Dipawali, the festival of lights, is the perfect occasion to share with you another book review. The book is about Express, “Mastering Web Application Development with Express”. Author, Alexandru has covered various aspects of web application development using Express through well composed eleven chapters.
Let’s go with each of the chapters in detail so that we can conclude that if you are not reading this book, then you will definitely miss valuable points and understanding of Express, a web development framework for Node.js.
Chapter 1: Diving into Express
The following are the positives of this chapter:
- It talks about Express features and how it is different from more complex framework like Rails, or Django and or CakePHP
- Use cases of Express
- Who are all using Express?
- How to structure an Express application?
Chapter 2: Component Modularity Using Middleware
An important concept while discussing about Express is Middleware and hence this chapter among others deserves all the attention. Author has done justice and the highlights of this section are as follows:
- Definition of Middleware and its’ functionalities
- Code snippet to explain how to configure middleware
- A practical example of middleware to have clear understanding of the subject
- Why ordering of middleware is important
- An insight into handling error with middleware
No wonder at end of this chapter, you will have good understanding of what middleware is and how you can use it for your purpose.
Chapter 3: Creating RESTful APIs
- If you don’t know about REST, HTTP Verbs, status codes, then no worries. Author has explained this very well in the beginning of the chapter.
- REST api creation is explained in detail with the help of developing an application called Notes using Test Driven Development approach
- Points to remember while creating REST Apis
- Lastly author has shown to tackle different issues when creating API’s and you will see how Express helps them solve visibly
Chapter 4: Leveraging the Power of Template Engines
- This chapter starts with good explanation of template engines and their types. What is good about the book is that it will give readers a good context of the subject going to be discussed.
- You will get to know about consolidate.js, a template engine consolidation library for node.js. This a new learning for me and it looks promising.
- Another informative discussion is about caching, caching of the views. I did a quick google search and found a nice discussion:
- Finally, you will learn to integrate a template engine with Express as well as other advanced features such as partials, layouts and caching.
Chapter 5: Reusable Patterns for a DRY Code Base
Another knowledge enriching chapter of the book to learn how to keep your codebase DRY. You can also read a Tut+ link I found very helpful:
Chapter 6: Error Handling
Error handling is an integral part of web application development which ensures scalable, bug free and extendable code base. When we talk about error or exception handling, the first comes to our mind is try… catch…. finally. Further, here in the chapter we are introduced to
- EventEmitter, publish-subscribe functionality.
- Custom Express error handler
- Identifying different error tracing modules
Chapter 7: Improving the Application’s Performance
Application performance is as critical as error handing in any Web application. And what is very encouraging for the readers in this chapter is that author will first start with an application and then he will show how to improve it’s performance gradually.
He has further discussed various options for performance improvements of an Express application which are no doubt very helpful.
Chapter 8: Monitoring Live Applications
We can’t sit back and relax after the project goes live. Next responsibility is to monitor the performance and health of this live application.
Chapter 9: Debugging
From novice to experienced developers can introduce bugs unintentionally due to many reasons. In that scenario, we need effective tools and techniques to debug those defects.
Author has discussed tips and tricks to add an improved error handler which will correctly point the buggy code. Further, he has discussed how to introduce an error middleware to efficiently point out the defects.
Debugging memory leaks discussions apart from the above paragraphs have impressed me a lot.
Chapter 10: Application Security
Like performance improvement and debugging an application, another very important, should be discussed topic is application security. Author has put focus on following topics which are always good to be discussed:
- Running Express applications on privileged ports in a secure way
- Cross-site request forgery (CSRF) and cross-site scripting (XSS)
- Adding security headers using Helmet
- Handling file uploads
- Session middleware parameters
Chapter 11: Testing and Improving Code Quality
Book ends with the chapter that is very close to my heart. So I started this chapter with all interest and found discussions on the below items very informative and well thought out.
Apart from discussing about unit testing, this book talks about checking an application according to the specifications when writing all the things together, i.e. functional tests. Besides this, book has covered code coverage, code linting, load testing and continuous integration topics.
From the above discussions it is quite apparent now why I like this book so much. It has not only covered development topics from ground up but also other aspects of successful project execution.
When a book does all of these, then you can’t thought of leaving it for gathering dust. And hence, this book is a well recommended book for serious developers/ programmers who care for an efficient and an effective Express project implementations.
Book Link: http://bit.ly/1wmRdaX