SlideShare a Scribd company logo
Mobile Java Web Applications with MVC and
OpenDDR
JCON2020#
www.jcon.one
Werner Keil
CATMedia
Our Partners 2020:
Agenda
 Introduction
 History and Comparison
 Project Overview
 MVC Frameworks
 Spring Mobile
 Jakarta MVC
 Demo
 Conclusion
#JCON2020 #OpenDDR #MVC 2
Who Am I?
 Consultant – Coach
 Creative Cosmopolitan
 Open Source Evangelist
 Software Architect
 Maintenance Lead – JSR 385
 Maintenance Lead – JSR 354
 Jakarta EE Specification Committee Member
 Author, Speaker
Twitter @wernerkeil
#JCON2020 #OpenDDR #MVC 3
JCON 2020: Mobile Java Web Applications with MVC and OpenDDR
What is a DDR?
#JCON2020 #OpenDDR #MVC 5
What is a DDR?
#JCON2020 #OpenDDR #MVC 6
What is a DDR?
#JCON2020 #OpenDDR #MVC 7
What is a DDR?
#JCON2020 #OpenDDR #MVC 8
What is OpenDDR?
Day after day we all experience an incredible growth and fragmentation of devices
available on a more and more proliferated market.
Accurately tracking their specs has become very hard work.
But this complexity can be reduced if managed by a community daily involved in
improving the Device Description Repository (DDR).
This is the essence of the OpenDDR project, the best open and free repository of
device descriptions currently available.
#JCON2020 #OpenDDR #MVC 9
Why is OpenDDR different?
If you want a comfortable user experience, you need dynamic, “responsive” content
according to hardware and browser of your device.
Device Description Repositories (DDR) are databases that plenty of information
concerning mobile phones, tablets, Interactive TVs, set top boxes and any device
having a Web browser. DDR allow developers to realize applications providing
appropriate user experience on each client
There are several DDR projects, most demand often hefty fees to access to their
databases and APIs or restricts free use to non-commercial applications.
#JCON2020 #OpenDDR #MVC 10
JCON2020#
www.jcon.one
History
@wernerkeil
WURFL Wall
#JCON2020 #OpenDDR #MVC 12
WURFL Wall since August 2011
#JCON2020 #OpenDDR #MVC 13
WURFL no longer Open Source
#JCON2020 #OpenDDR #MVC 14
Apache Trail
 In late 2011 a few months after OpenDDR started, Apache committers and
members got aware of the technology and its relevance. Deciding to create both a
unified Device Repository and APIs for Java and .NET.
 OpenDDR was a Founding Member of the Apache DeviceMap Incubator.
 It graduated in late 2014, but compared to OpenDDR with monthly release cycles,
that was not archived for long despite hopes that an Apache project would attract
more contributors, activity and releases decreased in the years after.
 So DeviceMap was retired in January 2017.
#JCON2020 #OpenDDR #MVC 15
Back to the Roots
 About a year after the reboot under OpenDDR.mobi the project saw record-
breaking downloads of nearly 175,000 in July 2018 alone. With total of almost
500k in 2018.
 This continued with 6-digits in 2019 and despite COVID-19 also affecting top sites,
it should be 5-digit by the end of the year, more than DeviceMap ever had in its
lifespan between 2011 and 2016.
#JCON2020 #OpenDDR #MVC 16
Project Comparison
Project Strength Weakness License
51Degrees.mobi More Predictable
product catalogue,
.NET Support
Free license contains fewer devices,
usually less accurate
Repository: MPL or Commercial
(„Pro Edition“)
API: Mozilla Public License
DeviceAtlas Data is multi-
sourced from
industry-leading
partners.
Some W3C
compliance
Only commercial licenses. Repository: Commercial license
API: Commercial license
WURFL Former Community
project
(till Aug 2011)
The license does not allow to use
the DDR without accessing through
the WURFL API
the API does not allow use in
projects with a proprietary license
Repository: Use not allowed if
accessed without WURFL APIs
API license: dual licensing AGPL
and commercial
(Changed since August 2011)
NetBiscuits Service based,
seems easy to
integrate at least
via JavaScript
Free and SME offerings dependent
on using their JavaScript , no API
below Enterprise or “OEM” price
range
Repository: N/A
API: Commercial license
Volantis Relatively wide
device coverage
Only commercial licenses.
Multiple takeovers, the last owner
did not show support for it any more.
Repository: Commercial license
API: Commercial license
JCON2020#
www.jcon.one
Project Overview
@wernerkeil
Why Open Standards?
 OpenDDR stakes on open standards:
• Repository is fully compliant with W3C DDR
• SimpleDDR library implements the W3C DDR Simple APIs
 From a developer point of view:
• You can start developing your application with confidence that your product will work with any
W3C DDR Simple API implementation, no binding to OpenDDR DDR implementation
• Adopting a W3C standard, the Copyright of these interfaces is
owned and protected by W3C against any IP or patent claim
 The Apache License means that you are free to use all of OpenDDR in open
source or proprietary software.
#JCON2020 #OpenDDR #MVC 19
What's different in OpenDDR?
 Users can update the operating systems of their devices either with custom builds,
or just install a new browser.
 E.g. Google‘s Project Ara aimed for modular devices with an almost endless
combination of capabilities.
 The identification of a device through the original User Agent exposed by
manufactures is not always enough.
 OpenDDR considers the device as a combination of three important aspects:
Physical Device
Operating System
Web Browser
#JCON2020 #OpenDDR #MVC 20
Level of Confidence
 OpenDDR can identify custom builds of the operating system and third party
browsers.
 If a particular version of a browser or an operating system is not recognized,
OpenDDR returns information about the closest version rather than not returning
any information at all.
 OpenDDR identifies a device, a web browser or an operating system with a
certain level of Confidence.
 You can specify the threshold as a target to achieve in the identification process.
The higher the confidence the slower or more memory consuming the process
may be.
#JCON2020 #OpenDDR #MVC 21
Patching and Optimization
 Lowering the confidence speeds up
the process, even if you can have less accurate results.
 OpenDDR supports Patching the data source.
 In OpenDDR we can specify a reduced vocabulary in order to limit the memory load.
• It can be specified in the oddr.limited.vocabulary.path property of the OpenDDR properties file.
• It allows developers to choose which properties need to be loaded in memory at startup from
the datasource. In most case developers need only a subset of properties from the datasource.
#JCON2020 #OpenDDR #MVC 22
Load Test
 We compared OpenDDR with WURFL API (1.3.1) in terms of memory load in two
situations:
Without limited vocabulary
With limited vocabulary
 We used jMeter as workload generator, configuring it in order to generate 100
requests per seconds from 10 workers with a different user agent. The user
agents set contained ten of most common user agent observed in a real
environment.
 Both OpenDDR DDR and WURFL API were tested in a simple web app.
#JCON2020 #OpenDDR #MVC 23
Test Results
 We chose as limited vocabulary the W3C core vocabulary
 The memory load of OpenDDR with limited vocabulary is only about
50MB and after initialization, OpenDDR won't show a memory spike.
 Both APIs identified correctly all the user agents in the HTTP request
#JCON2020 #OpenDDR #MVC 24
DDR Service Retrieval
To create the identification service we use the ServiceFactory
of W3C DDR-Simple-API
initializationProperties.load(context.getResourceAsStream
("/WEB-INF/oddr.properties"));
Service identificationService =
ServiceFactory.newService(“mobi.openddr.ssimple.DDRService",
initializationProperties.getProperty(DDRService.ODDR_VOCABULARY_IRI),
initializationProperties);
The first argument is the class implementing the DDRService;
the second argument is the default vocabulary used in the
identification if the vocabulary is not specified;
the third argument is the SimpleDDR properties file.
#JCON2020 #OpenDDR #MVC 25
New Java Client
While departing from W3C compliance a new Java client offers
more flexibility e.g. when it comes to ways of loading
device data.
Data can be loaded via:
• URL
• JAR file
• File system
Get classifier from a URL:
Classifier cl = Classifier.builder().with(LoaderOption.URL,
"http://openddr.mobi/data/snapshot/");
#JCON2020 #OpenDDR #MVC 26
New Java Client (2)
Get the client using JAR data source
Classifier cl = Classifier.builder().with(LoaderOption.JAR);
Get client using data from file system
Classifier cl = Classifier.builder().with(LoaderOption.FOLDER,
"/some/path/OpenDDR/latest/devicedata");
The last option is closest to the W3C DDR client.
#JCON2020 #OpenDDR #MVC 27
Metro – OpenDDR for .NET
#JCON2020 #OpenDDR #MVC 28Foto: Melanie Zanin
OpenDDR
 Open, free, based on W3C standard. Update to DDR by the community and
device manufacturers.
 Identification is not only for the device as a single entity but extended to the web
browser
and the operating system. OpenDDR can identify third parties web browsers and
customized operating systems. A developer can specify the vocabulary and the
aspects of the property he wants to know.
 Easy migration: Device Repository and most OpenDDR APIs are compatible with
W3C DDR
#JCON2020 #OpenDDR #MVC 29
JCON2020#
www.jcon.one
MVC Frameworks
@wernerkeil
Spring Mobile
Spring Mobile is a framework on top of Spring MVC that provides capabilities to
detect the type of device making a request to your Spring web site and serve
alternate views based on that device.
Features:
 A Device resolver abstraction for server-side detection of mobile and tablet
devices
 Site preference management that allows the user to indicate if he or she prefers a
“normal”, “mobile”, or “tablet” experience
 A site switcher capable of switching the user to the most appropriate site, either
mobile, tablet, or normal, based on his or her device and optionally indicated site
preference
 Device aware view management for organizing and managing different views for
specific devices#JCON2020 #OpenDDR #MVC 31
Device Detection
@Controller
public class HomeController {
private static final Logger logger =
LoggerFactory.getLogger(HomeController.class);
@RequestMapping("/")
public void home(Device device) {
if (device.isMobile()) {
logger.info("Hello mobile world!");
} else if (device.isTablet()) {
logger.info("Hello tablet world!");
} else {
logger.info("Hello desktop world!");
} }
}#JCON2020 #OpenDDR #MVC 32
Site Preference
@RequestMapping("/")
public String home(SitePreference sitePreference, Model model)
if (sitePreference == SitePreference.NORMAL) {
logger.info("Site preference is normal");
return "home";
} else if (sitePreference == SitePreference.MOBILE) {
logger.info("Site preference is mobile");
return "home-mobile";
} else if (sitePreference == SitePreference.TABLET) {
logger.info("Site preference is tablet");
return "home-tablet";
} else { logger.info("no site preference");
return "home"; }
}#JCON2020 #OpenDDR #MVC 33
Device aware View Resolution
@Bean
public LiteDeviceDelegatingViewResolver liteDeviceAwareViewResolve
InternalResourceViewResolver delegate =
new InternalResourceViewResolver();
delegate.setPrefix("/WEB-INF/views/");
delegate.setSuffix(".jsp");
LiteDeviceDelegatingViewResolver resolver =
new LiteDeviceDelegatingViewResolver(delegate);
resolver.setMobilePrefix("mobile/");
resolver.setTabletPrefix("tablet/");
return resolver;
}
#JCON2020 #OpenDDR #MVC 34
Jakarta MVC
Model-View-Controller, or MVC, is a common pattern for Web frameworks, mostly to
build HTML applications. The model refers to the application’s data or domain object,
the view to the data presentation and the controller is responsible for managing input
and out models and producing output.
Web UI frameworks can be action-based or component-based.
The API defined by the Jakarta MVC specification falls into the action-based
category and is, therefore, not intended as a replacement for component-based
frameworks like JavaServer Faces (JSF), but as a different approach to build Web
applications on the Jakarta EE platform.
#JCON2020 #OpenDDR #MVC 35
JCON2020#
www.jcon.one
Demo
@wernerkeil
Links
 OpenDDR Website:
http://openddr.mobi
 OpenDDR Sources and Data:
https://github.com/OpenDDRmobi
 Mailing List:
https://groups.google.com/g/openddr
 Jakarta MVC:
https://jakarta.ee/specifications/mvc/
 Spring Mobile:
https://projects.spring.io/spring-mobile/
#JCON2020 #OpenDDR #MVC 37
Thank You !
JCON2020#
www.jcon.one
Our Partners 2020:

More Related Content

What's hot (20)

PPTX
Visage Android Hands-on Lab
Stephen Chin
 
PDF
Securing Android Applications
Infosys
 
PDF
Sarah CV 2016 External
Sarah Thomas
 
PDF
Android NDK: Entrando no Mundo Nativo
Eduardo Carrara de Araujo
 
PDF
DexGuard
Topher Jordan
 
PPTX
Securing online services by combining smart cards and web-based applications
Olivier Potonniée
 
PDF
International Journal of Engineering Research and Development
IJERD Editor
 
PDF
Security Patterns for Microservice Architectures - ADTMag Microservices & API...
Matt Raible
 
PDF
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Márcio Rosa
 
PDF
Darshita_Shah_Resume
darshita shah
 
DOC
Abinash Sahu with 5years6months java exp
Abinash Sahu
 
PDF
Developing and-benchmarking-native-linux-applications-on-android
Elvis Jon Freddy Sitinjak
 
PDF
Extending Java EE with CDI and JBoss Forge
Antoine Sabot-Durand
 
PDF
Vaadin with Java EE 7
Peter Lehto
 
PDF
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Frederic Descamps
 
DOC
Jeevan_Resume
Mysore jeevan kumar
 
DOCX
@@@Resume2016 11 11_v001
Fred Jabbari
 
PDF
MongoDB for Java Developers with Spring Data
Chris Richardson
 
PDF
MongoDB for Java Devs with Spring Data - MongoPhilly 2011
MongoDB
 
PDF
Creating modern java web applications based on struts2 and angularjs
Johannes Geppert
 
Visage Android Hands-on Lab
Stephen Chin
 
Securing Android Applications
Infosys
 
Sarah CV 2016 External
Sarah Thomas
 
Android NDK: Entrando no Mundo Nativo
Eduardo Carrara de Araujo
 
DexGuard
Topher Jordan
 
Securing online services by combining smart cards and web-based applications
Olivier Potonniée
 
International Journal of Engineering Research and Development
IJERD Editor
 
Security Patterns for Microservice Architectures - ADTMag Microservices & API...
Matt Raible
 
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Márcio Rosa
 
Darshita_Shah_Resume
darshita shah
 
Abinash Sahu with 5years6months java exp
Abinash Sahu
 
Developing and-benchmarking-native-linux-applications-on-android
Elvis Jon Freddy Sitinjak
 
Extending Java EE with CDI and JBoss Forge
Antoine Sabot-Durand
 
Vaadin with Java EE 7
Peter Lehto
 
Pi Day 2022 - from IoT to MySQL HeatWave Database Service
Frederic Descamps
 
Jeevan_Resume
Mysore jeevan kumar
 
@@@Resume2016 11 11_v001
Fred Jabbari
 
MongoDB for Java Developers with Spring Data
Chris Richardson
 
MongoDB for Java Devs with Spring Data - MongoPhilly 2011
MongoDB
 
Creating modern java web applications based on struts2 and angularjs
Johannes Geppert
 

Similar to JCON 2020: Mobile Java Web Applications with MVC and OpenDDR (20)

PPTX
Apache DeviceMap - ApacheCon Europe 2014
Werner Keil
 
PPTX
Apache DeviceMap - ApacheCon core Europe 2015
Werner Keil
 
PDF
Improving Mobile UX with Apache DeviceMap - Werner Keil - Codemotion Rome 2015
Codemotion
 
PPTX
Apache DeviceMap - codemotion Rome 2015
Werner Keil
 
PPT
MyMobileWeb Certification Part III
crdlc
 
PDF
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
Daniel Bryant
 
KEY
Infinispan, Data Grids, NoSQL, Cloud Storage and JSR 347
Manik Surtani
 
PDF
Empire: JPA for RDF & SPARQL
Clark & Parsia LLC
 
PDF
Got bored by the relational database? Switch to a RDF store!
benfante
 
PPTX
OpenDJ - An Introduction
ForgeRock
 
PDF
BPM and SOA Are Going Mobile: An Architectural Perspective
Guido Schmutz
 
PPT
Rollin onj Rubyv3
Oracle
 
PDF
Drill architecture 20120913
jasonfrantz
 
PDF
AMIS Oracle ADF 12c Launch event 06 Steven Davelaar future REST features
Getting value from IoT, Integration and Data Analytics
 
PPT
Integrating Active Networking and Commercial-Grade Routing Platforms
Tal Lavian Ph.D.
 
PDF
Comparative Survey-Java APIs For RDF
anisoarasava
 
PPTX
Introduction Java Web Framework and Web Server.
suranisaunak
 
PDF
Application Architecture Trends
Srini Penchikala
 
PDF
Hidden pearls for High-Performance-Persistence
Sven Ruppert
 
PDF
ModeShape 3 overview
Randall Hauch
 
Apache DeviceMap - ApacheCon Europe 2014
Werner Keil
 
Apache DeviceMap - ApacheCon core Europe 2015
Werner Keil
 
Improving Mobile UX with Apache DeviceMap - Werner Keil - Codemotion Rome 2015
Codemotion
 
Apache DeviceMap - codemotion Rome 2015
Werner Keil
 
MyMobileWeb Certification Part III
crdlc
 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
Daniel Bryant
 
Infinispan, Data Grids, NoSQL, Cloud Storage and JSR 347
Manik Surtani
 
Empire: JPA for RDF & SPARQL
Clark & Parsia LLC
 
Got bored by the relational database? Switch to a RDF store!
benfante
 
OpenDJ - An Introduction
ForgeRock
 
BPM and SOA Are Going Mobile: An Architectural Perspective
Guido Schmutz
 
Rollin onj Rubyv3
Oracle
 
Drill architecture 20120913
jasonfrantz
 
AMIS Oracle ADF 12c Launch event 06 Steven Davelaar future REST features
Getting value from IoT, Integration and Data Analytics
 
Integrating Active Networking and Commercial-Grade Routing Platforms
Tal Lavian Ph.D.
 
Comparative Survey-Java APIs For RDF
anisoarasava
 
Introduction Java Web Framework and Web Server.
suranisaunak
 
Application Architecture Trends
Srini Penchikala
 
Hidden pearls for High-Performance-Persistence
Sven Ruppert
 
ModeShape 3 overview
Randall Hauch
 
Ad

More from Werner Keil (20)

PPTX
Securing eHealth, eGovernment and eBanking with Java - DWX '21
Werner Keil
 
PPTX
How JSR 385 could have Saved the Mars Climate Orbiter - Zurich IoT Day 2021
Werner Keil
 
PPTX
NoSQL Endgame - Java2Days 2020 Virtual
Werner Keil
 
PPTX
How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020
Werner Keil
 
PPTX
Money, Money, Money, can be funny with JSR 354 (Devoxx BE)
Werner Keil
 
PPTX
Money, Money, Money, can be funny with JSR 354 (DWX 2019)
Werner Keil
 
PPTX
NoSQL: The first New Jakarta EE Specification (DWX 2019)
Werner Keil
 
PPTX
How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day
Werner Keil
 
PPTX
JNoSQL: The Definitive Solution for Java and NoSQL Databases
Werner Keil
 
PPTX
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Databases
Werner Keil
 
PPTX
Physikal - Using Kotlin for Clean Energy - KUG Munich
Werner Keil
 
PPTX
Physikal - JSR 363 and Kotlin for Clean Energy - Java2Days 2017
Werner Keil
 
PPTX
Performance Monitoring for the Cloud - Java2Days 2017
Werner Keil
 
PPTX
Eclipse Science F2F 2016 - JSR 363
Werner Keil
 
PPTX
Apache DeviceMap - Web-Dev-BBQ Stuttgart
Werner Keil
 
PPTX
The First IoT JSR: Units of Measurement - JUG Berlin-Brandenburg
Werner Keil
 
PPTX
JSR 354: Money and Currency API - Short Overview
Werner Keil
 
PPTX
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
Werner Keil
 
PPTX
Enterprise 2.0 with Open Source Frameworks like Agorava
Werner Keil
 
PPTX
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
Werner Keil
 
Securing eHealth, eGovernment and eBanking with Java - DWX '21
Werner Keil
 
How JSR 385 could have Saved the Mars Climate Orbiter - Zurich IoT Day 2021
Werner Keil
 
NoSQL Endgame - Java2Days 2020 Virtual
Werner Keil
 
How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020
Werner Keil
 
Money, Money, Money, can be funny with JSR 354 (Devoxx BE)
Werner Keil
 
Money, Money, Money, can be funny with JSR 354 (DWX 2019)
Werner Keil
 
NoSQL: The first New Jakarta EE Specification (DWX 2019)
Werner Keil
 
How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day
Werner Keil
 
JNoSQL: The Definitive Solution for Java and NoSQL Databases
Werner Keil
 
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Databases
Werner Keil
 
Physikal - Using Kotlin for Clean Energy - KUG Munich
Werner Keil
 
Physikal - JSR 363 and Kotlin for Clean Energy - Java2Days 2017
Werner Keil
 
Performance Monitoring for the Cloud - Java2Days 2017
Werner Keil
 
Eclipse Science F2F 2016 - JSR 363
Werner Keil
 
Apache DeviceMap - Web-Dev-BBQ Stuttgart
Werner Keil
 
The First IoT JSR: Units of Measurement - JUG Berlin-Brandenburg
Werner Keil
 
JSR 354: Money and Currency API - Short Overview
Werner Keil
 
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
Werner Keil
 
Enterprise 2.0 with Open Source Frameworks like Agorava
Werner Keil
 
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
Werner Keil
 
Ad

Recently uploaded (20)

PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PPTX
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
NEW-Viral>Wondershare Filmora 14.5.18.12900 Crack Free
sherryg1122g
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
NEW-Viral>Wondershare Filmora 14.5.18.12900 Crack Free
sherryg1122g
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Tally software_Introduction_Presentation
AditiBansal54083
 

JCON 2020: Mobile Java Web Applications with MVC and OpenDDR

  • 1. Mobile Java Web Applications with MVC and OpenDDR JCON2020# www.jcon.one Werner Keil CATMedia Our Partners 2020:
  • 2. Agenda  Introduction  History and Comparison  Project Overview  MVC Frameworks  Spring Mobile  Jakarta MVC  Demo  Conclusion #JCON2020 #OpenDDR #MVC 2
  • 3. Who Am I?  Consultant – Coach  Creative Cosmopolitan  Open Source Evangelist  Software Architect  Maintenance Lead – JSR 385  Maintenance Lead – JSR 354  Jakarta EE Specification Committee Member  Author, Speaker Twitter @wernerkeil #JCON2020 #OpenDDR #MVC 3
  • 5. What is a DDR? #JCON2020 #OpenDDR #MVC 5
  • 6. What is a DDR? #JCON2020 #OpenDDR #MVC 6
  • 7. What is a DDR? #JCON2020 #OpenDDR #MVC 7
  • 8. What is a DDR? #JCON2020 #OpenDDR #MVC 8
  • 9. What is OpenDDR? Day after day we all experience an incredible growth and fragmentation of devices available on a more and more proliferated market. Accurately tracking their specs has become very hard work. But this complexity can be reduced if managed by a community daily involved in improving the Device Description Repository (DDR). This is the essence of the OpenDDR project, the best open and free repository of device descriptions currently available. #JCON2020 #OpenDDR #MVC 9
  • 10. Why is OpenDDR different? If you want a comfortable user experience, you need dynamic, “responsive” content according to hardware and browser of your device. Device Description Repositories (DDR) are databases that plenty of information concerning mobile phones, tablets, Interactive TVs, set top boxes and any device having a Web browser. DDR allow developers to realize applications providing appropriate user experience on each client There are several DDR projects, most demand often hefty fees to access to their databases and APIs or restricts free use to non-commercial applications. #JCON2020 #OpenDDR #MVC 10
  • 13. WURFL Wall since August 2011 #JCON2020 #OpenDDR #MVC 13
  • 14. WURFL no longer Open Source #JCON2020 #OpenDDR #MVC 14
  • 15. Apache Trail  In late 2011 a few months after OpenDDR started, Apache committers and members got aware of the technology and its relevance. Deciding to create both a unified Device Repository and APIs for Java and .NET.  OpenDDR was a Founding Member of the Apache DeviceMap Incubator.  It graduated in late 2014, but compared to OpenDDR with monthly release cycles, that was not archived for long despite hopes that an Apache project would attract more contributors, activity and releases decreased in the years after.  So DeviceMap was retired in January 2017. #JCON2020 #OpenDDR #MVC 15
  • 16. Back to the Roots  About a year after the reboot under OpenDDR.mobi the project saw record- breaking downloads of nearly 175,000 in July 2018 alone. With total of almost 500k in 2018.  This continued with 6-digits in 2019 and despite COVID-19 also affecting top sites, it should be 5-digit by the end of the year, more than DeviceMap ever had in its lifespan between 2011 and 2016. #JCON2020 #OpenDDR #MVC 16
  • 17. Project Comparison Project Strength Weakness License 51Degrees.mobi More Predictable product catalogue, .NET Support Free license contains fewer devices, usually less accurate Repository: MPL or Commercial („Pro Edition“) API: Mozilla Public License DeviceAtlas Data is multi- sourced from industry-leading partners. Some W3C compliance Only commercial licenses. Repository: Commercial license API: Commercial license WURFL Former Community project (till Aug 2011) The license does not allow to use the DDR without accessing through the WURFL API the API does not allow use in projects with a proprietary license Repository: Use not allowed if accessed without WURFL APIs API license: dual licensing AGPL and commercial (Changed since August 2011) NetBiscuits Service based, seems easy to integrate at least via JavaScript Free and SME offerings dependent on using their JavaScript , no API below Enterprise or “OEM” price range Repository: N/A API: Commercial license Volantis Relatively wide device coverage Only commercial licenses. Multiple takeovers, the last owner did not show support for it any more. Repository: Commercial license API: Commercial license
  • 19. Why Open Standards?  OpenDDR stakes on open standards: • Repository is fully compliant with W3C DDR • SimpleDDR library implements the W3C DDR Simple APIs  From a developer point of view: • You can start developing your application with confidence that your product will work with any W3C DDR Simple API implementation, no binding to OpenDDR DDR implementation • Adopting a W3C standard, the Copyright of these interfaces is owned and protected by W3C against any IP or patent claim  The Apache License means that you are free to use all of OpenDDR in open source or proprietary software. #JCON2020 #OpenDDR #MVC 19
  • 20. What's different in OpenDDR?  Users can update the operating systems of their devices either with custom builds, or just install a new browser.  E.g. Google‘s Project Ara aimed for modular devices with an almost endless combination of capabilities.  The identification of a device through the original User Agent exposed by manufactures is not always enough.  OpenDDR considers the device as a combination of three important aspects: Physical Device Operating System Web Browser #JCON2020 #OpenDDR #MVC 20
  • 21. Level of Confidence  OpenDDR can identify custom builds of the operating system and third party browsers.  If a particular version of a browser or an operating system is not recognized, OpenDDR returns information about the closest version rather than not returning any information at all.  OpenDDR identifies a device, a web browser or an operating system with a certain level of Confidence.  You can specify the threshold as a target to achieve in the identification process. The higher the confidence the slower or more memory consuming the process may be. #JCON2020 #OpenDDR #MVC 21
  • 22. Patching and Optimization  Lowering the confidence speeds up the process, even if you can have less accurate results.  OpenDDR supports Patching the data source.  In OpenDDR we can specify a reduced vocabulary in order to limit the memory load. • It can be specified in the oddr.limited.vocabulary.path property of the OpenDDR properties file. • It allows developers to choose which properties need to be loaded in memory at startup from the datasource. In most case developers need only a subset of properties from the datasource. #JCON2020 #OpenDDR #MVC 22
  • 23. Load Test  We compared OpenDDR with WURFL API (1.3.1) in terms of memory load in two situations: Without limited vocabulary With limited vocabulary  We used jMeter as workload generator, configuring it in order to generate 100 requests per seconds from 10 workers with a different user agent. The user agents set contained ten of most common user agent observed in a real environment.  Both OpenDDR DDR and WURFL API were tested in a simple web app. #JCON2020 #OpenDDR #MVC 23
  • 24. Test Results  We chose as limited vocabulary the W3C core vocabulary  The memory load of OpenDDR with limited vocabulary is only about 50MB and after initialization, OpenDDR won't show a memory spike.  Both APIs identified correctly all the user agents in the HTTP request #JCON2020 #OpenDDR #MVC 24
  • 25. DDR Service Retrieval To create the identification service we use the ServiceFactory of W3C DDR-Simple-API initializationProperties.load(context.getResourceAsStream ("/WEB-INF/oddr.properties")); Service identificationService = ServiceFactory.newService(“mobi.openddr.ssimple.DDRService", initializationProperties.getProperty(DDRService.ODDR_VOCABULARY_IRI), initializationProperties); The first argument is the class implementing the DDRService; the second argument is the default vocabulary used in the identification if the vocabulary is not specified; the third argument is the SimpleDDR properties file. #JCON2020 #OpenDDR #MVC 25
  • 26. New Java Client While departing from W3C compliance a new Java client offers more flexibility e.g. when it comes to ways of loading device data. Data can be loaded via: • URL • JAR file • File system Get classifier from a URL: Classifier cl = Classifier.builder().with(LoaderOption.URL, "http://openddr.mobi/data/snapshot/"); #JCON2020 #OpenDDR #MVC 26
  • 27. New Java Client (2) Get the client using JAR data source Classifier cl = Classifier.builder().with(LoaderOption.JAR); Get client using data from file system Classifier cl = Classifier.builder().with(LoaderOption.FOLDER, "/some/path/OpenDDR/latest/devicedata"); The last option is closest to the W3C DDR client. #JCON2020 #OpenDDR #MVC 27
  • 28. Metro – OpenDDR for .NET #JCON2020 #OpenDDR #MVC 28Foto: Melanie Zanin
  • 29. OpenDDR  Open, free, based on W3C standard. Update to DDR by the community and device manufacturers.  Identification is not only for the device as a single entity but extended to the web browser and the operating system. OpenDDR can identify third parties web browsers and customized operating systems. A developer can specify the vocabulary and the aspects of the property he wants to know.  Easy migration: Device Repository and most OpenDDR APIs are compatible with W3C DDR #JCON2020 #OpenDDR #MVC 29
  • 31. Spring Mobile Spring Mobile is a framework on top of Spring MVC that provides capabilities to detect the type of device making a request to your Spring web site and serve alternate views based on that device. Features:  A Device resolver abstraction for server-side detection of mobile and tablet devices  Site preference management that allows the user to indicate if he or she prefers a “normal”, “mobile”, or “tablet” experience  A site switcher capable of switching the user to the most appropriate site, either mobile, tablet, or normal, based on his or her device and optionally indicated site preference  Device aware view management for organizing and managing different views for specific devices#JCON2020 #OpenDDR #MVC 31
  • 32. Device Detection @Controller public class HomeController { private static final Logger logger = LoggerFactory.getLogger(HomeController.class); @RequestMapping("/") public void home(Device device) { if (device.isMobile()) { logger.info("Hello mobile world!"); } else if (device.isTablet()) { logger.info("Hello tablet world!"); } else { logger.info("Hello desktop world!"); } } }#JCON2020 #OpenDDR #MVC 32
  • 33. Site Preference @RequestMapping("/") public String home(SitePreference sitePreference, Model model) if (sitePreference == SitePreference.NORMAL) { logger.info("Site preference is normal"); return "home"; } else if (sitePreference == SitePreference.MOBILE) { logger.info("Site preference is mobile"); return "home-mobile"; } else if (sitePreference == SitePreference.TABLET) { logger.info("Site preference is tablet"); return "home-tablet"; } else { logger.info("no site preference"); return "home"; } }#JCON2020 #OpenDDR #MVC 33
  • 34. Device aware View Resolution @Bean public LiteDeviceDelegatingViewResolver liteDeviceAwareViewResolve InternalResourceViewResolver delegate = new InternalResourceViewResolver(); delegate.setPrefix("/WEB-INF/views/"); delegate.setSuffix(".jsp"); LiteDeviceDelegatingViewResolver resolver = new LiteDeviceDelegatingViewResolver(delegate); resolver.setMobilePrefix("mobile/"); resolver.setTabletPrefix("tablet/"); return resolver; } #JCON2020 #OpenDDR #MVC 34
  • 35. Jakarta MVC Model-View-Controller, or MVC, is a common pattern for Web frameworks, mostly to build HTML applications. The model refers to the application’s data or domain object, the view to the data presentation and the controller is responsible for managing input and out models and producing output. Web UI frameworks can be action-based or component-based. The API defined by the Jakarta MVC specification falls into the action-based category and is, therefore, not intended as a replacement for component-based frameworks like JavaServer Faces (JSF), but as a different approach to build Web applications on the Jakarta EE platform. #JCON2020 #OpenDDR #MVC 35
  • 37. Links  OpenDDR Website: http://openddr.mobi  OpenDDR Sources and Data: https://github.com/OpenDDRmobi  Mailing List: https://groups.google.com/g/openddr  Jakarta MVC: https://jakarta.ee/specifications/mvc/  Spring Mobile: https://projects.spring.io/spring-mobile/ #JCON2020 #OpenDDR #MVC 37