Chapter 1: Introducing AngularJS Flashcards
What does MVC stand for?
Model View Controller
What does MVVM stand for?
Model View View Model
What do we mean by model?
Driving force of the application. All the data and how its structured.
What do we mean by View?
This is the user interface
What do we mean by controller?
Decision making frameowrk for the application. What to show, what to do. Also handles the presentation of content.
Advantage of MVC approach
One unit takes care of one thing e.g. View looks after the user interface, Controller the business logic,
Each unit is idependent (makes code more modular, maintainable and reusable)
What do we mean by SPA?
Single Page Application
Also known as an AJAX application
What do we mean by CRUD?
Create Retrieve Update Delete
What’s data-bidnding?
Angular.js has 1 way and 2 way data binding
We tie data to our markup
e.g. Hello <span>{{name}}</span>
1 way (server to client)
2 way (client server)
What does ng-model mean?
It’s an attribute. Probably Angular model.
Used communicating with the server.
These are also called directives.
What’s the imperative paradigm?
We need to to tell the application exactly how to do everything
What’s the paradigm Angular.JS favours?
The declarative paradigm. In our mark up it iodinates what each part plays and leaves framework to handle it.
What do we mean by separation of concerns?
Different components do different things and you change it their not elsewhere
What’s dependency injection?
Asking for the dependencies of a particular controller or service
What are the backend requirements for Angular.js?
There’s no specific requirements (e.g. you don’t need Ruby, PHP, Java).
You do need a way to talk with the server (probably AJAX)
What do we need to include in our file to use Angular.js?
We need to point to the angular.js file
On the html tag we add the ng-app directive. Where we strap it to (element we put it on) and its contents will be part of application. Anything outside won’t be.
What do {{}} mean?
Either one-way data binding or an Angular.js expression
What does the ng-model directive do?
It’s strapped onto an element to indicate data to use in the app.
What does ng-bind directive do?
Interchangeable with the {{}}.
It can stand in for a variable. Indicate what data to add to the page.
e.g.<p></p> or {{name}} would work
What’s a directive?
These extend the vocabulary of HTML.
We can declare new tag types to suit the application.