JavaScript Tutorials
JavaScriptNarwhal Server Side JavaScript Library
An application through server-side JavaScript provides is not only seen as a highly interactive application (through JavaScript), but also a stable application with powerful security (through server-side).
Although JavaScript is originally a client-side programming language, developers are trying to move JavaScript to the server side. Unfortunately, the client side does not have the security features offered in the server side. If JavaScript could just be ported, the application would be a lot more security with the same interactive experience it could give to potential users.
Coding server side JavaScript is a good option. But a library created specifically for server side JavaScript is a lot better if a developer does not have time (or expertise).
If you are looking for a server side library, consider using Narwhal. It’s a highly adaptable server side JavaScript library as it could practically work in most JavaScript interpreters. Developers would be able to easily implement server side JavaScript as Narwhal would conform to interpreters without too much configuration from developers.
This powerful feature from the said library comes from the fact that it has totally conformed itself to ServerJS Standard. This type of standard was created by Mozilla as part of their efforts to standardize server side JavaScript. ServerJS Standard is practically an API which means developers could “plug-in” the ServerJS in the application.
Narwhal is based on this concept but pushes it even further so that it could be fully implemented in an application. Instead of a simple plug-in, Narwhal comes as a library with functions that could create an application.
Securable Modules
The library contains functions that introduce JavaScript to the server side. Keeping up with its original intention in porting JavaScript to the server side, these functions are created to ensure security. “Securable Modules” is another standard followed by the developers of Narwhal. It’s almost part of the Mozilla’s set of modules to enforce security in the server side.
But that’s not the only thing offered by this type of module. As part of ServerJS, the module will allow developers create server side JavaScript APIs that could be easily ported to other JavaScript interpreters.
These features in Securable Modules are found in Narwhal. These are implemented in various functions and attributes including:
• package.json (which could be replaced by local.json)
• bin
• lib
• jars
• src
The following are functions that help integrate the library to different platforms:
• package/{name} – to properly launch sub packages
• platform/{name} – to command the library to adjust its functions to the specific JavaScript platform.
Attributes in this library is almost the same compared to standard JavaScript attributes. However, it needs to go with the “package” and “platform” attribute to ensure compatibility.
Overall, Narwhal is a very smart server side JavaScript library. By choosing Mozilla’s tools, they ensure that the JavaScript functions would seamlessly go through. The addition of Securable Module makes it even better as it creates additional security and compatibility.
It could be limited to Mozilla but given the acceptance of JavaScript functions today, Narwhal could be a great library with cross-browser compatibility.
Sponsored Links
