[cgiapp] Re: OO MVC jumpstart/starter application

Bill Stephenson bills at perlhelp.com
Mon Dec 22 14:08:12 EST 2008


I'll be getting the "OO MVC jumpstart/starter application" soon and I'm 
looking forward to learning from it.

I'd like to make a suggestion that someone create a sample app that 
uses CGI.pm's built-in "Save" routine to store data:

	open(my $FILE, "> $selected_file");
	$DATA->save($FILE);

And, the built-in data retrieval routine:

	open(my $FILE, "$selected_file")) {
	$DATA = new CGI($FILE);

I don't really code SQL much, so I admit this request is selfish and 
that I'm too lazy to want to learn a SQL, but I honestly don't think 
that all apps need an industrial strength database engine to 
store/retrieve data, and, if my app is designed well it should be 
simple to switch from the above suggestion to an SQL database.

I think this would be useful for RAD prototyping and proof-of-concept 
uses too.

I'll point out that this method is pretty fast too. If, for example, 
you just want to load a users stored preferences data into an object, 
and you know where the data file is at, ($user_path/$user) then this is 
probably as fast as MySQL (maybe faster).

This also makes it easier to focus on learning about the CGI::App 
framework when going through a starter application exercise.

I played with this a couple years ago myself, but I'm not qualified to 
create a solid example app (I easily qualify to need one though ;)  I 
completed most of the features in the "starter application", but it was 
hacked together pretty crudely. I'd submit it if I thought it be of any 
use, but I'm pretty sure that at best you'd only get a chuckle or two 
out of it.

Kindest Regards,

--
Bill Stephenson



More information about the cgiapp mailing list