SitePoint Sponsor

User Tag List

Page 2 of 4 FirstFirst 1234 LastLast
Results 26 to 50 of 76
  1. #26
    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/

  2. #27
    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

  3. #28
    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
    */

  4. #29
    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

  5. #30
    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
    */

  6. #31
    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
    */

  7. #32
    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

  8. #33
    SitePoint Member
    Join Date
    Dec 2005
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    404 error at first example

    Quote Originally Posted by arbel
    I'm having trouble getting the first stage to work. The scaffolding part...i've created all the files and the http://localhost/ looks good, but when I try http://localhost/notes/ I get a url not found...
    Is anyone going to offer a solution to this problem? Two people so far have had it. Make me 3. Probably loads more...

  9. #34
    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

  10. #35
    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.

  11. #36
    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
    */

  12. #37
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mattymcg
    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.

    Not sure what version of Apache you are running, but I don't think this is necessary, just the LoadModule call.
    This doesn't work with Windows/Apache2.2, where even the php4apache2.dll downloaded from php.net doesn't work (it's said this file is for Apache2.0, you can download a 2.2 replacement from http://www.apachelounge.com/download/).

    The example view shows up only on http://localhost/index.php?url=notes. So it seems the mod_rewrite isn't working.

  13. #38
    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. #39
    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. #40
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CakePHP Under IIS 6 without Rewrite

    Another answer concerns anoobis's question:
    http://wiki.cakephp.org/tutorials:ca...ithout_rewrite
    Last edited by phpnut2; Aug 4, 2006 at 12:01. Reason: add title

  16. #41
    SitePoint Addict webaddictz's Avatar
    Join Date
    Feb 2006
    Location
    Netherlands
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should update your links. Instead of http://manual.cakephp.org/pages/ch12, it's now http://manual.cakephp.org/chapter/12.

    In the rest, it's a fine article, thanks for that.

  17. #42
    SitePoint Wizard Dean C's Avatar
    Join Date
    Mar 2003
    Location
    England, UK
    Posts
    2,906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What has annoyed me so far after getting stuck in today, is the case-sensitivity of application names. DVDs and Dvds are not the same.

    File: /app/model/dvd.php
    PHP Code:
    <?php

    class Dvd extends AppModel
    {
     var 
    $name 'Dvd';


    ?>
    File: /app/controller/dvds_controller.php
    PHP Code:
    <?php

    class DvdsController extends AppController
    {
        var 
    $name 'Dvds';
        var 
    $scaffold;


    ?>
    I have yet to get it working where it recognizes the applaction as a database of DVDs and not Dvds (and yes I have played around with the case in the class names.

  18. #43
    SitePoint Addict
    Join Date
    Jul 2005
    Location
    USA
    Posts
    291
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the tip, phpnut2. I hadn't thought of using a PERL redirect. I'll give it another go round.

    Are you also phpnut from the cake screencasts? If so, thanks again!

  19. #44
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe

    var $uses = array(Note, AnotherModel, YetAnotherModel);

    should be

    var $uses = array('Note', 'AnotherModel', 'YetAnotherModel');

    Hmm?

    (just a little picky thing, I'm reading the article right now and noticed it)

  20. #45
    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.

  21. #46
    Sujan Datta
    SitePoint Community Guest
    It's a greate help for those who are new in MVC or such type of aechitecture.

  22. #47
    SitePoint Addict Quaint's Avatar
    Join Date
    May 2004
    Location
    Netherlands
    Posts
    219
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The look and feel of CakePHP has changed since this article.. Was kinda confusing at first to see the screenshots looking (quite!) different! Perhaps you could update the screenshots to match the new look and feel?

  23. #48
    LeoK
    SitePoint Community Guest
    cake is one of the many cool php frameworks.
    i would suggest checking out the QCodo framework.
    And if you are a railsnut check out Akelos.

  24. #49
    BM
    SitePoint Community Guest
    I just found out about Cake last week, and I have been combing through the CakePHP site and the web to learn more about it. Your article is by far the best I found to explain what it does and cleared up a few questions for me. Thank you!

  25. #50
    xanders
    SitePoint Community Guest
    check out http://codeigniter.com/ and http://www.symfony-project.com/ as well.


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
  •