sdafdsf
-
Upload
bob-smith -
Category
Technology
-
view
98 -
download
0
Transcript of sdafdsf
![Page 1: sdafdsf](https://reader035.fdocuments.net/reader035/viewer/2022081821/55a50a5e1a28abb43e8b45d2/html5/thumbnails/1.jpg)
Rapid API development on MongoDB
Daniel Hjelm @dhjelmGoogle+ profile: http://goo.gl/QcLND
![Page 2: sdafdsf](https://reader035.fdocuments.net/reader035/viewer/2022081821/55a50a5e1a28abb43e8b45d2/html5/thumbnails/2.jpg)
• "the simplest way to build an API"
• Open source
• Build on Node.js and MongoDB
• Common server and client API (dpd.js)
• Can sync client states through Web-sockets.
• No live reload :(
http://deployd.com/
![Page 3: sdafdsf](https://reader035.fdocuments.net/reader035/viewer/2022081821/55a50a5e1a28abb43e8b45d2/html5/thumbnails/3.jpg)
Getting started
You need to specify dbname and host (at least when installing from NPM). Otherwise you just get stuck with a:
$ dpd -dstarting deployd v0.6.8...
Instead do:
$ dpd --dbname klmug-dpd --host localhost --mongoPort 27017starting deployd v0.6.8...listening on port 2403type help for a list of commandsdpd >
$ dpd create klmug-dpd
![Page 4: sdafdsf](https://reader035.fdocuments.net/reader035/viewer/2022081821/55a50a5e1a28abb43e8b45d2/html5/thumbnails/4.jpg)
Dashboard
![Page 5: sdafdsf](https://reader035.fdocuments.net/reader035/viewer/2022081821/55a50a5e1a28abb43e8b45d2/html5/thumbnails/5.jpg)
Client server communication
• Two ways to interact with the server
• via dpd.js
• via REST calls
• Returns JSON
• No authentication by default
• No CSRF protection
![Page 6: sdafdsf](https://reader035.fdocuments.net/reader035/viewer/2022081821/55a50a5e1a28abb43e8b45d2/html5/thumbnails/6.jpg)
Pros
• Easy to get started
• Example projects available on the website
• Could be good if you are new to REST
• Deployd's realtime capabilities
• Not only tied to web application developent
![Page 7: sdafdsf](https://reader035.fdocuments.net/reader035/viewer/2022081821/55a50a5e1a28abb43e8b45d2/html5/thumbnails/7.jpg)
Cons
• Kind of treats MongoDB as if it was a relational DB
• Only support one level of objects
• localhost:1234/meetings/12/attendees
• Can’t modify the id field (must be an auto-generated ObjectId)
![Page 8: sdafdsf](https://reader035.fdocuments.net/reader035/viewer/2022081821/55a50a5e1a28abb43e8b45d2/html5/thumbnails/8.jpg)
More cons...
• Does not support live reload
• Their scaleable cloud does not seems to work
• No datetime type
• No support for MongoDB replication nor sharding
![Page 9: sdafdsf](https://reader035.fdocuments.net/reader035/viewer/2022081821/55a50a5e1a28abb43e8b45d2/html5/thumbnails/9.jpg)
Conclusion
• Easy to get started with, but ...
• I can’t really see it as anything more than a prototyping tool
![Page 10: sdafdsf](https://reader035.fdocuments.net/reader035/viewer/2022081821/55a50a5e1a28abb43e8b45d2/html5/thumbnails/10.jpg)
Questions?