PermaLink Book Review: Learning AngularJS for .Net Developers11/06/2014 03:11 AM
Learning AngularJS for .Net Developers, written by Alex Pop and published by PACKT, provides a good introduction to single page applications with the AngularJS framework using Visual Studio 2013 as your development environment.  There is a lot of information available online for AngularJS, so the topics I'd like to see covered include in such a book include: how AngularJS is used on the client side, what support is provided by Visual Studio, how to write a .Net backend to support AngularJS, how authentication/security works in a client side application, how localization works, how the site is tested, and how the site can handle desktop web and mobile clients (aka Cordova/PhoneGap).  Most of these topics are covered sufficiently in this book except the last topic of using PhoneGap.

One metric I use in determining how well a book is written is how many typos there are in it. I've only seen misspellings of ng-cgange (should be ng-change) and Bicyle (should be Bicycle), so the proof readers did a good job with it. The examples are fairly comprehensive with the author writing a good portion of a Bicycle sales shop's ordering site.
To set a good base for your learning experience, the author covers essential basics like how AngularJS is an MVC architecture on the client side and how it's different from the older jQuery-based web sites, typical Javascript coding patterns needed. Specific AngularJS base features like dependency injection, controllers, services are also covered. Styling using Bootstrap is covered to make the examples look minimallly pretty.
For Visual Studio, MS' NuGET package management system for Visual Studio projects is covered. This system is used to install AngularJS and various related Visual Studio extensions and client libraries. It's also used to set up the web service side for AngularJS to talk to.

For the web service side, the popular C#.Net ServiceStack framework is used. Thinks like routing, filters, and validation are covered in creating a web service API to a SQLite database wrapped w/ the ORMLite framework. Authentication is provided using the AuthFeature plugin which supports username/password, http basic/digest auth, twitter, facebook, OpenID, and OAuth2. The authentication information is stored in an SQLite database, but it's easily switched to Redis, MongoDB, RavenDB, and hibernate.

Next, a web site using the same authentication is built using ASP.Net MVC. These web pages are also used to load initial state into the AngularJS application to minimize startup time.

As with any Javascript framework, testing is covered using Karma and Jasmine and Protractor. These are fairly common frameworks used for implementing AngularJS tests. Surprisingly, the author recommends xBehave.net for Behavior Driven Development (BDD) testing. I had expected to see a Cucumber/Gherkin environment such as Specflow (steps written in C#) or Mechanize/Webrat (steps written in Ruby).

Only AngularJS localization of numbers is covered using the angular-dynamic-locale module, but text replacement is not and being able to switch both dynamically is critical in a localized application.

AngularJS topics I wish this book covered that would be good for a V2: user role based permissions, downloading modules depending on user role, and mobile frameworks such as Ionic. On the server side, it would have been good to have a comparison of the different backends that are common with AngularJS and why .Net is still a useful backend, as well as what native .Net frameworks provide instead of the open source ones recommended.

All in all, this book is still a good summary for an audience that is used to writing ASP.Net applications and is certainly a good introduction to how single-page applications work using AngularJS which has quickly become one of the most popular client-side frameworks.

Comments :v

No documents found

Start Pages
RSS News Feed RSS Comments Feed CoComment Integrated
The BlogRoll
Calendar
April 2024
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Search
Contact Me
About Ken
Full-stack developer (consultant) working with .Net, Java, Android, Javascript (jQuery, Meteor.js, AngularJS), Lotus Domino