An Overview of AngularJS
AngularJS is a Single Page Application Framework (SPAF) created and maintained by engineers at Google. It is used to build many webapps, and it is even used to build mobile apps on many platforms.
AngularJS is considered an opinionated framework because it dictates much of your project structure in the interest of providing a lot of support for rapid development. AngularJS uses an MVC approach. Data Models are implemented in a way that works well with third party APIs, and data persists and is updated throughout the application. Views are handled through templates, which are important parts of an AngularJS app. Finally, Controllers are attached to different elements in each View and can power all sorts of features.
AngularJS is supported by a large community of developers, and there are many modules available. Most things you will want to do in AngularJS have probably already been created and listed on ngmodules.org, the main site for listing AngularJS modules.
Getting into AngularJS
Learning any framework takes time and effort. It's important to be diligent about figuring out how developers using your chosen framework approach a problem. There are always many ways to fulfill to any given requirement, but being able to do it in a way that "fits" with the framework you're using is crucial to long-term success. If you can learn to work with the framework, then it will help you go faster and build better apps. If you constantly work against the framework, then you will constantly be frustrated and will move more slowly.
AngularJS, like any framework, has a "philosophy" or "worldview". That view is centered around powerful templates, revealing functionality through custom HTML elements ("Directives"), keeping data streaming through the system, and keeping logic contained in discrete locations. The end result of this is that developers are given easy to manipulate components that can easily be moved around to dramatically alter visual presentation and user experience without requiring any changes to the underlying code.
This gives AngularJS exceptionally powerful templates, and allows both highly trained and more novice developers to contribute productively to a project.
Core concepts in AngularJS
In order to set us up for moving through the work described in the next several chapters, it's useful to get a grasp on some of the core concepts of AngularJS. Over the next few pages we will discuss these basic principles of the framework:
- Data Models
- Routes
- Controllers
- Views