Sponsored by Dragon Age: Origins
Join the Dragon Age: Origins development team on Facebook view!
facebook.com/DragonAgeOrigins - EA presents BioWare's new dark fantasy epic Dragon Age: Origins. '9/10' from Game Informer.
37 Comments
- Kilkonie, on 10/12/2007, -0/+3If you're beholden to PHP and are interested in Rails, I would recommend that you look at:
PHP on Trax
http://www.phpontrax.com/
Biscuit
http://ripcord.co.nz/biscuit/
http://flinn.activeintra.net/biscuit/
Trax is a much more complete implementation of Rails for PHP. It supports MVC routing, test/dev/live modes, layouts, generators for models and controllers, ActiveRecord (for auto managing database interactions) and ActionController and ActionMailer.
Biscuit is quite a bit smaller and more focused on providing MVC and the simplest form of database abstraction. You can probably read the source of this project in an afternoon and have a something you can get running and modify yourself.
If you dig a bit, it sounds like Cake has had some mismanagement. It might be useful to look at the alternatives. - kolanos, on 10/28/2007, -1/+4It's a shame that PHP needs to be dumbed down for the Ruby on Rails crowd in a manner like this -- but it doesn't surprise me.
Ruby is a lot of hype, and is incredibly limited when compared with PHP. Rails takes what is already a limited scope and retrofits a syntax ontop of it so braindead, that it finds a way to limit the possible applications that can be developed with it even further!
PHP was never really very sexy. There was never a lot of hype surrounding it, you never saw hipsters hyping it up like the next big thing. But it's popular, flexible, and as long as you use the right classes/libraries, is very easy to develop large scale enterprise applications, that are easy to maintain. It's when people don't know what the hell they're doing that you see applications that are insecure and unmaintainable. It's when you create programming languages that answer to the lowest common denominator that you see "programmers" who never bother to figure out how everything works.
With discipline and a little forethought, PHP is capable of just about anything you throw at it and really doesn't need to be dumbed down for the masses. - jesusphreak, on 10/12/2007, -0/+2bdmcnitt, I can't specifically answer your question, but the question is brought up all the time in the Rails mailing lists and blogs and such. I think the best thing you can do is to check out the official RoR weblog. There's a lot of entries about stuff like this:
http://weblog.rubyonrails.com/
Rails is not established now (its only been out for a single year), but you'll find that some serious names in both the Java and .NET world are switching over to Rails.
Here are two excellent, recent, and relevant entries from guys who are both still huge in the Java world:
http://jroller.com/page/dgeary?entry=tipping_rails
http://blogs.pragprog.com/cgi-bin/pragdave.cgi/Tech/Ruby/IsRailsReadyForPrimeTime.html
Rails is a pretty huge deal. You'll find that most Rails "converts" aren't former PHP users as often as they are former Java/.NET users, though exceptions do exist (such as the guy who created Rails himself). - bdmcnitt, on 10/12/2007, -0/+2A bit off topic since the focus of this thread is CakePHP (sorry), but since Ruby is mentioned, I have to ask. From a career standpoint, as good as Ruby is, how does one justify learning Ruby and becoming a Ruby developer when Ruby is almost non-existent in the corporate world? This is not a flame -- I ask honestly because I am tempted to learn Ruby given all the praise it receives, but from a career standpoint it seems hard to justify learning Ruby verses hacking through the less sexy but more established "real" languages like Java and .NET. Thoughts? Again, apologies for taking things off-topic.
- adam.lindsay, on 10/12/2007, -0/+2I do .NET by day and freelance RoR by night. It is quite literally getting to point of frustration during the day. Ruby is what makes Rails. Heck there is even a .NET Rails (monorail). I checked it out and just walked away laughing.
- Web_Weasel, on 10/28/2007, -0/+2Sounds interesting. While I'm a fan of Django I've been looking for a decent framework in PHP simply because most cheap webhosts have your standard shared Apache/PHP/MySQL available.
- happyfappy, on 10/12/2007, -0/+1Has anyone here run websites with at least 1,000,000 monthly page views on CakePHP?
I'm running a site on RoR, but portability is a serious problem; I'm seriously considering a switch to CakePHP. - anseljh, on 10/12/2007, -0/+1Update a year later: The documentation still stinks.
- rulian, on 10/28/2007, -0/+1as a PHP developer, I remain unimpressed with Rails,
I find the hype, commercials, and things Rails people say about PHP laughable
if PHP is confusing because it used "code" you really shouldnt be bragging how rails makes it easy,
tha'ts like saying english is better because you cant understand german. except PHP is a language while rails isnt.
Besides the whole debate over frameworks, you really shouldnt be, at least in my opinion, developing large scale websites on off the shelf frameworks to begin with. Building applications from the ground up may take longer, but the results are better, faster and cleaner if you know what your doing. - blenderstyle, on 10/12/2007, -0/+1CakePHP is awesome! I tried Ruby on Rails and I had a lot of problems trying to get it working on my little web server and because of that it may be difficult to move to a hosting company that doesn't have the necessary stuff to run Ruby on Rails. That doesn't mean Ruby on Rails isn't awesome because it really is. The Ruby language seems easy to learn and use but the portablility of the apps are more important for me. So, I went researching and found PHP on Trax but I also had a bit of problems with that because the documentation is so bad. I checked out CakePHP and found that it's pretty portable and doesn't necessarily require mod_rewrite.
Okay, I'll say it, http://cakephp.org/ sucks. The manual is good enough to get someone going on simple things but it's not extensive enough to make you a total expert. Also, the content is separated into several websites including a Wiki website. I would like to see it all cleaned up and organized a little better.
In short, CakePHP is pretty damn cool. I love it and I can build a blog with no security in like 5 minutes. The ACL stuff needs to be documented better but I think I can handle it for my needs. - jesusphreak, on 10/28/2007, -2/+3Its a good idea, but the entire reason that Rails is so good is because of Ruby. David Hansson, the guy who created Ruby on Rails, actually was a professional PHP programmer. He had a Rails-like framework in PHP, but he wasn't satisfied with it. The language just isn't made for stuff like that. That's when he started to use Ruby, and that's where the magic started.
Its noteworthy that David doesn't condone the use of PHP (he used to be a PHP developer himself), but in his mind its only useful for small scripts. Anything above that and PHP just gets messy.
A prime example of this is Basecamp, where the core system is built in RoR (you can see a screenshot on the frontpage), but the basic "home", "about", etc pages are done in PHP.
http://www.basecamphq.com - wadey, on 10/12/2007, -0/+1For Perl programmers:
http://dev.catalyst.perl.org/
Slightly biased comparision against RoR:
http://dev.catalyst.perl.org/wiki/VersusRails
I have used catalyst for a few projects, and it is pretty damn slick. - PhpNut, on 10/12/2007, -0/+1"joshpeek: Scaffolding isn't done yet. Which is a big miss for me. But relax its like alpha right now. It will be a good choice for people who hate ruby syntax."
Scaffolding is working in CakePHP along with associations. There is a little more work to be done on this but here are 2 examples:
Only controllers and models created no views needed for scaffold.
Both controllers use this setting for scaffold:
class ClassController
{
var $scaffold;
}
Models for this link:
Album: var $hasAndBelongsToMany = 'products,packages';
Product: var $hasAndBelongsToMany = 'packages,albums';
Package: var $hasAndBelongsToMany = 'products,albums';
http://phpnut.cakephp.org/albums/
Models for this link:
Titles: var $belongsTo = 'publisher,category';
var $hasMany = 'reviews';
var $hasAndBelongsToMany = 'authors';
Author: var $hasAndBelongsToMany = 'titles';
var $belongsTo = 'publisher';
Publisher: var $hasMany = 'titles,authors';
Review: var $belongsTo = 'title';
http://phpnut.cakephp.org/titles/ - fant0mas, on 10/12/2007, -0/+1Sounds great and all... but this looks very early in development.
- skoopmanschap, on 10/12/2007, -0/+1Cake sounds great but I've tried it a while ago and never got it to work, neither on php4 nor on php5. the documentation is also still in it's worth alpha I guess, cause I couldn't find any info on why things would go wrong. And since I didnt have time to dig deeper, I let it go. At least with Rails, I can get the book, start the server, and start playing around with it.
- tobymiller, on 10/12/2007, -0/+1All of you that previously reviewed CakePHP and thought it to be "too alpha" to consider should take another look. RC4 was just recently released and it has some good stuff in it.
http://www.cakephp.org/pages/announcement
-tm - maad, on 10/12/2007, -0/+0That's great.. but.. as the poster above said..
The Ruby language has entire areas of expressiveness that have no equivalents in PHP. Things like closures, etc. Creating *RAILS* is not possible in PHP. Creating a web framework that draws inspiration from Rails *is* possible in PHP, but it's *NOT* Rails and will not ever be Rails. People who dive into this debate and try to argue otherwise simply don't understand what Rails is actually doing. - jesusphreak, on 10/12/2007, -1/+1that should've been *condemn
- mutant, on 10/12/2007, -1/+1Cakphp is SO not done, its not even worth being homepage news..
- joshpeek, on 10/12/2007, -0/+0Scaffolding isn't done yet. Which is a big miss for me. But relax its like alpha right now. It will be a good choice for people who hate ruby syntax.
- TrevorNet, on 02/14/2009, -0/+0Even the most trivial tasks are made complicated through CakePHP. It's a sad reality when those that use PHP can't write their own pure code. CakePHP creates lazy programmers.
- inactive, on 10/12/2007, -1/+1YOU: >>Rails: You are tied to one language, which I find very horrible.
ME: .NET: You are tied to one operating system, which I find very horrible.
YOU:>>.NET: Not that I particularly like it, but you have a wide variety of languages to choose from
ME: Rails: Not that I particularly like it, but you have a wide variety of platforms and operating systems to choose from. - brego, on 10/12/2007, -0/+0CakePHP was never aimed to be in any way a "competitor" to Rails. It was aimed to be a framework that bases off from Rails concepts and implements them in PHP.
Next release, 0.10.0_dev is coming along. It has a lot of good features, and the stable release, 0.10.0_stable, will go through alpha, beta and 4 rc's before it gets stable.
It will feature:
- Scaffolding
- Table joins
- New directory structure, that allows for multiple apps of the same base code
- Lots of smaller improvements - mgiglesias, on 10/12/2007, -0/+0CakePHP is one of the most organized, effective, flexible and extensible frameworks I encountered for PHP. It makes your code look the way it should, and helps you concentrate on the logic of an application rather than having to deal with usual coding problems.
Latest stable release of CakePHP (1.1.11.4064) has even brought more cool features and a considerable performance improvement (by model lazy loading.)
If you are serious about web application development, and you normally build from enterprise scale applications to small websites then you should look no further. Go to cake php's website (www.cakephp.org) to find out more or check out some cool articles and tips at the bakery (bakery.cakephp.org) - jesusphreak, on 10/12/2007, -0/+0snuffkin, not only did milo already counter you with a good point, but what makes Rails IS Ruby. You just can't have Ruby without Rails. Its like having coffee without sugar. Its just not the same.
- bobmaluga, on 10/12/2007, -0/+0I have done RoR, Pylons, Turbogears, Django, Zope..
nothing has made sense to me than CakePHP. Well, I wanted to deploy my webapp in Pylons, which now my second favorite but finding a hosting who provide python (cheap of course) is a hard. Then I found cakephp, a saviour. Except I have to port back to PHP. I think CakePHP docs now is good (with examples), better than some others. Checkout the security components, data sanitization, access control (ACL), and of course the Bakery if you havent found the recipe for your cake.
Ruby, the language itself doesnt fit me in the first place. maybe bcoz I was built by Python? - brego, on 10/12/2007, -0/+0BTW, correct url is http://cakephp.org, not http://trac.cakephp.org.
- pooper12, on 10/12/2007, -0/+0This has just been dugg recently:(http://www.digg.com/programming/POG_-_A_PHP_Code_Generator)
http://www.phpobjectgenerator.com
not bad. not a framework, but i liiike it. - realworldapps, on 10/12/2007, -0/+0We looked at Ruby on Rails, but the reason we chose to write 3 new web applications for our clients in CakePHP is:
1. Ruby on Rails doesn't mix well with existing sites (in this case a php site).
2. Ruby on Rails is not supported on most shared hosting accounts or hosting providers.
If you are working on a fresh project with no legacy code and the hosting environment is totally flexible then I can see using Ruby On Rails, otherwise CakePHP makes it sooo easy to write an application and just drop it onto just about any existing system (literally FTP it up, no configuring on an existing PHP site). It worked out excellent for our 3 clients, and the development was a snap. Also, I talked to Rackspace.com (where we lease our servers), and they still have no support policy for Ruby on Rails. For our clients that is a big negative. Ruby on Rails looks like a great framework, and maybe superior to CakePHP, but in the real world, I have to say CakePHP is going to work for most scenarios. - jesusphreak, on 10/12/2007, -1/+0For that matter, what's wrong with C for CGI?
Anything can work, its just a matter of what is efficient and worth using. Perl has its own great framework, Catalyst.
I wouldn't mind using Perl, but the syntax scares me off. - trax, on 10/12/2007, -1/+0In short, using TRAX has sped up the majority, of our development to some (unmeasured) degree.
The code is clean and easier to maintain, especially when training new developers on an existing app, as it provides somewhat of a standard when coding. When you get into 100,000+ lines of code, MVC is nice. we have not experienced "limitations" mentioned by some.
We have not had to retrain our programmers to learn Ruby, nor go to a system that does not have library support, / community support.
POT (php on trax) is good for building apps for our clients since it gives them more flexibility, should they decide to leave us. If we use ROR, and they decide to leave, then they may be at a loss (which has happened to one of our clients). Trax can be learned in a few hours.
We are not opposed to using ROR for inhouse projects if we feel it will work better than POT. We just have not done it yet--just for clients so far.
POT also uses PHP5 which is nice. More object oriented perhaps than PHP4.
POT has a little ways to go to be able to really hit hard, like some documentation, which I believe has started recently. Apparently the framework is practically identical, so all you ROR fans can use trax when ROR cant be used, and all you PHP buffs can see why people like ROR, without leaving your true love.
Short of it is, we like both, we use(d) both. Using POT has not hurt our business in any way (cant say the same for ROR), in fact, it has helped speed of development. Thats what it really comes down to. - Snuffkin, on 10/12/2007, -2/+0Rails: You are tied to one language, which I find very horrible.
.NET: Not that I particularly like it, but you have a wide variety of languages to choose from, all creating the same results, and you can even code your own.
Could make Ruby so much better. - corbanbrook, on 10/28/2007, -3/+1You got to regonize. Its all about the late binding, bishes!!, PHP cant step to it.
- jasonsbytes, on 10/12/2007, -2/+0What's wrong with perl for CGI? I do all of my stuff in perl... It never fails me.
- jesusphreak, on 10/12/2007, -3/+0firefly, I'm pretty sure he was kidding around...
- jesusphreak, on 10/12/2007, -3/+0Anyway, do yourself and learn Rails. Ruby is very simple to pick-up, and Rails is fully functioning. Most people who learn Ruby have a hard time going back to other languages, as its designed around the idea that everything it it should be "common sense".
- Firefly, on 10/12/2007, -3/+0 "You got to regonize. Its all about the late binding, bishes!!, PHP cant step to it."
I don't know much about Ruby, but after that comment, I can't wait to dump PHP and learn more about it. ohhh... wait... what's "check spelling" button doing there... never noticed it before... there you go, I already feel smarter. Damn, Ruby must be awesome.


What is Digg?