IT’S HERE! X2 Framework for Node.js

We are ecstatic to announce the arrival of our newest product: the X2 Framework for Node.js! Designed and developed in-house by our VP of R&D, Lev Gimelfarb, X2 is a collection of modules published with NPM and designed to provide a complete toolset for creating back-end applications that expose RESTful APIs and are backed with a SQL database.

X2 – which we also refer to as “x2node” – comes packed with many modules crucial to developing applications today: persistent resources, basic RESTful APIs, SQL database operations, record validators, and JSON pointers, among others.

I asked the Lev a few questions about his latest creation…

Why did you see the need for this new framework? What need does it fill that other frameworks do not?

Lev Gimelfarb
Lev Gimelfarb

Lev Gimelfarb: Since Node.js gained completely justified popularity as a platform for creating back-end applications, particularly web-services, the eco-system of modules and frameworks for it grew unprecedentedly vast and poorly organized. Separating the wheat from the chaff in the world of modules for Node.js is a challenging task, especially for newcomers to the platform. Frameworks like Express and StrongLoop have emerged as the “gold standard” for implementing web-services with Node.js. However, if we look at Express, its developers call it a lightweight, minimalistic framework. The issue with that is when you create a full-featured web-service application ready to be exposed on the Internet, you end up adding dozens of other modules to the application that extend the framework – you find yourself in the same situation of introducing numerous dependencies and figuring out what modules to use and how to use them. What’s the value of a framework being “lightweight” if the end application built on it ends up being far from “lightweight”? The goal of developing x2node was to provide a single environment for creating applications that have all the features expected from a production-ready web-service, straight out-of-the-box, and allow the developer to completely focus on solving the specific business task instead of getting mired in the technology. In addition to that, the framework contains certain solutions, such as its SQL database operations module, that does not really have analogues.

Are there types of applications for which x2node is particularly well-suited or optimized?

LG: X2 was designed as a toolset for creating back-end applications that expose RESTful APIs and are backed with a SQL database. However, that is not the only way to use the framework. It is comprised of several modules that can be used on their own. For example, the same SQL database operations module mentioned earlier can be used by an application based on the Express framework and provide access to a SQL database in a way that is as easy as a NoSQL database. Similarly, many other modules included in the x2node framework can be used separately.

As the open source community begins to play with and use X2, what sorts of community contributions and extensions would you like to see?

LG: There are several extension points in the framework where additional modules can be implemented. Currently, the database operations module supports MySQL (and compatible databases) and PostgreSQL. Drivers for other database engines can be developed. The HTTP authentication modules currently include support for Basic and Bearer (OAuth 2.0) schemes. Other schemes could be added in the future. Collections of basic web-service endpoint handlers can be developed (the framework currently includes one such collection in the x2node-ws-resources module). It’s hard to tell where it will lead, the framework is only on the beginning of its public path. We’ll see!

We are really proud of what Lev has achieved with X2 – and we hope you are too! For those of you who want to learn more about the new framework, there will be a TechTalk held at Boyle Software’s HQ in New York City in the coming weeks. Please send an email to for more information and to inquire about attendance!

7 thoughts on “IT’S HERE! X2 Framework for Node.js

  1. I am always looking for ways to improve NodeJS and the X2 Framework looks incredible, especially the basic RESTful API node package. It is clear that Boyle Software cares about the node packages that are distributed.

  2. Do you have something that packages them all or even a tutorial that goes into more detail the setup? I’m not too familiar with x2node, but I see 8 different modules.

    If I understand it correctly, the modules should be downloaded independently, but couldn’t they all be packaged together? If these are the most useful packages that have been curated by boylesoftware, why not offer the 8 individually as currently done (for more experienced people to keep their apps light), but also provide 1 general purpose package (just called x2node), which is less work to install?

    If the noobie is the target audience, wouldn’t it be easier to package them to one and offer a demonstration (documentation) to show how to install and use it; my guess is with a Todo or Calendar app.

    I look forward to giving it a test try, once I find out more. If all works out right, hope it can integrate with SSO/Kerberos/NTLM authentication in the future, especially since it supports Postgres.

  3. @vol7: All of the modules are published in NPM and their dependencies are set accordingly. The functionality is split into these independent modules deliberately. The framework does not address a single use-case, depending on what the application does it can use some of the modules independently. For building a web-service app backed with a SQL DB, the “top” module would be x2node-ws-resources. Once you add it to your project, you’ll get other dependencies via NPM. And – we do plan a short tutorial, like a Todo app service, for x2node-ws-resources module. For now, the manual with some use-cases and example can be found in the module’s main README.

    @Mariusz Miszuta: Unfortunately, I’m not in a position to compare it with sails.js. However, if you’ve developed server-side apps using it and now are going to try x2node – your comparative feedback would be greatly appreciated by the community!

  4. @Veeresh: There’s no specific support for MongoDB in the framework. MongoDB itself has an API that is very easy to use and it does not really require any extra framework-level code on top of it, in our opinion. Of course, some frameworks follow the path of universalization of the DB API and provide generic interface for the application code to access databases of different nature, such as SQL databases and a variety of NoSQL databases. We think it’s unnecessary and in fact limiting. So, an application that uses x2node with MongoDB won’t use such SQL-specific modules as x2node-dbos and x2node-ws-resources, but it can still benefit from modules like x2node-ws, x2node-validators, etc. and use the MongoDB API to work with the database.

Comments are closed.