Node.js: Content Managers Developed using the JavaScript Environment

4 min reading
Node.js: Content Managers Developed using the JavaScript Environment
Node.js: Content Managers Developed using the JavaScript Environment

BBVA API Market

Content management systems are a mandatory requirement of any digital project in the editorial sector. Some companies choose free CMS such as WordPress, Drupal or Joomla. However, there are companies (usually the media) that prefer to develop their own managers so as to achieve greater customization and robustness and maybe even be able to market the solution. There is now another option in the market: the various CMS developed on Node.js, the JavaScript server-side development environment.

There are four main examples of managers based on Node.js and the JavaScript technology: KeystoneJS, Hatch.js, Apostrophe and Pencilblue. All of these solutions may be an interesting alternative thanks, to a large extent, to the increased influence of syntaxis in the overall development of digital projects, from adding interactivity to user interfaces to other areas such as back-end, servers and databases.

1. KeystoneJS

KeystoneJS is a framework on Node.js for the development of content web pages. In addition to Node.js, it is built on Express–the framework for developing back-end specific to Node.js– and MongoDB, the database management service in JavaScript. Consequently, this CMS is entirely developed in a programming language that is currently at its peak.

Although it goes without saying, it should be noted that the KeystoneJS installation has two obvious dependencies, Node.js and MongoDB. As a consequence, you need to install the environment and database to be able to use this web and application editor. They are easy to download and set up. You can find tutorials in their web pages.

There are additional conditions: the developer or designer must have mastered programming in JavaScript and it is recommended that they know Jadethe template system used in Node.js and based on this syntaxis– and LESS, the CSS style sheet extension. Virtually all JavaScript professionals know about both these projects.

To install KeystoneJS, follow these steps:

Install the KeystoneJS generator (this is its code on GitHub), developed by the Yeoman team. To do so, use this command:
$ npm install -g generator-keystone

Create the project folder. You need to create the directory for the web project or its application.
$ mkdir my-test-project

Check that you are inside your own project: $ cd my-test-project

Run the KeystoneJS generator: command $ yo keystone.

Final step. Run the command $ node keystone and open the local test server http://localhost:3000/ in the browser.

KeystoneJS – main characteristics:

– Available for free, it sits under the MIT license.

– Based on a MVC architecture (Model-View-Controller).

– Management system for registered users.

– Dynamic paths.

– Jade can be used as the template system but developers may choose one of the alternative options. Templates are fully customizable, with or without Jade.

– PaaS (Platform as a Service) for hosting solutions.

– Integration with email and services such as MailChimp.

2. Hatch.js

Hatch.js is one of the market alternatives to KeystoneJS, the CMS on Node.js most commonly used by developers. Hatch.js is a flexible and scalable open-source tool. It is a framework for creating webpages which combines content management with the use of social media for its distribution. It can be customized using widgets. In addition to Node.js, Hatch.js is built on Redis, an open-source solution for storing NoSQL data in the memory.

These are some of its defining characteristics:

– Quick and scalable CMS, which developers appreciate. Based on a key-value model, the NoSQL database system enables quick content load even in pages with big volumes of dynamic information. According to the developers of Hatch.js, this response time is under 0.05 seconds without having to use cache.

– Plug-in based solution. Hatch.js characteristics are written with plug-ins at the top of the platform. If developers wish to implement new features, they only need to code their own plug-in. To do so, they use CompoundJS, the Model-View-Controller development framework for Node.js.

– Every single template possibility. Hatch.js contains the themes from Bootstrap, Twitter’s development framework to design responsive websites. Alternatively, you can create your own template or program the project from scratch using HTML and CSS.

– It has all fonts from Google Webfonts.

– You can use LESS for CSS style sheets.

– Commercial licenses cost almost 730 euros/month.

3. Apostrophe

Apostrophe is a CMS which focuses on enabling simple content creation. Just like the aforementioned managers, it is based on Node.js for the back-end and MongoDB for the database.

Instead of Jade, Apostrophe uses Nunjucks as its template engine in JavaScript. Inspired by jinja2, the most powerful template engine for Python, Nunjucks precompiles templates directly on any modern browser and is fully scalable thanks to the use of extensions.

In addition to Node.js and MongoDB, another Apostrophe dependency is ImageMagick, a tool for creating, editing and converting images into all formats (jpeg, png, gif, tiff, svg, etc.). This is a kind of Photoshop incorporated into CMS: you can retouch colors and light curves, change sizes, retouch the frame, flip images, apply special effects… ImageMagick is an open-source software solution with Apache 2.0 license.

4. Pencilblue

Pencilblue is a CMS based on Node.js, MongoDB and Redis for the creation of responsive editorial projects. For design targeted at mobile devices such as smartphones, smart watches and tablets, developers who use Pencilblue benefit from integration with Bootstrap; AngularJS, the front-end development framework based on the Model-View-Controller (MVC) paradigm; and jQueryUI, the set of templates and widgets aimed at designing the user interface of websites.

Just like any other CMS, Pencilblue is fully scalable and customizable by installing plug-ins (a very similar system to more well-known managers such as WordPress). You can find the list of modules in the manager’s website. In any case, as it happens with WordPress, developers who use Pencilblue can program their own plugin. Watch this video for more information:

Follow us on @BBVAAPIMarket

It may interest you