SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Develop a Mobile
Application connected to
a REST Microservice
Charles Moulliard (@cmoulliard)
17 June 2016
 
Who
Committer, Coder, Architect
Work on Apache Camel, Karaf, Fabric8, Hawtio, Apiman, Drools
Mountain Biker, Belgian Beer Fan
Blog:
Twitter:
Email:
http://cmoulliard.github.io
@cmoulliard
cmoulliard@redhat.com
Agenda
Requirements
Hybrid HTML5 Mobile
Frameworks
Tools
Integration Technology
Cloud Mobile Platform
Demo - Part I / Local
Demo - Part II / Backend
Hybrid Mobile Dev
 
What Hybrid means ?
JavaScript
Model View
Controller
Improve project design
Reduce coding lines
 
Ionic
Fully integrated with
AngularJS
Provide AngularJS Extension
Huge collection of Widgets
(List, Buttons, Footers, …)
JBoss Mobile Eclipse
Ionic List
View
<ion-viewview-title="Articles">
<ion-content>
<ion-list>
<ion-itemng-repeat="articleinarticles|
orderBy:['user','title']"
href="#/app/article/{{article.id}}">
{{article.title}},posted{{article.postDate}},by{{article.user}}
</ion-item>
</ion-list>
</ion-content>
</ion-view>
Controller
blog.controller('FindAllCtrl',function($scope,fhcloud,articleService){
$scope.articles={};
fhcloud('/articles/',null,'GET')
.then(function(response){
articleService.replaceArticles(response);
$scope.articles=response;
})
});
Apache Cordova
Web Based App wrapped into a
native Shell
Access to native feature through
WebView & Plugins
Multiplatform : iOS, Android,
Blackberry, MS Phone
Plugins : camera, geo, contacts, file
Architecture
Cordova Tooling
Install npm install -g cordova
Command line Tool to manage Hybrid Apps

cordovacreate<PATH>[ID[NAME[CONFIG]]][options][PLATFORM...]
CreateaCordovaproject
PATH.........................Wheretocreatetheproject
ID...........................reverse-domain-stylepackagename-usedin<widgeti
NAME.........................humanreadablefield
cordovaplugin<command>[options]
Manageprojectplugins
add<pluginid>|<directory>|<giturl>[...].....addspecifiedplugins
pluginidwillbematchedin--search
directoryisadirectorycontaining
giturlisagitrepocontaining
Example
cordovacreatemyApporg.apache.cordova.myAppmyApp
cordovapluginaddcordova-plugin-camera--save
cordovaplatformaddandroid--save
cordovarequirementsandroid
cordovabuildandroid--verbose
cordovarunandroid
cordovabuildandroid--release--
--keystore="..android.keystore"
--storePassword=android--alias=mykey
Ionic Tooling
_ _
(_) (_)
_ ___ ___ _ ___
||/_|'_||/__|
||(_)|||||(__
|_|___/|_||_|_|___| CLIv1.7.12
=======================
serve[options]............................... Startalocaldevelopmentserverfor
[--port|-p] ............................ DevserverHTTPport(8100default
[--livereload-port|-r] ................. LiveReloadport(35729default)
[--address] ............................ Usespecificaddressorreturnwithfai
[--platform|-t] ........................ Startservewithaspecificplatform
platform[options]<PLATFORM>................. AddplatformtargetforbuildinganIon
[--noresources|-r] .................. DonotadddefaultIoniciconsandspla
[--nosave|-e] ....................... Donotsavetheplatformtothepackage
package<command>[options]................... UseIonicPackagetobuildyourapp
<command>buildandroid,buildios,lis
[--release] .......................... (build<platform>)Markthisbuildasa
[--profile|-p<tag>] ................. (build<platform>)SpecifytheSecurity
[--destination|-d<path>] ............ (download)Specifythedestinationdire
----
 
How to integrate
Nodejs Proxy Server
Feedhenry SDK
Extend Cordova/Ionic JS Frameworks
Api to
Access Cloud Applications $fh.Cloud()
Push notifications $fh.push()
Auth User (OAuth) $fh.auth()
Sync data $fh.sync()
JS Front Service
blog.service('fhcloud',function($q){
returnfunction(cloudEndpoint,data,operation){
vardefer=$q.defer();
varparams={
path:cloudEndpoint,
method:operation,
contentType:"application/json",
data:data,
timeout:15000
};
$fh.cloud(params,defer.resolve,defer.reject);
returndefer.promise;
};
});
REST endpoint (Proxy)
app.get('/articles/searchid/:id',blogService.findById);
app.get('/articles',blogService.findAll);
app.get('/articles/searchuser/:user',blogService.findByUser)
app.post('/articles',blogService.newPost);
exports.findById=function(req,res,next){
console.log("ServiceFindByIdcalled");
varid=req.params.id;
request('http://BACKEND_SERVER:9191/blog/article/search/id/'+id,function(error,
if(!error&&response.statusCode==200){
console.log(body);
res.send(body);
}
})
};
Demo - Part I
 
Demo - Part II
 
Questions
Twitter : @cmoulliard
Mobile Backend github.com/FuseByExample/mobile-rest-in-action
REST with Camel github.com/FuseByExample/rest-dsl-in-action



Contenu connexe

Tendances

RESTful Apps With MongoDB
RESTful Apps With MongoDBRESTful Apps With MongoDB
RESTful Apps With MongoDB
MongoDB
 

Tendances (20)

Picking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use CasePicking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use Case
 
Building Mobile Apps With Ionic & Loopback
Building Mobile Apps With Ionic & LoopbackBuilding Mobile Apps With Ionic & Loopback
Building Mobile Apps With Ionic & Loopback
 
Design patterns talk_node_summit
Design patterns talk_node_summitDesign patterns talk_node_summit
Design patterns talk_node_summit
 
Loopback presentation by tineco
Loopback presentation by tinecoLoopback presentation by tineco
Loopback presentation by tineco
 
APIs 101: What are they? What do they have to do with genealogy?
APIs 101: What are they? What do they have to do with genealogy?APIs 101: What are they? What do they have to do with genealogy?
APIs 101: What are they? What do they have to do with genealogy?
 
A Connector, A Container and an API Walk into a Bar… Microservices Edition
A Connector, A Container and an API Walk into a Bar… Microservices EditionA Connector, A Container and an API Walk into a Bar… Microservices Edition
A Connector, A Container and an API Walk into a Bar… Microservices Edition
 
APIs Are Forever - How to Design Long-Lasting APIs
APIs Are Forever - How to Design Long-Lasting APIsAPIs Are Forever - How to Design Long-Lasting APIs
APIs Are Forever - How to Design Long-Lasting APIs
 
API Best Practices
API Best PracticesAPI Best Practices
API Best Practices
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
OpenSource Node.js API Framework and Server for Enterprise
OpenSource Node.js API Framework and Server for EnterpriseOpenSource Node.js API Framework and Server for Enterprise
OpenSource Node.js API Framework and Server for Enterprise
 
Building Self Documenting REST APIs
Building Self Documenting REST APIsBuilding Self Documenting REST APIs
Building Self Documenting REST APIs
 
Node.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns WebinarNode.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns Webinar
 
Connect js nodejs_api_shubhra
Connect js nodejs_api_shubhraConnect js nodejs_api_shubhra
Connect js nodejs_api_shubhra
 
RESTful Apps With MongoDB
RESTful Apps With MongoDBRESTful Apps With MongoDB
RESTful Apps With MongoDB
 
Api application programming interface
Api application programming interfaceApi application programming interface
Api application programming interface
 
StrongLoop Node.js API Security & Customization
StrongLoop Node.js API Security & CustomizationStrongLoop Node.js API Security & Customization
StrongLoop Node.js API Security & Customization
 
Application Server-less Web Applications - Serverless Toronto Meetup
Application Server-less Web Applications - Serverless Toronto Meetup Application Server-less Web Applications - Serverless Toronto Meetup
Application Server-less Web Applications - Serverless Toronto Meetup
 
API Thinking - How to Design APIs Through Systems Design
API Thinking - How to Design APIs Through Systems DesignAPI Thinking - How to Design APIs Through Systems Design
API Thinking - How to Design APIs Through Systems Design
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 

En vedette

Big Data - CRM's Promise Land
Big Data - CRM's Promise LandBig Data - CRM's Promise Land
Big Data - CRM's Promise Land
Danny Camprubi Douglas
 
Apache ActiveMQ, Camel, CXF and ServiceMix Overview
Apache ActiveMQ, Camel, CXF and ServiceMix OverviewApache ActiveMQ, Camel, CXF and ServiceMix Overview
Apache ActiveMQ, Camel, CXF and ServiceMix Overview
Marcelo Jabali
 

En vedette (13)

Writing Mobile Apps in the cloud with FeedHenry
Writing Mobile Apps in the cloud with FeedHenryWriting Mobile Apps in the cloud with FeedHenry
Writing Mobile Apps in the cloud with FeedHenry
 
Big Data - CRM's Promise Land
Big Data - CRM's Promise LandBig Data - CRM's Promise Land
Big Data - CRM's Promise Land
 
Fusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliardFusesource camel-persistence-part1-webinar-charles-moulliard
Fusesource camel-persistence-part1-webinar-charles-moulliard
 
NodeConf EU, Red Hat Mobile Keynote
NodeConf EU, Red Hat Mobile KeynoteNodeConf EU, Red Hat Mobile Keynote
NodeConf EU, Red Hat Mobile Keynote
 
Apache ServiceMix4 : Dream platform for Java Integration
Apache ServiceMix4 : Dream platform for Java Integration Apache ServiceMix4 : Dream platform for Java Integration
Apache ServiceMix4 : Dream platform for Java Integration
 
Enterprise Mobility 1st Step Towards Digital Transformation
Enterprise Mobility 1st Step Towards Digital TransformationEnterprise Mobility 1st Step Towards Digital Transformation
Enterprise Mobility 1st Step Towards Digital Transformation
 
Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013Make easier Integration of your services with Fuse Solutions - RedHat 2013
Make easier Integration of your services with Fuse Solutions - RedHat 2013
 
Customize Your Enterprise Mobile Salesforce.com Integrations with Red Hat
Customize Your Enterprise Mobile Salesforce.com Integrations with Red HatCustomize Your Enterprise Mobile Salesforce.com Integrations with Red Hat
Customize Your Enterprise Mobile Salesforce.com Integrations with Red Hat
 
Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016Microservices with WildFly Swarm - JavaSI 2016
Microservices with WildFly Swarm - JavaSI 2016
 
Apache ActiveMQ, Camel, CXF and ServiceMix Overview
Apache ActiveMQ, Camel, CXF and ServiceMix OverviewApache ActiveMQ, Camel, CXF and ServiceMix Overview
Apache ActiveMQ, Camel, CXF and ServiceMix Overview
 
How would ESBs look like, if they were done today.
How would ESBs look like, if they were done today.How would ESBs look like, if they were done today.
How would ESBs look like, if they were done today.
 
iPaas with Fuse Fabric Technology
iPaas with Fuse Fabric TechnologyiPaas with Fuse Fabric Technology
iPaas with Fuse Fabric Technology
 
Devoxx 2011 integration-camel-cxf-servicemix-activemq
Devoxx 2011 integration-camel-cxf-servicemix-activemqDevoxx 2011 integration-camel-cxf-servicemix-activemq
Devoxx 2011 integration-camel-cxf-servicemix-activemq
 

Similaire à Develop a Mobile Application coonected to a REST backend

Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
Troy Miles
 
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Gustaf Nilsson Kotte
 
Client Side Frameworks
Client Side FrameworksClient Side Frameworks
Client Side Frameworks
Mitesh Gandhi
 

Similaire à Develop a Mobile Application coonected to a REST backend (20)

Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
 
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
 
Android App Development using HTML5 Technology
Android App Development using HTML5 TechnologyAndroid App Development using HTML5 Technology
Android App Development using HTML5 Technology
 
Connected Mobile Apps with Microsoft Azure
Connected Mobile Apps with Microsoft AzureConnected Mobile Apps with Microsoft Azure
Connected Mobile Apps with Microsoft Azure
 
2011 08-24 mobile web app
2011 08-24  mobile web app2011 08-24  mobile web app
2011 08-24 mobile web app
 
Top 4 Best Cross-Platform App Development Frameworks
Top 4 Best Cross-Platform App Development FrameworksTop 4 Best Cross-Platform App Development Frameworks
Top 4 Best Cross-Platform App Development Frameworks
 
Client Side Frameworks
Client Side FrameworksClient Side Frameworks
Client Side Frameworks
 
MyMobileWeb Certification Part I
MyMobileWeb Certification Part IMyMobileWeb Certification Part I
MyMobileWeb Certification Part I
 
Ionic event: March 2021
Ionic event: March 2021Ionic event: March 2021
Ionic event: March 2021
 
Best Practices for Mobile Web Design
Best Practices for Mobile Web DesignBest Practices for Mobile Web Design
Best Practices for Mobile Web Design
 
Meteor intro-2015
Meteor intro-2015Meteor intro-2015
Meteor intro-2015
 
Intro to appcelerator
Intro to appceleratorIntro to appcelerator
Intro to appcelerator
 
Loopback: An Easy and Robust Mobile Backend - Michael Hantler & Aviv Callande...
Loopback: An Easy and Robust Mobile Backend - Michael Hantler & Aviv Callande...Loopback: An Easy and Robust Mobile Backend - Michael Hantler & Aviv Callande...
Loopback: An Easy and Robust Mobile Backend - Michael Hantler & Aviv Callande...
 
ASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a coupleASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a couple
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
 
국립 부산기계공고 아이폰 애플리케이션 개발 멘토링 발표회 자료
국립 부산기계공고 아이폰 애플리케이션 개발 멘토링 발표회 자료국립 부산기계공고 아이폰 애플리케이션 개발 멘토링 발표회 자료
국립 부산기계공고 아이폰 애플리케이션 개발 멘토링 발표회 자료
 
CV
CVCV
CV
 
Achieve Responsive Web Applications With Ease Using Kendo UI
Achieve Responsive Web Applications With Ease Using Kendo UIAchieve Responsive Web Applications With Ease Using Kendo UI
Achieve Responsive Web Applications With Ease Using Kendo UI
 
Pivorak.javascript.global domination
Pivorak.javascript.global dominationPivorak.javascript.global domination
Pivorak.javascript.global domination
 
Andriy Vandakurov about "Frontend. Global domination"
Andriy Vandakurov about  "Frontend. Global domination" Andriy Vandakurov about  "Frontend. Global domination"
Andriy Vandakurov about "Frontend. Global domination"
 

Plus de Charles Moulliard

Fuse source parisjug-10052011
Fuse source parisjug-10052011Fuse source parisjug-10052011
Fuse source parisjug-10052011
Charles Moulliard
 

Plus de Charles Moulliard (9)

Fuse technology-2015
Fuse technology-2015Fuse technology-2015
Fuse technology-2015
 
Continuous Delivery & Integration with JBoss Fuse on Openshift
Continuous Delivery & Integration with JBoss Fuse on OpenshiftContinuous Delivery & Integration with JBoss Fuse on Openshift
Continuous Delivery & Integration with JBoss Fuse on Openshift
 
Development of social media projects with Apache Camel, Fabric8 & Hawtio
Development of social media projects with Apache Camel, Fabric8 & HawtioDevelopment of social media projects with Apache Camel, Fabric8 & Hawtio
Development of social media projects with Apache Camel, Fabric8 & Hawtio
 
Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012
 
Cloud fuse-apachecon eu-2012
Cloud fuse-apachecon eu-2012Cloud fuse-apachecon eu-2012
Cloud fuse-apachecon eu-2012
 
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
 
Fusesource camel-persistence-part2-webinar-charles-moulliard
Fusesource camel-persistence-part2-webinar-charles-moulliardFusesource camel-persistence-part2-webinar-charles-moulliard
Fusesource camel-persistence-part2-webinar-charles-moulliard
 
Be jug 090611_apacheservicemix
Be jug 090611_apacheservicemixBe jug 090611_apacheservicemix
Be jug 090611_apacheservicemix
 
Fuse source parisjug-10052011
Fuse source parisjug-10052011Fuse source parisjug-10052011
Fuse source parisjug-10052011
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Develop a Mobile Application coonected to a REST backend