SitePoint Sponsor

User Tag List

Results 1 to 24 of 24
  1. #1
    SitePoint Enthusiast
    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

  2. #2
    SitePoint Guru
    Join Date
    May 2005
    Location
    Finland
    Posts
    608
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by JasonM
    And what, in your opinion, is the most straight-forward, no-nonsense framework out there?
    Ruby on Rails.

    As for PHP... well, there isn't one as far as I know.

  3. #3
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ezku
    Ruby on Rails.
    If you want something that works right out of the box for web applications, that's the one to pick.

    When to move? Whenever you get bored re-inventing the wheel

    Douglas
    Hello World

  4. #4
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    Oklahoma
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ezku
    Ruby on Rails.

    As for PHP... well, there isn't one as far as I know.
    If you're still dealing with PHP4 I'd recommend Mojavi (http://www.mojavi.org). I can't say I recommend the PHP5 version though.

  5. #5
    SitePoint Enthusiast
    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

  6. #6
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    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.

  7. #7
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    Oklahoma
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by JasonM
    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
    Pretty close. It doesn't supply a lot of that by default, therefore giving you the option of choosing whatever DB Abstraction and templating system you're comfortable with. Check the forums for a lot of information on using whatever systems you're already comfortable with.

  8. #8
    SitePoint Enthusiast
    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!

  9. #9
    SitePoint Member
    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.

  10. #10
    SitePoint Zealot
    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:-).
    What are common task? Form validators, datagrid, datalist, form wizard, localize number and date formatter based on ICU, string formatter (for localization), an extended Prototype javascript library, and standard form components are included (+ TinyMCE and a datapicker).

    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.

  11. #11
    SitePoint Enthusiast
    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

  12. #12
    SitePoint Enthusiast
    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.

  13. #13
    SitePoint Guru
    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.

  14. #14
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am with Symfony now:-)

  15. #15
    SitePoint Enthusiast
    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.
    /**
    * @author Larry E. Masters aka PhpNut
    * @url CakePHP Rapid Development Framework
    */

  16. #16
    SitePoint Enthusiast
    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 .

  17. #17
    SitePoint Enthusiast
    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.

  18. #18
    SitePoint Guru Nick Carlson's Avatar
    Join Date
    Aug 2003
    Location
    Denver
    Posts
    644
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I prefer CakePHP. It's amazing.
    ncarlson.net - a programmer's dystopia

  19. #19
    SitePoint Evangelist
    Join Date
    Mar 2005
    Posts
    421
    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.

  20. #20
    SitePoint Guru
    Join Date
    Jul 2004
    Location
    Netherlands
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You page does not work with me

    Page BuildingCakeBakery not found

    Quote Originally Posted by 1PhpNut View Post
    JasonM,
    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.
    Go visit my site :-D you know you want to ;-)
    www.mech7.net

  21. #21
    Non-Member
    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.

  22. #22
    SitePoint Guru
    Join Date
    Jul 2004
    Location
    Netherlands
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you explain what the design exactly lacks what the others do have ?

    Quote Originally Posted by Dr Livingston View Post
    And I'm not associated with any of the two, it's just that the design has something the others lack.
    Go visit my site :-D you know you want to ;-)
    www.mech7.net

  23. #23
    Non-Member
    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/">&copy; 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"))?>
    That is a snippet from one of the tutorials based on the framework. I have to ask myself why do we have this in the View/Template?

    PHP Code:
    ... $this->controller->Session-> ... 
    Since when does the View need to know about data persistence huh? Sure, the relationship between the Controller and SESSION is valid but a better solution would be to have the Controller pass in the data to the View it's self instead, and just leave it to the View to access them as and when required;

    I can do it,

    PHP Code:
    // abstract Page class
    public function __constructQDataspace_Interface $nodes ) { 
    $this -> import$nodes );
    // ... 
    The $nodes is just your basic data container [abeit in my case, with some logic] which isn't too difficult to achieve; The way Cake PHP does it, to many people, may not be a problem or issue, but it is for me - it clearly breaks the layers.

    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.

  24. #24
    SitePoint Member
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •