Quantcast
Channel: SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 789

Analyzing JavaScript Remotely! With Vorlon.JS

$
0
0

Vorlon.JS

 

vorlon.png

 

An open source, extensible, platform-agnostic tool for remotely debugging and testing your JavaScript. Powered by node.js and socket.io.

 

That’s the official introducing. Sounds pretty interesting, right? I’ve tested Vorlon.JS with my current software project. The lesson is clear: Vorlon.JS provides useful features for analyzing and testing web based applications.

 

How does it work?

 

Vorlon.JS consists of a server-side and a client-side part. The Vorlon.JS server is based on node.js and provides a web fronted(dashboard) for inspecting connected applications. In your app, you enable Vorlon.JS by adding a script tag.  After that, the client will send various information to the server:

 

  • console logging
  • network activities (XHR and resource loading)
  • DOM tree and corresponding styles
  • all living JavaScript variables
  • a list of supported and unsupported browser features
  • local resources such as localStorage/cookies

 

All these information are very useful if you want to analyze remotely the status of an application. The following pictures illustrates an exemplary IT Infrastructure with Vorlon.JS.

 

architecture.png

 

Installation

 

Ensure, you have installed node.js. If not, visit the download section of the official website.

 

Open a console and type the following to install Vorlon.JS.

 

 

npm i -g vorlon

 

After that, you can start the server with:

 

 

vorlon

 

To connect e.g. a SAPUI5 application to the server, just add this script-tag in your index.html.

 

 

<script src="http://vorlonjs-server:1337/vorlon.js"></script>

 

Recommendation

 

For evaluation purposes, you can install Vorlon.JS on your local machine. For production, i recommend to install it on a separate server. If you have some experience with Amazon Web Services, it’s maybe a good idea to install Vorlon.js on a virtual server via EC2. Here’s a little instruction:

 

  • choose instance type t2.micro (that’s enough capacity for Vorlon.JS)
  • choose Amazon Linux AMI as OS
  • assign an elastic IP address to your instance, so you have a static reference to it
  • logon to your instance
  • install node.js
  • install Vorlon.JS

 

Using Cloud Computing has the major advantage, that you can stop the instance when you don’t need it. So you only pay for the resources you actually need. Besides, the provision of the Vorlon.JS server instance is done within minutes.

 

Working with Vorlon.JS

 

Dashboard and Plugins

 

When the server is running, the following exemplary URL starts the mentioned Vorlon.JS dashboard.

 

http://vorlonjs-server:1337/

 

Vorlon.JS plugins provide the actual debugging functionality. There are eight plugins by default, but you can also develop your own custom plugin. More information about the dashboard and the existing plugins can be found right here:

 

Vorlon.JS Dashboard

Vorlon.JS Plugins

 

Development/Production

 

Vorlon.JS works perfectly with SAPUI5 apps. In your development process, you can assign manually the mentioned script tag in your app. In production, i recommend to establish an URL parameter to enable Vorlon.JS. This approach is comparable with the „sap-config-mode=x“ parameter in Web Dynpro or FPM. If the respective parameter is assigned, you add the Vorlon.JS script tag in your index.html.

 

Hint: SAPUI5 provides a method for evaluating GET Parameter.

 

var value =  jQuery.sap.getUriParameters().get("myParam");

 

If you need to encrypt the communication between Vorlon.JS server and your app, just have a look at the documentation. The project has a great SSL support.

 

Conclusion

 

The idea behind Vorlon.JS is simply great! It’s definitely worth to check out the project!

 

Official Website

Github Project


Viewing all articles
Browse latest Browse all 789

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>