Categories: Insights

My Experience with KeystoneJS

5 min read

Why KeystoneJS?

Learning a new language can be a daunting task for web developers, but there comes a time when you have to bite the bullet and do it. I’m a novice programmer, with my experience mostly limited to a couple of PHP websites, using mySQL. I had a new project on the table and decided I wanted to learn Node. Any self-respecting Node beginner has written the very basic “Hello World” node server:

var http = require('http');
var server = http.createServer(function(req, res) {
res.writeHead(200, {"Content-Type": "text/plain"});
res.end("Hello World");
});
server.listen(80);

Run node server.js and open localhost:80 in your web browser, and there it is. Great!It works, so maybe this isn’t going to be so painful after all. Time to start writing the website! I quickly figure out that there is quite a jump between outputting “Hello World” and writing a fully functioning website. Some more research points me to the express package, which I install and learn how to use. However, eventually I have quite the list of packages to install, and all of these need configuring in the correct way to interact with each other. At this stage, everything is starting to get a little too complicated, and my small project seems like it’s going to take lots of hours’ work to get to the final website. Maybe I should just write it in PHP, since I at least know how to use it.

Luckily, I was pointed toward KeystoneJS. I’m not going to explain how KeystoneJS works in this post, but by simply running yo keystone, my site was up and running. Keystone had configured all of those annoying modules for me, and I could concentrate on writing the code for my web pages. Adding new content types became as simple as adding a new Keystone “model” to the site, and then Keystone would automatically create all the database schemas for me and add this model to the admin UI. I was so impressed, and I had finished the whole website in just over an hour. KeystoneJS had definitely done 75% of the work for me, and I was incredibly pleased and impressed.

I picked up Keystone so quickly, and I have used it for multiple projects since. It is without a doubt my go-to tool if I’m writing a website which has any kind of content management needs.

Open Source Software and the KeystoneJS Community

KeystoneJS is a completely open source project. You can see the source code on GitHub, and there is an active community of developers constantly improving and fixing bugs in KeystoneJS. It was developed by ThinkMill, a web design company. They use the software for their own work, so it benefits them to have a community helping to improve their software. Anyone can use KeystoneJS, and there is no need to give anything back, but a lot of people who find KeystoneJS really useful will want to help out. It also means if I discover a bug, I am able to submit a pull request to fix it, and hopefully that will get merged into the code.

A few weeks ago, I found myself with some spare time and decided to get involved in the project, so I started to help out by adding some end-to-end (e2e) testing. Initially, the work I did was incorrect, but rather than my pull request just being rejected, the developers took the time to point me in the right direction. Eventually I worked out how everything worked, and my pull request was merged into the code.

A few days later on, I had written a few more tests. I’d quite often need to ask questions on how things should be done, but the developers were all very friendly and helpful. Soon enough, I understood quite a bit about the testing and managed to add some more tests. It was not long before the project lead, Jed Watson, asked me if I would like to be a KeystoneJS member, which would give me access to push my changes straight into the code without having to make pull requests. For me, as a complete beginner, being able to say I was part of a project as big as this meant a lot. For me, to begin with, I felt as though I was asking so many questions that I must just be annoying everyone and should probably stop. However, Jed andeveryone else quickly changed that, and I felt like I was doing something useful.

Into the future

The entire team is very motivated to make KeystoneJS as good as it can be. Once version 0.4 is released, there will bemany exciting additions in the pipeline. The admin UI is going to be made more customizable, and user permissions and roles will be implemented, among many other things. All of this is made possible by the community, who dedicate lots of their time for free to make this work. The fact that everyone is contributing because they want to and not because it’s what they’re paid to do makes a huge difference. People want to see these features added so that they can use them for their own projects, and so they are all very committed to making it happen.

On a personal note, I can’t thank the community enough for all their help and support over the last few weeks, and am very much looking forward to being part of Keystone’s development.

About the author

Jake Stockwin is a third-year mathematics and statistics undergraduate at the University of Oxford, and a novice full-stack developer. He has a keen interest in programming, both in his academic studies and in his spare time. Next year, he plans to write his dissertation on reinforcement learning, an area of machine learning. Over the past few months, he has designed websites for various clients and has begun developing in Node.js.

Jake Stockwin

Share
Published by
Jake Stockwin

Recent Posts

Harnessing Tech for Good to Drive Environmental Impact

At Packt, we are always on the lookout for innovative startups that are not only…

2 months ago

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago