SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 76

Hybrid View

  1. #1
    ********* Articles ArticleBot's Avatar
    Join Date
    Apr 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Article Discussion

    This is an article discussion thread for discussing the SitePoint article, "The CakePHP Framework: Your First Bite"

  2. #2
    PHP Brainiac dg_den_golotyuk's Avatar
    Join Date
    Jul 2006
    Location
    Kiev, Ukraine
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm to use this framework from recent time. I like it very much. It is a good tool for middle-complexity web-projects
    DG [Den Golotyuk], Lead Developer
    Chestnut Software
    Avoid web outsourcing scams!
    Click here
    for a free downloadable report

  3. #3
    SitePoint Evangelist spinmaster's Avatar
    Join Date
    Mar 2005
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice read... another Framework worth a look for small to medium size webapps is Code Igniter! I like CI even better than CakePHP.

  4. #4
    SitePoint Member pixelguru's Avatar
    Join Date
    Jul 2003
    Location
    Newark, DE
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spinmaster
    Nice read... another Framework worth a look for small to medium size webapps is Code Igniter! I like CI even better than CakePHP.

    Thanks for introducing me to CodeIgniter. It's exactly what I needed.
    Last edited by pixelguru; Jul 16, 2006 at 12:09. Reason: add original message

  5. #5
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For those that have used the framework, what has been the performance? any issues?

  6. #6
    PHP Brainiac dg_den_golotyuk's Avatar
    Join Date
    Jul 2006
    Location
    Kiev, Ukraine
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bbolte
    For those that have used the framework, what has been the performance? any issues?
    Many issues. This framework is a standard tool. It is not giving you all abilities you need. Before using it - you must consider a project functional specification with it. But it is really usefull for easy and middle-complexity projects
    DG [Den Golotyuk], Lead Developer
    Chestnut Software
    Avoid web outsourcing scams!
    Click here
    for a free downloadable report

  7. #7
    SitePoint Evangelist -T-'s Avatar
    Join Date
    Jun 2002
    Posts
    444
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After reading the article I've desided not to use Cake. It looks nice for simple things. But as soon as you start doing complex stuff, you will find yourself battling the limitations of the framework. Which is a pain in the buttocks
    chrome is a wrapper that combines a browser with spyware

  8. #8
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Shorewood, IL
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by -T-
    After reading the article I've desided not to use Cake. It looks nice for simple things. But as soon as you start doing complex stuff, you will find yourself battling the limitations of the framework. Which is a pain in the buttocks
    This is not the largest application built using CakePHP, but was a cool project to develop for the client...

    Not so simple application built with CakePHP

    Limitations, if reached are easy to overcome...
    /**
    * @author Larry E. Masters aka PhpNut
    * @url CakePHP Rapid Development Framework
    */

  9. #9
    SitePoint Enthusiast mutant's Avatar
    Join Date
    Apr 2004
    Location
    Gallifrey
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've tried to pick up cake on several occasions to "fill the gap" on some project. In the end, I've never gotten it to fit, there is a large gap in examples.. Excluding Hello World, and Your first blog. Cake assumes you'll automagically know the proper/best/their way of doing things, and when you don't you can't really find examples of how to do things the "right way".

    The html handling is also pretty basic, I had a need for multiple skins for a site based on different environmental factors, and I found myself struggling more with the skin handling than writing for the business logic of the site. Default cake installs it's own cake templates if you don't have anything there, but this makes it hard to figure out what you have to put out there.

    I'm also concerned that I've not seen any "big" apps deployed in Cake. Rails has tons of examples like most of the stuff from the folks that did BasecampHQ. I've just not seen Cake really picked up in general.

    One of the best parts about Cake can also be a big old pain in the ****. Cake itself is kept ENTIRELY separate from your code, I think this is AWESOME. Upgrading cake distrobutions becomes so much simpler, since you don't have to worry about hacks, and other issues it all just upgrades nicely. I did download a previous cake version, wrote a couple quick apps then upgraded it with no problem. Of course there may be times where your code might conflict, but the chances are also so much less than other frameworks.

    This separation is also a major pain in the neck until you get to understand it. For the longest time I threw my hands up in the air and left it in the "development" state because everytime I tried to break out the directories, it blew up on me. I hate fighting with a framework! In the end I finally understood it, and the crazy pathfinding capabilities, but it's a pain unless you get it, and getting it can be tough.

    In all, I've not seen a project through to completion with Cake, I'm certain it's because I find I can get things done faster doing it "my way", no matter how much I would like to use this type of framework.

    I'd like to see some applications come out using Cake that are groundbreakers, I think the developers have a good thing, if the rest of us can wrap thier heads around it.

  10. #10
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hate coding sql,and I was going to have a try for a long time.But now I find design a class which handle sql like cake is not hard .So I give up my plan.

  11. #11
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dg_den_golotyuk and Dean C: Care to elaborate? All both of you mention is a Framework/Cake being inflexible and not suited for complex projects, but you give no examples. And then I take a look at your portfolio/sites, and it looks exactly like something you could (and would) do with with Cake. So, I'm just wondering ...

  12. #12
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry. Couldn't reproduce the first simple exsample. How should the memo screen (http://www.cakephp.dev/notes/) appear after only creating two files (note.php and notes_controller.php) and a databse table? I see only the 404 apache message.

  13. #13
    SitePoint Addict
    Join Date
    Jul 2005
    Location
    USA
    Posts
    291
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rhenkel
    Sorry. Couldn't reproduce the first simple exsample. How should the memo screen (http://www.cakephp.dev/notes/) appear after only creating two files (note.php and notes_controller.php) and a databse table? I see only the 404 apache message.
    Bump for truth.
    1. Create two class files
    2. ???
    3. Profit!

    I'm using IIS. Is there something I'm missing or does the article assume I've taken other steps?

    Edit: The article mentions that IIS is supported by cake, but the solutions so far involve Apache and mod_rewrite. Is this article dependant on mod_rewrite?

  14. #14
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IIS does not support URL rewriting itself.

    Quote Originally Posted by an00bis
    I'm using IIS. Is there something I'm missing or does the article assume I've taken other steps?

    Edit: The article mentions that IIS is supported by cake, but the solutions so far involve Apache and mod_rewrite. Is this article dependant on mod_rewrite?
    1. Please check http://ask-leo.com/does_iis_support_url_rewriting.html for more details.

    2. This tutorial depends on mod_rewrite if you want it work just as taught to show something with only two files added. A way around mod_rewrite is try this link
    http://localhost/index.php?url=notes. And then when you add more views, e.g. add, edit, you manully change the link by inserting "index.php?url=".

    3. The answer to the post above is
    The example view shows up only on http://localhost/index.php?url=notes. So it seems the mod_rewrite isn't working.
    when changing httpd.conf, besides
    LoadModule rewrite_module libexec/httpd/mod_rewrite.so
    AddModule mod_rewrite.c (not needed for Apache 2.2)

    Make sure the AllowOverride is set to All for the correct Directory.

  15. #15
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    286
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rhenkel View Post
    Sorry. Couldn't reproduce the first simple exsample. How should the memo screen (http://www.cakephp.dev/notes/) appear after only creating two files (note.php and notes_controller.php) and a databse table? I see only the 404 apache message.

    me too facing the same problem . ..
    [COLOR=SlateGray]
    Web Developer @ VeriQual

  16. #16
    The Mind's I ® silver trophy Dark Tranquility's Avatar
    Join Date
    Sep 2003
    Location
    KSA - UAE
    Posts
    9,457
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Nice article!
    the cake is drawing more and more interest
    I found to work well with simple models!
    Also Jonathan Snook is starting a new blog about CakePHP: http://withcake.com/

  17. #17
    SitePoint Evangelist -T-'s Avatar
    Join Date
    Jun 2002
    Posts
    444
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've read up on cake a little more now. And as most other frameworks I've tried, it fails when it comes to caching. It might just be me, but I need caching to work, and I need it to work the right way.

    from the cake manual:
    First, you should be aware that Cake will automatically clear the cache if a database change has been made. For example, if one of your views uses information from your Post model, and there has been an INSERT, UPDATE, or DELETE made to a Post, Cake will clear the cache for that view.
    This is fine if you run an article site, or a blog. But as soon as you start doing something a bit more complex it gets unusable. IE you have a download site with downloads listed. Of course you keep track of the downloads and present this to the users. the more downloads you have, the longer time it takes for php/mysql (I'm usually using mysql) to process this. You might not notice this at the beginning, as the site is small. But as soon as you start getting more users, it will be a drag. Caching the list and make it update every hour will save you A LOT of processing power. The more users the more processing power you save. I run a site which have a usual load of 80-120 users. When these users hammer a download list, caching saves my dedicated server from going down. I had huge issues with load until I implented caching at some parts of the site. It saved me from investing into another dedicated server and set up loadbalancing

    Caching is a big moneysaver, and I see it as the most important backend part of a site (next to session handling). If I can save $400 a month on servers because of cache, I will use it. And I will use it on every project, no matter how small. Never know if a small project grows big. If a frameworks caching can't be used, the framework can't be used. I'd rather use a framework without caching and build my own caching library. And I won't use a framework that implements an unusable caching engine. It bloats the engine code and it makes me wonder about the rest of the code.
    chrome is a wrapper that combines a browser with spyware

  18. #18
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Shorewood, IL
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by -T-
    ...I'd rather use a framework without caching and build my own caching library.
    The nice thing about the current caching is you use it only when you want, you have to turn it on, so using your own caching system is very easy. There is also specifc code you can use to not cache a specific part of your page.

    simple example:

    http://cakephp.org/pastes/show/6f197...41781ac5078557

    The example you used above would be very easy to implement and cache a specific part of the page being displayed while keeping another section dynamic.

    Another suggestion, if you see something you have a question about, stop by our freenode.net irc channel #cakephp I am there often, or visit the google group http://groups.google.com/group/cake-php.

    A feature request or bug report is handled on the trac site https://trac.cakephp.org/
    /**
    * @author Larry E. Masters aka PhpNut
    * @url CakePHP Rapid Development Framework
    */

  19. #19
    SitePoint Evangelist -T-'s Avatar
    Join Date
    Jun 2002
    Posts
    444
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why would I use 2 caching engines in one aplication? I'd rather have one that can do what I want it to do. And to be honest, I prefer a framework with a minimal of functions and a library at the side were you pick the functions you want. This will lower cpu and memory usage a lot and help maintain fast and slick aplications. I find a lot of the frameworks are built to speed up the work at the loss of quality. To me, speed and security comes first. The frameworks I've tried up to now have not been able to deliver that.
    chrome is a wrapper that combines a browser with spyware

  20. #20
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Shorewood, IL
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by -T-
    ...Why would I use 2 caching engines in one aplication? I'd rather have one that can do what I want it to do.
    I think you misunderstood me, there is nothing forcing you to use the included caching, and you must turn it on to use it, I said nothing about using 2 caching engines, re-read my post. The core caching is not even loaded unless you need it. Same with the rest of the core framework code only what is needed is loaded.
    And to be honest, I prefer a framework with a minimal of functions and a library at the side were you pick the functions you want.
    To me a framework is not only libraries but a set of conventions that make it easier to build your application, by sticking with these conventions you will see application development is much easier and faster. There is nothing forcing you to use these conventions, but by not using them it will make development harder trying to use a framework built as Cake is, not only that, you will write more code trying not to use these conventions, which defeats the purpose of using a framework in the first place IMO.

    Cake adds structure to an unstructured language, and those who use it could not agree more that this structure has been a blessing for them in their daily development activities.

    What you describe as wanting in a framework is nothing more then PHP itself...
    /**
    * @author Larry E. Masters aka PhpNut
    * @url CakePHP Rapid Development Framework
    */

  21. #21
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Shorewood, IL
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I should have done this to begin with, showed you an example...

    PHP Code:
    <?php
    class Download extends Appmodel{
        var 
    $name 'Download';
        
        function 
    _clearCache($type null){
            
    //since we are overriding the Model::_clearCache() cache will remain 
            //until the time set to delete cache is reached
        
    }
    }
    ?>
    And all is well in your application...
    /**
    * @author Larry E. Masters aka PhpNut
    * @url CakePHP Rapid Development Framework
    */

  22. #22
    SitePoint Member
    Join Date
    Dec 2005
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, after a quick play I think I can answer my own question

    in your apache config file uncomment the following (approx line no in brackets)

    (192) LoadModule rewrite_module modules/mod_rewrite.so
    (237) AddModule mod_rewrite.c

    mine now seems to work

    BUT I'm no apache expert so perhaps someone more knowledgable can confirm this is the correct/safe thing to do.

    T

  23. #23
    SitePoint Guru mattymcg's Avatar
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    574
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by timboreader
    BUT I'm no apache expert so perhaps someone more knowledgable can confirm this is the correct/safe thing to do.
    Yep I was going to suggest that it may be happening because your Apache install does not have mod_rewrite installed, but you beat me to it. Cake needs that module to work correctly.

    Quote Originally Posted by timboreader
    (237) AddModule mod_rewrite.c
    Not sure what version of Apache you are running, but I don't think this is necessary, just the LoadModule call.
    Last edited by mattymcg; Jul 19, 2006 at 20:41.
    I design beautiful, usable interfaces. Oh, and I wrote a kids' book.
    • Follow me on Twitter.
    • Read my blog.
    • Buy my book, Charlie Weatherburn and the Flying Machine.

  24. #24
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Shorewood, IL
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mattymcg
    Cake needs that module to work correctly.
    If you remove the comment from the BASE_URL define in app/config/core.php you can use CakePHP without mod rewrite.

    URLS would be www.example.com/index.php/notes in this article example then

    Most of this is covered in the manual. http://manual.cakephp.org/
    /**
    * @author Larry E. Masters aka PhpNut
    * @url CakePHP Rapid Development Framework
    */

  25. #25
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Quote Originally Posted by 1PhpNut
    If you remove the comment from the BASE_URL define in app/config/core.php you can use CakePHP without mod rewrite.

    URLS would be www.example.com/index.php/notes in this article example then

    Most of this is covered in the manual. http://manual.cakephp.org/
    The above message fixed the problem I was having ... I had to remove all the htaccess files also. Strange thing for me was that something view were working and others were not. I check my code over and over again and everything looked fine but I would get a 404 error when trying to access some pages. Once I turned on the BASE_URL then all pages would work without error. This tells me that something was wrong with server configuration and not a problem with my code.


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
  •