PureMVC Architects Lounge

Announcements and General Discussion => Public Demos, Tools and Applications => Topic started by: vrtisworks on May 31, 2009, 11:28:23



Title: PureMVC PHP application - idbweb
Post by: vrtisworks on May 31, 2009, 11:28:23
I have started a new application using PureMVC PHP as the base.  I am still in the process of getting all the pieces lined up on sourceforge, but have the code up on SVN and a distribution package that included my code and PureMVC.

http://sourceforge.net/projects/idbweb/ (http://sourceforge.net/projects/idbweb/)

There is a readme at http://idbweb.sourceforge.net/readme.html (http://idbweb.sourceforge.net/readme.html), and a sample site at http://idbweb.sourceforge.net/idbweb (http://idbweb.sourceforge.net/idbweb).  Not quite ready for general usage because I want to patch out the SQL updates and inserts to keep it from collecting too much junk.

Nick


Title: Re: PureMVC PHP application - idbweb
Post by: puremvc on June 01, 2009, 06:11:29
Cool! A great example. I'd suggest posting about this over in the PureMVC PHP forum as well.

In my quick look at the code, I'd make 2 minor suggestions:

Read this post about not reaching into the PureMVC apparatus from the index.php:
http://forums.puremvc.org/index.php?topic=1234.msg5721#msg5721

And reorganize the classes into model, view and controller folders rather than having them all in one big folder. (i.e instead of iwbase/classes/*, have iwbase/model/*, iwbase/controller/*, iwbase/view/*).

This will make it more recognizable to others since it is the standard PureMVC project layout. And it will make it more maintainable. As the number of classes grows (and even now) you have to look and look to find the file you want in this long folder listing, and the classes arent grouped by type, they're alphabetical.

-=Cliff>


Title: Re: PureMVC PHP application - idbweb
Post by: vrtisworks on June 04, 2009, 06:15:31
Cliff,

Thanks for taking the time to review the code.  And thanks for the suggestions.

You are right about moving the code into the appropriate directories.  I've been sort of lazy on this during the early development because I end up bouncing between the three files involved in each of the idb tables.

I'm not sure I understand your suggestion about index.php. Should I be moving the creation of idbConfigInfo into the Facade?  That's what I think the link you posted was saying...

Thanks again...


Title: Re: PureMVC PHP application - idbweb
Post by: puremvc on June 04, 2009, 01:50:49
Essentially, the index.html shouldn't be doing things like sending notifications. The following should be about the extent of what it does to start:

:
$facade = ApplicationFacade::getInstance();
$facade->startup( $_SERVER['PHP_SELF'] );

Then inside your startup, you do all the PureMVC related stuff.
-=Cliff>