Skip to main content
Home  ›  Blog

JS Rules! #2 - JS Modules / Apps are compatible across CMSes, Platforms and Versions!

This is part 2 of my short series JavaScript Rules! - make sure you have also read part 1 about the new WordPress architecture.

Let's start with an FAQ

  1. Q: Will JavaScript Apps work in DNN 6, 7 and 8?
    A: Yes!
  2. Q: Will JavaScript Apps work in the future neXt version of DNN, which won't be compatible to the current versions?
    A: Yes!
  3. Q: Will JavaScript Apps also work in Umbraco, Kentico, SiteFinity or SharePoint
    A: Yes!
  4. Q: …on Azure, Amazon, Google-hosted scenarios
    A: Yes!
  5. 5. Q: …on (heaven forbid!) PHP, Ruby, nodejs servers
    A: Yes!
  6. Q: Will it work across all these platforms with one code base for the App / UI?
    A: Yes!
  7. Q: Will it work across all these platforms with one server API code base?
    A: For DNN 7/8/neXt probably yes.
    A: For cross-platform or cross-CMS probably no. 

The Vision: Server Agnostic Applications

I would like to start with an example of an application I recently stumbled upon - simogeo/FileManager - a JavaScript based file manager which looks nice and doesn't care what server is running it - all it cares about is the server side API which is currently exists in PHP, MVC, classic ASP. It even has ColdFusion and Lasso! We're currently evaluating it to replace the Telerik-file-picker in 2sxc, because all we would have to do is create a DNN-API. 

This is the power of JavaScript - basically any kind of System which only cares about a simple API will become portable to many platforms and will become used on many platforms. What's really nice is that a JS-App-developer starting on DNN can also cater to Drupal, SharePoint or some Ruby-Server. The Requirement: Separation of UI and Server-Functionality

To get there the UI must really become independent of the server underneath. Any halfway implementation mixing server-rendered HTML with the JS-App will never reach the same broad audience as a properly separated system. Here's an example that won't make it (unless they refactor) ResponsiveFilemanager. It looks great - better than the simogeo/FileManager - but the core view is PHP rendered, making a DNN adaptation very "expensive" and parallel maintenance impossible.

Key Success Factor for Future Apps: Clear API

Assuming I'm right (and I have a track record in tech predictions :) then one of the key success factors of future apps is JavaScript-only UIs and a clear, replaceable API. This means that a good JS-App must…

  1. have a consistent way of calling WebAPI endpoints - preferably REST
  2. use a common, consistent format - preferably JSON 
  3. allow minimal configuration to address alternate WebApi endpoints (because urls will change a bit from system to system)
  4. clearly separate network-concerns from the core application (like authentication) - like our implementation of configuring $http in 2sxc to fit DNN

Basically developing a JS App this way will allow easy portability to other platforms and increase its adoption. In the same way any JS App developed this ways will be easy to port to DNN as well. 

Key Success Factor for Future Server-Platforms: Api-Flexibility and Dev-Speed

Being able to deliver a WebApi for an existing JS application is key to the success of future servers. This means all layers of the stack OS (Windows/Azure/Linux), web service (IIS, Apache), dev-framework (Java, PHP, .net), implementation (WebApi, etc.) and Frameworks built on top of this (like DNN or the 2sxc-REST-Api)

Microsoft has been doing a good job here for about 2 years now with WebApi . And I love what they are doing with opening up, promoting AngularJS - this will provide another great boost. 

How does DNN, 2sxc or custom 2sxc-App fit in this brave new world?

Surprisingly well - even DNN is extremely well prepared. The core question is how well is each part future-proof, based on the key success factors. This will be discussed in part 3 of my JS Rules! Series.

With love from Switzerland,

Daniel Mettler grew up in the jungles of Indonesia and is founder and CEO of 2sic internet solutions in Switzerland and Liechtenstein, an 20-head web specialist with over 800 DNN projects since 1999. He is also chief architect of 2sxc (see github), an open source module for creating attractive content and DNN Apps.

Read more posts by Daniel Mettler