SlideShare a Scribd company logo
THE SOFTWARE EXPERTS 
Reactive UIs with the 
Model View ViewModel Pattern: 
Simple with Ankor.io 
Thomas Spiegl 
Manfred Geiler 
Irian Solutions - The Software Experts
THE SOFTWARE EXPERTS 
Agenda 
• M V V M 
• New concept „MVSVM“ 
• Ankor framework 
• Ankor live sample 
• Ankor special features
THE SOFTWARE EXPERTS 
„M V V M” ? 
• „Model View ViewModel“ 
• 2005 by John Gossman (Microsoft) 
• ≅ „Presentation Model“ by Martin Fowler 
• Separation of Concerns 
o Graphical UI 
o 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 – The View 
• Graphical user interface (GUI) 
• User inputs 
• Data binding to the ViewModel 
• Markup 
o XAML 
o FXML 
Business Logic and Data 
Presentation & UI Logic 
DB 
Data Binding 
ViewModel 
Service Calls 
Model 
View
THE SOFTWARE EXPERTS 
M V V M – The ViewModel 
• Link between View and Model 
• Connection to Model (service calls) 
• Properties and actions for the View (binding) 
• UI logic 
• UI validation 
Business Logic and Data 
Presentation & UI Logic 
View 
DB 
Data Binding 
Service Calls 
Model 
ViewModel
THE SOFTWARE EXPERTS 
M V V M – The Model 
• Domain model 
• Data(base) access 
• Domain logic 
• Business Rules 
Presentation & UI Logic 
• Validation 
View 
• Unit testing Business Logic and Data 
DB 
Data Binding 
ViewModel 
Service Calls 
Model
THE SOFTWARE EXPERTS 
MVVM solves... 
• Separation of concerns 
o Web designer ↔ UI developer 
o View technology ↔ Presentation logic 
• Testable ViewModel! 
o Unit tests 
o Mock View 
Business Logic and Data 
Presentation & UI Logic 
View 
DB 
Data Binding 
ViewModel 
Service Calls 
Model
THE SOFTWARE EXPERTS 
MVVM does not solve... 
• Model on client or server? 
• Communication client ↔ server 
• Various client technologies 
o HTML5 
o iOS 
o Android 
o JavaFX 
Presentation & UI Logic 
View 
ViewModel 
o ... Business Logic and Data 
DB 
Data Binding 
Service Calls 
Model
THE SOFTWARE EXPERTS 
Agenda 
• M V V M 
• New concept „MVSVM“ 
• Ankor framework 
• Ankor live sample 
• Ankor special features
THE SOFTWARE EXPERTS 
Client 
Server 
Model View SynchronizedViewModel 
View 
ViewModel ViewModel 
DB 
Model 
Data Binding 
Synchronization
THE SOFTWARE EXPERTS 
MVSVM - Synchronized ViewModel 
Client 
Server 
View 
ViewModel ViewModel 
DB 
Model 
Data Binding 
Synchronization 
Client holds: 
• View 
• ViewModel 
Client technology: 
• Modern platform 
o HTML5 
o JavaFX 
o iOS, Android 
o ... 
• Very latest frameworks 
• Cutting edge 
Server holds: 
• ViewModel 
• Model 
Server technology: 
• Java EE 
• Approved patterns 
• Stable platform
THE SOFTWARE EXPERTS 
Agenda 
• M V V M 
• New concept „MVSVM“ 
• Ankor framework 
• Ankor live sample 
• Ankor special features
THE SOFTWARE EXPERTS 
Project „Ankor” 
• 2013 
• http://www.ankor.io 
• Open Source (Apache License, Version 2.0) 
• Expandable modular framework 
o Event driven programming model 
o Asynchronous processing 
o Bidirectional client-server communication 
o Native MVSVM support
THE SOFTWARE EXPERTS 
Ankor Server 
Client 
Ankor - Synchronized ViewModel 
View 
ViewModel 
● Strongly typed 
● Behaviour 
DB 
Data Binding 
Change Events 
Action Events 
ViewModel 
● Type-less 
● Only data 
Model
THE SOFTWARE EXPERTS 
JEE Server 
Client 
Ankor - Synchronized ViewModel 
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 
JavaFX HTML5 iOS .NET 
Messaging (Connector HTTP, Websocket, JMS, ...) 
Ankor Framework 
JEE Server 
DB 
Ankor – Architecture overview 
View 
ViewModel 
Model
THE SOFTWARE EXPERTS 
Ankor – Client Architecture 
• Various client languages und platforms 
o Java 
 JavaFX 
 Android 
o Javascript / HTML5 
 jQuery 
 AngularJS 
 React 
o Objective-C 
 iOS 
o C# 
 .NET / WPF 
JavaFX HTML5 iOS .NET 
Messaging (HTTP, Websocket, JMS, ...) 
Ankor Framework 
JEE Server
THE SOFTWARE EXPERTS 
Ankor – Server Architecture 
• Java SE 1.6 (or higher) 
• Various network protocols 
o Socket 
o HTTP-Polling 
o Websocket 
• Messaging 
o JSON 
• Concurrency / Parallelization 
o Simple Synchronization 
o Akka Actors 
• JEE / Web Container 
JavaFX HTML5 iOS .NET 
Messaging (HTTP, Websocket, JMS, ...) 
Ankor Framework 
o Glassfish (Websocket) 
o Tomcat 
o Spring Boot (Websocket, embedded Tomcat) 
JEE Server
THE SOFTWARE EXPERTS 
Agenda 
• M V V M 
• New concept „MVSVM“ 
• Ankor framework 
• Ankor live sample 
• Ankor special features
THE SOFTWARE EXPERTS 
Ankor - iOS Example
THE SOFTWARE EXPERTS 
Ankor - iOS Example 
Start Ankor System, connect to server 
[[[ANKSystem alloc] 
initWith:@"root" connectParams:connectParams 
url:@"ws://localhost:8080/websocket/ankor" 
useWebsocket:YES] start];
THE SOFTWARE EXPERTS 
Register Change Listener 
[ANKRefs observe:@"root.model.tasks" 
target:self listener:@selector(tasksChanged:)]; 
Change Listener 
- (void)tasksChanged:(id) value { 
[[self toDoItems]removeAllObjects]; 
[[self toDoItems]addObjectsFromArray:value]; 
[self.tableView reloadData]; 
} 
Ankor - iOS Example
THE SOFTWARE EXPERTS 
Ankor - iOS Example 
Fire Action / Add a new Task 
[ANKRefs fireAction:@"root.model" 
name:@"newTask" 
params:params]; // Dictionary 
ActionListener Java 
@ActionListener 
public void newTask(@Param("title") final String title) 
{...}
THE SOFTWARE EXPERTS 
Agenda 
• M V V M 
• New concept „MVSVM“ 
• Ankor framework 
• Ankor live sample 
• Ankor special features
THE SOFTWARE EXPERTS 
Client 
Ankor - Special Features 
Server • Ankor Annotations 
• Ankor Big Collections 
o BigList 
o BigMap 
• Ankor Flood Control 
• Pluggable Bean-Factory 
o Simple/Reflection 
o Spring 
o CDI (planned) 
• Collaboration Support 
• Stateless Server 
Model 
public class AnimalSearchViewModel { 
private AnimalSearchFilter filter; 
@ChangeListener(pattern = {".filter.**"}) 
public void reloadAnimals() { 
this.animals 
= animalRepository.searchAnimals(filter); 
}
THE SOFTWARE EXPERTS 
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 
o BigList 
o BigMap 
• Ankor Flood Control 
• Pluggable Bean-Factory 
o Simple/Reflection 
o Spring 
o CDI (planned) 
• Collaboration Support 
• Stateless Server 
Model 
Ankor - Special Features 
Client
THE SOFTWARE EXPERTS 
Ankor - Special Features 
Server • Ankor Annotations 
• Ankor Big Collections 
o BigList 
o BigMap 
• Ankor Flood Control 
• Pluggable Bean-Factory 
o Simple/Reflection 
o Spring 
o CDI (planned) 
• Collaboration Support 
• Stateless Server 
Model 
public class AnimalSearchViewModel { 
@ChangeListener(pattern = {".filter.**"}) 
@AnkorFloodControl(delayMillis = 100L) 
public void reloadAnimals() { 
this.animals 
= animalRepository.searchAnimals(filter); 
} 
Client
THE SOFTWARE EXPERTS 
Server 
Shared ViewModel 
• Ankor Annotations 
• Ankor Big Collections 
o BigList 
o BigMap 
• Ankor Flood Control 
• Pluggable Bean-Factory 
o Simple/Reflection 
o Spring 
o CDI (planned) 
• Collaboration Support 
• Stateless Server 
Model 
Ankor - Special Features
THE SOFTWARE EXPERTS 
Server 
• Ankor Annotations 
• Ankor Big Collections 
o BigList 
o BigMap 
• Ankor Flood Control 
• Pluggable Bean-Factory 
o Simple/Reflection 
o Spring 
o CDI (planned) 
• Collaboration Support 
• Stateless Server 
Model 
Ankor - Special Features 
send state 
information 
public class TaskListModel { 
@StateHolder 
private Filter filter; 
public void setFilter(String filter) { 
this.filter = 
Filter.valueOf(filter); 
initCalculatedFields(); 
}
THE SOFTWARE EXPERTS 
Ankor.io 
Further information, documentation & tutorials 
http://ankor.io 
http://github.com/ankor-io 
Thomas Spiegl 
Manfred Geiler

More Related Content

PDF
JavaLand 2014 - Ankor.io Presentation
manolitto
 
PPTX
Angular js for Beginnners
Santosh Kumar Kar
 
PDF
Web sockets in Angular
Yakov Fain
 
PPTX
2011 NetUG HH: ASP.NET MVC & HTML 5
Daniel Fisher
 
PDF
MVC 1.0 als alternative Webtechnologie
OPEN KNOWLEDGE GmbH
 
PDF
AngularJS Basics
Nikita Shounewich
 
PPTX
Vue js and Dyploma
Yoram Kornatzky
 
PDF
Overview of the AngularJS framework
Yakov Fain
 
JavaLand 2014 - Ankor.io Presentation
manolitto
 
Angular js for Beginnners
Santosh Kumar Kar
 
Web sockets in Angular
Yakov Fain
 
2011 NetUG HH: ASP.NET MVC & HTML 5
Daniel Fisher
 
MVC 1.0 als alternative Webtechnologie
OPEN KNOWLEDGE GmbH
 
AngularJS Basics
Nikita Shounewich
 
Vue js and Dyploma
Yoram Kornatzky
 
Overview of the AngularJS framework
Yakov Fain
 

What's hot (20)

PPTX
Asp.net mvc 5 course module 1 overview
Sergey Seletsky
 
PPTX
Valentine with Angular js - Introduction
Senthil Kumar
 
PPTX
Angularjs Basics
Jayantha Sirisena
 
PPT
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Apaichon Punopas
 
KEY
Everything you need to know about HTML5 in 15 min
Edgar Parada
 
PPTX
Hanselman lipton asp_connections_ams304_mvc
denemedeniz
 
PDF
[2015/2016] Require JS and Handlebars JS
Ivano Malavolta
 
PPTX
Angular2 and TypeScript
David Giard
 
PDF
Handlebars & Require JS
Ivano Malavolta
 
PDF
[2015/2016] JavaScript
Ivano Malavolta
 
PDF
Crash Course in AngularJS + Ionic (Deep dive)
ColdFusionConference
 
PDF
Seven Versions of One Web Application
Yakov Fain
 
PPTX
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
PDF
Apache Cayenne for WO Devs
WO Community
 
PPTX
Sitecore MVC: Converting Web Forms sublayouts
nonlinear creations
 
PPTX
Introduction to ASP.Net MVC
Sagar Kamate
 
PPTX
Getting started with MVC 5 and Visual Studio 2013
Thomas Robbins
 
PPTX
Asp.Net Mvc
micham
 
PPTX
MvvmQuickCross for Windows Phone
Vincent Hoogendoorn
 
Asp.net mvc 5 course module 1 overview
Sergey Seletsky
 
Valentine with Angular js - Introduction
Senthil Kumar
 
Angularjs Basics
Jayantha Sirisena
 
Dynamic Application Development by NodeJS ,AngularJS with OrientDB
Apaichon Punopas
 
Everything you need to know about HTML5 in 15 min
Edgar Parada
 
Hanselman lipton asp_connections_ams304_mvc
denemedeniz
 
[2015/2016] Require JS and Handlebars JS
Ivano Malavolta
 
Angular2 and TypeScript
David Giard
 
Handlebars & Require JS
Ivano Malavolta
 
[2015/2016] JavaScript
Ivano Malavolta
 
Crash Course in AngularJS + Ionic (Deep dive)
ColdFusionConference
 
Seven Versions of One Web Application
Yakov Fain
 
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
Apache Cayenne for WO Devs
WO Community
 
Sitecore MVC: Converting Web Forms sublayouts
nonlinear creations
 
Introduction to ASP.Net MVC
Sagar Kamate
 
Getting started with MVC 5 and Visual Studio 2013
Thomas Robbins
 
Asp.Net Mvc
micham
 
MvvmQuickCross for Windows Phone
Vincent Hoogendoorn
 
Ad

Similar to Ankor Presentation @ JavaOne San Francisco September 2014 (20)

PPTX
Anshulika Verma_p.pptx
ssusere56526
 
PPTX
Training: MVVM Pattern
Betclic Everest Group Tech Team
 
PDF
Designing your API Server for mobile apps
Mugunth Kumar
 
PPTX
Mvc express presentation
Raimundas Banevičius
 
PDF
Real World Windows Phone Development
Igor Kulman
 
PDF
Lublin Startup Festival - Mobile Architecture Design Patterns
Karol Szmaj
 
PDF
Samuel Asher Rivello - PureMVC Hands On Part 2
360|Conferences
 
PPTX
Open source and .net
Hrvoje Hudoletnjak
 
ODP
The Next Step in AS3 Framework Evolution
FITC
 
KEY
Sugarcoating your frontend one ViewModel at a time
Einar Ingebrigtsen
 
PDF
MvvmCross Introduction
Stuart Lodge
 
PDF
MvvmCross Seminar
Xamarin
 
PPTX
IGears: Template Architecture and Principles
Ecommerce Solution Provider SysIQ
 
PPTX
MVVM ( Model View ViewModel )
Ahmed Emad
 
PDF
Spring Boot
Shubham Aggarwal
 
PDF
MVVM & RxSwift
Thai Son Dang
 
PPTX
MVVM - Model View ViewModel
Dareen Alhiyari
 
DOCX
A report on mvc using the information
Toushik Paul
 
PDF
Rich Internet Applications con JavaFX e NetBeans
Fabrizio Giudici
 
PDF
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET Journal
 
Anshulika Verma_p.pptx
ssusere56526
 
Training: MVVM Pattern
Betclic Everest Group Tech Team
 
Designing your API Server for mobile apps
Mugunth Kumar
 
Mvc express presentation
Raimundas Banevičius
 
Real World Windows Phone Development
Igor Kulman
 
Lublin Startup Festival - Mobile Architecture Design Patterns
Karol Szmaj
 
Samuel Asher Rivello - PureMVC Hands On Part 2
360|Conferences
 
Open source and .net
Hrvoje Hudoletnjak
 
The Next Step in AS3 Framework Evolution
FITC
 
Sugarcoating your frontend one ViewModel at a time
Einar Ingebrigtsen
 
MvvmCross Introduction
Stuart Lodge
 
MvvmCross Seminar
Xamarin
 
IGears: Template Architecture and Principles
Ecommerce Solution Provider SysIQ
 
MVVM ( Model View ViewModel )
Ahmed Emad
 
Spring Boot
Shubham Aggarwal
 
MVVM & RxSwift
Thai Son Dang
 
MVVM - Model View ViewModel
Dareen Alhiyari
 
A report on mvc using the information
Toushik Paul
 
Rich Internet Applications con JavaFX e NetBeans
Fabrizio Giudici
 
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET Journal
 
Ad

Recently uploaded (20)

PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PDF
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
DOCX
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
PPTX
Presentation about Database and Database Administrator
abhishekchauhan86963
 
PPTX
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PDF
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
Presentation about Database and Database Administrator
abhishekchauhan86963
 
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 

Ankor Presentation @ JavaOne San Francisco September 2014

  • 1. THE SOFTWARE EXPERTS Reactive UIs with the Model View ViewModel Pattern: Simple with Ankor.io Thomas Spiegl Manfred Geiler Irian Solutions - The Software Experts
  • 2. THE SOFTWARE EXPERTS Agenda • M V V M • New concept „MVSVM“ • Ankor framework • Ankor live sample • Ankor special features
  • 3. THE SOFTWARE EXPERTS „M V V M” ? • „Model View ViewModel“ • 2005 by John Gossman (Microsoft) • ≅ „Presentation Model“ by Martin Fowler • Separation of Concerns o Graphical UI o 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 – The View • Graphical user interface (GUI) • User inputs • Data binding to the ViewModel • Markup o XAML o FXML Business Logic and Data Presentation & UI Logic DB Data Binding ViewModel Service Calls Model View
  • 7. THE SOFTWARE EXPERTS M V V M – The ViewModel • Link between View and Model • Connection to Model (service calls) • Properties and actions for the View (binding) • UI logic • UI validation Business Logic and Data Presentation & UI Logic View DB Data Binding Service Calls Model ViewModel
  • 8. THE SOFTWARE EXPERTS M V V M – The Model • Domain model • Data(base) access • Domain logic • Business Rules Presentation & UI Logic • Validation View • Unit testing Business Logic and Data DB Data Binding ViewModel Service Calls Model
  • 9. THE SOFTWARE EXPERTS MVVM solves... • Separation of concerns o Web designer ↔ UI developer o View technology ↔ Presentation logic • Testable ViewModel! o Unit tests o Mock View Business Logic and Data Presentation & UI Logic View DB Data Binding ViewModel Service Calls Model
  • 10. THE SOFTWARE EXPERTS MVVM does not solve... • Model on client or server? • Communication client ↔ server • Various client technologies o HTML5 o iOS o Android o JavaFX Presentation & UI Logic View ViewModel o ... Business Logic and Data DB Data Binding Service Calls Model
  • 11. THE SOFTWARE EXPERTS Agenda • M V V M • New concept „MVSVM“ • Ankor framework • Ankor live sample • Ankor special features
  • 12. THE SOFTWARE EXPERTS Client Server Model View SynchronizedViewModel View ViewModel ViewModel DB Model Data Binding Synchronization
  • 13. THE SOFTWARE EXPERTS MVSVM - Synchronized ViewModel Client Server View ViewModel ViewModel DB Model Data Binding Synchronization Client holds: • View • ViewModel Client technology: • Modern platform o HTML5 o JavaFX o iOS, Android o ... • Very latest frameworks • Cutting edge Server holds: • ViewModel • Model Server technology: • Java EE • Approved patterns • Stable platform
  • 14. THE SOFTWARE EXPERTS Agenda • M V V M • New concept „MVSVM“ • Ankor framework • Ankor live sample • Ankor special features
  • 15. THE SOFTWARE EXPERTS Project „Ankor” • 2013 • http://www.ankor.io • Open Source (Apache License, Version 2.0) • Expandable modular framework o Event driven programming model o Asynchronous processing o Bidirectional client-server communication o Native MVSVM support
  • 16. THE SOFTWARE EXPERTS Ankor Server Client Ankor - Synchronized ViewModel View ViewModel ● Strongly typed ● Behaviour DB Data Binding Change Events Action Events ViewModel ● Type-less ● Only data Model
  • 17. THE SOFTWARE EXPERTS JEE Server Client Ankor - Synchronized ViewModel 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 JavaFX HTML5 iOS .NET Messaging (Connector HTTP, Websocket, JMS, ...) Ankor Framework JEE Server DB Ankor – Architecture overview View ViewModel Model
  • 19. THE SOFTWARE EXPERTS Ankor – Client Architecture • Various client languages und platforms o Java  JavaFX  Android o Javascript / HTML5  jQuery  AngularJS  React o Objective-C  iOS o C#  .NET / WPF JavaFX HTML5 iOS .NET Messaging (HTTP, Websocket, JMS, ...) Ankor Framework JEE Server
  • 20. THE SOFTWARE EXPERTS Ankor – Server Architecture • Java SE 1.6 (or higher) • Various network protocols o Socket o HTTP-Polling o Websocket • Messaging o JSON • Concurrency / Parallelization o Simple Synchronization o Akka Actors • JEE / Web Container JavaFX HTML5 iOS .NET Messaging (HTTP, Websocket, JMS, ...) Ankor Framework o Glassfish (Websocket) o Tomcat o Spring Boot (Websocket, embedded Tomcat) JEE Server
  • 21. THE SOFTWARE EXPERTS Agenda • M V V M • New concept „MVSVM“ • Ankor framework • Ankor live sample • Ankor special features
  • 22. THE SOFTWARE EXPERTS Ankor - iOS Example
  • 23. THE SOFTWARE EXPERTS Ankor - iOS Example Start Ankor System, connect to server [[[ANKSystem alloc] initWith:@"root" connectParams:connectParams url:@"ws://localhost:8080/websocket/ankor" useWebsocket:YES] start];
  • 24. THE SOFTWARE EXPERTS Register Change Listener [ANKRefs observe:@"root.model.tasks" target:self listener:@selector(tasksChanged:)]; Change Listener - (void)tasksChanged:(id) value { [[self toDoItems]removeAllObjects]; [[self toDoItems]addObjectsFromArray:value]; [self.tableView reloadData]; } Ankor - iOS Example
  • 25. THE SOFTWARE EXPERTS Ankor - iOS Example Fire Action / Add a new Task [ANKRefs fireAction:@"root.model" name:@"newTask" params:params]; // Dictionary ActionListener Java @ActionListener public void newTask(@Param("title") final String title) {...}
  • 26. THE SOFTWARE EXPERTS Agenda • M V V M • New concept „MVSVM“ • Ankor framework • Ankor live sample • Ankor special features
  • 27. THE SOFTWARE EXPERTS Client Ankor - Special Features Server • Ankor Annotations • Ankor Big Collections o BigList o BigMap • Ankor Flood Control • Pluggable Bean-Factory o Simple/Reflection o Spring o CDI (planned) • Collaboration Support • Stateless Server Model public class AnimalSearchViewModel { private AnimalSearchFilter filter; @ChangeListener(pattern = {".filter.**"}) public void reloadAnimals() { this.animals = animalRepository.searchAnimals(filter); }
  • 28. THE SOFTWARE EXPERTS 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 o BigList o BigMap • Ankor Flood Control • Pluggable Bean-Factory o Simple/Reflection o Spring o CDI (planned) • Collaboration Support • Stateless Server Model Ankor - Special Features Client
  • 29. THE SOFTWARE EXPERTS Ankor - Special Features Server • Ankor Annotations • Ankor Big Collections o BigList o BigMap • Ankor Flood Control • Pluggable Bean-Factory o Simple/Reflection o Spring o CDI (planned) • Collaboration Support • Stateless Server Model public class AnimalSearchViewModel { @ChangeListener(pattern = {".filter.**"}) @AnkorFloodControl(delayMillis = 100L) public void reloadAnimals() { this.animals = animalRepository.searchAnimals(filter); } Client
  • 30. THE SOFTWARE EXPERTS Server Shared ViewModel • Ankor Annotations • Ankor Big Collections o BigList o BigMap • Ankor Flood Control • Pluggable Bean-Factory o Simple/Reflection o Spring o CDI (planned) • Collaboration Support • Stateless Server Model Ankor - Special Features
  • 31. THE SOFTWARE EXPERTS Server • Ankor Annotations • Ankor Big Collections o BigList o BigMap • Ankor Flood Control • Pluggable Bean-Factory o Simple/Reflection o Spring o CDI (planned) • Collaboration Support • Stateless Server Model Ankor - Special Features send state information public class TaskListModel { @StateHolder private Filter filter; public void setFilter(String filter) { this.filter = Filter.valueOf(filter); initCalculatedFields(); }
  • 32. THE SOFTWARE EXPERTS Ankor.io Further information, documentation & tutorials http://ankor.io http://github.com/ankor-io Thomas Spiegl Manfred Geiler