Friday, May 27, 2011

Server side javascript, when will you dominate

Back to 2008, when one of my friend told me that he believes one day javascript can take the place of PHP, I just laughed and didn't take it seriously. 

The world of web development has been changed so much that today we can't ignore javascript. The painful part that causes many developers don't like javascript programming, DOM manipulation inconsistency in variant browsers, will become more and more painless as browser vendors start to make their latest browsers become standard following, and people start to use these browsers. Also we already have many excellent javascript libraries that help to reduce the pain of crossing browser issue. No matter what, javascript dominates frontend development, and i believe it will keep dominating. And frontend is taking more and more business logics and becoming more important than ever.

But why only limit to frontend? As a programming language, is there any specific feature that cause it only suitable for frontend programming? I don't see any. I believe javascript is a plasticine language. It is so flexible that it can mimic OOP language, procedure language, functional language, or whatever. It is up to you that you like its flexibility or not, but that shouldn't be the reason that javascript can only survive in frontend, in browsers.

Actually, netscape did implement the first server side javascript in livewire. But somehow, server side javascript is not wildly supported and javascript turns to be a frontend specific programming language for people to create annoying popup windows. 

However, let's imagine that we can use javascript at both frontend and backend. How wonderful it could be! Developers don't have to spend time learning backend language and frontend languages and become more productive. Employers don't have to worry about looking for frontend developers and backend developers. Web will become a better place. 

I wish this day can come faster, the day that server side javascript become wildly supported. It doesn't have to be replace PHP or other backend languages, but it can be as popular as them and offer one more option for developers and development. 

I have to say, i still like PHP. But I just so believe that if javascript can work at both frontend and backend, the world of web will become much much better and more wonderful.

No comments: