Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Consumiendo una API REST con AngularJS
Search
César Suárez Ortega
February 11, 2016
Programming
390
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Consumiendo una API REST con AngularJS
César Suárez Ortega
February 11, 2016
More Decks by César Suárez Ortega
See All by César Suárez Ortega
Symfony y concurrencia: el componente Lock
csuarez
0
1.2k
PHP Episodio VII: El Despertar de la Fuerza
csuarez
1
310
Construyendo una API REST con Python y MongoDB
csuarez
0
340
Automatización de tareas con Ansible
csuarez
1
390
Procesanso datos con Hadoop: MapReduce y YARN
csuarez
0
370
Introducción a SCRUM
csuarez
0
350
Introducción a GIT
csuarez
1
260
Using CAD Systems and E-Learning in radiologist training
csuarez
0
140
CETA-CIEMAT: Salud + Investigación
csuarez
0
150
Other Decks in Programming
See All in Programming
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
180
Lessons from Spec-Driven Development
simas
PRO
0
150
JavaDoc 再入門
nagise
0
310
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
OSもどきOS
arkw
0
470
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
130
AutonomyとControlのあいだ:Graflowで記述するAIエージェント協調
myui
0
110
dRuby over BLE
makicamel
2
330
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
3.9k
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
150
RTSPクライアントを自作してみた話
simotin13
0
520
3Dシーンの圧縮
fadis
1
680
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
22k
How to Ace a Technical Interview
jacobian
281
24k
Are puppies a ranking factor?
jonoalderson
1
3.5k
The Curse of the Amulet
leimatthew05
1
13k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
What's in a price? How to price your products and services
michaelherold
247
13k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Everyday Curiosity
cassininazir
0
230
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
370
Transcript
CONSUMIENDO UNA API REST CON ANGULARJS César Suárez Ortega <
[email protected]
>
II Jornadas Técnicas UEx – CIEMAT: Introducción a NoSQL con MongoDB 9 – 11 de Febrero, 2016
Índice Conceptos básicos Patrón MVC Inyección de dependencias Promesas AngularJS
Práctica: Nuestra tienda online
PATRONES DE DISEÑO
Patrón MVC
Patrón MVC API
“Dependency Injection” is a 25-dollar term for a 5-cent concept.
James Shore http://www.jamesshore.com/Blog/Dependency-Injection-Demystified.html
Inyección de dependencias public class Example { private DatabaseThingie myDatabase;
//SIN inyección de dependencias public Example() { myDatabase = new DatabaseThingie(); } //CON inyección de dependencias public Example(DatabaseThingie useThisDatabaseInstead) { myDatabase = useThisDatabaseInstead; } public void doStuff() { myDatabase.GetData(); } }
Promesas var result = sloooooowSyncMethod(); console.log(result); var promise = promiseAsyncMethod();
promise.then(function(result) { console.log(result); });
None
None
None
Sobre AngularJS Framework JavaScript Extiende HTML Muchas facilidades para organizar
nuestro front-end. Aproximación declarativa. <button ng-click="addLol()">Touch me</button> DEPRECATED
PRÁCTICA #2
$ curl –sL https://deb.nodesource.com/setup | sudo bash - $ sudo
apt-get install nodejs build-essential ruby ruby-dev $ git clone https://github.com/csuarez/juc-mongodb-web.git $ cd juc-mongodb-web $ sudo npm –g install grunt-cli $ sudo npm –g install bower $ sudo gem install compass $ npm install $ bower install --allow-root $ grunt serve Arrancando la web https://github.com/csuarez/juc-mongodb-web
AngularJS facts Framework JavaScript MVC Flexible Muchas facilidades para
AngularJS facts
[email protected]