Prism for HTML5/JS

Topics: Prism v4 - Silverlight 4, Prism v4 - WPF 4
Mar 22, 2012 at 5:12 PM

This is a fairly high-level exploratory question to help me frame the direction I'm researching, looking for Prism-like architectural patterns for HTML5/js type websites/applications.

I'm a big fan of Prism/MVVM when it comes to WPF/SL due to the use of strong design patterns such as:
- Modularity
- IOC/DI
- Event Driven
- View Separation 

That, plus other design patterns allow for a very strong underlying architecture for maintainable large scale applications.

I'm looking for guidance to accomplish the same architectural approach but using typical web technologies.

MVC is great.  The new single page application (SPA) using js libraries for MVVM and offline storage are also great.  There are many other great technologies for the web to choose from.  Add it all up including HTML5/js and it should be "close enough" for a desktop experience on the web.

The biggest pattern I have a problem with right now is modularity.  With Prism/WPF modules are easily identified and separated.  The only reference to the outside world is through interfaces shared in a central framework.

How does one accomplish the same design for a website?

I'll end by saying another huge benefit to me using Prism was the consolidated and proven nature of the guidance.  It wasn't a mixed collection of technologies and patterns from all over the place where you have to make up the glue in between.  That hard work was already done by the PnP team, thank you by the way.

I'm hoping to not have to figure out all the in between bits, hoping that someone (like the PnP team) has already done that :)

Cheers

Developer
Mar 22, 2012 at 8:05 PM

Hi,

Prism does not provide guidance for building websites and architectures implemented in HTML / JavaScript. However, I believe you will find one of the latest Pattern & Practices projects very valuable for this kind of scenario: Project Silk.

As far as I know, Project Silk provides guidance based on HTML5, jQuery and ASP.NET MVC 3 which covers several topics like modularity, loosely coupled communication and dependency injection among many others. Based on this, I believe you will find the patterns proposed by this guidance very useful.

You can find the official MSDN documentation of project Silk in the following link:

Regards,

Damian Cherubini
http://blogs.southworks.net/dcherubini