Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Consumiendo una API REST con AngularJS
Search
César Suárez Ortega
February 11, 2016
Programming
400
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
360
Automatización de tareas con Ansible
csuarez
1
400
Procesanso datos con Hadoop: MapReduce y YARN
csuarez
0
390
Introducción a SCRUM
csuarez
0
370
Introducción a GIT
csuarez
1
270
Using CAD Systems and E-Learning in radiologist training
csuarez
0
160
CETA-CIEMAT: Salud + Investigación
csuarez
0
160
Other Decks in Programming
See All in Programming
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
250
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
340
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.3k
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.5k
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
410
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
180
ChromeでローカルLLM
ryu1013
0
190
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
200
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
210
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
140
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
3
1.7k
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
47k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Mind Mapping
helmedeiros
1
420
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
Building the Perfect Custom Keyboard
takai
2
940
The Cult of Friendly URLs
andyhume
79
7.1k
Ruling the World: When Life Gets Gamed
codingconduct
0
430
Producing Creativity
orderedlist
PRO
348
41k
From π to Pie charts
rasagy
1
430
Discover your Explorer Soul
emna__ayadi
2
1.3k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
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]