startups and code

JavaScript and Server Development in the new world

← Back to home

As promised, a new post for this. JavaScript has made itself "THE" client side scripting language for the web (sorry VBScript, you lost that battle). Now, with web browsers being more and more powerful, and cloud computing, network storage, and bandwidth being at a high-level, why should a web developer learn in-depth server-side programming when JavaScript with frameworks like ExtJS, Dojo, MochaUI, and (of course) JQuery provide such powerful mechanisms on the client that free up Server resources to truly serve data. MVC3 becomes a "C" out of that which only serves up Ajax requests. The Model and View are stored in ExtJS. Let the client do the work for you. Razor (and all other view engines) are dead at that point. Why would I want to see my page post back to the server when I can simply make an ajax call?

Ok, now that I have gotten the few devs reading this either going,

"YEAH, you are right, that is how it should be done."

or

"What are you talking about, the server code is essential for generating dynamic html that gets pushed to the client, that is why Razor (view engines in general) are used, so you can access your model right then, you are clueless."

As a former speech/debate member, I can go either way and see the advantages to both. Microsoft keeps coming out with new approaches to the MVC/Razor engine. They even have an IDE called WebMatrix which makes development of web sites EASIER (not completely easy, but easier) for non-developers. I love WebMatrix (so much I'm teaching a class on it in the spring (plug-plug-plug)).

So here is my attitude, I understand that if you are doing a marketing site, blog, simple web-presence site, server-side development is fine and really makes it easy to maintain from my standpoint and also, it generally (I said generally) works on almost any browser out there, since it is just pushing html.

However, for complex, high-dynamic layout sites, JavaScript seems to be the way to go. I'm still hesitant, but it is getting harder and harder for me to argue. Try and create a resizable nav bar with a tree in it without posting back to the server without JavaScript. You do lose all of the cool functionality that Microsoft is trying to convince us we need to do development (Razor, ASP.Net, Silverlight, .Net Framework).

But before you get all angry and emotional... stop and think about this:

"JavaScript is a free language that is supported on most browsers without ANY plug-in required"

So on the server, you simply need a way to pass down data (Json/Xml/etc...) and have server side validation of the request (a web service (pick your language, php/asp.net/ruby?)) and that is it.

All the argument of ASP.Net using Razor view engine is better than Java using Spring which is better than PHP, which is better than, Ruby on Rails, which is better than Perl or Python, which is better than 6502 Assembly, etc... who cares which is better, pick your language, it doesn't matter to me... just let JavaScript do the rendering...

Why is that so scary for people? Because Apple can't force websites to sell their application through the AppStore if it is available through the Safari browser? Because Microsoft can't sell another new technology (Razor/MVC4/5/6) so you have to buy the next Visual Studio? Because Google is all for it and they want to improve things (so far) and keep getting better without trying to sell me something at every new "release". I got a new OS on my android last night, did I have to go the apple store to buy it? did I need a new version of the iPhone to run it? did I need to download 23 security patches to make sure it would be safe after I installed it? did I have to order a new version of it and pray it works better than Vista and works on my hardware? The answer to all of those questions are NO. I simply pressed, "apply update". A few minutes later, my phone was faster responding, messaging had gotten selection of text better, and the notifications were faster and the toolbar was more readable. ALL FOR FREE. So yes, I am a fan of Google. Yes, I am writing this on a macbook, and Yes, I worked at Microsoft for several years and still work on Visual Studio everyday (and love it). But I'm learning nothing is black and white (even macbooks are grey now. hehehe). I like technology and what it provides for us. I don't need to be on one side or the other. I use what technology is appropriate for the task at hand. I still do some websites in iWeb, because it is easy. I use wordpress or blogger depending on how in-depth the person wants to go for blogging. I do use MySql or SqlExpress depending on what their host provides. It is all up to what the user wants and what best fits. Don't try to force everything down a single path. I love this quote,

"If all you have is a hammer, than everything looks like a nail"

Apparently, that came from Bernard Baruch. It's true. If I am an ASP.Net developer, then why would I ever want to do Java/Spring? If I am a database developer, why not put everything in the stored procedures and control the business logic there rather than on the server? If I am a client side developer, why not design the whole site in JavaScript objects, and make Ajax calls to get the data you need. It is a combination of ALL of those that make a good site. The problem I have seen is that people are having a hard time finding people to maintain that, because people can only do one thing. You have to hire a database developer, an ASP.Net middle-tier developer, and front-end JavaScript developer to maintain one site. Yes, that is true... or you hire one person who knows all of that... but they still have their favorites... It is not easy, but that is why it is an ongoing challenge. Ok, I've written enough for today... It's almost 8am. Let me know what you think and what technologies I left off that you feel are important to include. Thanks for stopping by.