[转] Node.js cms framework comparison
https://github.com/patrikholcak/trinity/tree/master/models
https://github.com/keystonejs/keystone-demo
https://github.com/sseppola/generator-react-keystone
http://keystonejs.com/zh/
Node.js is becoming more and more popular and we can find an increasing number of frameworks available for different purposes. As the community is growing, so grows the user base of all of these frameworks.
Regarding the WEB, one framework type is exceptionally important. If we examine the World Wide Web today, we see, that 40% of the existing websites are using some kind of content management system.
CMS definition
CMS is the abbreviation of Content Management System and it is a commonly used framework type on the web. If you google it, you will find the following definition:
A content management system (CMS) is a computer application that allows publishing, editing and modifying content, organizing, deleting as well as maintenance from a central interface. Such systems of content management provide procedures to manage workflow in a collaborative environment.
Shortly: CMS helps to manage the content of our websites, providing a GUI to create / modify / organize / publish and delete content.
Though the general aim is the same, there are many different solutions and types. We can categorize them according to the following aspects:
Functionality aspect:
There are three popular types of use cases: blog systems, wikis and online shopping solutions. Of course there are more ways to use them, in pretty much any way you can imagine.
Extendibility aspect:
Some CMSs are “ready”, you can use them as they are, but not really
extend them. Some others make it really easy to add new features and
functionality. They are the plugin based ones.
End user aspect:
Some CMSs are really easy to use and they require no programming
knowledge. On the other side, some others are directly developed for
programmers to make their work easier.
Today WordPress is obviously dominating the CMS market as it has a share of 60% out of all the websites using CMS. WordPress is built on PHP and mostly used as a blogging platform, but this is not the only use case. It has an amazing plugin system and an unbelievable huge list of useful plugins. It can be used by anybody, not just programmers.
Node.js based CMS options
Ok, PHP is the winner, but what about node.js? Is there anything interesting in the hands of the fast growing community? Here are the most interesting projects:
Note: After “Github” you will find three Github metrics for each CMS. These metrics are the following: stars / forks / last commit, each recorded in April, 2015. As you’ll see, these metrics give quite a good picture about the popularity of these systems.
Ghost
Github: 14.702 / 3.453 / 2 days
Ghost is an open source blogging platform and at this
time, it is the most famous CMS built on node.js. It provides two
versions, one for everyone and one for developers.
They started their work thanks to a successful kickstarter campaign. They are also famous about their transparency policy as they have a public revenue dashboard. If you are looking for an easy blogging system, Ghost is a good choice. They also provide a nice marketplace for themes.
KeystoneJS
Github: 3.005 / 532 / 1 day
KeystoneJS is an open source framework built for developers.
As they claim, they make it really easy to build database-drives
websites or APIs. That means, you have to add and configure just one
data-model and you’ll get an automatically generated admin interface for
CRUD (create, read, update, delete) operations and an API. That makes
the development process pretty fast. They are using Express and MongoDB
and these are the only prerequisites before installing their product.
They have pretty big “clients” like Continental, Sony or Vodafone, it’s
not a wonder that they are the second most famous CMS built on
node.js. They provide great docs, community and examples.
Calipso
Github: 1.559 / 286 / 3 month
Calipso is a simple CMS system using Express and MongoDB. They say, they
are built along similar themes to WordPress and they would like to be
simple, fast and flexible. They idea is really good, but:
1. Their github repo activity does not seem too promising.
2. They have just five community modules, that’s not a good sign. (The strength of WordPress is in their plugins.)
Despite the numerous stars on the github repo I wouldn’t recommend this
project at this time, later it might be worth to visit again.
Reaction Commerce
Github: 775 / 150 / 7 days
Reaction Commerce is a really interesting project as they are the only one building something for the eCommerce
industry. They are using Meteor, Node.js (note: interesting
combination), MongoDB and CoffeScript and it is launched as a Docker
container.
They promise “real time merchandising”, real time pricing, promotions
and conversion monitoring. They are functional but unstable, with HEAVY
ongoing development.
PencilBlue
Github: 705 / 91 / 2 days
Pencilblue looks like something quite similar to Calipso but with a much
better marketing. The project is using MongoDB and Bootstrap and it
supports AngularJS. They are also totally extendible and they are also
providing their plugin system. They have 14 plugins at the moment and
just 3 of them were developed by community contributors. Anyway, they
have useful tutorials, documentation, blog posts, they organize events
and they are providing partnerships. And maybe the most important, they
are really active on GitHub. It’s worth to keep and eye on this project.
Apostrophe
Github: 558 / 69 / 10 days
Apostrophe provides a content-driven solution just like KeystoneJS. They
have their installer in the form of an npm package and they are also
using mongoDB. They mention simple templating and modular functionality.
It’s kind of surprising, but originally they started in 2007 as a Symfony CMS. The project activity on Github is moderate.
Cody
Github: 301 / 85 / 6 hours
Cody is the first framework using MySQL, otherwise they are also using
Express as backend framework – version 4. The framework is written for
developers and claims to be user friendly with the use of wysiwig
editors and drag-and-drop solutions. Multi language support is built in
and they host your website for free if it’s using Cody. In the last time
they are quite active on Github.
TiddlyWiki
Github: 255 / 69 / 6 months
TiddlyWiki is also a unique project as they are focusing on building
wikis. As they have no competitors, TiddlyWiki is highly recommended in
case you want to create wiki using JavaScript.
Nodize
Github: 176 / 28 / 2 years
Nodize is a CMS for coffescript lovers. It’s and adoption of the Ionize
CMS which is based on PHP, not a wonder that they are using MySQL. They
have good ideas like cloud hosting, multi language support, caching, SEO
friendliness, drag & drop admin, etc., but the GitHub project is
actually dead for years.
TaracotJS
Github: 19 / 2 / 3 months
TaracotJS is using mongoDB and redis. They would like to provide an all
in one framework from blogging to e-commerce through social network. Unfortunately the project is dead for 3 months. Update: The project is being really active lately.
Hatch.js
Github: 0 / 0 / 1 year
Hatch.js is providing widget-based page building, social networking,
performance and scalability. On their homepage it’s really difficult to
find their github repo as it’s hidden in the downloads menu. The project is unfortunately dead for 1 year.
——– Update (May, 2015) ——–
We didn’t write about these, here we fix it:
Buckets.io
Github: 903 / 118 / 9 days
Bucket.io is built by the Assembly
community. Regarding their Github popularity buckets.io has a nice
position. Altough, even if the last commit was just 9 days ago, the
activity of the project seems to be slowing down –
they write, that it’s under active development and it’s not ready yet.
You can use buckets.io in any express project, they also have an npm package avilable. They provide routing and flexible data management – it’s using MongoDB.
We.js
Github: 46 / 16 / 7 days
We.js is a pretty new project, started in February, 2015. We.js is good
for creating sites and blogs as well, you can extend it easily by
writing your own plugins and themes. It also supports profiles –
authentication and user management -, images – upload and resize -,
comments, groups, etc. Community plugins and example sites are missing,
but hopefully they will come soon.
——– End of the update ——–
Buckets.io (updated in May, 2015)
Github: 903 / 118 / 9 days
Bucket.io is built by the Assembly
community. Regarding their Github popularity buckets.io has a nice
position. Altough, even if the last commit was just 9 days ago, the
activity of the project seems to be slowing down –
they write, that it’s under active development and it’s not ready yet.
You can use buckets.io in any express project, they also have an npm package avilable. They provide routing and flexible data management – it’s using MongoDB.
Node.js cms framework comparison
If you collect all the Github popularity metrics together and try to visualize it, you’ll get something similar to the following graph:
Node.js CMS framework comparision
The number of stars and forks show correlaion, more stars mean more forks. Statistically, 4-6 stars mean 1 fork.
The top 5 frameworks are the followings:
- Ghost
- KeyStoneJS
- Calipso
- Reaction Commerce
- PencilBlue
Ghost is specialized for blogging, Reaction Commerce is specialized for eCommerce, KeyStoneJS, Calipso and PencilBlue are for general purposes. As Calipso is not too active on GitHub, let’s examine KeyStoneJS and PencilBlue in details.
Experience with PencilBlue
The requirements for the installation are NodeJS and MongoDB. If you are ready with this, you can also follow the official instructions.
PencilBlue has an own installer which is available on npm:
After this, you’ll be able to use the pbctrl command, like this:
You can configure the db and site names, the ports and decide about bower, that’s all the configuration, you are ready. Note: the screen may stay empty for a while, but be patient, it will work.
After the installation you can start your server with the pbctrl start command and sign up as an admin user – just like in WordPress – under the following url: http://localhost:8080/admin
Signing into the admin, you’ll see the following navigation bar:
In Content / Navigation you have five options, you can create a Link / Article / Section / Page / Container. The first problem is, that the admin interface is poorly documented, and you’ll have a hard time to find out the purpose of these options.
Even if you figure it out, you’ll find nonworking parts, like the “Content” field. The search button does not work and no alert message is shown. This would be a really basic functionality and it doesn’t work. Sadly there are just more and more of similar problems. After 10 minutes of simply adding and deleting elements, I managed to cause a fatal error: xy variable undefined…
If you are a curious programmer with lots of time, you can find and repair these problems and contribute to the project, otherwise I wouldn’t recommend the production use yet.
Experience with KeystoneJS
Following the official guide, you’ll find, that KeystoneJS has a pretty cool yeoman installer, which you can install with ease:
After that, you simply create a directory for your project and install the framework:
You’ll have to answer for a few really useful configuration questions:
The use of Mandril and Cloudinary are highly recommended, they provide an awesome service for mailing and image hosting.
After starting your server with the ‘node keystone’ command you can reach your admin under the localhost:8080/keystone url. By default you have five models, and all the CRUD (Create, Read, Update, Delete) services for them:
- Posts
- Categories
- Galleries
- Enquiries
- Users
You can easily add new models in the models folder. All these models will be automatically interpreted to the admin, and you’ll have a WYSIWYG editor for them. The Post model for example looks like this:
If you like to learn more about the field types or the field options you can easily find out more thanks to the official documentation.
If you have a newly installed KeystoneJS instance, you’ll have some generated templates like a blog or gallery. If you like to add new stuff, you have to edit the frontend manually, you can add new routes in the routes/index.js file and add new views in the templates folder.
Even if they write, it’s not the perfect tool for API generation. The model generated “API” won’t be RESTful and a deletion for example will look like follows: http://localhost:3000/keystone/api/galleries/delete?id=5536b7cce80ca8a20e44504f
Summary: KeystoneJS is a really lightweight and really clever framework. It is quite stable, ready for production and helps a lot for developers who has to show an admin interface for their clients.
Conclusion
There are many interesting CMS solutions based on node.js out there and many of them are mature solutions – like Ghost for blogging – which can be used in production without any problem.
However we still have to wait for the next WordPress. The good working plugin based framework with many useful plugins is still missing.
Note: Is there any CMS we forgot and should write about? Please write your comment and we’ll extend the article.