SlideShare a Scribd company logo
1 of 49
Download to read offline
1
Gearing Up for Mobile
Development with AeroGear
Prajod Vettiyattil
@prajods
in.linkedin.com/in/prajod

2

Naveen Raj Balasubramaniam
@Naveenrajbala
in.linkedin.com/in/naveenraj
Agenda
A walk with AeroGear
Simplify mobile development

Front end development support
Server side development support
The Road Ahead

Summary
3
A walk with AeroGear

4
Mobile Development Framework
Local Data
Management

User Interaction
Management

Authentication /
Authorization

Communication
Framework

Native API handler

Patch / Version
Management

Management

Monitoring

UI Framework
Data
Management

Request
Processing

Authentication /
Authorization

Device Variant
Management

Communication
Framework

Metering /
Billing

Patch / Version
Management

Monitoring

Management

Server side Framework
5

User / Device
Registration
Mobile Development Framework
AeroGear features
Local Data
Management

User Interaction
Management

Authentication /
Authorization

Communication
Framework

Native API handler

Patch / Version
Management

Management

Monitoring

UI Framework
Data
Management

Request
Processing

Authentication /
Authorization

Device Variant
Management

Communication
Framework

Metering /
Billing

Patch / Version
Management

Monitoring

Management

Server side Framework
6

User / Device
Registration
Mobile web Development
There many mobile
phone operating systems
in the market.

7
And there are Frameworks
ā€¢
ā€¢

There are lot of technologies for every platform
Native and nonā€“native technologies

8
Overview of AeroGear
AeroGear is for mobile development
ā€¢ A set of libraries
ā€¢
ā€¢
ā€¢
ā€¢

Android library, iOS library, JavaScript Library
AeroGear Connectivity
AeroGear Controller, Security
AeroGear Persistence

ā€¢ Unified approach to development
ā€¢ Multi-platform support
ā€¢ Out of the box push notification and
security

9
Browser support in Aerogear
Currently AeroGear supports the following desktop
web browsers
ā€¢ Firefox
ā€¢ Chrome
ā€¢ IE
ā€¢ Safari
Currently AeroGear Supports the following mobile web
browsers.
ā€¢ Android Browser
ā€¢ Safari
In General all the web browsers with html5 support
will support Aerogear apps too
10
Mobile development options

Option 1: Mobile Browser app
Mobile Brower

HTML5,
CSS3, JS

11

ā€¢ Mobile browser app(web
app)
ā€¢ HTML5 + CSS3 +
javascript
ā€¢ Most portable
ā€¢ Platform independent
code
ā€¢ No access to native
APIs
Mobile development options

Option 2: Native App
ā€¢ Native apps
Native App

Native Device
APIs

12

ā€¢ Platform dependent
ā€¢ Uses native APIs
ā€¢ Most powerful, least
portable
ā€¢ Most popular among
users
ā€¢ Best user experience
Mobile development options

Option 3: Hybrid App
ā€¢ Hybrid apps, plugins
Native Shell
Mobile Brower
HTML5, CSS3,
JS

Bridge code

Native Device APIs

13

Developed as web apps
Deployed and run as native apps
Javascript calls the bridge code
Plugins for direct access to native
APIs
ā€¢ Looks like a native app
ā€¢ Has limitations in accessing native
APIs
ā€¢ Cordova, PhoneGap, Appcelerator,
Sencha
ā€¢
ā€¢
ā€¢
ā€¢
Comparing the options
Mobile Brower

Native Shell
Mobile Brower

Native App
HTML5,
CSS3, JS

HTML5, CSS3,
JS

Bridge code

Native Device
APIs

Browser only
14

Native Device APIs

Native only

Hybrid(browser+native)
Which option is AeroGear for ?
ā€¢ Primarily
ā€¢ Client-server type of apps
ā€¢ Browser only apps
ā€¢ Hybrid apps

ā€¢ Also
ā€¢ Native apps
ā€¢ The communication and server side
features
15
Simplify mobile development
with AeroGear

16
AeroGear Mobile Development
Aerogear makes front end development easier and
unified in the following platforms
ā€¢ Android
ā€¢ iOS
ā€¢ Mobile web

For the server side, AeroGear touches the following areas
ā€¢ Push Notification (Android, JS, iOS)
ā€¢ Security
ā€¢ More coming upā€¦
17
Unified Development
Libraries for different platforms
ā€¢ Java for Android
ā€¢ JavaScript for web browsers
ā€¢ Objective-C for iOS
ā€¢ Unified approach
ā€¢ Single application for multiple Mobile platforms
ā€¢ Same deployment can be viewed by both mobile device
browsers and desktop browsers

18
Push Notification
Notifications are a popular method of communication
Push = messaging
from Server side

The why and how of notification
ā€¢ Alert apps about events, updates
ā€¢ High scalability
ā€¢ Lightweight messages
App 7

Server

Push
Service

Push

19
Push: The platform concept

Push
Servers

20
Security
Authentication

Authorization

ā€¢ OTP: One Time Password
ā€¢ HTTPS: SSL
ā€¢ General: username /password (encrypted transmission)
ā€¢ Single Sign On
ā€¢ Federated Identity Management using external Identity
Managers

21
Support for
front end development

22
User Interface Development
ā€¢ UI Coding: Use HTML 5, CSS3 and
Javascript
ā€¢ aerogear.js: javascript library
ā€¢ REST: used for communications

23
AeroGear Development
Communication and Storage
Pipe
ā€¢
ā€¢

A connection made to the server
Connectivity to asynchronous data sources

Pipeline
pipe

Pipeline
ā€¢
ā€¢

A wrapper for a set of pipes
Has management features for pipes

DataManager
ā€¢
ā€¢
ā€¢

Data connections
Data models
Data connection is represented as a Store

Store
ā€¢
ā€¢

24

Data Stores on the mobile platform
Eg: SQLite(iOS, Android), Web Storage(HTML5)

Data Manager
iOS
Store

Android
Store

Web
Store
JavaScript Development
Creating Pipeline and Pipes
Instantiate a Pipeline
Add pipes to the Pipeline

Name

URL

Using Data Manager and Store
Instantiate a DataManager
Adding stores to the DataManager

25

Type
JavaScript Development
Creating Pipeline and Pipes
var memberPipe = AeroGear.Pipeline([{
name: ā€œ2014",
settings: {
baseURL: ā€œJUDCon/ā€œ
}
}
]).pipes.members;
The pipeā€™s URL will then look like:

URL

Instantiate a data manager

var dataManager = AeroGear.DataManager(
"membersStore" ),
MemberStore =
dataManager.stores["membersStore"];

26

pipeā€™s name

http://localhost/application_name/JUDCon/2014

Using Data Manager and Store

Assign a store

Instantiate a pipe

//Create a custom local store
var dManage =
AeroGear.DataManager({
name: "mySessionStorage",
type: "SessionLocal",
id: "customID"
});
Android Development
Pipeline and Pipes
public class MyActivity extends ListActivity {

Pipeline pipeline;
void onCreate() {
pipeline = new Pipeline("http://www.judcon.com");
pipeline.pipe(Car.class);
}

Pipeline
Operations
ā€¢
ā€¢
ā€¢
ā€¢

Read
Save
Update
Remove

void onStart() {
LoaderPipe<Car> pipe = pipeline.get("car", this);
pipe.read(new MyCallback());
}
}

27
Android Development contdā€¦
SQLStore

Memory Store

28

Operations
StoreConfig sqlStoreConfig = new StoreConfig();
sqlStoreConfig.setContext(getApplicationContext());
sqlStoreConfig.setType(SQL);
sqlStoreConfig.setKlass(Data.class);
Store store = dataManager.store("sqlStore",
sqlStoreConfig);
((SQLStore))store).open(/*callback*/);

ā€¢
ā€¢
ā€¢
ā€¢
ā€¢

Read
Save
Remove
Filter
Reset

StoreConfig memoryStoreConfig = new StoreConfig();
memoryStoreConfig.setContext(getApplicationContext());
memoryStoreConfig.setType(MEMORY);
memoryStoreConfig.setKlass(Data.class);
Store store = dataManager.store("memoryStore", memoryStoreConfig);
iOS Development
Pipeline and Pipes
// NSURL object:
NSURL* serverURL = [NSURL URLWithString:@"http://todoaerogear.rhcloud.com/todo-server/"];

Pipeline
Operations
ā€¢
ā€¢
ā€¢
ā€¢

29

Read
Save
Update
Remove

// create the 'todo' pipeline, which points to the baseURL
of the REST application
AGPipeline* todo = [AGPipeline
pipelineWithBaseURL:serverURL];
// Add a REST pipe for the 'projects' endpoint
id<AGPipe> projects = [todo pipe:^(id<AGPipeConfig>
config) {
[config setName:@"projects"];
// this is the default, can be emitted
[config setType:@"REST"];
}];
iOS Development contdā€¦
SQLite

Memory Store

30

// create the datamanager
AGDataManager* dm = [AGDataManager manager];
// add a new (default) store object:
id<AGStore> store = [dm store:^(id<AGStoreConfig>
config) {
[config setName:@"tasks"];
[config setType:@"SQLITE"];
}];

Data
Operations
ā€¢
ā€¢
ā€¢
ā€¢
ā€¢

Read
Save
Remove
Filter
Reset

// create the datamanager
AGDataManager* dm = [AGDataManager manager];
// add a new (default) store object:
id<AGStore> myStore = [dm store:^(id<AGStoreConfig> config) {
[config setName:@"tasks"];
}];
The server side components

AeroGear Controller
AeroGear Security
UnifiedPush

31
AeroGear Controller
What is the AeroGear Controller ?
ā€¢ A lean MVC implemented in java
ā€¢ Routes HTTP requests to plain Java Object endpoint, and
handles the results
ā€¢ Can be deployed on any container supporting CDI(Context and
Dependency Injection)
public class Routes extends AbstractRoutingModule {
@Override
public void configuration() {
route()
.from("/").roles("admin")
.on(RequestMethod.GET)
.consumes(JSON)
.produces(JSP, JSON)
.to(Home.class).index();
}
}
32
AeroGear Controller continuedā€¦
Routes
public class Routes extends AbstractRoutingModule {
@Override
public void configuration() {
route()
.from("/").roles("admin")
.on(RequestMethod.GET)
.consumes(JSON)
.produces(JSP, JSON)
.to(Home.class).index();
}
}

33
AeroGear Controller continuedā€¦
Pagination
ā€¢
ā€¢

If a page is too long for the screen
Returns a limited number of elements

Sample code returning a page in AeroGear controller, with pagination
route()
.from("/cars")
.on(RequestMethod.GET)
.produces(JSON)
.to(Cars.class).findCarsBy(param(PaginationInfo.class), param("color"));

Error Handling
route()
.on(YourException.class)
.to(ExceptionHandler.class).errorPage();
34
Push Notification: Registration
1

2 User

Developer

Push Notification Server
Application
Registration
Storage
Sender

JBoss AS backend server
35
Push Notification: Runtime
Push Notification
Server

5

Application
Registration

Simple Push

Storage

4
Sender

GCM

APN

3
JBoss AS backend server
36
Push for web clients

http

37
Push for Android

XMPP

38
Push for iOS

39
Push Notification: feature list
AeroGear Unified Push Notification Server
App 7

ā€¢ Single unified push notification
ā€¢ Single server for multiple apps and mobile platforms
ā€¢ Currently supports Google Cloud Messaging, Apple
Push Notification
ā€¢ Web push based on Mozillaā€™s Simple Push

Unified Push Administration Console
ā€¢
ā€¢
ā€¢
ā€¢
40

A single place to manage configurations
Register new push apps
Register variants of platforms
Currently supported: Android, iOS and Simple push
variants
Security

Hawk

Java OTP

PicketLink

iOS OTP

Shiro

41
Security
AeroGear Security Implementation
ā€¢ Providing integration with security providers like
PicketLink, Shiro
ā€¢ Completely decoupled from the AeroGear controller
import org.jboss.aerogear.controller.spi.SecurityProvider;

public class AeroGearSecurityProvider implements SecurityProvider {
@Inject
private IdentityManagement identityManagement;
@Override
public void isRouteAllowed(Route route) throws ServletException {
if (!identityManagement.hasRoles(route.getRoles())) {
throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED);
}
}
42

}
Security: Filters and HSTS
Filters

ā€¢ A security mechanism with many applications
ā€¢ Eg: prevent ClickJacking
HSTS
ā€¢ HTTP Strict Transport Security
ā€¢ Force https usage
ā€¢ Optional in AeroGear
43
Security: OTP

AeroGear OTP
ā€¢ One time password
ā€¢ Increased security while executing transaction
ā€¢ OTP and AeroGear Security can be used together or
separately
// Get a userā€™s otp

// verify the userā€™s otp

public class Otp {

public User otp(SimpleUser user, String otp) {

@Inject
@Secret
private Instance<String> secret;

Totp totp = new Totp(secret.get());
boolean result = totp.verify(otp);
if (!result)
throw new RuntimeException("Invalid OTP");

@Inject
@LoggedUser
private Instance<String> loggedInUserName;

return user;
}

public String secret() {
return new
Totp(secret.get()).uri(loggedInUserName.get());
}

44

}
The Road Ahead

45
Road Ahead
Browser Support
ā€¢
ā€¢
ā€¢

Windows Mobile
Mobile Chrome
Opera Mobile and Desktop

Push Notification
ā€¢
ā€¢

46

MQTT
STOMP
Summary
ā€¢ What is Aerogear
ā€¢ Supported platforms
ā€¢ Front end development
ā€¢ AeroGear Libraries for each platform

ā€¢ Server side development
ā€¢ AeroGear Push Notification
ā€¢ AeroGear Security

47
Useful Links
AeroGear References
ā€¢ http://aerogear.org

External References
ā€¢ http://www.markus-falk.com/mobile-frameworks-comparisonchart/
ā€¢ http://www.infoq.com/articles/javaee-mobile-applicationdevelopment-aerogear
ā€¢ http://www.slideshare.net/lfryc/the-gear-you-need-to-gomobile-with-java-enterprise
ā€¢ http://www.slideshare.net/jaxlondon2012/html-alchemy-thesecrets-of-mixing-javascript-and-java-ee
ā€¢ http://www.ohloh.net/p?ref=homepage&q=aerogear
48
Thank You
@prajods

@Naveenrajbala

Start Gearingā€¦

49

More Related Content

What's hot

Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
aswapnal
Ā 
Asp interview Question and Answer
Asp interview Question and Answer Asp interview Question and Answer
Asp interview Question and Answer
home
Ā 
Sid K
Sid KSid K
Sid K
Sid K
Ā 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
cummings49
Ā 
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Nik Patel
Ā 

What's hot (20)

Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
Ā 
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Ā 
Oracle WebCenter Solutions
Oracle WebCenter SolutionsOracle WebCenter Solutions
Oracle WebCenter Solutions
Ā 
Asp interview Question and Answer
Asp interview Question and Answer Asp interview Question and Answer
Asp interview Question and Answer
Ā 
Creating personalized cross platform mobile apps with the Sitecore Mobile SDK
Creating personalized cross platform mobile apps with the Sitecore Mobile SDKCreating personalized cross platform mobile apps with the Sitecore Mobile SDK
Creating personalized cross platform mobile apps with the Sitecore Mobile SDK
Ā 
Sid K
Sid KSid K
Sid K
Ā 
Nokia Web-Runtime Presentation (Phong Vu)
Nokia Web-Runtime Presentation (Phong Vu)Nokia Web-Runtime Presentation (Phong Vu)
Nokia Web-Runtime Presentation (Phong Vu)
Ā 
Oracle ADF Case Study
Oracle ADF Case StudyOracle ADF Case Study
Oracle ADF Case Study
Ā 
IBM WebSphere Portal 6.1 Preview - What's New
IBM WebSphere Portal 6.1 Preview - What's NewIBM WebSphere Portal 6.1 Preview - What's New
IBM WebSphere Portal 6.1 Preview - What's New
Ā 
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB StitchMongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
Ā 
Drupal Commerce, DrupalCamp Colorado 2010
Drupal Commerce, DrupalCamp Colorado 2010Drupal Commerce, DrupalCamp Colorado 2010
Drupal Commerce, DrupalCamp Colorado 2010
Ā 
Frontend APIs powering fast paced product iterations
Frontend APIs powering fast paced product iterationsFrontend APIs powering fast paced product iterations
Frontend APIs powering fast paced product iterations
Ā 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
Ā 
Integrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePointIntegrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePoint
Ā 
Oracle web center
Oracle web centerOracle web center
Oracle web center
Ā 
Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...
Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...
Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...
Ā 
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Ā 
Sitecore xDB - Architecture and Configuration
Sitecore xDB - Architecture and ConfigurationSitecore xDB - Architecture and Configuration
Sitecore xDB - Architecture and Configuration
Ā 
Tech p22 integrating sap with web sphere portal
Tech p22 integrating sap with web sphere portalTech p22 integrating sap with web sphere portal
Tech p22 integrating sap with web sphere portal
Ā 
Web API 2 Token Based Authentication
Web API 2 Token Based AuthenticationWeb API 2 Token Based Authentication
Web API 2 Token Based Authentication
Ā 

Similar to JUDCon 2014: Gearing up for mobile development with AeroGear

Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
Mobile Web Applications using HTML5  [IndicThreads Mobile Application Develop...Mobile Web Applications using HTML5  [IndicThreads Mobile Application Develop...
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
IndicThreads
Ā 

Similar to JUDCon 2014: Gearing up for mobile development with AeroGear (20)

Case Study For Track Revenue Reports of Casino through Google App Engine
Case Study For Track Revenue Reports of Casino through Google App EngineCase Study For Track Revenue Reports of Casino through Google App Engine
Case Study For Track Revenue Reports of Casino through Google App Engine
Ā 
Ibm xamarin gtruty
Ibm xamarin gtrutyIbm xamarin gtruty
Ibm xamarin gtruty
Ā 
Summit Australia 2019 - PowerApp Portals - Andrew Ly & Lachlan Wright
Summit Australia 2019 - PowerApp Portals - Andrew Ly & Lachlan WrightSummit Australia 2019 - PowerApp Portals - Andrew Ly & Lachlan Wright
Summit Australia 2019 - PowerApp Portals - Andrew Ly & Lachlan Wright
Ā 
Mobile web development
Mobile web developmentMobile web development
Mobile web development
Ā 
Mobile game architecture on GCP
Mobile game architecture on GCPMobile game architecture on GCP
Mobile game architecture on GCP
Ā 
Simple stock market analysis
Simple stock market analysisSimple stock market analysis
Simple stock market analysis
Ā 
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
Mobile Web Applications using HTML5  [IndicThreads Mobile Application Develop...Mobile Web Applications using HTML5  [IndicThreads Mobile Application Develop...
Mobile Web Applications using HTML5 [IndicThreads Mobile Application Develop...
Ā 
Developerā€™s Independence Day: Introducing the SharePoint App Model
Developerā€™s Independence Day:Introducing the SharePoint App ModelDeveloperā€™s Independence Day:Introducing the SharePoint App Model
Developerā€™s Independence Day: Introducing the SharePoint App Model
Ā 
Serverless in Azure with Functions
Serverless in Azure with FunctionsServerless in Azure with Functions
Serverless in Azure with Functions
Ā 
300 - Multiplatform Apps on Google Cloud Platform
300 - Multiplatform Apps on Google Cloud Platform300 - Multiplatform Apps on Google Cloud Platform
300 - Multiplatform Apps on Google Cloud Platform
Ā 
Fire up your mobile app!
Fire up your mobile app!Fire up your mobile app!
Fire up your mobile app!
Ā 
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDB
Ā 
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
Ā 
Made for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsMade for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile Apps
Ā 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
Ā 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
Ā 
Cloud Powered Mobile Apps with Azure
Cloud Powered Mobile Apps  with AzureCloud Powered Mobile Apps  with Azure
Cloud Powered Mobile Apps with Azure
Ā 
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Ā 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
Ā 
Connecting Xamarin Apps with IBM Worklight in Bluemix
Connecting Xamarin Apps with IBM Worklight in BluemixConnecting Xamarin Apps with IBM Worklight in Bluemix
Connecting Xamarin Apps with IBM Worklight in Bluemix
Ā 

More from prajods

More from prajods (7)

Apache Cassandra and Python for Analyzing Streaming Big Data
Apache Cassandra and Python for Analyzing Streaming Big Data Apache Cassandra and Python for Analyzing Streaming Big Data
Apache Cassandra and Python for Analyzing Streaming Big Data
Ā 
Big Data visualization with Apache Spark and Zeppelin
Big Data visualization with Apache Spark and ZeppelinBig Data visualization with Apache Spark and Zeppelin
Big Data visualization with Apache Spark and Zeppelin
Ā 
Event Driven Architecture with Apache Camel
Event Driven Architecture with Apache CamelEvent Driven Architecture with Apache Camel
Event Driven Architecture with Apache Camel
Ā 
RedHat MRG and Infinispan for Large Scale Integration
RedHat MRG and Infinispan for Large Scale IntegrationRedHat MRG and Infinispan for Large Scale Integration
RedHat MRG and Infinispan for Large Scale Integration
Ā 
Apache Spark: The Next Gen toolset for Big Data Processing
Apache Spark: The Next Gen toolset for Big Data ProcessingApache Spark: The Next Gen toolset for Big Data Processing
Apache Spark: The Next Gen toolset for Big Data Processing
Ā 
Enabling Data as a Service with the JBoss Enterprise Data Services Platform
Enabling Data as a Service with the JBoss Enterprise Data Services PlatformEnabling Data as a Service with the JBoss Enterprise Data Services Platform
Enabling Data as a Service with the JBoss Enterprise Data Services Platform
Ā 
Apache Camel: The Swiss Army Knife of Open Source Integration
Apache Camel: The Swiss Army Knife of Open Source IntegrationApache Camel: The Swiss Army Knife of Open Source Integration
Apache Camel: The Swiss Army Knife of Open Source Integration
Ā 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(ā˜Žļø+971_581248768%)**%*]'#abortion pills for sale in dubai@
Ā 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Ā 

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Ā 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Ā 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Ā 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Ā 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Ā 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Ā 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
Ā 
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
Ā 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
Ā 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
Ā 
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...
Ā 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Ā 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Ā 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Ā 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Ā 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Ā 
Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024Finology Group ā€“ Insurtech Innovation Award 2024
Finology Group ā€“ Insurtech Innovation Award 2024
Ā 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Ā 

JUDCon 2014: Gearing up for mobile development with AeroGear

  • 1. 1
  • 2. Gearing Up for Mobile Development with AeroGear Prajod Vettiyattil @prajods in.linkedin.com/in/prajod 2 Naveen Raj Balasubramaniam @Naveenrajbala in.linkedin.com/in/naveenraj
  • 3. Agenda A walk with AeroGear Simplify mobile development Front end development support Server side development support The Road Ahead Summary 3
  • 4. A walk with AeroGear 4
  • 5. Mobile Development Framework Local Data Management User Interaction Management Authentication / Authorization Communication Framework Native API handler Patch / Version Management Management Monitoring UI Framework Data Management Request Processing Authentication / Authorization Device Variant Management Communication Framework Metering / Billing Patch / Version Management Monitoring Management Server side Framework 5 User / Device Registration
  • 6. Mobile Development Framework AeroGear features Local Data Management User Interaction Management Authentication / Authorization Communication Framework Native API handler Patch / Version Management Management Monitoring UI Framework Data Management Request Processing Authentication / Authorization Device Variant Management Communication Framework Metering / Billing Patch / Version Management Monitoring Management Server side Framework 6 User / Device Registration
  • 7. Mobile web Development There many mobile phone operating systems in the market. 7
  • 8. And there are Frameworks ā€¢ ā€¢ There are lot of technologies for every platform Native and nonā€“native technologies 8
  • 9. Overview of AeroGear AeroGear is for mobile development ā€¢ A set of libraries ā€¢ ā€¢ ā€¢ ā€¢ Android library, iOS library, JavaScript Library AeroGear Connectivity AeroGear Controller, Security AeroGear Persistence ā€¢ Unified approach to development ā€¢ Multi-platform support ā€¢ Out of the box push notification and security 9
  • 10. Browser support in Aerogear Currently AeroGear supports the following desktop web browsers ā€¢ Firefox ā€¢ Chrome ā€¢ IE ā€¢ Safari Currently AeroGear Supports the following mobile web browsers. ā€¢ Android Browser ā€¢ Safari In General all the web browsers with html5 support will support Aerogear apps too 10
  • 11. Mobile development options Option 1: Mobile Browser app Mobile Brower HTML5, CSS3, JS 11 ā€¢ Mobile browser app(web app) ā€¢ HTML5 + CSS3 + javascript ā€¢ Most portable ā€¢ Platform independent code ā€¢ No access to native APIs
  • 12. Mobile development options Option 2: Native App ā€¢ Native apps Native App Native Device APIs 12 ā€¢ Platform dependent ā€¢ Uses native APIs ā€¢ Most powerful, least portable ā€¢ Most popular among users ā€¢ Best user experience
  • 13. Mobile development options Option 3: Hybrid App ā€¢ Hybrid apps, plugins Native Shell Mobile Brower HTML5, CSS3, JS Bridge code Native Device APIs 13 Developed as web apps Deployed and run as native apps Javascript calls the bridge code Plugins for direct access to native APIs ā€¢ Looks like a native app ā€¢ Has limitations in accessing native APIs ā€¢ Cordova, PhoneGap, Appcelerator, Sencha ā€¢ ā€¢ ā€¢ ā€¢
  • 14. Comparing the options Mobile Brower Native Shell Mobile Brower Native App HTML5, CSS3, JS HTML5, CSS3, JS Bridge code Native Device APIs Browser only 14 Native Device APIs Native only Hybrid(browser+native)
  • 15. Which option is AeroGear for ? ā€¢ Primarily ā€¢ Client-server type of apps ā€¢ Browser only apps ā€¢ Hybrid apps ā€¢ Also ā€¢ Native apps ā€¢ The communication and server side features 15
  • 17. AeroGear Mobile Development Aerogear makes front end development easier and unified in the following platforms ā€¢ Android ā€¢ iOS ā€¢ Mobile web For the server side, AeroGear touches the following areas ā€¢ Push Notification (Android, JS, iOS) ā€¢ Security ā€¢ More coming upā€¦ 17
  • 18. Unified Development Libraries for different platforms ā€¢ Java for Android ā€¢ JavaScript for web browsers ā€¢ Objective-C for iOS ā€¢ Unified approach ā€¢ Single application for multiple Mobile platforms ā€¢ Same deployment can be viewed by both mobile device browsers and desktop browsers 18
  • 19. Push Notification Notifications are a popular method of communication Push = messaging from Server side The why and how of notification ā€¢ Alert apps about events, updates ā€¢ High scalability ā€¢ Lightweight messages App 7 Server Push Service Push 19
  • 20. Push: The platform concept Push Servers 20
  • 21. Security Authentication Authorization ā€¢ OTP: One Time Password ā€¢ HTTPS: SSL ā€¢ General: username /password (encrypted transmission) ā€¢ Single Sign On ā€¢ Federated Identity Management using external Identity Managers 21
  • 22. Support for front end development 22
  • 23. User Interface Development ā€¢ UI Coding: Use HTML 5, CSS3 and Javascript ā€¢ aerogear.js: javascript library ā€¢ REST: used for communications 23
  • 24. AeroGear Development Communication and Storage Pipe ā€¢ ā€¢ A connection made to the server Connectivity to asynchronous data sources Pipeline pipe Pipeline ā€¢ ā€¢ A wrapper for a set of pipes Has management features for pipes DataManager ā€¢ ā€¢ ā€¢ Data connections Data models Data connection is represented as a Store Store ā€¢ ā€¢ 24 Data Stores on the mobile platform Eg: SQLite(iOS, Android), Web Storage(HTML5) Data Manager iOS Store Android Store Web Store
  • 25. JavaScript Development Creating Pipeline and Pipes Instantiate a Pipeline Add pipes to the Pipeline Name URL Using Data Manager and Store Instantiate a DataManager Adding stores to the DataManager 25 Type
  • 26. JavaScript Development Creating Pipeline and Pipes var memberPipe = AeroGear.Pipeline([{ name: ā€œ2014", settings: { baseURL: ā€œJUDCon/ā€œ } } ]).pipes.members; The pipeā€™s URL will then look like: URL Instantiate a data manager var dataManager = AeroGear.DataManager( "membersStore" ), MemberStore = dataManager.stores["membersStore"]; 26 pipeā€™s name http://localhost/application_name/JUDCon/2014 Using Data Manager and Store Assign a store Instantiate a pipe //Create a custom local store var dManage = AeroGear.DataManager({ name: "mySessionStorage", type: "SessionLocal", id: "customID" });
  • 27. Android Development Pipeline and Pipes public class MyActivity extends ListActivity { Pipeline pipeline; void onCreate() { pipeline = new Pipeline("http://www.judcon.com"); pipeline.pipe(Car.class); } Pipeline Operations ā€¢ ā€¢ ā€¢ ā€¢ Read Save Update Remove void onStart() { LoaderPipe<Car> pipe = pipeline.get("car", this); pipe.read(new MyCallback()); } } 27
  • 28. Android Development contdā€¦ SQLStore Memory Store 28 Operations StoreConfig sqlStoreConfig = new StoreConfig(); sqlStoreConfig.setContext(getApplicationContext()); sqlStoreConfig.setType(SQL); sqlStoreConfig.setKlass(Data.class); Store store = dataManager.store("sqlStore", sqlStoreConfig); ((SQLStore))store).open(/*callback*/); ā€¢ ā€¢ ā€¢ ā€¢ ā€¢ Read Save Remove Filter Reset StoreConfig memoryStoreConfig = new StoreConfig(); memoryStoreConfig.setContext(getApplicationContext()); memoryStoreConfig.setType(MEMORY); memoryStoreConfig.setKlass(Data.class); Store store = dataManager.store("memoryStore", memoryStoreConfig);
  • 29. iOS Development Pipeline and Pipes // NSURL object: NSURL* serverURL = [NSURL URLWithString:@"http://todoaerogear.rhcloud.com/todo-server/"]; Pipeline Operations ā€¢ ā€¢ ā€¢ ā€¢ 29 Read Save Update Remove // create the 'todo' pipeline, which points to the baseURL of the REST application AGPipeline* todo = [AGPipeline pipelineWithBaseURL:serverURL]; // Add a REST pipe for the 'projects' endpoint id<AGPipe> projects = [todo pipe:^(id<AGPipeConfig> config) { [config setName:@"projects"]; // this is the default, can be emitted [config setType:@"REST"]; }];
  • 30. iOS Development contdā€¦ SQLite Memory Store 30 // create the datamanager AGDataManager* dm = [AGDataManager manager]; // add a new (default) store object: id<AGStore> store = [dm store:^(id<AGStoreConfig> config) { [config setName:@"tasks"]; [config setType:@"SQLITE"]; }]; Data Operations ā€¢ ā€¢ ā€¢ ā€¢ ā€¢ Read Save Remove Filter Reset // create the datamanager AGDataManager* dm = [AGDataManager manager]; // add a new (default) store object: id<AGStore> myStore = [dm store:^(id<AGStoreConfig> config) { [config setName:@"tasks"]; }];
  • 31. The server side components AeroGear Controller AeroGear Security UnifiedPush 31
  • 32. AeroGear Controller What is the AeroGear Controller ? ā€¢ A lean MVC implemented in java ā€¢ Routes HTTP requests to plain Java Object endpoint, and handles the results ā€¢ Can be deployed on any container supporting CDI(Context and Dependency Injection) public class Routes extends AbstractRoutingModule { @Override public void configuration() { route() .from("/").roles("admin") .on(RequestMethod.GET) .consumes(JSON) .produces(JSP, JSON) .to(Home.class).index(); } } 32
  • 33. AeroGear Controller continuedā€¦ Routes public class Routes extends AbstractRoutingModule { @Override public void configuration() { route() .from("/").roles("admin") .on(RequestMethod.GET) .consumes(JSON) .produces(JSP, JSON) .to(Home.class).index(); } } 33
  • 34. AeroGear Controller continuedā€¦ Pagination ā€¢ ā€¢ If a page is too long for the screen Returns a limited number of elements Sample code returning a page in AeroGear controller, with pagination route() .from("/cars") .on(RequestMethod.GET) .produces(JSON) .to(Cars.class).findCarsBy(param(PaginationInfo.class), param("color")); Error Handling route() .on(YourException.class) .to(ExceptionHandler.class).errorPage(); 34
  • 35. Push Notification: Registration 1 2 User Developer Push Notification Server Application Registration Storage Sender JBoss AS backend server 35
  • 36. Push Notification: Runtime Push Notification Server 5 Application Registration Simple Push Storage 4 Sender GCM APN 3 JBoss AS backend server 36
  • 37. Push for web clients http 37
  • 40. Push Notification: feature list AeroGear Unified Push Notification Server App 7 ā€¢ Single unified push notification ā€¢ Single server for multiple apps and mobile platforms ā€¢ Currently supports Google Cloud Messaging, Apple Push Notification ā€¢ Web push based on Mozillaā€™s Simple Push Unified Push Administration Console ā€¢ ā€¢ ā€¢ ā€¢ 40 A single place to manage configurations Register new push apps Register variants of platforms Currently supported: Android, iOS and Simple push variants
  • 42. Security AeroGear Security Implementation ā€¢ Providing integration with security providers like PicketLink, Shiro ā€¢ Completely decoupled from the AeroGear controller import org.jboss.aerogear.controller.spi.SecurityProvider; public class AeroGearSecurityProvider implements SecurityProvider { @Inject private IdentityManagement identityManagement; @Override public void isRouteAllowed(Route route) throws ServletException { if (!identityManagement.hasRoles(route.getRoles())) { throw new AeroGearSecurityException(HttpStatus.AUTHENTICATION_FAILED); } } 42 }
  • 43. Security: Filters and HSTS Filters ā€¢ A security mechanism with many applications ā€¢ Eg: prevent ClickJacking HSTS ā€¢ HTTP Strict Transport Security ā€¢ Force https usage ā€¢ Optional in AeroGear 43
  • 44. Security: OTP AeroGear OTP ā€¢ One time password ā€¢ Increased security while executing transaction ā€¢ OTP and AeroGear Security can be used together or separately // Get a userā€™s otp // verify the userā€™s otp public class Otp { public User otp(SimpleUser user, String otp) { @Inject @Secret private Instance<String> secret; Totp totp = new Totp(secret.get()); boolean result = totp.verify(otp); if (!result) throw new RuntimeException("Invalid OTP"); @Inject @LoggedUser private Instance<String> loggedInUserName; return user; } public String secret() { return new Totp(secret.get()).uri(loggedInUserName.get()); } 44 }
  • 46. Road Ahead Browser Support ā€¢ ā€¢ ā€¢ Windows Mobile Mobile Chrome Opera Mobile and Desktop Push Notification ā€¢ ā€¢ 46 MQTT STOMP
  • 47. Summary ā€¢ What is Aerogear ā€¢ Supported platforms ā€¢ Front end development ā€¢ AeroGear Libraries for each platform ā€¢ Server side development ā€¢ AeroGear Push Notification ā€¢ AeroGear Security 47
  • 48. Useful Links AeroGear References ā€¢ http://aerogear.org External References ā€¢ http://www.markus-falk.com/mobile-frameworks-comparisonchart/ ā€¢ http://www.infoq.com/articles/javaee-mobile-applicationdevelopment-aerogear ā€¢ http://www.slideshare.net/lfryc/the-gear-you-need-to-gomobile-with-java-enterprise ā€¢ http://www.slideshare.net/jaxlondon2012/html-alchemy-thesecrets-of-mixing-javascript-and-java-ee ā€¢ http://www.ohloh.net/p?ref=homepage&q=aerogear 48