Académique Documents
Professionnel Documents
Culture Documents
Misko Hevery introduces building an app with AngularJS. To follow along, use the command git clone at http://github.com/angular/angular-phonecat/
0.03.00 0.05.30
0.05.30 0.07.30
Misko codes Hello World in the three languages, showing how AngularJSs declarative
data-binding framework greatly simplifies coding. Angular is about teaching browsers
new tricks.
0.11.30 0.13.45
0.13.45 0.17.50
The scripts use of dependency injection makes testing easier. Misko demonstrates how,
also showing the agile functionality of the code.
0.17.50 0.19.48
AngularJS has testing tools baked in. Because HTML & JavaScript will remain standard,
Misko explains why AngularJS embraces the standard but strives to improve on w3cs
limitations.
0.19.48 0.23.34
Return to introduction to building an app with AngularJS; the standard framework, with
testing included. Be sure to enter checkout step - 0 - f to avoid Miskos alias. Seed apps
are included with the software and include test folders with end-to-end and unit testing.
From the Scripts folder, open browser and go to local host 9876.
0.23.34 0.25.05
AngularJS end-to-end testing is ideal for testing AngularJS applications. Misko explains
the advantages of Angulars built-in test runner.
0.25.05 0.32.04
How to transform static text to dynamic text. Enter checkout step 2 f . Questions
from the floor make sure everyone is following. Misko explains how Angular defines
new vocabulary for HTML. Angular also uses jQuery to increase levels of abstraction.
1
0.32.04 0.36.17
AngularJS doesnt require main methods, so main method testing is not required. Declarative data binding and dependency injection allow Angular to work without main
methods. Misko runs a short test to demonstrate.
0.36.17 0.37.50
0.42.26 0.45.31
Real-time searches with data binding; a difficult exercise in jQuery becomes simple in
AngularJS. Misko searches the list of phones in two lines and shows how AngularJS replaces a huge coding task with one line of code.
0.45.31 0.51.00
Misko tests the app with a series of scenarios. By the magic of AngularJS, he makes JS
wait. Misko explains one of Angulars best innovations: easy testing. The AngularJS
testing tools are ideal for Create/Read/Update/Delete type applications specifically.
0.51.00 0.54.45
Misko explains how callbacks are handled within AngularJS, and how mockup back-
0.54.45 1.00.45
Rather than use a hard-coded data list, the application pulls data from a server. Misko
takes more questions, explaining how AngularJSs specific commands work like conventional Java codes.
1.00.45 1.03.00
Dependency injection lets you test your app without the actual need for the server to
reply. The declarative assembly instructions allow for more creative results, and the
built-in xhr mocks allow testing of every crevice of your application.
1.03.00 1.05.00
After a short break, Misko explains how the code calls for dependencies, and how the
dependency injection knows what to hand the code. Basically, ask and ye shall receive.
The code is coded to know what to do.
1.05.00 1.08.00
Incorporated links change the URLs for multi-page applications by rejigging the data
already on hand. Misko demonstrates from the source code
1.08.00 1.12.07
Misko describes deep linking as the big step that makes Angular more than a toy application. The application mimics server-based applications, but wholly within the browser,
using the code ng view and the function PhoneCatCtrl to create a new controller.
Likewise, coding is similar to round-trip applications, but entirely within the browser.
1.12.07 1.16.30
Applications are able to identify the browser type, and switches appropriately between
hash bangs and real URL paths. Misko refers to the documentation app at docs.angular.
org/#!/api/angular.service.$xhr. AngularJS coding is searchable as well.
2
1.16.30 1.18.29
Greater depth in the app-browsing experience leads to a very responsive interactive experience. Misko demonstrates with phone/phoneId and built-in xhr mocks. Misko says
youre in a comfortable world of round-trip apps with URLs and controllers while at the
same time youre building an xhr app that is very user-responsive.
1.18.29 1.22.15
Misko demonstrates filters under phone-detail.html. Also see the page on $filter.number from the reference site. Filters allow you to ascribe special characters to true/false
properties, format numbers, let dates be displayed in different ways in different places,
etc., and take smaller issues out of the controllers hands.
1.22.15 1.25.00
1.25.00 1.27.00
Answering a question from the floor, Misko explains why page changes in the browserbased applications AngularJS can create are much faster than even the fastest server-side
application.
1.27.00 - 1.28.32
AngularJS can be sprinkled onto regular web pages; use as much or as little as you like.
It plays happily with other web technologies.
1.28.32 1.32.32
1.32.32 - 1.35.29
Misko explains the handy tag Phone_.query. Simple calls to the server can be made,
with the tacit understanding that it will be handled in time.
1.35.30 - 1.36.24
AngularJS is available in two branches, a mostly-stable Branch 9 used in this demonstration and a more experimental Branch 10. A first release version, AngularJS 1.0, is due for
release soon (as of January 2012).
1.36.24 1.38.30
Answering another question, Misko explains the curry function. Injectors call functions and supply necessary functions. It can also provide some other items it has been
instructed about specifically.
1.38.30 1.45.00
Misko demos one way AngularJS teaches the browser new tricks. Small amounts of code,
in this example the tag my:time, will allow you to create new commands that can be
called elsewhere in the app. AngularJS is at its core an html compiler. Misko also talks
about Sencha Touch (sencha.com).
How do you sprinkle AngularJS onto a server-side application? The example shows
how to call for help text within a static HTML page using the command ng:autobind.
The AngularJS sprinkling can load an existing round-trip app or static page with extra
content that can be called by a user without further demands on the server. Controller
documentation also shows how to sprinkle AngularJS.
1.51.50 1.58.48
AngularJS widgets are no longer in the expected release version. Nevertheless, Misko
discusses their operation in detail using an example from the reference site. Widgets have
been replaced by Directives in AngularJS 1.0, making it far simpler to perform the same
functions.
1.58.48 2.00.30
To use your pre-existing jQuery modules in the AngularJS pages without interference,
you can point the AngularJS towards a function that tells it to leave the system alone if
another app might cause a conflict. Misko uses the my:time example.
2.00.30 2.04.00
How is this better/different from Onclick? AngularJS statements do not operate at a window level. Misko explains how AngularJS has its own lexicon parser that takes it beyond
mere html.
2.04.00 2.04.53
2.04.53 2.06.30
AngularJS wasnt developed to handle very large databases. Misko says that Angular
takes 80% of your coding out of your hands, all the way up to the DOM, and allows you
to do it declaratively, leaving you with the remaining 20%, which is still heavy lifting that
will have to be done conventionally.
2.06.30 2.09.00
2.09.00 2.12.15
Misko explains how AngularJS is being used internally at Google. Some third-party applications have been built in AngularJS but few in the public domain. Go to github.com/
angular/angularjs/wiki/ and search for projects using AngularJS. Misko reiterates that
Angular is best for crud applications.
2.12.15 2.13.19
Misko is one of only three people working on AngularJS, all by coincidence from Slovakia. They released a new development stage about once a month.
2.13.19 2.19.16
How do you get from a conventional HTML + JS web site, and move to something with
automated testing? Misko explains that starting with a small project will allow the programmer to gain enough experience to successfully structure the replacement for the
original app, in a fully testable environment. But it isnt easy. Misko discusses the challenges of testing the DOM.
2.19.16 2.22.02 Misko recommends three books about test-driven development: Working Effectively with
Legacy Code by Michael Feathers, Growing Object Oriented Software Guided by Tests by
Steve Freeman and Nat Pryce, and Test-Driven JavaScript Development by Christian
Johansen. Part Two ends.
stories of the tests - youll be able to write code that can be tested by it.
3.06.45 3.11.38 While simple objects can be trusted to be benign, more involved objects need careful
handling. The new operator is best avoided.
3.11.38 - 3.13.30
The graph shows the lines of production code vs the lines of test code. Ideally these should
be developed evenly and at the same time.