
To use all the tools that we require to build our application and deploy it, we need to install some things first.
To get started, we’ll need a good starting point with a clear separation of concerns for our codebase architecture.
It’s always nice to see what our hard work will amount to. This is where you get to see the final application that we’ll create along the way.
Manually testing your code for intended behavior is time-consuming and tedious. We will automate this process with Karma and JSHint.
BrowserSync allows us to create a LiveReload server with additional functionality, while SASS will make sure we can author our CSS in an easy way. This will result in a fully automated build system that we can use while developing.
We’ll use localStorage to store data for some persistence. Think of data like favorite animals, past matches, and so on.
Our application obviously needs some data. We’ll add a list of animal data and write a service to query that data.
A matchup obviously needs a random opponent and a random terrain. That‘s exactly what we’re going to do here.
Every animal is assigned a couple of statistics, along with their terrain performance. We’ll need to calculate their total score to determine a winner.
Now that we have all the separate pieces, we’ll combine them to determine a winner in a matchup.
We have all the logic needed to generate a match, but we can’t display it to the user yet. Time to create a view and show that information.
We need to display the animal and terrain information in an easily digestible way. We’ll use directives for this purpose so that we can re-use them later on, if needed.
After we’ve generated a matchup containing an opponent and a terrain, we need to select our own animal to fight with. We’ll implement that in this section.
Instead of starting the application in the Arena view, having a dashboard with some metadata would be a lot cooler.
If we get any errors in the application, we’d like to know about it. Using Bugsnag will allow us to track any JS errors that might occur.
Our production version will use minified source and vendor code, along with optimized CSS. We’ll create a new app folder that contains these production-ready assets.
Now that our application is ready for production, all that’s left to do is host it somewhere. We’ll use Heroku and NodeJS to serve the application.
We will briefly go over the entire application to see what we’ve accomplished, and for additional information we will go through some links and references.
We briefly discuss a couple of problems that we experienced during the development of the application and any future steps the reader might take in order to improve the application.
AngularJS does exactly what it says on the box - it extends HTML to what it should be for web applications. It allows users to create applications quickly with great architecture backing it up and provides testing support, which shouldn't be underestimated. AngularJS also has a great community surrounding it, justifying its popularity.
Gulp and NodeJS are technologies that make the life of any frontend developer easier by allowing them to automate tedious tasks. Think of SASS compilation, minifying your code, and so on, all happening automatically, and at the speed of light using our build system in Gulp.
Heroku is a cloud application platform that allows us to easily deploy our application to the web and scale it according to our needs. Heroku allows us to focus on writing code instead of worrying about server infrastructure.
AngularJS makes developing frontend web applications a breeze, while Gulp and Node provide an optimized and stable production version to deploy on Heroku, making application development hassle free.
Deploying AngularJS is aimed at providing best practices and the most modern tooling methods available for creating and deploying an AngularJS application. Not only will your applications be simple and elegant, the development and deployment will also be blazingly fast.
We start by outlining the application idea, then developing it, and finally deploying our app to Heroku. Before we begin, we’ll prepare our development environment and our build system. After everything is up and running, we’ll get started by constructing the supporting services that form the skeleton of our application. Then, we use those services to flesh out the app. Later, we make sure our application is optimized for production, and we deploy it to Heroku.
This video course will help you develop and deploy your AngularJS applications in a short but sweet, no-nonsense approach.
Thomas Tuts is a web developer who is completely in love with JavaScript, HTML, build systems, and AngularJS. He gets a great sense of joy when he’s helping people out with their code or mentoring them. He is an active AngularJS community member on the #angularjs IRC channel, usually hanging out to help people when he can.