SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Guru
    Join Date
    Jan 2005
    Location
    heaven
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Doophp -- "It might be the fastest MVC based PHP framework in the world!"

    I randomly found this website claiming it was the fastest framework "Ever" and chuckled a bit. I gave it the benefit of the doubt and took downloaded it and gave it a gander. They maybe right. It might be one of the fastest php frameworks out there simply because it doesn't actually do much -- aside from repeating itself incessantly. Its some what laughable. After about 5 files I stopped reading. It has lots of comments but most of what I saw was OOP wrappers for php functions.

    PHP Code:
    class DooApcCache{
    //...
        
    public function flush($id){

            return 
    apc_delete($id);

        }
    // ... 
    I could have just called apc_delete and have been done with it why do I need a class for it?

    PHP Code:
    class DooController {
    //...
        
    public function db(){

            return 
    Doo::db();

        }

    //...

        
    public function acl(){

            return 
    Doo::acl();

        }

    //...

        
    public function render($file$data=NULL$process=NULL$forceCompile=false){

            
    $this->view()->render($file$data$process$forceCompile);

        }

    //... 
    Since when is it the controllers job to render the view, build an ACL or instantiate a database connection? I thought the the purpose of the controller was that of handling requests and responses? I wasn't aware of a database request specified in HTTP/1.1 o.O. That's amazing!

    In any case if you want a giggle take a look its a good lesson in what NOT to do.
    Creativity knows no other restraint than the
    confines of a small mind.
    - Me
    Geekly Humor
    Oh baby! Check out the design patterns on that framework!

  2. #2
    SitePoint Zealot Amenthes's Avatar
    Join Date
    Oct 2006
    Location
    Bucharest, Romania
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by imaginethis View Post
    Since when is it the controllers job to render the view, build an ACL or instantiate a database connection? I thought the the purpose of the controller was that of handling requests and responses? I wasn't aware of a database request specified in HTTP/1.1 o.O. That's amazing!
    Since when are controllers HTTP specific? I don't get your point in the above
    quote. What component would you have render the view or open a database
    connection? The model?

    I'm not sure what those guys are doing with their database object, but as long
    as their not issuing queries inside the controller, and pass it along to a model,
    everything might just be fine (although I don't like the static call).

    ZF has a render() method in their base Controller too. CodeIgniter uses the
    same method of injecting the database connection as this Doo framework.
    After all, you have to somehow inject the database object somewhere in order
    to get it to your models, or rather data mappers. What I don't like is that
    they are using a Singleton.

    Also, what do you understand by handling of requests and responses?

    Quote Originally Posted by imaginethis View Post
    I could have just called apc_delete and have been done with it why do I need a class for it?
    Welcome to the adapter pattern. If you take a look at the other Cache
    implementations in the framework you'll see that they are implementing the same
    minimal interface:

    - get()
    - set()
    - flush()
    - flushAll()

    If you'd rather use apc_delete() in your controller, then you're doing it wrong.

    Last but not least, don't bash at them. He's a developer just like you, he makes
    mistakes and improves himself. I bet you are the same.

    On a funny note though...
    Quote Originally Posted by imaginethis View Post
    ...but most of what I saw was OOP wrappers for php functions.
    The whole PHP language would benefit from a consistent wrapper, OOP or not.
    I'm under construction | http://igstan.ro/

  3. #3
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Woah, you posted a thread slating their framework and now their forum has a thread slating this thread! Will it ever end?

    That framework is... laughable... but in the end that's the authors interpretation of mvc. He has absolutely NO idea about OOP, and unfortunately the users have picked up on this and seem to think that OOP is putting a function inside a class.

    Anyway, in the end it's upto them to think about their code. Sure, it has the functionality of a peanut but it does it slightly faster...
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  4. #4
    SitePoint Guru
    Join Date
    Jan 2005
    Location
    heaven
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To be honest I didn't really go through more than 5 or so files. I was overly critical before I started reading simply because of the comment plastered over the sight "fastest PHP framework"... which is on me. I should have been a tad more optimistic.
    Creativity knows no other restraint than the
    confines of a small mind.
    - Me
    Geekly Humor
    Oh baby! Check out the design patterns on that framework!

  5. #5
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    No, you shouldn't have been. Your judgment was right, though slightly bending towards purism (which, to be honest, isn't always a bad thing)
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  6. #6
    SitePoint Guru
    Join Date
    Mar 2006
    Posts
    701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyway, we have an opportunity again to vote the framework of our choice

  7. #7
    SitePoint Addict SirAdrian's Avatar
    Join Date
    Jul 2005
    Location
    Kelowna, BC
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I wanted the world's fastest framework, I'd create it myself in a few minutes. There is an obvious balance between speed and function (and maintainability).

    On one extreme end, you have a basic PHP file. Business logic is inside a function (M), controller decides what happens (C), and the view is the HTML at the bottom (V).

    On the other end, you have something like Zend which has a very deep hierarchy of classes.

    The first is faster. Who cares? It's useless. The reason we use MVC in the first place is to better separate our code, to help make it more flexible and easier to maintain.

    Code:
    Fast, Useless                           Slow, Amazing
    ----------------|------------------------------------
    Anyway, I didn't look much further than the website. The claim bugs me too, for the reasons stated above, and I doubt I'll ever use it. I wouldn't go as far as flaming them, though.

    To me, it boils down to this:
    development time is more expensive than hardware
    Adrian Schneider - Web Developer

  8. #8
    SitePoint Guru Ruben K.'s Avatar
    Join Date
    Jun 2005
    Location
    Alkmaar, The Netherlands
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want a really fast framework I'd look into python and Django

  9. #9
    SitePoint Addict Mastodont's Avatar
    Join Date
    Mar 2007
    Location
    Czech Republic
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by imaginethis View Post
    claiming it was the fastest framework "Ever" and chuckled a bit
    Try google some benchmarks, this framework is really fast. (no time to check reason)

  10. #10
    SitePoint Guru
    Join Date
    Jan 2005
    Location
    heaven
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ruben K. View Post
    If you want a really fast framework I'd look into python and Django
    I like python as a language. Its easy to learn and fun to play with. But I've been programming with C style languages for a little over a decade... Just a bit hard to transition out of the mind set ^_^
    Creativity knows no other restraint than the
    confines of a small mind.
    - Me
    Geekly Humor
    Oh baby! Check out the design patterns on that framework!


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
  •