You are reading:
You are reading:
Developers have grown increasingly more interested in Ruby on Rails over the last year, and for good reason: the Rails movement has ushered in a new paradigm of agile web development that has allowed dozens of web 2.0 applications to launch in highly condensed time frames.
I’ve been wondering lately though: how realistic is the long term use of Rails going to be? For a development environment to be so tied to a relatively young server package as lighttpd compared to the de-facto standard of Apache is slightly concerning. Don’t get me wrong, I feel like Rails has kicked the web movement into high gear, and I’m incredibly impressed with what I’ve seen. Lately though, I’ve been reading more and more about PHP frameworks that aim to either port, or at least mimic the essential Rails functionality, and it’s quite intriguing.
My main point of contention is that PHP is first and foremost intended for use on the web: it’s a “Hypertext Preprocessor”, where Ruby is a more multipurpose programming language. Does that mean PHP will have strengths in the web arena that Ruby cannot match? Or does that mean that Ruby will be more versatile because it doesn’t focus on HTML?
I’m by no means an expert, but this is one of the big topics on my mind right now. If you’d like to do some further reading, here are a couple overviews of PHP framework packages:
Fresh Crashpod content, delivered directly to your RSS reader.
One of the immediate reactions to my article about those Rails-inspired PHP frameworks was: “Rails is much better” or “Do yourself a favor: learn Rails”.
…As usual, you may say, when anything even remotely related to RoR gets posted anywhere. Personally I think Ruby has a MUCH cleaner and more elegant syntax than PHP and it was simply the most appropriate language for the RoR framework. Yep, Rails creator originally thought of PHP before deciding in favor of Ruby, and he was right, it’s not the point.
The point is that PHP - as you said - is a programming language made for the Web, not for anything else: some people may call it “scripting” language to emphasize the contrast. PHP is also one of the most simple programming languages to learn, and thus the most popular and commonly learnt not only by professionals, but also by any other person who may think that someday he’ll make a site for his family pictures. Inexperienced developers created inevitable insecure applications, and so PHP quickly become the language for the masses, but not suitable for any “serious” project.
That’s wrong. PHP can be used for large applications and these new frameworks certainly can make things a lot easier. Also, PHP5 is much more advanced than its predecessor, so we’ll see what happens…
Will PHP become too complex and people will just choose other languages instead? Only time will tell.
Rails? It will probably get better and better, and will eventually reach the masses: a few months ago web hosts didn’t even think about offering Ruby support, now there are more and more which do.
Personally I hope to see more “properly-coded” PHP applications, now that finally we have the instruments to make things tidier and more organized.
I think i get it, but assume for a minute I don’t even know what php is. Give me something in laymans terms. Okay not laymans terms, but please chew this up for me a little bit more.
Mang, I really want the time to play with PHP/Ruby frameworks, whether it ever becomes one of my core skills or not, it just seems like something that no web developer can afford to ignore.
@Skettios
Sorry, sometimes I tend to write too much without coming straight to the point. I simply meant that:
- PHP is a language born for web development and it’s also the easiest to learn
- Due to its nature (it was born as a simple and basic form interpreter), people inevitably started to use it producing “spaghetti-code”, i.e. mixing PHP with HTML without separating the program’s logic from its presentation (the HTML/CSS code).
- This bad practice is often the cause of bugs and often makes an application simply unmaintainable
- PHP frameworks like CakePHP can help developers coding in a more organized way, making the code easy to update and debug
—
- PHP syntax is rather verbose, while Ruby’s is much cleaner and essential
- This was one of the reasons why Ruby on Rails was developed in Ruby, and one of the reasons why it was so successful and will keep improving.
To understand what I mean by cleaner syntax, have a look at my blog post comparing CakePHP and RoR way of doing the same thing:
http://www.h3rald.com/blog/view/22/
You can see both can make an application more organized, but inevitably PHP syntax looks more messy :/
Great comments herald, I really like your point about Rail’s more mature error reporting: having a framework tell you exactly what’s wrong, rather than forcing the developer hunt for the issue causing a problem is a considerable benefit.
At this point only time will tell whether Rails or PHP based frame works win out in the long run: frankly I hope they both enjoy long life spans, becaue the development commnunity stands to benefit greatly from the qualities they share.
lp case…
Fresh information about lp case….