Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

As a hobby experiment I am creating a on-line tool for creating web sites with the ability to create custom HTML and CSS using a template engine for safe-use of functionality.

Now I am in the dilemma if I should save the template files in a "customers" folder, and create a tree view of this file structure - or if I should go for adding a new row in the database containing the mark-up and build a tree view from the table?

I will be doing revisions of the file changes, so i am moving more and more towards having the "files" (meta-data) stored in the database, instead of real files on the server, and just glue the pieces together in the presentation layer.

share|improve this question
    
Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see How to Ask –  gnat Oct 9 at 6:59
1  
Related stackoverflow.com/questions/8952/… –  Alex G Oct 9 at 9:42

1 Answer 1

I always prefer files for this purpose, simply because it makes the design easier for others to reuse and test:

  • There is no need to install or maintain a database.
  • You can clone or move your "database" simply by cloning or moving the file system.
share|improve this answer
    
without an explanation, this answer may become useless in case if someone else posts an opposite opinion. For example, if someone posts a claim like "I never prefer files for this purpose, simply because it makes the design harder for others to reuse and test.", how would this answer help reader to pick of two opposing opinions? Consider editing it into a better shape, to fit How to Answer guidelines. –  gnat Oct 10 at 16:26
1  
@gnat: thanks. I tried to expand the answer. Please provide some more constructive comments. –  Frank Hileman Oct 10 at 16:34
    
@gnat: "additional" constructive comments. Your comments are all constructive! –  Frank Hileman Oct 10 at 17:20
    
as far as I can tell, recent edits addressed concerns in my prior comment –  gnat Oct 10 at 18:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.