Thomas Spiegl Manfred Geiler Irian Solutions - The Software Experts

Slides:



Advertisements
Similar presentations
Lecture plan Information retrieval (from week 11)
Advertisements

Expression Blend 4 – deep dive
Apache Struts Technology
Developing HTML5 Application using MVVM pattern Pekka Ylenius.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.Public 1 JavaScript/HTML5 Rich Clients Using Java EE 7 Reza Rahman Java EE/GlassFish.
ISE 390 Dynamic Web Development Java EE Web Applications.
Fabian Vilers Hands on ASP.NET MVC.
Internet Technologies 1 Master of Information System Management Java Server Faces Model/View/Controller Design Pattern for Web Development Slides.
Microsoft Focus & Expertise We have a world-class team of Microsoft experts that can make any other platform integrate better with an existing enterprise.
A Good UX How To Make It Happen EAE 4023, UNITE 2010 Tuesday, 9:15 am May 25 th 2010 Niels Gebauer Director Client Tools Consultancy
DATABASE APPLICATION DEVELOPMENT SAK 3408 The Web and DBMS.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Building Silverlight Applications Using the MVVM pattern An Introduction by Peter Messenger Senior Developer – Qmastor
Structure of a web application1 Dr Jim Briggs. MVC Structure of a web application2.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.

Android and iOS Development with JAX-RS, WebSocket , and Java EE 7
Intelligent Tutoring System Mobile Communication Team Drew Boatwright Nakul Dureja Richard Liou.
Struts 2.0 an Overview ( )
UNIT-V The MVC architecture and Struts Framework.
Client/Server Architectures
Written by Liron Blecher
INTRODUCTION TO WEB DATABASE PROGRAMMING
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
Introduction to distributed systems Dr. S. Indran 23 January 2004.
Building an Offline Smart Client using Domain-Driven Design Principles Tim McCarthy.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
J2EE Structure & Definitions Catie Welsh CSE 432
1 Another group of Patterns Architectural Patterns.
Architectural Patterns Support Lecture. Software Architecture l Architecture is OVERLOADED System architecture Application architecture l Architecture.
JSF Framework Java Server Faces Presented by Songkran Totiya (6/10/2014)
1 ObjectRiver Metadata Compilers Programmatic WebSockets JavaOne 2014 – Steven Lemmo.
World Wide Web “WWW”, "Web" or "W3". World Wide Web “WWW”, "Web" or "W3"
Getting started with ASP.NET MVC Dhananjay
Markus Hjort Reaktor Innovations Java Web Development T WWW-palvelun HUT
Session 7: JMS, JCA, JSF Dr. Nipat Jongsawat.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
SEA Side – Extreme Programming 1 SEA Side Software Engineering Annotations Architectural Patterns Professor Sara Stoecklin Director of Software Engineering-
ThinStructure: An Overview Support for ThinStructure demonstration. Jean Georges Perrin – Annandale, 21 st April 2004.
Presentation Title Subtitle DSpace UI Prototype 7 Spring, Angular.js, and the DSpace REST API.
Windows 8 apps and the MVVM pattern SILVERLIGHTSHOW.NET WEBINARS SERIES GILL CLEEREN, October 16 th
Building J2EE Applications Based on Design Patterns with Business Components for Java Olivier LE DIOURIS Principal Product Manager Oracle Corporation.
Martin Kruliš by Martin Kruliš (v1.0)1.
Added Value to XForms by Web Services Supporting XML Protocols Elina Vartiainen Timo-Pekka Viljamaa T Research Seminar on Digital Media Autumn.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Intro To MVC Architecture.
Slide 1. What's New in NetBeans IDE 7.1 Name Title.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
What is BizTalk ?
ISYS 350 Building Business Applications
Structure of a web application
AJAX and REST.
Web Software Model CS 4640 Programming Languages for Web Applications
JS301 Week 4 Knockout and Objects.
ISYS 350 Building Business Applications
Java Tutorial Zhe Li.
ISYS 350 Building Business Applications
ISE 390 Dynamic Web Development
Model-View-Controller (MVC) Pattern
ISYS 350 Building Business Applications
ISYS 350 Building Business Applications
ISYS 350 Building Business Applications
ISYS 350 Building Business Applications
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Back end Development CS Programming Languages for Web Applications
ISYS 350 Building Business Applications
Web Technologies Computing Science Thompson Rivers University
Back end Development CS Programming Languages for Web Applications
An Introduction to the Model-View-ViewModel Pattern
Presentation transcript:

Thomas Spiegl Manfred Geiler Irian Solutions - The Software Experts Reactive UIs with the Model View ViewModel Pattern: Simple with Ankor.io Thomas Spiegl Manfred Geiler Irian Solutions - The Software Experts

Agenda M V V M New concept „MVSVM“ Ankor framework Ankor live sample Ankor special features

„M V V M” ? „Model View ViewModel“ 2005 by John Gossman (Microsoft) ≅ „Presentation Model“ by Martin Fowler Separation of Concerns Graphical UI UI logic

Controller Model View Model View Controller

View ViewModel Domain Model Model View ViewModel Binding Service Calls Presentation & UI Logic View Binding ViewModel Business Logic and Data Domain Model Service Calls DB Model View ViewModel

M V V M – The View Graphical user interface (GUI) User inputs Data binding to the ViewModel Markup XAML FXML Presentation & UI Logic View Data Binding ViewModel Business Logic and Data Model Service Calls DB

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 Presentation & UI Logic View Data Binding ViewModel Business Logic and Data Model Service Calls DB

M V V M – The Model Domain model Data(base) access Domain logic Business Rules Validation Unit testing Presentation & UI Logic View Data Binding ViewModel Business Logic and Data Model Service Calls DB

MVVM solves... Separation of concerns Web designer ↔ UI developer View technology ↔ Presentation logic Testable ViewModel! Unit tests Mock UI Business Logic and Data Presentation & UI Logic View DB Data Binding Service Calls ViewModel Model

Model on client or server? Communication client ↔ server MVVM does not solve... Model on client or server? Communication client ↔ server Various client technologies HTML5 iOS Android JavaFX ... Business Logic and Data Presentation & UI Logic View DB Data Binding Service Calls ViewModel Model

Agenda M V V M New concept „MVSVM“ Ankor framework Ankor live sample Ankor special features

Model View SynchronizedViewModel DB Client View Data Binding Server ViewModel ViewModel Synchronization Model Model View SynchronizedViewModel

MVSVM - Synchronized ViewModel Client holds: View ViewModel Client technology: Modern platform HTML5 JavaFX iOS, Android ... Very latest frameworks Cutting edge Server holds: ViewModel Model Server technology: Java EE Approved patterns Stable platform DB Client View Data Binding Server ViewModel ViewModel Synchronization Model

Agenda M V V M New concept „MVSVM“ Ankor framework Ankor live sample Ankor special features

Project „Ankor” 2013 http://www.ankor.io Open Source (Apache License, Version 2.0) Expandable modular framework Event driven programming model Asynchronous processing Bidirectional client-server communication Native MVSVM support

Ankor - Synchronized ViewModel DB Client View Data Binding Ankor Server ViewModel Type-less Only data ViewModel Strongly typed Behaviour Change Events Action Events Model Ankor - Synchronized ViewModel

Ankor - Synchronized ViewModel DB 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; Client View Data Binding JEE Server ViewModel type-less only Data ViewModel strongly typed Behaviour Change Events Action Events Model Ankor - Synchronized ViewModel

Ankor Framework View ViewModel Model Ankor – Architecture overview JavaFX HTML5 iOS .NET View ViewModel Messaging (Connector HTTP, Websocket, JMS, ...) Ankor Framework Model JEE Server DB Ankor – Architecture overview

Ankor – Client Architecture Various client languages und platforms Java JavaFX Android Javascript / HTML5 jQuery AngularJS React Objective-C iOS C# .NET / WPF JavaFX HTML5 iOS .NET Messaging (HTTP, Websocket, JMS, ...) Ankor Framework JEE Server

Ankor – Server Architecture Java SE 1.6 (or higher) Diverse Netzwerk-Protokolle Socket HTTP-Polling Websocket Messaging JSON Concurrency / Parallelisierung Simple Synchronization Akka Actors JEE Container Glassfish (Websocket) Tomcat Spring Boot (embedded Tomcat) JavaFX HTML5 iOS .NET Messaging (HTTP, Websocket, JMS, ...) Ankor Framework JEE Server

Agenda M V V M New concept „MVSVM“ Ankor framework Ankor live sample Ankor special features

Ankor - iOS Example

Ankor - iOS Example Start Ankor System, connect to server [[[ANKSystem alloc] initWith:@"root" connectParams:connectParams url:@"ws://localhost:8080/websocket/ankor" useWebsocket:YES] start];

Ankor - iOS Example 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 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) {...}

Agenda M V V M New concept „MVSVM“ Ankor framework Ankor live sample Ankor special features

Ankor - Special Features Ankor Annotations Ankor Big Collections BigList BigMap Ankor Flood Control Pluggable Bean-Factory Simple/Reflection Spring CDI (planned) Collaboration Support Stateless Model Server public class AnimalSearchViewModel { private AnimalSearchFilter filter; @ChangeListener(pattern = {".filter.**"}) public void reloadAnimals() { this.animals = animalRepository.searchAnimals(filter); } Client

Ankor - Special Features Ankor Annotations Ankor Big Collections BigList BigMap Ankor Flood Control Pluggable Bean-Factory Simple/Reflection Spring CDI (planned) Collaboration Support Stateless Model 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! Client

Ankor - Special Features Ankor Annotations Ankor Big Collections BigList BigMap Ankor Flood Control Pluggable Bean-Factory Simple/Reflection Spring CDI (planned) Collaboration Support Stateless Model Server public class AnimalSearchViewModel { @ChangeListener(pattern = {".filter.**"}) @AnkorFloodControl(delayMillis = 100L) public void reloadAnimals() { this.animals = animalRepository.searchAnimals(filter); } Client

Ankor - Special Features Ankor Annotations Ankor Big Collections BigList BigMap Ankor Flood Control Pluggable Bean-Factory Simple/Reflection Spring CDI (planned) Collaboration Support Stateless Model Server Shared ViewModel

Ankor - Special Features Ankor Annotations Ankor Big Collections BigList BigMap Ankor Flood Control Pluggable Bean-Factory Simple/Reflection Spring CDI (planned) Collaboration Support Stateless Model send state information Server public class TaskListModel { @StateHolder private Filter filter; public void setFilter(String filter) { this.filter = Filter.valueOf(filter); initCalculatedFields(); }

Further information, documentation & tutorials http://ankor.io Ankor.io Further information, documentation & tutorials http://ankor.io http://github.com/ankor-io Thomas Spiegl Manfred Geiler