mongodb + node.js + epam road

26
MongoDB, Node.JS + EPAM ROAD Backend és iOS kliens könnyedén Molnár Szilveszter Epam Systems moszinet

Upload: szilveszter-molnar

Post on 06-Aug-2015

671 views

Category:

Software


2 download

TRANSCRIPT

Page 1: MongoDB + Node.JS + EPAM ROAD

MongoDB, Node.JS + EPAM ROADBackend és iOS kliens könnyedén

Molnár Szilveszter Epam Systems

moszinet

Page 2: MongoDB + Node.JS + EPAM ROAD

Why ?

Page 3: MongoDB + Node.JS + EPAM ROAD

Topics we will cover• Architecture

• Build the Backend

• Build the iOS app

• Summary

Page 4: MongoDB + Node.JS + EPAM ROAD

The App

Page 5: MongoDB + Node.JS + EPAM ROAD
Page 6: MongoDB + Node.JS + EPAM ROAD
Page 7: MongoDB + Node.JS + EPAM ROAD
Page 8: MongoDB + Node.JS + EPAM ROAD

MongoDB• Open source

• High performance, high availability, automatic scaling

• Document database

Page 9: MongoDB + Node.JS + EPAM ROAD

{ name: “Szilveszter Molnar”, age: 37, groups: [ “mobileDev”, “iOS”, “Android”, “WP8” ] }

Page 10: MongoDB + Node.JS + EPAM ROAD
Page 11: MongoDB + Node.JS + EPAM ROAD
Page 12: MongoDB + Node.JS + EPAM ROAD

DEMO MongoDB

Page 13: MongoDB + Node.JS + EPAM ROAD

Node.JS• A platform built on Google’s Open Source V8 engine

• event-driven, non-blocking I/O model

• JavaScript based

Page 14: MongoDB + Node.JS + EPAM ROAD

var http = require(‘http');http.createServer(function (req, res) {

res.writeHead(200, {'Content-Type': ‘text/plain'}); res.end('Hello World\n');

}).listen(1337, '127.0.0.1');

console.log('Server running at http://127.0.0.1:1337/');

Page 15: MongoDB + Node.JS + EPAM ROAD

Express• Express: Node.JS Web Application Framework

• npm install express

Page 16: MongoDB + Node.JS + EPAM ROAD

Routing

Page 17: MongoDB + Node.JS + EPAM ROAD

// respond with "Hello World!" on the homepage app.get('/', function (req, res) { res.send('Hello World!'); })

// accept POST request on the homepage app.post('/', function (req, res) { res.send('Got a POST request');})

// accept PUT request at /userapp.put('/user', function (req, res) { res.send('Got a PUT request at /user'); })

// accept DELETE request at /userapp.delete('/user', function (req, res) { res.send('Got a DELETE request at /user'); })

Page 18: MongoDB + Node.JS + EPAM ROAD

Mongoose• MongoDB object modeling framework

• npm install mongoose

Page 19: MongoDB + Node.JS + EPAM ROAD

DEMO Basic Car repository

Page 20: MongoDB + Node.JS + EPAM ROAD

EPAM ROAD

Page 21: MongoDB + Node.JS + EPAM ROAD

Rapid Objective-C Applications Development• Features

• Support for attributes (annotations), reflection

• Services (service locator pattern)

• Serialization (JSON, XML)

• Web Service client w/ zero-coding using attributes

• CocoaPods integration

Page 22: MongoDB + Node.JS + EPAM ROAD

Attributes

RF_ATTRIBUTE(RFSerializable)@interface RDCar : NSObject { … }

RF_ATTRIBUTE(RFWebServiceCall, method = @"GET", relativePath = @"/cars", prototypeClass=[RDCar class])- (id)carListWithSuccess:failure:;

Page 23: MongoDB + Node.JS + EPAM ROAD
Page 24: MongoDB + Node.JS + EPAM ROAD

DEMO

Page 25: MongoDB + Node.JS + EPAM ROAD

Resources

• github.com/moszi/MongoNodeRoad

• server install script, backend + iOS source code

• github.com/epam/road-ios-framework

• mongodb.org

• nodejs.org, expressjs.com, mongoosejs.com

Page 26: MongoDB + Node.JS + EPAM ROAD

Köszönöm!

Molnár Szilveszter Epam Systems

moszinet