This is an article discussion thread for discussing the SitePoint article, "The CakePHP Framework: Your First Bite"
Printable View
This is an article discussion thread for discussing the SitePoint article, "The CakePHP Framework: Your First Bite"
Very nice! I hope to use this in my PHP Practices!
I'm to use this framework from recent time. I like it very much. It is a good tool for middle-complexity web-projects
Nice read... another Framework worth a look for small to medium size webapps is Code Igniter! I like CI even better than CakePHP. :cool:
All in all, this was a very good article but when you consider the complexities of a real application I doubt I could find a use for the framework. Nevertheless, it may be useful when I want to draw something up quickly on the fly ;)
For those that have used the framework, what has been the performance? any issues?
I believe the correct phrase is, "You can eat your cake and have it too". It makes sense to have your cake and eat it, but to eat your cake and still have it is a novel concept; this is why the phrase is used.
Information on the original correct saying and how it has been corrupted (and misused) can be found at: http://en.wikipedia.org/wiki/Have_one's_cake_and_eat_it_too
--tparkin
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...
I have just started to learning Symfony Project framework. Anyone can tell which one is better?
First of all, it seems like the documentation links near the end of the article do not work. A bit disapointing.
I have been comparison shopping for a framework for my large (already running) application (I used codecharge studio for most of it, but am feeling the limits of this otherwise excelent program).
Cake looks nice, but I am really liking the Hierarchical Model View Controler concept employed by (and far as I can tell, only by) the Claw (http://clawphp.org/) framework. I am also concerned with how flexible the Object Relational Mapping is (it looks like no other framework is any better in this regard, ORM seems to be the standard everywhere).
I am currently torn between using Claw with my own customized models (and or Propel where it makes sense) or taking Cake and trying to add on the HMVC concept (and again writing my own custom models).
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
Hmm, they all work fine for me. What problem are you seeing?Quote:
Originally Posted by greywire
LOL! I'll be sure to pass this onto our English editor! :lol:Quote:
Originally Posted by tparkin
This is not the largest application built using CakePHP, but was a cool project to develop for the client...Quote:
Originally Posted by -T-
Not so simple application built with CakePHP
Limitations, if reached are easy to overcome...
I've just began working with CakePHP and am having a ball so far. This isn't only to do with the fact I think it's an excellent framework, but also because there is decent documentation, an active and responsive Google group, as well as IRC channel.
The times when I have needed help because of problems or lack of documentation, the group and IRC channel have always come to the rescue in quicktime!
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.
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.
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 projectsQuote:
Originally Posted by bbolte
Agreeing absolutely :) This framework is not for complex projects... Let me think... Can't get any framework form my head that can be used with real complex projectsQuote:
Originally Posted by Dean C
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 ... :)
Wow.Quote:
Originally Posted by dg_den_golotyuk
I mean wow.
Personally I've never thought too highly of SitePoint (or, by extension, it's readership I suppose), but this level of ignorance really takes the cake (pun not specifically intended, but a happy coincidence).
Let's break down and analyze that statement:
(1) "This framework is not for complex projects".
Uhh, have you done any complex projects with it? Have you done any complex projects period?? I will grant you that getting into the framework was hard for me because of documentation, but it's gotten a *whole* lot better since then. Unless you have a medical excuse (like ADD) there is no way that a couple hours of your time won't get you into this framework.
(2) "Can't get any framework form my head that can be used with real complex projects".
K, I'm not completely sure what that means, but I can only assume by your continual references to complexity that you prefer to write sloppy, unmaintainable code.
I challange anyone to come up with a project that's too "complex" for this framework. While I agree that it's not right for *all* projects, saying it can't handle "complex" projects means you are either highly intelligent or extremely dense. More likely the latter.
@dg_den_golotyuk
this is a nice overview of extending CakePHP
http://devzone.zend.com/node/view/id/593
This is an example of using Zend Components with CakePHP.
http://cakebaker.wordpress.com/2006/...-with-cakephp/
The same principle can be used with any third party library. For example, in http://cakephp.org/pastes we use the nice Geshi code highlighting library
@mutant
http://cakephp.org/search
will search several blogs about cakephp, the google group and the manual all at once.
@those who want to suggest building their own instead
The advantages of Open Source should be pretty clear by now. The CakePHP community is filled some very good programmers who are willing to contribute ideas, bug reports, code and help. When you need to bring in new developers to help you with a project you can have them read the manual, api, and review the many resources available. Otherwise, you have to sit there explaining how your homegrown framework works.
CakeForge has many sample applications. For instance, the code used for http://rd11.com, a blog and photo gallery site is freely available at http://cakeforge.org/projects/rdos You will also find CakeMap, which use a google maps helper and makes adding maps to a CakePHP based site easy. And the code for CakeBin is available there and gives the nice example of using Geshi within CakePHP.
I'm so done with the "blog in 20 minutes" thing. Why would anyone write thier own blog when there are tons out there that are top-notch? Lets see a sample application that has real-world use. A CMS, a simple shopping cart, show complexity by demonstrating the ease of development when developing something ususual in a shopping cart site. I think the thing that eveyone gets hung up on is that its like learning a whole new language no matter how well you know PHP, Cake is difficult when you don't know it front/back/sideways, leftwise and right, especially when you are trying to figure out how best to proceed in implementing business logic.Quote:
Originally Posted by gwoo
Perhaps that's what people mean -- CakePHP isn't suited to complex apps, not because it's not suited, but because they're not suited to having to learn this potentially complex system of doing things. I don't think there is any need to beat people up for not seeing how Cake can build complex sites -- if you support Cake, show some examples, otherwise, you're just a troll.
As a matter of fact, I think I'm going to take a page out of my own book. I'm going to try to make a simple shopping site. I'll document my trials as best I can, and report back here. Mabey that will help people understand the barriers to entry in regards to Cake.
It think this comment could go both ways, you say it is not capable of creating complex applications, yet there is no example given of a complex application you would like to create and found cake not suitable for it. I already posted a link above to a description of an application we created for a client through the Cake Software Foundation. If you browse the CakeForge site you will see there is a simple shopping car called bakesale, also a few CMS projects and many more are listed.Quote:
Originally Posted by mutant
http://cakeforge.org/top/mostactive.php
This sounds like a great idea, stop by the IRC channel if you need help, someone is always online to help by answering your questions. You will find me there often too.Quote:
As a matter of fact, I think I'm going to take a page out of my own book. I'm going to try to make a simple shopping site. I'll document my trials as best I can, and report back here. Mabey that will help people understand the barriers to entry in regards to Cake.
Java web based client:
http://irc.cakephp.org/
If you have your own IRC client
irc.freenode.net
#cakephp
Particulary if you want to download the latest manuals and software go to : http://cakeforge.org/top/mostactive.php
but the manual has some errors for examlpe in the hasAndBelongsToMany assosiations. I will write a good tutorial about assosiations because is one of the most important things to grasp to understand cakephp. I think after seeing this article here in sitepoint that cakephp migth be the best choice not only because there is an article here but because it has the most active comunity.
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.