with the help of the Launcher class that will provide Event Loop automatically.
Despite the typical Java concept that regular application is usually a WAR archive that should be deployed to some
DataKernel application has embedded server. So it looks like a regular Java program. You just launch it and that’s it -
DataKernel supports running Event Loop in the main, like Node.js executes in Event Loop. Moreover, DK provides features
like Launcher and DI.
JS has several dynamical chaining methods - then(), catch().
DataKernel provides a wide range of methods - then(), map(), thenEx(), mapEx(), whenResult(), whenException() etc.
JS allows to execute promise-ified functions using all() method.
DataKernel provides even more useful methods - combine(), both(), either(), any() etc.
Have a look at combine():
For more examples of these methods, navigate to Promises.
Middleware VS Servlets
Express.js allows you to use a chain of functions (middlewares) that are called one after the other, make any modifications to request, and then send a response back.
DataKernel suggests an alternative named routing servlets.
DK routing servlet allows you to simply deal with the application’s endpoints.
You can create servlets for each of the specified paths to handle requests independently and preserve modularity.
DataKernel uses functional composition, so servlets can be wrapped one in another.
Whereas Node.js always follows the chaining construct, like:
To make DataKernel more developer-friendly, we’ve created dozens of tutorials and examples of different scales,
representing most of the framework’s capabilities. You can also go through tutorials
or explore our docs first.