SitePoint Sponsor |
|
User Tag List
Results 1 to 24 of 24
-
Aug 31, 2005, 03:26 #1
- Join Date
- Apr 2005
- Posts
- 41
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
When is it time to move to open-source framework?
Here is my situation:
I am building my own sort of framework, that has database (via AdoDb), filesystem, forms, and template classes.
I have this gut feeling that I am re-inventing the wheel...
When do you think it is the time to move to availabel open source frameworks?
And what, in your opinion, is the most straight-forward, no-nonsense framework out there?
Your personal experience and insights are very valuable.
Thank you,
Jason
-
Aug 31, 2005, 04:25 #2
- Join Date
- May 2005
- Location
- Finland
- Posts
- 608
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by JasonM
As for PHP... well, there isn't one as far as I know.
-
Aug 31, 2005, 04:40 #3
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Ezku
When to move? Whenever you get bored re-inventing the wheel
DouglasHello World
-
Aug 31, 2005, 06:46 #4
- Join Date
- Jul 2004
- Location
- Oklahoma
- Posts
- 119
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Ezku
-
Aug 31, 2005, 08:20 #5
- Join Date
- Apr 2005
- Posts
- 41
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for your replies, guys.
I actually installed RoR and started playing with it. Even bought a book!
Several big cons for me:
1. Not supported at web hosts.
3. New language to learn.
BTW, just today I found out a RoR alternative for PHP, called CakePHP.
Am I correct in saying that Mojavi is good for designing the "skeleton" MVC? Could not find db, filesystem, template classes in there.
Anyone that has a real-life experience using the frameworks, please chip in.
Thanks,
Jason
-
Aug 31, 2005, 08:34 #6
- Join Date
- Jun 2004
- Location
- Copenhagen, Denmark
- Posts
- 6,157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
prado seems to be the most complete framework currently. It has a lot of support in the community too.
Mojavi is mostly concerned with the controller-part as you have figured out. You could combine it with a template-engine and a db-layer or ORM, and you have a full package. propel is probably the best shot at a ORM currently (though it's primarily php5).
WACT is an option too, but it's kind of experimental.
I'm not impressed of cake.
-
Aug 31, 2005, 08:49 #7
- Join Date
- Jul 2004
- Location
- Oklahoma
- Posts
- 119
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by JasonM
-
Aug 31, 2005, 14:37 #8
- Join Date
- Apr 2005
- Posts
- 41
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks, guys.
It looks like Prado and Mojavi are the top contenders.
Has anyone used Prado? Can you completely rely on its code repository for the common tasks? Can it be extended with your own classes? No straight answers on the website, so if you are using it for your projects, please let me know:-).
I'm thinking that if there is too much learning to do for Prado, the better way is to use Mojavi and dress it up with the familiar classes (via phpclasses.org). The only thing is that there isn't much documentation on Mojavi.
If you were in a position to take a leap from procedural/partial oop to full oop, which route would you take? Ideally, the goal is to have a reliable and extendible framework to allow for reasonably fast development. I am mainly concerned with site-building and creating various small tools (i.e. conversion tracking script, simple order fulfilement system, simple ticket system - these are some that are on my list).
Thanks!
-
Aug 31, 2005, 16:03 #9
- Join Date
- Jun 2004
- Location
- Atlanta, GA
- Posts
- 21
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I agree you're probably better off with Mojavi than Prado. Prado is PHP5-only, after all, which goes against your number one objection to Ruby on Rails (lack of hosting). About that concern, though, if you're writing stuff for your own use rather than a distributable, packaged application, you shouldn't let the sparse number of hosts for Ruby on Rails or PHP5 dissuade you from either technology. At this point, a host that supports Rails or PHP5 is probably really good, meaning the people who run it are savvy and friendly toward developers.
You should look at freed php classes. Right now it's not available in all its glory (see the message on the front page), but it's a site that redistributes all the code from phpclasses.org without requiring you to register (or pick a mirror, look at ads, etc.). The people running it are really snarky, too, so it's fun.
As far as route from procedural to oop, I wish I had bought PoEAA a long, long time ago. Advanced PHP Programming (that's the author's Amazon Associate ID in the url, not mine) is very good, too. I'm not sure how adept you have to be to "get" PoEAA, but you should definitely try. Also, get familiar with test-driven development right away (see SimpleTest). And use Subversion or other version control. And use PEAR coding standards.
Watch out for code smells.
PHP doesn't have anything close to a "standard" framework (the way Rails has become the "standard" web application framework for Ruby). Mojavi has a good bit of mindshare but it's a lot of work to understand and it only handles one "layer" (the Controller, like k said). WACT is very impressive (the wiki has a wealth of non-WACT-specific info, too), but it's really ... dense, I guess. And underdocumented. Prado's also very impressive but its event-driven paradigm is hard to conceptualize in a web environment (for me).
In a nutshell, don't expect to be able to reuse much of your code. You'll probably end up writing a framework and using it for a couple of things, then rewriting it from scratch several times. Until PHP has a Rails-killer, that's probably just how it's got to be.
-
Aug 31, 2005, 17:25 #10
- Join Date
- Mar 2004
- Location
- Australia
- Posts
- 101
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
begin biased rubbish...
Prado may be overkill for a few simple web pages. Some of the advantages are the idea of components (of course, not an original idea). Where each component (your own and packaged) are responsibile for their own interactions. And the usage of these components are very simple in most cases. The other advantages are the events associated with these components, hence the interaction between components. There are also the form validators which does both client-side and server side validation.
Down side of Prado:
It is heavyweight, thus it can be slow with simple pages (easy way out, install Zend cache and optimizer, eAcceleator doesn't seem to work well with php5, haven't tried others). But we haven't seem any reports of load problems in large production servers.
It has a page life cycle that may be intimidating at first.
The user documentation is not complete (the wiki does contain about 500 pages, most of them in english, and can be downloaded as a CHM file), the API docs are complete.
Has anyone used Prado? Can you completely rely on its code repository for the common tasks? Can it be extended with your own classes? No straight answers on the website, so if you are using it for your projects, please let me know:-).
But no kitchen sink, an ORM is not provided, but Adodb is bundled.
Prado is PHP5 only.
Oh yeah, video, http://xlab6.com/video/ (could be too long I think)
end my biased rant...
At the end of the day, you need to chose carefully and chose one framework, because once work is commited in one framework, it gets very hard to move it into another. Frameworks will tend to force you into particular set of ways in doing things. And often, similar frameworks are not compatiable with each other. Of course, trying a few of them out before getting hands dirty may be time well spent.
Cheers, Wei.
-
Aug 31, 2005, 17:56 #11
- Join Date
- Jul 2003
- Location
- New York
- Posts
- 57
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm also a user of Prado and It's been really great to use. I'm not the type to use other frameworks and have even been developing/using my own until I read about prado. Since then, I've ported my code to it and have been developing a complete web app with it since February. As wei said, the page life cycle is intimidating at first, but everything else was generally an easy learn. Good news is, the next version of Prado is supposed to get rid of the page life cycle
.
viveHosting.com
Affordable Hosting, Reliable Service
-
Sep 1, 2005, 02:42 #12
- Join Date
- Apr 2005
- Posts
- 41
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks Webservant and others for your advice. Professional PHP Programming book is on my wish list.
Sheesh... I am back where I started.
Prado is PHP5 (didn't know that) - not supported by my webhost.
Mojavi is 'just' a controller.
I looked at WACT and I will probably give it a try some time later, but for now, I'm going to stick to what I already know.
I hate the idea of having to learn another language (framework) only to find out later that it actually limits my options. I guess the reason why I have been playing with php for 2 years is to be able to do things my own way. My approach to things has been to basically wrap any new class with my own interfaces.
-
Sep 1, 2005, 03:27 #13
- Join Date
- May 2005
- Location
- Finland
- Posts
- 608
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The one problem with PRADO: it generates invalid XHTML. That's a big no-no. I have to say I'm eager to see what PRADO v3 will bring along, as it's promised to be fully XHTML compliant among other things.
-
Mar 16, 2006, 05:42 #14
- Join Date
- Apr 2005
- Posts
- 41
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I am with Symfony now:-)
-
Mar 16, 2006, 12:35 #15
- Join Date
- Mar 2004
- Location
- Shorewood, IL
- Posts
- 42
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
JasonM,
Being a little biased myself, I would suggest taking a look at CakePHP. I know people here have mentioned they are not impressed, but there are many who use it and love it.
People who make comments on this forum have not looked at Cake lately IMO.
Stop by the irc channe, on avg. we have about 45 people there how are willing to help.
#cakephp at irc.freenode.net
Goggle Group is also good for help
Google Group
Open Source project using Cake
CakeForge
Here is a tutorial I will be doing shortly over a 6 step process. This biggest part of this tutorial will be showing how associations work within the framework.
Building Cake Bakery
The source code for step 1 is there for download, it uses scaffold, but will show you how easy it is to work with cake.
As for extending cake, there are many bloggers who have wrote on how to extend it for their uses.
-
Mar 17, 2006, 06:58 #16
- Join Date
- Apr 2005
- Posts
- 41
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
1PhpNut,
I've eaten my grain of salt with installing symfony already:-), I don't want to switch horses in the middle. Have nothing against CakePHP. If symfony won't work out for me, it will be the next on my list.
-
Feb 19, 2007, 09:20 #17
- Join Date
- Apr 2005
- Posts
- 41
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Guys, it's official. Symfony is now 1.0. My year-long quest for php framework is over. If you are not satisfied with writing spaghetti code and do not want to re-invent the wheel, Symfony would suit you nicely. Head over to http://www.symfony-project.com and check it out yourself.
P.S. I am not affiliated with Symfony development in any way. I am just amazed how much a dedicated team of programmers can do for the php community in a just one year.
-
Feb 19, 2007, 16:27 #18
I prefer CakePHP. It's amazing.
ncarlson.net - a programmer's dystopia
-
Feb 20, 2007, 12:33 #19
- Join Date
- Mar 2005
- Posts
- 423
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I've kind of developed my own php4 framework, and agree that "reinventing the wheel" is tiresome. I'll will take the jump to either the zend framework or symfony when i have to move to developing php5.
As for that freed php classes site, it seems to be down due to some legal stuff. I've never spent more than 2 minutes on php classes. It's absolutely horrific to look at and i find more organization in a tin of baked beans.
-
Feb 20, 2007, 13:11 #20
- Join Date
- Jul 2004
- Location
- Netherlands
- Posts
- 672
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Go visit my site :-D you know you want to ;-)
www.mech7.net
-
Feb 20, 2007, 15:32 #21
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
> As for PHP...
There is now
Take a look at Zend Framework, either that or Symfony; I've not particularly used them but I've poured an amount of time over the pair of them, and compared against the others, ie Cake for example (Solar for another), these two are about the only ones of note in my view.
And I'm not associated with any of the two, it's just that the design has something the others lack.
-
Feb 20, 2007, 15:34 #22
- Join Date
- Jul 2004
- Location
- Netherlands
- Posts
- 672
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Go visit my site :-D you know you want to ;-)
www.mech7.net
-
Feb 23, 2007, 16:33 #23
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well...
Code:<div id="content"> <?php if ($this->controller->Session->check('Message.flash')) $this- >controller->Session->flash(); ?> <?php echo $content_for_layout?> <div class="clear"></div> </div> <!-- #content --> <div id="footer"> <p> CakePHP : <a href="http://www.cakefoundation.org/pages/copyright/">© 2006 Cake Software Foundation, Inc.</a> </p> <a href="http://www.w3c.org/" target="_new"> <?php echo $html->image('w3c_css.png', array('alt'=>"valid css", 'border'=>"0"))?>
PHP Code:... $this->controller->Session-> ...
I can do it,
PHP Code:// abstract Page class
public function __construct( QDataspace_Interface $nodes ) {
$this -> import( $nodes );
} // ...
The task of the Controller is to only delegate to a View and nothing more; Not to directly interact with it - the -beep- View shouldn't know about the -beep- Controller.
-
Feb 24, 2007, 14:22 #24
- Join Date
- Feb 2007
- Posts
- 9
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Guys i don't want to look like i'm spamming about Limb3 in one more thread but have a look at its CRUD application located in web_app package examples. It's quite interesting how model, controller and view(WACT based) look like, it's quite promising.
Bookmarks