I was working on a small and simple application built with AngularJS the other day. As with most applications like this, I start with a single JavaScript file caled app.js and no module system.
In the past I’ve used RequireJS with AngularJS. It’s an awful mistake. It leads to a big jump in complexity with no benefts. Angular apps don’t work well with AMDs, so really your are using RequireJS to combine files into one big file.
Read more
tl;dr?
Check your mongodb.conf bind_ip settings to make sure that you’re not allowing connections only from localhost.
This may just end up being the first part of a wider troubleshooting guide, but this is one I’ve spent a few hours fixing, after assuming I was making terrible mistakes with my security groups.
If you find you cannot connect to your MongoDB server from an EB app server (or anything for that matter), before you spend ages checking your Elastic IP, VPC and Security Group config, don’t forget that you may have simply used bind_ip in your config file.
Read more
Dealing with memory leaks in JavaScript applications can be a complex process. In this article I’m going to show you how to identify whether you have memory leaks, analyse them and ultimately resolve them.
I’m using an AngularJS application to demonstrate the concepts and approaches, but much of this material applies to any JavaScript application.
Understanding Memory Leaks What is a Memory Leak? Why is a Memory Leak Bad?
Read more
If you need modals in an AngularJS application, look no further. I’ll show you how to use the Angular Modal Service to add Bootstrap Modals or your own custom modals to your application.
See it in a fiddle or check out a full set of samples online.
Contents [Using the Angular Modal Service](#UsingTheAngular ModalService) A Quick Example Design Goals How It Works Wrapping Up Using the Angular Modal Service Here’s how you can use the Angular Modal Service to add a bootstrap modal to your application.
Read more
Welcome to Part 2 of Practical AngularJS. I’m going to introduce you to some of the core components of an angular app. These are:
Controllers Filters Directives Services Views & Routes We’re not going to be going into detail – just taking a look at what each of these components are and where they fit into the structure of an app. We’ll be going into detail for each of them in later articles.
Read more
This series focuses on building applications with AngularJS. It assumes no prior knowledge.
Part 1 – Introducing AngularJS
What is AngularJS? What’s it for and when should we use it? We look into the basics of AngularJS – controllers, models and scopes, as well as how to use common directives like ng-model and ng-repeat. We see how client side logic is improved with AngularJS and how we can handle unit testing.
Read more
Promises are a core feature of AngularJS - whether you understand them or not, if you use AngularJS you’ve almost certainly been using them for a while.
In this post I’m going to explain what promises are, how they work, where they’re used and finally how to use them effectively.
Once we’ve got the core understanding of promises, we’ll look at some more advanced functionality - chaining and resolving promises when routing.
Read more
Specifications are absolutely key to the success of a project.
Unless you have a good definition of what your project is supposed to be, there’s no way you can deliver it. A specification is the contract between you and the client, the basis for technical designs, quality assurance test plans, operational readiness, and much more.
I’m not going to talk about how different teams do specs, what works and what doesn’t work.
Read more
tl;dr Ghost is a blogging platform well worth considering if your blog is all about development.
I’ve been having some gripes with WordPress as a platform for blogging lately. For development focused blogs like this one, there are some things about it that make writing posts just a little bit clunky. For example:
Syntax Higlightling is always going to use plugins with various shortcode formats. This works, but your raw blog text becomes quite specific to a certain implementation.
Read more
In this series of articles I’m going to be working with AngularJS, a fantastic framework from Google that helps you rapidly build web applications. We’ll see how AngularJS can be used to speed up your development and help you write cleaner, more testable code.
Introducing AngularJS First of all an introduction is in order.
AngularJS is a lightweight JavaScript framework, primarily for building single page web applications. The idea behind applications like these is that rather than the ’traditional’ way of writing web applications which would involve using server side technologies to render the user interface and send it to the user, we handle all of the presentation logic on the client side.
Read more