--

database or file

Ah, here I go again.

I have to make a final decision.

1.  Do I do code generation from meta data in a database, and load up templated web pages that are built dynamically.

-all data must be housed in a customizations table with meta data about the new structure/module/page you are adding


2.  Or do I load up only part of the data from meta data in the database, and create files that are more static?

--only basic table data in the database, and when you press a button, you are creating actual html pages on the disk.  More flexibility because you aren't limited to the html file templates I provide.  You can generate a base html template, edit it as you wish to show data/design the way you want.


I dunno.  Large systems tend to do files (#2).
Permalink Send private email sharkfish 
September 13th, 2006 12:02am
#2 is a heavier lifting solution, and I suspect will be harder to maintain and debug. Do you really need that kind of flexibility?
Permalink Send private email Steel McLargeEsquimaux 
September 13th, 2006 12:05am
> Large systems tend to do files

They do both really. They start off as files because that's what people usually do then they fight each other over how to move it into the database.

There's a three. (1) plus a caching layer. You don't need to generate static files

On (2). Will anyone ever really generate a template or is this just a feature that sounsd like a good idea?
Permalink son of parnas 
September 13th, 2006 12:08am
the templates are for me, the developer.  Everyone wants their own itty bitty customization.

So I want to be able to do that with minimum work.  Make a table, hit a button, generate the class code, generate the html, compile (or use a scripting language instead) and load up the new pages.
Permalink Send private email sharkfish 
September 13th, 2006 12:10am
> So I want to be able to do that with minimum work.

Editing the database or the sql load file is pretty easy too.
Permalink son of parnas 
September 13th, 2006 12:11am
But what if I want to hand over some abilities to the user?
Permalink Send private email sharkfish 
September 13th, 2006 12:13am
> But what if I want to hand over some abilities to the user?

They will never ever edit a text file. So you need a GUI. The GUI can be over a template file or directly over the database. Or you can just provide a simple API to change the tweakable things.
Permalink son of parnas 
September 13th, 2006 12:15am
A GUI to the text file.

Of course they won't edit the file itself.

If you have ever looked at SugarCRM, they have a table with references to base tables to custom column data for those tables. Those tables are edited by javascripted fancy schmancy GUI pages that update that table and write some changes to disk/file.

I don't like it so much because of the need to give permissions to write to disk from the web.  On the other hand, it is neat to do basic edits using the GUI, then advanced users can go and edit the files directly.

Database storage inhibits you on what kinds of changes you can make, so if for every added module, it has its own files, and therefore, own sandbox, you can let users/developers play.

Hmmm.
Permalink Send private email sharkfish 
September 13th, 2006 12:21am
(son of parnas strikes as someone who isn't a dreamer :) )
Permalink Send private email sharkfish 
September 13th, 2006 12:22am
Sing it with me, SoP:

"I'd like to teach the world to sing, in perfect harmoneeeeee!"
Permalink Send private email sharkfish 
September 13th, 2006 12:23am
if sharky's really talking about a CRM system, then yes, the user needs to be able to edit the templates.
Permalink Send private email Steel McLargeEsquimaux 
September 13th, 2006 12:24am
> I don't like it so much because of the need to
> give permissions to write to disk from the web.

That's one problem. Who checks those files for validity? If you load balance how do changes get transactionally replicated? How do you backup and restore? Using the database solves all these problems, while certainly creating some others.

> then advanced users can go and edit the files directly.

Then you have to document the file format. You have to handle gross editing fuckups. People have to remember what they changed when doing upgrades.

> Database storage inhibits you on what kinds of
> changes you can make

How so?

> (son of parnas strikes as someone who isn't a dreamer :) )

I dream of being able to teach the world to sing.
Permalink son of parnas 
September 13th, 2006 12:31am
"> Database storage inhibits you on what kinds of
> changes you can make

How so? "

Because web pages have lots of possibilities.
Permalink Send private email sharkfish 
September 13th, 2006 12:38am
> Because web pages have lots of possibilities.

I find usually the acceptable changes are pretty small, unless you are making an authoring system. Trying to allow for any possible change takes a lot of work and it will probably never be used.
Permalink son of parnas 
September 13th, 2006 12:42am
I love the whole dynamic nature.

I create table with some columns and an id. Click a button, I get my edit, list, detail views.  The CSS makes it look exactly like you want, including hide fields.


I think I'll stop overthinking this and see what the requests are before my head explodes.

I think I'm hearing some wisdom from you, SoP.  Trouble is, I am going to be the one making all these customizations.

Setting limits is hard for me.  One of the personality flaws that is both positive and negative.
Permalink Send private email sharkfish 
September 13th, 2006 12:50am
> Setting limits is hard for me.

Interesting. I don't see it as you setting limits, but the problem and the solution space setting the limits. You are just the conduit.
Permalink son of parnas 
September 13th, 2006 12:53am
sharkfish is just the conduit in a different level of problem abstraction. She has her own discretion to set the limits with what she's working now. I guess that's the reason why we have a thread in the first place :)

If I had to work on this, I would mimic the SharePoint architecture. It's not because it is inherently good or anything. It's because they would've come across problems and made modifications which I don't like to encounter them again and do it.
Permalink Send private email Senthilnathan N.S. 
September 13th, 2006 3:24am
Sharkfish,

I've got most of Option 2 already implemented.  I definitely have the database-schema -> objects & screens & controllers.  I've also got the templating library.  Managing the static HTML generation is a little tricky but it can be done.  The biggest part is keeping thing in sync and knowing what has to be updated.

Check out http://www.ceamus.com/objbuilder/ for the object-relational mapper part.  I don't actually have templates to generate the user interaction HTML, but it wouldn't be hard at all.  It was just a lot faster given my time constraints to write the HTML templates myself.
Permalink Send private email Clay Dowling 
September 13th, 2006 8:31am
> It's not because it is inherently good or anything.

Why not just kill yourself now? What a shit approach.
Permalink son of parnas 
September 13th, 2006 10:41am
Oh sorry. I guess I wasn't clear. I actually meant that it isn't very good or something. I didn't add that it was good enough and it wasn't inherently bad either... :)
Permalink Send private email Senthilnathan N.S. 
September 13th, 2006 11:14am
"Check out http://www.ceamus.com/objbuilder/ "

Hmmm. I'm doing something pretty similar, only probably not command line though, because I also want to control page layout.  I'm considering doing a free, hosted version with ads.  Haven't thunk it through, but if I take that route, I'll also want an automagic set-up.

Good stuff there, Mr. C++ web developer. Now if you were really smart, you'd have a scripting language to add changes/modules :p
Permalink Send private email sharkfish 
September 13th, 2006 1:13pm

This topic is archived. No further replies will be accepted.

Other topics: September, 2006 Other topics: September, 2006 Recent topics Recent topics