Wednesday, March 18, 2015

Jumping into JavaScript

In passing on .NET Rocks! and in blog posts, I've noticed folks whine and complain about JavaScript. I'm now starting to understand a little of what that's about :)  Now that I'm using JavaScript as my daily language, I too have stumbled on several of the language features that make in mildly difficult for a developer coming from another language to truly appreciate it.  However, I feel like to use JS effectively you have to embrace it flaws and all, and learn to have fun with the language.  I've read Douglas Crockford's JavaScript the Good Parts, but honestly I'll probably have to reread it several times before it all sinks in.

One of the things that I've noted about JavaScript is the huge number of libraries available to work with.  This is both a blessing and a curse.  On .NET Rocks! they sometimes talk about a tribe of JS frameworks, as several frameworks that work well together.  I like the concept of a witch's brew, with several JS frameworks stirred together, with a few JS incantations for good measure.  At first it all seems a little magical.

To illustrate my point, below is a table showing a few of the changes I've made in switching over to JS in my day job.

.NET - C# JS
Testing MS-Test & Moq Karma, Mocha, Sinon, Sinon-Chai, Chai-as-Promised, & Coffee Script
Ide Visual Studio webstorm, atom, & sublime - pick your poison, i use all three for different things
Build MS-Build Gulp & Webpack
Package management NuGet, & Chocolatey Bower, Node Package Manager
Frameworks WPF Angular
Declarative UI Code XAML HTML5, CSS

Many of the core concepts of front-end development are shared, MVC, MVVM, MV*, DI.  Good stuff that doesn't need to be re-learned.  The tooling and frameworks though are another matter.  The upside of the current JS world is the enormous amount of flexibility, the downside is the complexity and the learning curve to become productive.  Honestly, .NET keeps programmers fairly constrained to world of standard libraries, strongly typed code, and compile time error checks.  Stepping outside that world can be a little scary.

Microsoft has embraced the current development landscape of JS and is bringing more JS tooling into Visual Studio 2015.  I'm hopeful that the new tooling in VS2015 will make it the development platform of choice over Sublime, Atom or WebStorm.  Microsoft is really good at reducing the friction in the development experience, here's hoping they get it right for JavaScript!

No comments:

Post a Comment