SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist tetsuo shima's Avatar
    Join Date
    Oct 2005
    Location
    Switzerland
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What's your lovestory with Frameworks these days?

    Hello,
    Every once in a while, I check what framework people are using. I know it's usually not the kind of fascinating threads but it's always interesting, especially now that PHP6 appears in the horizon.

    So go ahead. Name the framework, and say why you're using that one.

    The SEO Faq thread
    Dependency injection made easy: Phemto

  2. #2
    SitePoint Enthusiast
    Join Date
    Oct 2001
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm using my own framework, built in house over the past couple of years, because it works well and does everything I need. Took a brief look at CakePHP and the Zend Framework a few months back but can't see the point in switching - if it ain't broke...
    Richard Lord
    Big Room - Flash & PHP development
    Ubiq - Actionscript & PHP training in the UK
    Search PHP & MySQL docs from IE7 & FF2 toolbar

  3. #3
    SitePoint Evangelist
    Join Date
    Aug 2004
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    good reasoning

    http://www.sitepoint.com/forums/show...5&postcount=53

    seperate what makes sense and finish the project [ KISS ]. over analysis is a growing problem .. look into agile development. sometimes the bells and whistles can complicate a relatively simple problem. Iterative approaches always come out with better code and more functionality.

    remember frameworks are designed by people that may not be designing applications you require. Although they can solve similar problems you cannot depend on the framework to provide all the functionality you need. Reasons why i am cautious with .net. So don't be bound to a box and experiment freely. Acknowledging mistakes are the cornerstone in a solid programmers lifetime.

    [ practice, experiment, and read from different authors using different languages... is probably the best advice. The more you know the more your able to pick and choose from when your designing.]

  4. #4
    SitePoint Enthusiast shref's Avatar
    Join Date
    Nov 2004
    Location
    Egypt, Alexandria
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Took a brief look at CakePHP and the Zend Framework a few months back but can't see the point in switching - if it ain't broke...
    if I have a good built in house FW I won't change my FW simply too.

    I'm now intersted in ZendFramework but didn't start any real project using it till now as you know it's still in version 0.2.0 . I did projects before using Cake, it's the fastest way to finish a php project, but the simplisty isn't every thing.
    Shreef
    blog: shreef.com
    twitter: @shreef

  5. #5
    SitePoint Addict n0other's Avatar
    Join Date
    Feb 2005
    Posts
    290
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't looked into Cake yet, nor I felt the need to do it after I discovered symfony. The reasons I use it are excellent documentation, an admin generator, the "not reinventing the wheel" attitude of core devs and fast app development speed.

  6. #6
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Always looking at other frameworks, but after the labriously looking to "outsource" my work needs, I still end up refining my own framework model, which is rather simple and consists basically of the following:

    1. Use of apache rewrite to funnel all requests through index.php

    2. OOP contained in a class directory.

    3. Templates in a template directory but nothing special other than:

    a. bind/variable substitution
    b. auto constant fill which really is a variation of (a) but allows autofill of "defined" constants...
    c. template "includes" (i.e, including header/footer and sub-templates like forms)

    There is a template class that allows me to create pages easily like this:

    Code:
    # DOCROOT.'/templates/'
    
    {#pageheader#}
    
    <h1>{=SITETITLE=}</h1>
    {{PAGECONTENT}}
    
    {#pagefooter#}
    
    # DOCROOT.'/modules'
    
    $p = new Simplate( 'default.tpl' );
    $p->set( 'PAGECONTENT', "stuff on the web page" );
    echo $p->generate();
    As stated, index.php acts as a controller and has includes for constants (convienence stuff like setting REQMETH to $_SERVER['REQUEST_METHOD'] and OP to @$_REQUEST['op'], etc....), a common library of functions (though very small and limited to stuff that is used by most of the scripts). There is a class I use to parse the "pretty urls" -- SITEURL."/arg1/arg2/arg3/..." and then include the correct module (i.e., SITEURL."/article/332" would call "article.php" in the modules directory and "332" would be the first of the script arguments...

    Finally, one important function in my common library is the magic method __autoload, which makes it so that the only require/include statements are in index.php and all other objects are dynamically loaded. This to me, is the biggest benefit of PHP (well, having close to true OOP also is a biggie...). Therefore I never have to fret over including too many modules or frequently refactor as I had to do with PHP4 with an expanding code base -- the first time I reference a class it is auto loaded...

    I usually code a class up for each database table, and I realize that the frameworks out there do this automatically, but most of the tables are simple cut and paste deals and the only real coding effort is initial. I don't like to get locked into one size fits all, however, as there are circumstances that make for simpler or more complex, even beastly details.

    While none of the PHP frameworks have tweaked my interest enough, I've done some Ruby on Rails development and while it beats the old fashioned PHP scripting, I don't think it's as fast and as robust as my own evolved framework. While Ruby > PHP as a scripting language IMV (fodder for another post!), in the web environment, RoR still falls short of PHP in many aspects -- especially in terms of deployment...

  7. #7
    SitePoint Zealot
    Join Date
    Jul 2005
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I also use one that I have been developing for my projects needs, though I do occasionally look at the pre-built ones out there for ideas and sometimes solutions to some problems. Like I really liked the way Zend Framework did the FrontController, Router, and Dispatcher, so I borrowed some of their ideas and adapted them to my needs.


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
  •