SlideShare a Scribd company logo
1 of 31
Download to read offline
THE SOFTWARE EXPERTS
Moderne UIs mit
server-seitigem
Model View ViewModel
Thomas Spiegl
Manfred Geiler
Irian Solutions - The Software Experts
THE SOFTWARE EXPERTS
Agenda
● M V V M
● Neues Konzept MVSVM
● Ankor Framework
● Live Samples
THE SOFTWARE EXPERTS
„M V V M” ?
● „Model View ViewModel“
● 2005 von John Gossman (Microsoft)
● ≅„Presentation Model“ von Martin Fowler
● Seperation of Concerns
○ Graphical UI
○ UI Logic
THE SOFTWARE EXPERTS
Model View Controller
View
Model
Controller
THE SOFTWARE EXPERTS
Model View ViewModel
Business Logic and Data
Presentation & UI Logic
View
DB
Binding
ViewModel
Domain
Model
Service Calls
THE SOFTWARE EXPERTS
M V V M - View
● Grafische Benutzeroberfläche (GUI)
● Benutzereingaben
● Datenbindung („Binding“) auf ViewModel
● Markup
○ XAML
○ FXML
Business Logic and Data
Presentation & UI Logic
DB
Data Binding
Service Calls
ViewModel
Model
View
THE SOFTWARE EXPERTS
M V V M - ViewModel
● Bindeglied zwischen View und Model
● Verbindung mit Model (Service-Calls)
● Properties und Actions für View (Binding)
● UI-Logik
Business Logic and Data
Presentation & UI Logic
View
DB
Data Binding
Service Calls
Model
ViewModel
THE SOFTWARE EXPERTS
M V V M - Model
● Domain Model, Datenzugriff
● Domain Logik
● Validierung
● Unit Tests
Business Logic and Data
Presentation & UI Logic
View
DB
Data Binding
Service Calls
ViewModel
Model
THE SOFTWARE EXPERTS
Was MVVM löst...
● Separation of Concerns
○ Designer ↔ UI-Entwickler
○ View-Technologie ↔ Präsentations-Logik
● ViewModel testbar!
○ Unit-Tests
○ Mock-UI
Business Logic and Data
Presentation & UI Logic
View
DB
Data Binding
Service Calls
ViewModel
Model
THE SOFTWARE EXPERTS
Was MVVM nicht löst...
● Model am Client oder Server?
● Kommunikation Client ↔ Server
● Problem: Vielfalt Client-Technologien
○ HTML5
○ iOS
○ Android
○ JavaFX
○ ...
Business Logic and Data
Presentation & UI Logic
View
DB
Data Binding
Service Calls
ViewModel
Model
THE SOFTWARE EXPERTS
Agenda
● M V V M
● Neues Konzept MVSVM
● Ankor Framework
● Live Samples
THE SOFTWARE EXPERTS
Model View SynchronizedViewModel
Client
Server
View
ViewModel ViewModel
DB
Model
Data Binding
Synchronization
THE SOFTWARE EXPERTS
Client
Server
View
ViewModel ViewModel
DB
Model
Data Binding
Synchronization
Client hat:
● View
● ViewModel
Client-Technologie:
● Moderne Plattform
○ HTML5
○ JavaFX
○ iOS, Android
○ ...
● Schnell anpassbar
Server hat:
● ViewModel
● Model
Server-Technologie:
● Java EE
● Bewährte Technik
● Stabile Plattform
MVSVM - Synchronized ViewModel
THE SOFTWARE EXPERTS
Agenda
● M V V M
● Neues Konzept MVSVM
● Ankor Framework
● Live Samples
THE SOFTWARE EXPERTS
Projekt “Ankor”
● 2013
● http://www.ankor.io
● Open Source (Apache License, Version 2.0)
● Erweiterbares modulares Framework
○ Event Driven Programming Model
○ Asynchronous Processing
○ Bidirectional Communication
○ Support for MVSVM
THE SOFTWARE EXPERTS
JEE Server
Ankor - Synchronized ViewModel
Client
View
ViewModel
● strongly typed
● Behaviour
DB
Data Binding
Change Events
Action Events
ViewModel
● type-less
● only Data
Model
THE SOFTWARE EXPERTS
JEE Server
Ankor - Synchronized ViewModel
Client
View
ViewModel
● strongly typed
● Behaviour
DB
Data Binding
Change Events
Action Events
ViewModel
● type-less
● only Data
Model
ViewModel (client side)
● type-less
● only Data
{
"tasks": [
{"id": "dda6f7d9-8d5e-4baf-969b-110f654a64e3",
"title": "drink less coffee",
"completed": false},
{"id": "ff202f81-33b8-4ae3-bf6a-0208714e2261",
"title": "get more sleep",
"completed": false}
],
"filter": "all",
"itemsLeft": 2
}
ViewModel (server side)
● strongly typed
● Behaviour
public class TaskListViewModel {
private List<Task> tasks;
private String filter;
private Integer itemsLeft;
// getters and setters
}
public class Task {
private String id;
private String title;
private boolean completed;
// getters and setters
}
THE SOFTWARE EXPERTS
Ankor - Überblick Architektur
DB
JEE Server
Ankor Framework
Messaging (Connector HTTP, Websocket, JMS, ...)
JavaFX HTML5 iOS .NET
ViewModel
Model
View
THE SOFTWARE EXPERTS
Ankor - Architektur / Client
● Diverse Client-Sprachen und -Plattformen
○ Java
■ JavaFX
■ Android
○ Javascript / HTML5
■ jQuery
■ Dojo Toolkit
■ React
○ Objective-C
■ iOS
○ C#
■ .NET / WPF
JEE Server
Ankor Framework
Messaging (HTTP, Websocket, JMS, ...)
JavaFX HTML5 iOS .NET
THE SOFTWARE EXPERTS
Ankor - Architektur / Server
● Java SE 1.6 (oder höher)
● Diverse Netzwerk-Protokolle
○ Socket
○ HTTP-Polling
○ Websocket
● Messaging
○ JSON
● Concurrency / Parallelisierung
○ Simple Synchronization
○ Akka Actors
● JEE Container
○ Tomcat
○ Glassfish (Websocket)
JEE Server
Ankor Framework
Messaging (HTTP, Websocket, JMS, ...)
JavaFX HTML5 iOS .NET
THE SOFTWARE EXPERTS
Ankor - iOS Example
THE SOFTWARE EXPERTS
[[[ANKSystem alloc]
initWith:@"root" connectParams:connectParams
url:@"ws://localhost:8080/websocket/ankor"
useWebsocket:YES] start];
Start Ankor System, connect to server
Ankor - iOS Example
THE SOFTWARE EXPERTS
[ANKRefs observe:@"root.model.tasks"
target:self listener:@selector(tasksChanged:)];
Register Change Listener
- (void)tasksChanged:(id) value {
[[self toDoItems]removeAllObjects];
[[self toDoItems]addObjectsFromArray:value];
[self.tableView reloadData];
}
Change Listener
Ankor - iOS Example
THE SOFTWARE EXPERTS
[ANKRefs fireAction:@"root.model"
name:@"newTask"
params:params]; // Dictionary
Fire Action / Add a new Task
@ActionListener
public void newTask(@Param("title") final String title)
{...}
ActionListener Java
Ankor - iOS Example
THE SOFTWARE EXPERTS
Client
Server● Ankor Annotations
● Ankor Big Collections
○ BigList
○ BigMap
● Ankor Flood Control
● Pluggable Bean-Factory
○ Simple/Reflection
○ Spring (geplant)
○ CDI (geplant)
● Collaboration Support
public class AnimalSearchViewModel {
private AnimalSearchFilter filter;
@ChangeListener(pattern = {".filter.**"})
public void reloadAnimals() {
this.animals
= animalRepository.searchAnimals(filter);
}
}
Ankor - Special Features
THE SOFTWARE EXPERTS
Client
Server
public class AnimalSearchViewModel {
private List<Animal> animals
= new ArrayList<Animal>(10000);
@AnkorBigList(chunkSize = 10)
public List<Animal> getAnimals() {
return animals;
}
}
send 10 rows
at once -
on demand
only!
● Ankor Annotations
● Ankor Big Collections
○ BigList
○ BigMap
● Ankor Flood Control
● Pluggable Bean-Factory
○ Simple/Reflection
○ Spring (geplant)
○ CDI (geplant)
● Collaboration Support
Ankor - Special Features
THE SOFTWARE EXPERTS
Client
Server● Ankor Annotations
● Ankor Big Collections
○ BigList
○ BigMap
● Ankor Flood Control
● Pluggable Bean-Factory
○ Simple/Reflection
○ Spring (geplant)
○ CDI (geplant)
● Collaboration Support
public class AnimalSearchViewModel {
@ChangeListener(pattern = {".filter.**"})
@AnkorFloodControl(delayMillis = 100L)
public void reloadAnimals() {
this.animals
= animalRepository.searchAnimals(filter);
}
}
Ankor - Special Features
THE SOFTWARE EXPERTS
Server
● Ankor Annotations
● Ankor Big Collections
○ BigList
○ BigMap
● Ankor Flood Control
● Pluggable Bean-Factory
○ Simple/Reflection
○ Spring (geplant)
○ CDI (geplant)
● Collaboration Support
Shared ViewModel
Ankor - Special Features
THE SOFTWARE EXPERTS
Server SVR#2
Client C#1
Ankor - Multiple Sessions and Layers
Server SVR#1
ModelSession S#1
Model
M#1
ModelSession S#2
Model
M#1
Model
M#2
ModelSession S#3
Model
M#1
Model
M#3
ModelSession S#4
Model
M#2
Client C#2
Support Client C#3
ModelSession S#6
Model
M#3
ModelSession S#5
Model
M#3
One
Way
Sync
Two
Way
Sync
Direct
Access
THE SOFTWARE EXPERTS
Agenda
● M V V M
● Neues Konzept MVSVM
● Ankor Framework
● Live Samples
THE SOFTWARE EXPERTS
ankor.io
Weiterführenden Informationen & Tutorials
http://ankor.io
http://github.com/ankor-io

More Related Content

What's hot

Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - IntroductionSenthil Kumar
 
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDBDynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDBApaichon Punopas
 
Everything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 minEverything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 minEdgar Parada
 
[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JSIvano Malavolta
 
Hanselman lipton asp_connections_ams304_mvc
Hanselman lipton asp_connections_ams304_mvcHanselman lipton asp_connections_ams304_mvc
Hanselman lipton asp_connections_ams304_mvcdenemedeniz
 
Angular2 and TypeScript
Angular2 and TypeScriptAngular2 and TypeScript
Angular2 and TypeScriptDavid Giard
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web ApplicationYakov Fain
 
Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)ColdFusionConference
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO DevsWO Community
 
Sitecore MVC: Converting Web Forms sublayouts
Sitecore MVC: Converting Web Forms sublayoutsSitecore MVC: Converting Web Forms sublayouts
Sitecore MVC: Converting Web Forms sublayoutsnonlinear creations
 
Introduction to ASP.Net MVC
Introduction to ASP.Net MVCIntroduction to ASP.Net MVC
Introduction to ASP.Net MVCSagar Kamate
 
MvvmQuickCross for Windows Phone
MvvmQuickCross for Windows PhoneMvvmQuickCross for Windows Phone
MvvmQuickCross for Windows PhoneVincent Hoogendoorn
 
Asp.Net Mvc
Asp.Net MvcAsp.Net Mvc
Asp.Net Mvcmicham
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Thomas Robbins
 

What's hot (20)

Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
 
Angularjs Basics
Angularjs BasicsAngularjs Basics
Angularjs Basics
 
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDBDynamic Application Development by NodeJS ,AngularJS with OrientDB
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
 
Everything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 minEverything you need to know about HTML5 in 15 min
Everything you need to know about HTML5 in 15 min
 
[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS
 
Hanselman lipton asp_connections_ams304_mvc
Hanselman lipton asp_connections_ams304_mvcHanselman lipton asp_connections_ams304_mvc
Hanselman lipton asp_connections_ams304_mvc
 
Angular2 and TypeScript
Angular2 and TypeScriptAngular2 and TypeScript
Angular2 and TypeScript
 
Handlebars & Require JS
Handlebars  & Require JSHandlebars  & Require JS
Handlebars & Require JS
 
Mule 2.2.1-users-guide
Mule 2.2.1-users-guideMule 2.2.1-users-guide
Mule 2.2.1-users-guide
 
[2015/2016] JavaScript
[2015/2016] JavaScript[2015/2016] JavaScript
[2015/2016] JavaScript
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
 
Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)Crash Course in AngularJS + Ionic (Deep dive)
Crash Course in AngularJS + Ionic (Deep dive)
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
 
Sitecore MVC: Converting Web Forms sublayouts
Sitecore MVC: Converting Web Forms sublayoutsSitecore MVC: Converting Web Forms sublayouts
Sitecore MVC: Converting Web Forms sublayouts
 
Introduction to ASP.Net MVC
Introduction to ASP.Net MVCIntroduction to ASP.Net MVC
Introduction to ASP.Net MVC
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
MvvmQuickCross for Windows Phone
MvvmQuickCross for Windows PhoneMvvmQuickCross for Windows Phone
MvvmQuickCross for Windows Phone
 
Asp.Net Mvc
Asp.Net MvcAsp.Net Mvc
Asp.Net Mvc
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013
 

Viewers also liked

Joomladay Netherlands 2012 - Joomla in the Cloud
Joomladay Netherlands 2012  - Joomla in the CloudJoomladay Netherlands 2012  - Joomla in the Cloud
Joomladay Netherlands 2012 - Joomla in the CloudJohan Janssens
 
JavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toJavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toNicolas Fränkel
 
Docker for (Java) Developers
Docker for (Java) DevelopersDocker for (Java) Developers
Docker for (Java) DevelopersRafael Benevides
 
Monitoring Highly Dynamic and Distributed Systems with NGINX Amplify
Monitoring Highly Dynamic and Distributed Systems with NGINX AmplifyMonitoring Highly Dynamic and Distributed Systems with NGINX Amplify
Monitoring Highly Dynamic and Distributed Systems with NGINX AmplifyNGINX, Inc.
 
Continuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsContinuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsSunil Dalal
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java DevelopersNGINX, Inc.
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java DevelopersImesh Gunaratne
 

Viewers also liked (7)

Joomladay Netherlands 2012 - Joomla in the Cloud
Joomladay Netherlands 2012  - Joomla in the CloudJoomladay Netherlands 2012  - Joomla in the Cloud
Joomladay Netherlands 2012 - Joomla in the Cloud
 
JavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toJavaLand - Integration Testing How-to
JavaLand - Integration Testing How-to
 
Docker for (Java) Developers
Docker for (Java) DevelopersDocker for (Java) Developers
Docker for (Java) Developers
 
Monitoring Highly Dynamic and Distributed Systems with NGINX Amplify
Monitoring Highly Dynamic and Distributed Systems with NGINX AmplifyMonitoring Highly Dynamic and Distributed Systems with NGINX Amplify
Monitoring Highly Dynamic and Distributed Systems with NGINX Amplify
 
Continuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsContinuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applications
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
 

Similar to JavaLand 2014 - Ankor.io Presentation

ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh! Chalermpon Areepong
 
Best Practices with WSO2 Developer Studio
Best Practices with WSO2 Developer Studio Best Practices with WSO2 Developer Studio
Best Practices with WSO2 Developer Studio WSO2
 
SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4Jon Galloway
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpChalermpon Areepong
 
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...Mark Leusink
 
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 ...Mark Roden
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)Hendrik Ebbers
 
WSO2 Product Release Webinar - WSO2 App Factory 2.1
WSO2 Product Release Webinar - WSO2 App Factory 2.1WSO2 Product Release Webinar - WSO2 App Factory 2.1
WSO2 Product Release Webinar - WSO2 App Factory 2.1WSO2
 
Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Loiane Groner
 
The Basics Angular JS
The Basics Angular JS The Basics Angular JS
The Basics Angular JS OrisysIndia
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesEamonn Boyle
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
Benchx: An XQuery benchmarking web application
Benchx: An XQuery benchmarking web application Benchx: An XQuery benchmarking web application
Benchx: An XQuery benchmarking web application Andy Bunce
 
Oracle ADF Overview for Beginners
Oracle ADF Overview for BeginnersOracle ADF Overview for Beginners
Oracle ADF Overview for BeginnersJithin Kuriakose
 
Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio WSO2
 
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 coupleAlexandre Marreiros
 
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...ddrschiw
 

Similar to JavaLand 2014 - Ankor.io Presentation (20)

ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
 
Best Practices with WSO2 Developer Studio
Best Practices with WSO2 Developer Studio Best Practices with WSO2 Developer Studio
Best Practices with WSO2 Developer Studio
 
SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4
 
Sprint 17
Sprint 17Sprint 17
Sprint 17
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
 
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 ...
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)
 
WSO2 Product Release Webinar - WSO2 App Factory 2.1
WSO2 Product Release Webinar - WSO2 App Factory 2.1WSO2 Product Release Webinar - WSO2 App Factory 2.1
WSO2 Product Release Webinar - WSO2 App Factory 2.1
 
Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018Angular for Java Enterprise Developers: Oracle Code One 2018
Angular for Java Enterprise Developers: Oracle Code One 2018
 
The Basics Angular JS
The Basics Angular JS The Basics Angular JS
The Basics Angular JS
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
 
Mean stack Magics
Mean stack MagicsMean stack Magics
Mean stack Magics
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Benchx: An XQuery benchmarking web application
Benchx: An XQuery benchmarking web application Benchx: An XQuery benchmarking web application
Benchx: An XQuery benchmarking web application
 
Oracle ADF Overview for Beginners
Oracle ADF Overview for BeginnersOracle ADF Overview for Beginners
Oracle ADF Overview for Beginners
 
Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio
 
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
 
Ad111
Ad111Ad111
Ad111
 
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
 

Recently uploaded

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 

JavaLand 2014 - Ankor.io Presentation

  • 1. THE SOFTWARE EXPERTS Moderne UIs mit server-seitigem Model View ViewModel Thomas Spiegl Manfred Geiler Irian Solutions - The Software Experts
  • 2. THE SOFTWARE EXPERTS Agenda ● M V V M ● Neues Konzept MVSVM ● Ankor Framework ● Live Samples
  • 3. THE SOFTWARE EXPERTS „M V V M” ? ● „Model View ViewModel“ ● 2005 von John Gossman (Microsoft) ● ≅„Presentation Model“ von Martin Fowler ● Seperation of Concerns ○ Graphical UI ○ UI Logic
  • 4. THE SOFTWARE EXPERTS Model View Controller View Model Controller
  • 5. THE SOFTWARE EXPERTS Model View ViewModel Business Logic and Data Presentation & UI Logic View DB Binding ViewModel Domain Model Service Calls
  • 6. THE SOFTWARE EXPERTS M V V M - View ● Grafische Benutzeroberfläche (GUI) ● Benutzereingaben ● Datenbindung („Binding“) auf ViewModel ● Markup ○ XAML ○ FXML Business Logic and Data Presentation & UI Logic DB Data Binding Service Calls ViewModel Model View
  • 7. THE SOFTWARE EXPERTS M V V M - ViewModel ● Bindeglied zwischen View und Model ● Verbindung mit Model (Service-Calls) ● Properties und Actions für View (Binding) ● UI-Logik Business Logic and Data Presentation & UI Logic View DB Data Binding Service Calls Model ViewModel
  • 8. THE SOFTWARE EXPERTS M V V M - Model ● Domain Model, Datenzugriff ● Domain Logik ● Validierung ● Unit Tests Business Logic and Data Presentation & UI Logic View DB Data Binding Service Calls ViewModel Model
  • 9. THE SOFTWARE EXPERTS Was MVVM löst... ● Separation of Concerns ○ Designer ↔ UI-Entwickler ○ View-Technologie ↔ Präsentations-Logik ● ViewModel testbar! ○ Unit-Tests ○ Mock-UI Business Logic and Data Presentation & UI Logic View DB Data Binding Service Calls ViewModel Model
  • 10. THE SOFTWARE EXPERTS Was MVVM nicht löst... ● Model am Client oder Server? ● Kommunikation Client ↔ Server ● Problem: Vielfalt Client-Technologien ○ HTML5 ○ iOS ○ Android ○ JavaFX ○ ... Business Logic and Data Presentation & UI Logic View DB Data Binding Service Calls ViewModel Model
  • 11. THE SOFTWARE EXPERTS Agenda ● M V V M ● Neues Konzept MVSVM ● Ankor Framework ● Live Samples
  • 12. THE SOFTWARE EXPERTS Model View SynchronizedViewModel Client Server View ViewModel ViewModel DB Model Data Binding Synchronization
  • 13. THE SOFTWARE EXPERTS Client Server View ViewModel ViewModel DB Model Data Binding Synchronization Client hat: ● View ● ViewModel Client-Technologie: ● Moderne Plattform ○ HTML5 ○ JavaFX ○ iOS, Android ○ ... ● Schnell anpassbar Server hat: ● ViewModel ● Model Server-Technologie: ● Java EE ● Bewährte Technik ● Stabile Plattform MVSVM - Synchronized ViewModel
  • 14. THE SOFTWARE EXPERTS Agenda ● M V V M ● Neues Konzept MVSVM ● Ankor Framework ● Live Samples
  • 15. THE SOFTWARE EXPERTS Projekt “Ankor” ● 2013 ● http://www.ankor.io ● Open Source (Apache License, Version 2.0) ● Erweiterbares modulares Framework ○ Event Driven Programming Model ○ Asynchronous Processing ○ Bidirectional Communication ○ Support for MVSVM
  • 16. THE SOFTWARE EXPERTS JEE Server Ankor - Synchronized ViewModel Client View ViewModel ● strongly typed ● Behaviour DB Data Binding Change Events Action Events ViewModel ● type-less ● only Data Model
  • 17. THE SOFTWARE EXPERTS JEE Server Ankor - Synchronized ViewModel Client View ViewModel ● strongly typed ● Behaviour DB Data Binding Change Events Action Events ViewModel ● type-less ● only Data Model ViewModel (client side) ● type-less ● only Data { "tasks": [ {"id": "dda6f7d9-8d5e-4baf-969b-110f654a64e3", "title": "drink less coffee", "completed": false}, {"id": "ff202f81-33b8-4ae3-bf6a-0208714e2261", "title": "get more sleep", "completed": false} ], "filter": "all", "itemsLeft": 2 } ViewModel (server side) ● strongly typed ● Behaviour public class TaskListViewModel { private List<Task> tasks; private String filter; private Integer itemsLeft; // getters and setters } public class Task { private String id; private String title; private boolean completed; // getters and setters }
  • 18. THE SOFTWARE EXPERTS Ankor - Überblick Architektur DB JEE Server Ankor Framework Messaging (Connector HTTP, Websocket, JMS, ...) JavaFX HTML5 iOS .NET ViewModel Model View
  • 19. THE SOFTWARE EXPERTS Ankor - Architektur / Client ● Diverse Client-Sprachen und -Plattformen ○ Java ■ JavaFX ■ Android ○ Javascript / HTML5 ■ jQuery ■ Dojo Toolkit ■ React ○ Objective-C ■ iOS ○ C# ■ .NET / WPF JEE Server Ankor Framework Messaging (HTTP, Websocket, JMS, ...) JavaFX HTML5 iOS .NET
  • 20. THE SOFTWARE EXPERTS Ankor - Architektur / Server ● Java SE 1.6 (oder höher) ● Diverse Netzwerk-Protokolle ○ Socket ○ HTTP-Polling ○ Websocket ● Messaging ○ JSON ● Concurrency / Parallelisierung ○ Simple Synchronization ○ Akka Actors ● JEE Container ○ Tomcat ○ Glassfish (Websocket) JEE Server Ankor Framework Messaging (HTTP, Websocket, JMS, ...) JavaFX HTML5 iOS .NET
  • 21. THE SOFTWARE EXPERTS Ankor - iOS Example
  • 22. THE SOFTWARE EXPERTS [[[ANKSystem alloc] initWith:@"root" connectParams:connectParams url:@"ws://localhost:8080/websocket/ankor" useWebsocket:YES] start]; Start Ankor System, connect to server Ankor - iOS Example
  • 23. THE SOFTWARE EXPERTS [ANKRefs observe:@"root.model.tasks" target:self listener:@selector(tasksChanged:)]; Register Change Listener - (void)tasksChanged:(id) value { [[self toDoItems]removeAllObjects]; [[self toDoItems]addObjectsFromArray:value]; [self.tableView reloadData]; } Change Listener Ankor - iOS Example
  • 24. THE SOFTWARE EXPERTS [ANKRefs fireAction:@"root.model" name:@"newTask" params:params]; // Dictionary Fire Action / Add a new Task @ActionListener public void newTask(@Param("title") final String title) {...} ActionListener Java Ankor - iOS Example
  • 25. THE SOFTWARE EXPERTS Client Server● Ankor Annotations ● Ankor Big Collections ○ BigList ○ BigMap ● Ankor Flood Control ● Pluggable Bean-Factory ○ Simple/Reflection ○ Spring (geplant) ○ CDI (geplant) ● Collaboration Support public class AnimalSearchViewModel { private AnimalSearchFilter filter; @ChangeListener(pattern = {".filter.**"}) public void reloadAnimals() { this.animals = animalRepository.searchAnimals(filter); } } Ankor - Special Features
  • 26. THE SOFTWARE EXPERTS Client Server public class AnimalSearchViewModel { private List<Animal> animals = new ArrayList<Animal>(10000); @AnkorBigList(chunkSize = 10) public List<Animal> getAnimals() { return animals; } } send 10 rows at once - on demand only! ● Ankor Annotations ● Ankor Big Collections ○ BigList ○ BigMap ● Ankor Flood Control ● Pluggable Bean-Factory ○ Simple/Reflection ○ Spring (geplant) ○ CDI (geplant) ● Collaboration Support Ankor - Special Features
  • 27. THE SOFTWARE EXPERTS Client Server● Ankor Annotations ● Ankor Big Collections ○ BigList ○ BigMap ● Ankor Flood Control ● Pluggable Bean-Factory ○ Simple/Reflection ○ Spring (geplant) ○ CDI (geplant) ● Collaboration Support public class AnimalSearchViewModel { @ChangeListener(pattern = {".filter.**"}) @AnkorFloodControl(delayMillis = 100L) public void reloadAnimals() { this.animals = animalRepository.searchAnimals(filter); } } Ankor - Special Features
  • 28. THE SOFTWARE EXPERTS Server ● Ankor Annotations ● Ankor Big Collections ○ BigList ○ BigMap ● Ankor Flood Control ● Pluggable Bean-Factory ○ Simple/Reflection ○ Spring (geplant) ○ CDI (geplant) ● Collaboration Support Shared ViewModel Ankor - Special Features
  • 29. THE SOFTWARE EXPERTS Server SVR#2 Client C#1 Ankor - Multiple Sessions and Layers Server SVR#1 ModelSession S#1 Model M#1 ModelSession S#2 Model M#1 Model M#2 ModelSession S#3 Model M#1 Model M#3 ModelSession S#4 Model M#2 Client C#2 Support Client C#3 ModelSession S#6 Model M#3 ModelSession S#5 Model M#3 One Way Sync Two Way Sync Direct Access
  • 30. THE SOFTWARE EXPERTS Agenda ● M V V M ● Neues Konzept MVSVM ● Ankor Framework ● Live Samples
  • 31. THE SOFTWARE EXPERTS ankor.io Weiterführenden Informationen & Tutorials http://ankor.io http://github.com/ankor-io