Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: PureMVC PHP application - idbweb  (Read 4049 times)
vrtisworks
Newbie
*
Posts: 3


View Profile Email
« 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/

There is a readme at http://idbweb.sourceforge.net/readme.html, and a sample site at 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
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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>
Logged
vrtisworks
Newbie
*
Posts: 3


View Profile Email
« Reply #2 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...
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #3 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>
Logged
Pages: [1]
Print