I’m working on an app that allows users to customize an HTML design
template to suit their needs. The user will be able to customize css
through a graphical interface and then output an HTML for their usage.
The basic idea is that each ‘design’ would have a variety of canned
‘styles’ or the user can create a ‘custom’ one. My current thinking on
the DB was that I would have a something like the following:
Designs - has many styles (columns: name, HTML, ?)
Styles - belongs to design (columns: name, HTML, ?)
Users (name, password, ?)
My questions are as follows.
First what columns do I need to add to my DB?
I will be displaying the current design (the one that the user is
customizing) on the lower portion of the page as the user makes changes.
They will be able click a button to update the preview as they move
through the customization. Where should I store these HTML pages that
user can customize? Should I load all the HTML into a DB and then when a
user wants to customize one, create a copy associated with that user and
allow them to customize that version?
If the user is basically editing css through a GUI, should I be storing
each value in a DB (i,e, heading font-size= 2em, heading color=red, etc)
and then use erb in my html design to reflect whatever the user has
selected? So when they click the preview I would just pull the various
css values from the DB and dump them into that html file when it’s
displayed for them.
btw, I’m thinking of dumping the css inline so the user will have
everything in one final HTML file.
Any thoughts on how to proceed would be great. If you haven’t figured it
out by now, I’m noob at rails…