⬆️ ⬇️

Helma - and again server-side JavaScript

A little earlier, I already talked about the development of the company Aptana - the Jaxer server platform , which allows you to deploy JavaScript applications on the server side, and thus combine the code of the client and server side. Of course, there are many controversies in this approach, as well as the general applicability of such a language as JavaScript for developing full-fledged web applications on the server, but this does not stop developers - despite the limitations, it is possible to develop interesting applications. But is this platform unique? Now there is no.



Helma open source project is a Java-written platform for executing server-side applications in JavaScript. Version 1.7 is now supported, but with the development of the Rhino engine, which is responsible for interpreting JS in all projects of this kind, we will expect that the second version will be supported. The platform also has a built-in web server, which uses Jetty, and even its own object-oriented database (based on XML), which is transparently integrated into the platform and allows you to save and cache objects between sessions. There are also built-in debugging tools for applications, while everything is available through the web interface.





The applications for Helma themselves are an amazing mixture of static files, HTML and the main JavaScript code and other service files scattered in a certain way in the top ten service directories. The approach is quite non-trivial and tries to mix some of the features of Java and .NET, but at first glance this is all confusing, so you have to deal with the structure of files and their format, which is quite difficult. This is a significant disadvantage of the platform, when compared with Aptana Jaxer.

')

But there are positive differences. For example, Helma has its own framework (yes, exactly the same approach in the Aptana solution), which, using the Helma Object Publisher module, allows you to map the interfaces of the connected Java components to JavaScript applications. This will allow for some efforts to use many ready-made server components in Java, and this greatly expands the capabilities of applications. And, unlike the same solution from Aptana, some components are initially available to us that are very useful for developing serious solutions - the Apache Lucene search module, modules for working with databases, protocols SSH, FTP, HTTP, module for working with mail, drawing graphs and charts, working with files and images and several others. In principle, the integration of other modules should not be very complicated, so Helm can even be considered as a proxy provider for connecting Java packages with applications in other languages, perhaps even this part can be connected to Aptana, combining the advantages of both platforms.



The platform also includes a full-fledged environment for debugging applications without the use of additional applications - all operations (breakpoints, viewing the stack, step-by-step debugging) are performed directly in the browser. In addition to the debugger, there is an inspector for HopObjects (these are the main platform objects available in the application, some of which are abstractions to the interfaces of the platform itself, some are the same Java components that are available in JavaScript via the Helma Object Publisher), as well as a small , but a fairly advanced wrapper for working with SQL databases that are connected via JDBC.







Unfortunately, there is no detailed description of the platform, although there is a lot of documentation for the developer, so I tried to understand the general architecture using descriptions in the examples, I studied the distribution itself and in other ways. Maybe I missed something, I didn’t talk about something in such detail as I would have, but it’s not so important and not the essence of this material. In some ways, the Helma platform is inferior to Jaxer - for example, in the ease of deployment, in integration with other servers, but there are quite a few unique points that make this solution interesting for application development. Out of the box, many interesting features are available, more than in competitive environments, and the presence of built-in powerful debugging tools allows you to use Helma as a medium for rapid prototyping and testing new ideas, then implementing them already on a working platform. The choice, as always, is yours!



Ps . Original publication in my blog .

Source: https://habr.com/ru/post/27915/



All Articles