Is Your AngularJS App Ready for Production?

Posted on Tue, Nov 17, 2015 @ 9:49 am

AngularJS (AAngularJS_LogoJS), a component of the popular Javascript MEAN Stack, has quickly become a go-to framework for developers looking to build dynamic, robust single page web applications.

AJS lets you extend the HTML vocabulary for your app to create an extraordinarily expressive and readable environment that can be developed very quickly. With the fast adoption of this newer technology comes a plethora of new concerns when moving an app into production. Read on for a specialized checklist from OFS on what to watch for as you ready your AngularJS app for production.

A Production Checklist for AngularJS Apps

  1. Performance Pitfalls

Typically with any AJS application, being a single-page application (SPA), you need to be very careful about the size of the final package that is deployed on the webserver. It is critically important to ensure that the app has a modular design and incrementally downloads to the end user’s device. This becomes especially important if users are on a mobile phone or tablet and are using the telecom network for accessing the web app. Ashutterstock_95526985 m
odular design and techniques like minifying the resource files will help avoid potential performance problems that the end user might see. This is a tricky issue because of the limitations that most organizations will have due to lacking the right test environment before going into production.

  1. Logging

As much as logging is important on the server side, special care needs to be taken on the client side AJS app to figure out what is happening – for both positive and negative flows. A
strong logging strategy must be in place when deploying Angular apps to production. This will also help in figuring out what is a better path for the user with respect to navigating the application – like A/B testing. An async and independent logging framework will offer lots of insight while in production.  Also, one needs to ensure that the app is not logging anything to the console on the client side.

  1. Caching

While caching is required, it can also cause potential problems with stale files, especially when a content delivery network (CDN) is being put to use. Proper configuration and right testing will help the team understand the intricacies with respect to caching. It is also a good practice to download the dependencies from publicly available CDNs –- It has pros and cons, which the team must understand beforehand.

  1. Size

The size of the HTML/JS resources being downloaded and the volume and size of data being passed back and forth matters a lot. Features like pagination must be given due diligence.

  1. DOM Manipulations

This is very important in any AJS app and this should be done only in the right place – directives. This will have direct impact on the end user experience.

  1. Misuse of $scope

Developers tend to misuse scope in most of the cases, and proper development guidelines must be followed here. Often when there are bad practices around this, debugging gets difficult in the post production support.

Note: Apart from this, the back button, images (sizes, responsiveness), responsive behavior testing, and issues that arise due to minifying code need extra care and review to ensure that the end user experience is as expected.

With this checklist, you’ll be able to consider the major challenges you may face in moving your AJS app into production, and curb any problems that threaten to derail your momentum.

Need help beyond just a checklist? 

OFS has a wealth of highly skilled employees trained in AngularJS and every component of the MEAN Stack—MongoDB, Express, AngularJS, and Node.js.  Send us a quick note here to find out how we can help you rapidly build compelling Javascript apps for your business. For more on our MEAN Stack expertise, click here.

Leave a Reply

Your email address will not be published. Required fields are marked *