Php, Yii And Ror

Hi guys,

I’ve been a PHP developer (Paid. No longer just hobbying) for the past 2.5 years. Been learning for much longer. I also love reading about the development and anything tech related.

Recently, I’ve noticed that the general consensus around the internet is that PHP is on it’s way out and Ruby with it’s RoR framework is the new fad.Wait, before you go bashing on me. I FULLY UNDERSTAND that most of the known web is PHP based and PHP is not going anywhere for a long time. :D I’m well aware.

I’ve recently began working on a side project that I have big plans for and is going on well. So far, so good. It’s being developed with Yii, my absolute favorite PHP framework. I’m fairly comfortable with Yii and I am learning everyday.

However, the thoughts of other PHP frameworks and the ever-elitist RoR are always creeping in. I keep thinking that I should learn to develop with RoR as it is the current ‘trend.’

I have tried RoR for a week. I saw nothing special about it. None of that "elegance" that everyone talks about. To be perfectly honest, I ***king love semicolons and curly braces. I feel they make writing code feel like writing code. Does that even make sense?

I just don’t want to feel like I’m lagging behind. The internet is full of lists of 10000 reasons why you should learn RoR and none of the points ever make me go, well, that’s a good point but they keep STRESSING that RoR is the way of the future.

Any advice?

Another point, I keep reading on the internet that Yii is one of the fastest performing framework, however, I don’t seem to find it to be as popular as the other frameworks. I struggled with this when I was first starting out coming from Codeigniter where the community is seemingly bigger and the documentation is the stuff of legends. I don’t have a problem with this anymore, I am just wondering out loud.

Another point I’d like to have discussed is the lack of jobs or companies that are looking for Yii developers? Is it the same everywhere or maybe just in my country, Malaysia?

Please once again, these are the concerns that I have in my head, these are not facts, just questions I would like to discuss with you guys. What are your thoughts? What is the future for Yii, Cake, Zend, RoR or even Django. Or what do you think at least?

One more thing, I know the tools don’t make the carpenter but the internet is trying to have us believe otherwise, me at least. These elitist pricks are sprouting out everywhere with their “I love the Ruby community crap.” What does that even mean?!

I find it surprising that you think RoR is the future when all the momentum is about javascript right now. Especially server-side JS (i.e. node).

I don’t think server-side frameworks are going anywhere anytime soon - the mental hurdle to leap to node is a big step and its really not necessary for the majority of sites currently on the internet.

I’d like to kindly point the op to the TIOBE index. Ruby is trending, but nowhere near PHP. JS is currently declining (which is quite surprising, since all the fuzz seems to be about node.js atm). The biggest gains seem to be among languages that are important for the mobile market, which isn’t PHP’s direct realm.

Regarding Yii vs. RoR: Yii has in parts been inspired by RoR, so I think there is little gain in putting the two frameworks in opposition. There has been a comparison between the two a while ago which I found an interesting read.

Now for the further outlook, I’m with waitforit. Cross-platform projects are very important right now. And they are cheapest to set in place an maintain if they are web-based. Every piece of internet-capable consumer hardware nowadays ships with a browser, so the prerequisites are right there. There is an incredible amount of infrastructure backing the web. Including ready-to-use concepts for fault tolerance, load balancing and failover configurations. All of this is a strong point for web application frameworks, so I take it they will be around for a while longer. At least until a protocol has been established and deployed widely that is as versatile as HTTP ;)

What is really intersting is that formats having their origin in web app development have now permeated into languages that are rarely found in that realm: Consuming JSON in C? Not a problem. Reading in RSS/Atom feeds in Erlang? Sure. Parsing XML in Prolog? Only a one-liner away. There are certainly web application frameworks in those languages around (I’ve personally worked on one in Prolog), but they have an insignificant market share and are often designed for a specific technical niche, which is hampering their wide-spread use.

As far as Yii’s role in this is concerned: Have patience. Yii is relatively new and unknown to a lot of decision makers. Yet it is strongly trending. Towards the better, of course ;)

Oh, and just for the lulz: PHP has JavaScript capabilities.

First of all, the statement about PHP isn’t going anywhere isn’t true: http://www.slideshare.net/jpauli/on-road-to-php55

RoR doesn’t feel special to you becaise you’ve used Yii. We have lots of similar ideas. Some things aren’t that good, some are better but the spirit of the framework quite matches.

Yii is gaining popularity very fast. It’s already took the top places on the list in all ex-USSR and starting to conquer US and Europe with conferences and meetups. Two years ago it was different, of course.

In ex-USSR every fifth PHP job lists Yii as a requirement. Also check jobs section at this forum. I think Malaysia can be the case with lack of jobs because Yii isn’t very popular there yet. But you can always take a remote job that’s often paid a lot better.

There are some thoughts of mine about PHP and frameworks http://rmcreative.ru/blog/post/yii--frameworks-and-where-php-is-heading-to . A bit too offensive about ZF and Symfony but it was necessary for the talk. In reality I appreciate these project for what these done to PHP world recently. As for RoR and Django… well, it’s smaller market overall. Harder to find developers, harder to get a job.

As far as RoR vs. Yii goes…

Lets be clear about something. Ruby is an elegant language in a kind of way that php is not and cannot be due to its roots (aka historical baggage). Therefore, RoR inherits the goodness and magic that Ruby provides.

There is really nothing that can be done in RoR that can’t be done in Yii, or done in Ruby that can’t be done in php. I think you can argue that Ruby is more expressive than php as a language. For contrast in the other direction look at Java (eww).

I think php’s advantage will always be its universal availability and out of the box ‘ready-to-use’ factor. That doesn’t stop me from experimenting with other languages though as it is just interesting to see how to approach problems from another angle.

Thanks guys! Lots of reassuring stuff.

To answer some the points, I think there is a lot of hype about Node.js but it’s currently just a lot more about the “possibilities” than actual deployment IF you compare the amount of live Node.js projects compared to RoR projects.

Besides, I love Yii. I really have taken a good look at other PHP framework and I think they’re a lot more talk than not.

It’s just a matter of why is Yii not as popular are the rest. You don’t hear about a Yii meetup, “YiiCon” or even a large Yii community.

Please don’t take offense by any of these statements. I am on your side :P I just want to see Yii getting more attention. The attention it deserves.

One of the biggest advancements we have is the Yii books that we have out and if you’ve also noticed Larry Ullman is writing a Yii book in parts. I think that’s really cool.

We’ll have to wait and see how the future shapes out. But it definitely looks good for Yii :)

Meetups take time to establish and require somebody to take the organizational burden. In case of “YiiCon” it is my pleasure to prove you wrong :)

Currently in Australia a good RoR developer can get at least 20K/annum more than a good PHP developer. RoR is the fashion, however will it last?

I am also seeing more and more Yii specific work in Australia, so there is definitely a future with it. I think that in the longer term a ninja Yii dev will close the gap with RoR devs.

Were I as young as you, I would learn both.