Developing HTML5 Application using MVVM pattern Pekka Ylenius.

Slides:



Advertisements
Similar presentations
Bob German Principal Architect Introduction to Cloud Hosted Apps Your apps here!
Advertisements

ASP.NET Ajax Supplementary Tutorial. Why Use ASP.NET AJAX? - I ASP.NET AJAX enables you to build rich Web applications that have many advantages over.
Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
Facts about Welcome to this video from Ozeki. In this video I will present what makes Ozeki Phone System XE the Worlds best on-site software PBX for Windows.
Esri International User Conference | San Diego, CA July 14, 2011 Troubleshooting ArcGIS Web APIs (JavaScript, Flex, Silverlight) from a Support Perspective.
.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
Silverlight is dead! Long live MVVM!
Creating Knockout User Experiences in SharePoint with JavaScript Making awesome with Knockout, jQuery and SharePoint REST.
HTML5 That’s What You Need to Know Today Ingo Rammer | thinktecture |
Mobile App Development Using: Presented by Tyler Richey Images from
John Culviner johnculviner.com DEMO CODE:
6/3/2015eBiquity1 Tutorial on AJAX Anubhav Kale (akale1 AT cs DOT umbc DOT edu)
Chalermvong Vijitpiyakul Microsoft MVP Greatfriends.biz Community Lead GF 30 August 2009.
Client Side Dev. Toolkit HTML5 JavaScript CSS (and Less, but not today) Bootstrap Knockout.js Require.js (moving to Browserify) Toastr Visual Studio and.
Does Ajax suck? CS575 Spring 2007 Chanwit Suebsureekul.
SharePoint Saturday Sponsors Gold Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
Chapter 1 Getting Started With Dreamweaver. Explore the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
Development of mobile applications using PhoneGap and HTML 5
Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 2013 Technical Preview and published July Introducing.
Microsoft SharePoint 2010 Upgrade Preview FSU SharePoint Users Group Presents: Thursday, December 1 st, 2011.
Agenda What is AJAX? What is jQuery? Demonstration/Tutorial Resources Q&A.
Chris Pinski.  History  What is Ajax  Who uses Ajax  Underlying Technologies  SE Aspect  Common Problems  Conclusion.
JavaScript & jQuery the missing manual Chapter 11
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
Mobile App Support Jacob Poirier Geri Hengesbach Andrea Menke Erin Rossell.
Angelo Chan Kamran Bilgrami. Agenda ● WinJS - What and Why ● Modern Apps ● WinRT Architecture ● Demos o Controls o Data Bindings o Program LifeCycle Management.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Build a Free Website1 Build A Website For Free 2 ND Edition By Mark Bell.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
RUSS FUSTINO HEAD OF DEVELOPER JavaScript for the ASP.NET Developer Chris Bannon.
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
Lap Around Visual Studio 2008 &.NET 3.5 Enhancements.
WEB &.NET Web development trends in.NET World. Sanjay Jagarlamudi Associate Director at MATRIX Founder Dallas HTML5 Group Father of two girls.
SharePoint Saturday Sponsors Gold Bronze Creating Knockout User Experiences in SharePoint with JavaScript Making awesome with Knockout, jQuery and SharePoint.
Mobile web Sebastian Lopienski IT Technical Forum 29 June 2012.
Telerik Software Academy ASP.NET Web Forms Telerik Software Academy ASP.NET Web Forms.
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
Microsoft UI Stack Ronnie Saurenmann Technical Evangelist, Microsoft Switzerland
The Web Developer’s Toolbox Steve Fabian e:
JAVASCRIPT WITH A VIEW Jordan Knight Solution Architect Xamling SESSION CODE: WEB305 (c) 2011 Microsoft. All rights reserved.
Building Excellent Internet & Intranet Solutions Dave Remmer Architect Advisor Microsoft Canada
Trunica Inc. 500 East Kennedy Blvd #300 Tampa, FL Cross Platform Mobile Apps With Cordova and Visual Studio 2015 © Copyright 2015.
Web 2.0: Concepts and Applications 11 The Web Becomes 2.0.
 An essential supporting structure of any thing  A Software Framework  Has layered structure ▪ What kind of functions and how they interrelate  Has.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
MVC 4.0, Knockout.js, Bootstrap and EF6.0 FAST, FLEXIBLE AND RESPONSIVE QUICK TO MARKET WEBSITES.
Software services delivering SharePoint, Mobile, and Business Intelligence solutions Creating mobile applications that integrate with SharePoint 2013 on-
Mobile App Development Using:
A little more App Inventor and Mind the GAP!
JQuery Fundamentals Introduction Tutorial Videos
Real world Windows Phone development
Web Technologies Computing Science Thompson Rivers University
Visual Studio 2017 By Michael Washington
Client Side Dev.
Data Virtualization Tutorial… CORS and CIS
Tracking and Booking Taxi
Building Web Applications with Microsoft ASP
KnockoutJS -Pradeep Shet 31st August 2014.
Rich single page applications with SharePoint
HTML5 and Local Storage.
Office 365 Development.
WPS - your story so far Seems incredible complicated, already
Dot Net Application PROF. S. LAKSHMANAN, DEPT. OF B. VOC. (SD & SA),
Web Technologies Computing Science Thompson Rivers University
Running C# in the browser
Presentation transcript:

Developing HTML5 Application using MVVM pattern Pekka Ylenius

This presentation  Presentation is for developers  Not much for designers  No CSS3 nor Canvas demos  Contanins demos and code samples  Generic info also

Myself  Hardcore c# developer  Tried to avoid JavaScript as long as possible  Have been working a lot with SilverLight and ASP.Net (UpdatePanel was Ajax enough for me)  I started moving to Javascript word after Microsoft  SilverLight was ”killed”  Huge promoting for Windows 8 App development with Javascript  Azure Mobile Services support only Javascript serverside scripts  New Office Store is also HTML+Javascript only

How I moved to client side  Started moving to client side programming 3-4 years ago  jQuery made it easy for everyone to program simple scripts  Combining Asp.Net controls and jQuery components was painful  Searched for way to do databinding with web  Finally founded Knockout

Debugging Javascript  Painful at beginning  Visual Studio 2010 supported stepping inside Javascript code  Currently Google Chrome and Mozilla Firefox have excellent debuggers  Debug console helped tracing  Visual Studio 2012 has much better support for debugging Javascript  Currently debugging Javasript is almost as easy as debuggin c#

Difference between HTML5 app and server side HTML pages  HTML5 application loads once at statup / HTML pages are reloading after every click of button  HTML5 app is like Excel or Word  No need to send intall package with every document  HTML5 app can work offline also  Much better performance because only little or no data is transferred when working inside application

What is Model-View-ViewModel (MVVM) pattern  Originated from Microsoft  Targeted at HTML5, WPF, Silverlight, WP7, WP8  Based on MVC pattern  Better unit testing  No dependencies to MS technologies

Model-View-ViewModel  Model is actual object saved to database  In phonebook app Model would be one contact  View is HTML page  Everything that is made visible for user  ViewModel is part if model that is exposed to web page  Used to combine and parse information for View  Used to restrict information from View  Helper methods needed by UI  When we live in browser DOM everything is accessible by user

Why MVVM  Pattern separates different layers in specific way so work responsibility and work can be divided.  View  Because UI testing is the most difficult area of testing, amount of code in View is minimized.  View does not have access to model, it only binds to data provided by ViewModel.  It does not need to know how to save data or when move to different view. It just knows how to command ViewModel to save data.  ViewModel  Responsibility is to load and save models. And sometimes parse it ready for View. ViewModel does not know how to show data. It just offers interface for View to bind to.

Why to use MVVM with HTML5 app  Basically for same reasons as in any other environments also.  To have easy to read and testable applications.  Actual data is not saved inside inputs but inside view- model  Only one place for data  Enables bi-directional binding of data  Easy to load data from server and save back to server

KnockoutJS  Knockout makes it possible to do bi-directional binding with HTML page  Knockout comes with ASP.MVC and Web Pages projects  Other options for Knockout exist also  Knockout does only one narrow thing but does it well. And there are other libraries to fulfill other needs which I will present later also.

Knockout demo  Live learning demo from Knockout website 

SPA – Sigle Page Application  Gmail is one example of SPA  No page loadings when using application  Uses inpage # URL for navigating inside application  Searches and lists can be populated still use network connectivity

SPA CRM Application demo  Simple CRM Application demo  Hot Towel SPA template  Knockout for data bindings  Durandal for navigation and UI  Breeze for data mangement

PhoneGap  Library for using HTML5 applications in most of Phones and Tablets  Common APIs for contacts, GPS, etc. 

PhoneGap demo  Moving previous CRM demo app to WP8