The State of Front-End Package Management

Scott Hanselman just introduced support for front-end build tools grunt, gulp, bower, and npm on his blog. Visual Studio is going to have support for front-end build tooling and package management. As Scott mentions, there still is possible use cases for using NuGet to distribute front-end assets.

However, I think not using any package management for front end assets is OK for the most part. I’m actually not a big fan of tools like require.js either. While it encourages people to structure their JavaScript better, we shouldn’t be wrapping all our JavaScript code in framework specific “define” methods. Now your entire app is coupled to require.js. Justin Searls talks about this in the latest episode of the changelog: http://thechangelog.com/128/.

Just because NuGet is a lifesaver and huge optimizer for managing third party dependencies doesn’t mean tools like bower will solve your front-end dependency management woes. For one, pulling in new JavaScript is not hard. Perhaps it is too easy. Second, if you have to use a tool to manage your dependencies in JavaScript – you’re probably running a little fat on the client anyway and need to go on a diet. Lastly, I don’t think the trend will ever go away from directly including third-party JavaScript, as opposed to maintaining a “lib” folder for .dll dependencies.

.NET/Azure Folks: Learn Reactive Programming

On November 4th, the course Principles of Reactive Programming will start on Coursera: https://www.coursera.org/course/reactive. While the course is not taught in .NET, the principles are platform agnostic but is particularly targeted at building distributed and scalable systems. You can learn more about the characteristics of these systems here: http://www.reactivemanifesto.org. One of the course instructors is Erik Meijer, a former architect at Microsoft with large responsibilities in the development of LINQ and Reactive Extensions.

Current guidance on building distributed systems on Azure focuses largely on more infrastructural concerns, such as using queues or Azure Service Bus for distributing work. (See Clemens Vasters’ video blog on Channel9 and course on Pluralsight for excellent guidance in this area). This will be changing as frameworks and tools emerge that embrace the distributed nature of computing, much in the same way frameworks like Entity Framework provides a programmatic model for the database, or Web API gives a model for HTTP.

These efforts are already well underway at Microsoft. Microsoft internally uses Reactive Extensions for message processing on Azure, as evidenced by their CloudFx framework. They are also developing actor model libraries similar to Akka and Erlang that provide a simple programming model for programming distributed systems. Code-named “Orleans”, a framework similar to Akka has been in the works by Microsoft Research as far back as 2010, and is used in production by the Halo team for building real-time gaming services. ActorFx, an Actor Framework for Windows Azure, is another effort in this area to provide a language independent model for distributed systems.

While all these frameworks are at various levels of maturity (or availability), the consensus is clear in the community for the need to develop a programmatic model for building resilient and scalable systems to take advantage of both the increasing prevalence of distributed systems in the Cloud, as well as the increasing number of cores available on today’s processors. If you are building systems that require resiliency and/or scalability in a distributed or multi-core environment, understanding the patterns and solutions available to build these systems is essential to good software engineering. Of these frameworks and libraries, Reactive Extensions is already a success story, being adopted both within Microsoft and the wider community. Recent examples include GitHub’s most recent release of their .NET client features a Reactive companion package, and Netflix bringing the same concept into the Java world with RxJava, using it heavily with their APIs.

Instead of re-inventing the wheel every time we come up against these challenges, let’s learn and work together to build and master the tools needed to address and achieve the potential of today’s distributed environment.

Update: In addition to the Coursera course on reactive programming principlesErik Meijer is offering a live course focused solely on Reactive Extensions (Rx). Sign up at https://rx.yapsody.com.

Links/Resources

Reactive Programming

Principles of Reactive
Programming on Coursera

Reactive Manifesto

Reactive Extensions

Reactive Extensions
Project Home
GitHub: Rx.NET and RxJS and more
DNR: Reactiv Extensions
Functional Reactive Programming in the Netflix API
Learn Rx in SF with Erik Meijer himself: https://rx.yapsody.com/    

Microsoft “Orleans”

Orleans Project Home
Orleans Channel9 Team Interview
Microsoft opens early adopter program for its ‘Orleans’ cloud framework
Orleans: Cloud Computing for Everyone – ACM Symposium on Cloud Computing (SOCC 2011)

CloudFx

Understanding and Using the CloudFx Framework

CloudFx Samples

CloudFx on NuGet

ActorFx

ActorFx Project Home

Programming
the Cloud with Actors: Inside ActorFx

Akka