Wednesday, August 29, 2012

Mirror Mirror on the Wall, what is going to be the strongest programming languages of all?

Prediction:

JavaScript in going to cross its current boundaries of being used only in Web Platforms. It will be used in many more scenarios than what it is being used today.

JavaScript is used in combination with other related technologies like HTML, jQuery, JSON, CSS and AJAX.  So it’s not just JavaScript, but all of the related technologies that will have more important role in the future.
For the rest of the blog, when I say JavaScript, I mean JavaScript and the related technologies.

On what basis I make the statement?

I have been working on the new Microsoft products released this year, and observing the trend. Below are some examples of how things are changing with the new releases.

Windows Applications World:
Traditional Win Form Apps were developed in VB.Net or C# as the programming language. The front end used was Win Forms or XAML/Silverlight. With Windows 8 Metro Style Apps, there is a new alternative. The Apps can be developed in either XAML & C++, XAML  & C# or HTML5  & JavaScript.  JavaScript was so far used only in Web Applications, so this comes as a radical shift. It’s being used in a non-web based platform.

SharePoint Customizations/Apps:
SharePoint Customizations were typically done in C# (very few people used VB.Net).  There was an alternative approach called “No Server Code” development, or “Middle tier approach to SharePoint Development”. This approach used SharePoint Designer, JavaScript, XML/XSLT without requiring any custom code or solution packages to be deployed on the server.  While the approach had its benefits (and I led one of the largest and the best team of SharePoint ‘No Server Code’ developers), its adoption in the industry was limited.

In MOSS 2007, to call the SharePoint Web Services, we initially wrote custom code and later used third party JavaScript libraries like Darren’s SPAPI.js or Marc Anderson’s SPServices.js. 

With SharePoint 2010, the approach got a big push with the inclusion of JavaScript Client Side Object Model(CSOM).  SharePoint 2010 CSOM had some limitations, which have been overcome in SharePoint 2013 CSOM.

SharePoint 2013 also introduces a new way of developing customizations called SharePoint Apps. The Apps use JavaScript CSOM to interact with data stored in SharePoint (though C# or even LAMP can be used for SharePoint apps).   Sandbox Solutions and Farm Solutions are still supported and will continue to be developed in C#.  
SharePoint is a Web Platform, and JavaScript was always used since the beginning.

With SharePoint 2013, JavaScript plays a very important role and the industry is likely to use more of JavaScript than C# for customizations.

 

Microsoft Office Customizations:

Office Macros were traditionally written in VBA. With Visual Studio Tools for Office(VSTO), we saw VB.Net being adopted. VB.Net was more widely used than C# in the Office Customization space as VB.Net is the logical upgrade path for VBA Code and also VBA developers.

The Office 2013 Apps (also referred as Agaves) are now developed in HTML5 and JavaScript. Yes, you read it right; JavaScript enters the Office 2013 Apps space.

Other factors:

Mobility:
If you choose to develop mobile apps in native code, you need to develop a different app for each of the platforms (Windows Phone, iOS and Android). However, if you develop a browser based application, it can be viewed on the Mobile Browsers for all the modern mobile devices and tablets. So mobility is a big driver for JavaScript emergence.

Web Services:

JSON is lightweight and has performance benefits (compared to XML) when transmitted over the wire.  The modern web services return data in JSON format, not XML (e.g Facebook API) . Some like built-in SharePoint Web services return data in both the formats, and let the consumer decide.

Mirror Mirror on the Wall, which is going to be the strongest programming languages of all?
The writing is on the wall. JavaScript and related technologies are going to play an increasingly important role (compared to what they do today) in the future of application development on Microsoft and other platforms.  As the Win 8 Apps or Office 2013 Apps examples show, JavaScript is no longer restricted to web development. It is becoming omnipresent. It is emerging the strongest programming language. 

What is my advice?
If you are in the Software industry, and don’t know JavaScript and the related technologies that I earlier mentioned, prioritize learning these skills over everything else. You will be doing yourself a lot of good. It’s my advice to students, fresher's and experienced software developers.

What if what Vinay Bhatia says does not turn out to be true?
Standard Disclaimer: It’s based on my observations and my personal opinions, and if it does not turn out to be true, don’t sue me. However, a few years down the line,  if my advice helps you move ahead of the competition, do let me know and buy me a drink.

What about other non-Microsoft platforms?
I work in the Microsoft Technologies space, and my views are based on the changes that I am seeing in the way we develop in Microsoft technologies.  If you work in non-Microsoft space, do let me know your views by leaving a comment.

7 comments:

Girish Kumar p Meena said...

Very well thought out article :)

JS always had the potential and its being recognized now. But I wonder if this is the right way to do it.
I remember one of the talks which Douglas Crockford, JSON fame, gave to Google where he was talking about how the basic design itself of JS is flawed. And this has been continuing since when Netscape was the primary force behind JS standards. Today Netscape is no longer there (and he attributes JS's failure as one of the reason), but JS code still has the same basic flaws which were there in design since those days.
There were some attempts to right this wrong when HTML 5 standards were being decided. There were 2 copies of these standards one was highly progressive and other was little progressive but which was aimed at making things right all the things which were wrong. W3C, decided to go ahead with former and so the mistakes are just adding up.
Declaring JS as a language of future with all of its flaws is mistake because one day all those flaws will come back to haunt us as the scale of web is going up and since the base is not strong, it will break one day.
Big companies like Google and FB already recognized this and hence they mostly try and use their own framework based on JS (FBJS, Caja project just to name a few).
So I agree with basic point that people has to learn JS and it has the potential of being the language to learn, but it can't force its falws on users and in current form it tends to do just that.

ronancameron said...

Aw, this was a really nice post. In idea I would like to put in writing like this additionally – taking time and actual effort to make a very good article… but what can I say… I procrastinate alot and by no means seem to get something done but i want know about SharePoint.

Sonal Aggarwal said...

Fairly motovating blog!
I work in MS technologies anf most of the times focus on C# part of code and leave rest of it to designers.
But I think Vinay has made a sense here... Java script is actually your strength to accomodate creativity and innovations in app.

Vinay Bhatia said...

Interesting comments. I was not familiar with what Douglas Crockford said, and had to search online for same. While the flaws of JavaScript might not go away overnight, we will continue using it. We can probably minimize the flaws by sticking to the Good Parts (from the Good Parts, Bad Parts) and enforcing use of JSLint in our projects.

JavaScript does not feel like an Object Oriented Language, though it can be me made to act like one. It has its own unique design patterns and style of programming, not found in C# or Java. Some of the styles and patterns have emerged only in last few years, though JavaScript has been around for much longer. There is a learning curve involved in how to use it as OOPs, beyond a scripting language. I did not stress on what to learn, when I said learn JavaScript. It’s the common pitfalls and the unique style and patterns which we need to master for the coming years.

Girish Kumar p Meena said...

The point I was made was if we are betting so big on a programming language such that a lot of applications will be built on that, a fraction of which is what you pointed out, then that language should atleast be free from these flaws. And given how high the stakes are growing (there are more people on FB today then the total population of earth 200 years back!!) then shouldn't we be thinking what the future will be if everything is built on something that is fundamentally weak?

JS has been around for more than 2 decades now and there are innumerable programs which runs on this flawed architecture. Now, it can't go ahead and bring in a revolutionary approach saying it will not be backward compatible. This is the worry of W3C, and hence there isn't any progress on this. Latter they do it, more number of programs will be built on top of a flawed programming language and harder it will become to set things right.

Your article talks about emergence of JS as a futures language and my comments are only precautionary to this, but there is no denying the role of JS in days to come.

Girish Kumar p Meena said...

I was finally able to locate that video which I was talking about:http://www.youtube.com/watch?v=hQVTIJBZook (it's kind of big, but totally worth it, especially in context of this article)

Vinay Bhatia said...

‎@Girish: Google Tech Talks seem to be cool. Thanks for introducing. Watched the good parts video over weekend (you tube is blocked in office). Here is another good one on JavaScript performance optimization at Google Tech talk.

http://www.youtube.com/​watch?v=mHtdZgou0qU&feature​=relmfu