SlideShare a Scribd company logo
1 of 25
Kendo UITHE WAY OF HTML5
Introductions
Lohith G N
Dev Evangelist, Telerik
Lohith.nagaraj@telerik.com
@kashyapa
www.kashyapas.com
www.telerikhelper.net
MVVM
What is it ?
Why MVVM ?
• Device & OS Proliferation
– Desktops, Laptops, Tablets, Phones, Netbooks
etc.
• Only delivery on all platforms – Web App
– Complex on client side, Need to model data
on client as well as server
• Need to keep up with changes in Server, UI
and State of App
MVVM
• Design Patterns
• Acronym
– M = Model
– V = View
– VM = ViewModel
• Separate Model (Data) from the View (UI)
• View-Model responsible for exposing data
objects
• Many frameworks available in the market
Where Are We Today?
A Quick Look At The Problem With
Client-Side Development Today
The Problem
• Multiple Small-Scoped Libraries
• Non-Unified Frameworks
• Unpredictable Road Maps
• Unsupported Code
Kendo UI to the Rescue!
How It Makes Your JavaScript
Development A Piece Of Cake
In a Nutshell
• JavaScript Library
• Based on jQuery
• HTML5
• CSS3
• UI Framework Solution
– Desktop
– Mobile
Why Kendo UI?
• A Single Package
– UI Widgets
– Framework
– Modular
• Data Binding
– Data Source
– MVVM
• Data Visualization
• Native-Like & Hybrid Mobile Apps
• Latest Web Standards
• Aggressive Release Schedule
Kendo UI Packages
Web
• UI Widgets
• Framework
• Browsers
• Desktop
• Mobile
DataViz
• Visualizations
• Charts
• Gauges
Mobile
• Hybrid Apps
• HTML & CSS
• Native UI
Kendo UI Complete
Kendo UI Complete Wrappers
Kendo UI Web
• UI Widgets
– Grid, Menu, TabStrip, Editor etc.
• Client-Side Data Source
• MVVM
• Templates
• Drag & Drop
• Animations
• Built-In Touch Support
MVVM IN KENDO UI
MVVM in Kendo UI
• 3 core pieces
• ObservableObject
• ObservableArray
• Bindings are supported with UI elements
– Attr, Checked, Click, Disabled, Enabled, Events,
Html, Invisible, Source, Style, Text, Value,
Visible
ObservableObject
• kendo.data.ObservableObject
• Supports change tracking & notifies
subscribers
• Inherits Observable
• var vm = new
kendo.data.ObservableObject(,field1:””-)
• Var vm = new
kendo.observable(,field1:””-)
ObservableObject
• Fields
– uid
• Methods
– bind
– get
– parent
– set
– toJSON
• Events
– change
– set
– get
ObservableArray
• Wraps existing Array with change tracking
capabilities
• var arr = new
kendo.data.ObservableArray([{name:”L”-+)
• var arr = new
kendo.data.ObservableArray(*“Loh”,”Adi”+)
• Provides all Array constructs
DEMO
Lets see some action!
Validation in Kendo UI
Lets check some data
HTML5 Form Validation
• Validation Attributes - Anticipated feature
of HTML5
• Set constraints on HTML inputs
• Required, Pattern, Min/Max, HTML5 Data
Types
• Browser will validate inputs to constraints
before form submission
• Input fails constraints, browser displays
message
Problems
• HTML5 Form validation is great - But….
• Problems
– Old Browsers offer no support to HTML5
– Support in modern browsers incomplete
– Browser created validation error messages –
difficult to re style
• Solution
– Augment HTML5 form validation with JS
Kendo UI Validator
• Augments HTML’s form validation with JS
• Works with standard HTML5 form attibs
• Automatically makes these work in all
browsers (IE7+)
• Gives you more customizability
• Usage
– var validator = $(“#form”).kendoValidator();
– var isValid = validator.validate();
Customization
• Custom Rules
• Custom Validation Messages
$("#myform").kendoValidator({
rules: {
custom: function(input){
return input.val() === "Test";}
},
messages: {
custom: "Your name must be Test“
}
});
DEMO
Lets see some action!
Thanks!
Q & A

More Related Content

What's hot

Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebSingle Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.Web
Chris Canal
 

What's hot (20)

Angular Introduction (RS)
Angular Introduction (RS)Angular Introduction (RS)
Angular Introduction (RS)
 
Web Content Management with Sitefinity
Web Content Management with SitefinityWeb Content Management with Sitefinity
Web Content Management with Sitefinity
 
Build Hybrid Mobile Applications for Nokia Lumia Devices
Build Hybrid Mobile Applications for Nokia Lumia DevicesBuild Hybrid Mobile Applications for Nokia Lumia Devices
Build Hybrid Mobile Applications for Nokia Lumia Devices
 
Scaffolding in One Asp.Net
Scaffolding in One Asp.NetScaffolding in One Asp.Net
Scaffolding in One Asp.Net
 
Single page application and Framework
Single page application and FrameworkSingle page application and Framework
Single page application and Framework
 
Build HTML5 Sites/Apps with Kendo UI Core
Build HTML5 Sites/Apps with Kendo UI CoreBuild HTML5 Sites/Apps with Kendo UI Core
Build HTML5 Sites/Apps with Kendo UI Core
 
Migrating MVVM Applications to HTML5
Migrating MVVM Applications to HTML5Migrating MVVM Applications to HTML5
Migrating MVVM Applications to HTML5
 
XAML/C# to HTML5/JS
XAML/C#  to HTML5/JS XAML/C#  to HTML5/JS
XAML/C# to HTML5/JS
 
Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebSingle Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.Web
 
The RAW stack
The RAW stackThe RAW stack
The RAW stack
 
Pros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside AppPros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside App
 
A Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMA Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVM
 
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Transforming Front-End Disaster Code™ Into A Maintainable MasterpieceTransforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
 
AngularJS - GrapeCity Echo Tokyo
AngularJS - GrapeCity Echo TokyoAngularJS - GrapeCity Echo Tokyo
AngularJS - GrapeCity Echo Tokyo
 
Mobilizing Your SAP Data with Kendo UI Mobile
Mobilizing Your SAP Data with Kendo UI MobileMobilizing Your SAP Data with Kendo UI Mobile
Mobilizing Your SAP Data with Kendo UI Mobile
 
Inside Wijmo 5, a Large-scale JavaScript Product
Inside Wijmo 5, a Large-scale JavaScript ProductInside Wijmo 5, a Large-scale JavaScript Product
Inside Wijmo 5, a Large-scale JavaScript Product
 
Front End Applications Using One Stop JavaScript Library from Telerik
Front End Applications Using One Stop JavaScript Library from TelerikFront End Applications Using One Stop JavaScript Library from Telerik
Front End Applications Using One Stop JavaScript Library from Telerik
 
Server rendering-talk
Server rendering-talkServer rendering-talk
Server rendering-talk
 
Togu CMS
Togu CMSTogu CMS
Togu CMS
 
Introduction to Vue.js DevStaff Meetup 13.02
Introduction to Vue.js  DevStaff Meetup 13.02Introduction to Vue.js  DevStaff Meetup 13.02
Introduction to Vue.js DevStaff Meetup 13.02
 

Viewers also liked

Presentación
PresentaciónPresentación
Presentación
ikebukoro
 
ITCamp 2012 - Alex Gyoshev - Kendo-UI
ITCamp 2012 - Alex Gyoshev - Kendo-UIITCamp 2012 - Alex Gyoshev - Kendo-UI
ITCamp 2012 - Alex Gyoshev - Kendo-UI
ITCamp
 

Viewers also liked (9)

Presentación
PresentaciónPresentación
Presentación
 
Kendo UI presentation at JsConf.eu
Kendo UI presentation at JsConf.euKendo UI presentation at JsConf.eu
Kendo UI presentation at JsConf.eu
 
AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014
AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014
AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014
 
ITCamp 2012 - Alex Gyoshev - Kendo-UI
ITCamp 2012 - Alex Gyoshev - Kendo-UIITCamp 2012 - Alex Gyoshev - Kendo-UI
ITCamp 2012 - Alex Gyoshev - Kendo-UI
 
Browser tools
Browser toolsBrowser tools
Browser tools
 
Kendo ui web
Kendo ui webKendo ui web
Kendo ui web
 
Introducing Kendo UI
Introducing Kendo UIIntroducing Kendo UI
Introducing Kendo UI
 
Telerik Kendo UI Overview
Telerik Kendo UI OverviewTelerik Kendo UI Overview
Telerik Kendo UI Overview
 
Kendo UI - Potencia tu Web
Kendo UI - Potencia tu WebKendo UI - Potencia tu Web
Kendo UI - Potencia tu Web
 

Similar to MVVM & Validation with Kendo UI

Knockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockoutKnockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockout
Andoni Arroyo
 
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Jeremy Likness
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8
Gill Cleeren
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
Ganesh Kondal
 

Similar to MVVM & Validation with Kendo UI (20)

Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Knockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockoutKnockout implementing mvvm in java script with knockout
Knockout implementing mvvm in java script with knockout
 
A Smooth Transition to HTML5
A Smooth Transition to HTML5A Smooth Transition to HTML5
A Smooth Transition to HTML5
 
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
 
KhajavaliShaik
KhajavaliShaikKhajavaliShaik
KhajavaliShaik
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8
 
MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!
 
Santosh_Resume_Java
Santosh_Resume_JavaSantosh_Resume_Java
Santosh_Resume_Java
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
 
Node.js In The Enterprise - A Primer
Node.js In The Enterprise - A PrimerNode.js In The Enterprise - A Primer
Node.js In The Enterprise - A Primer
 
Evolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.jsEvolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.js
 
Vikram_Singh_TeamLead
Vikram_Singh_TeamLeadVikram_Singh_TeamLead
Vikram_Singh_TeamLead
 
Kumar_Resume - LinkedIn
Kumar_Resume - LinkedInKumar_Resume - LinkedIn
Kumar_Resume - LinkedIn
 
Modular & Event driven UI Architecture
Modular & Event driven UI ArchitectureModular & Event driven UI Architecture
Modular & Event driven UI Architecture
 
Html5 phillycc
Html5 phillyccHtml5 phillycc
Html5 phillycc
 
Knockout js
Knockout jsKnockout js
Knockout js
 
Asp.net mvc - Better User Experience with Kendo UI
Asp.net mvc - Better User Experience with Kendo UIAsp.net mvc - Better User Experience with Kendo UI
Asp.net mvc - Better User Experience with Kendo UI
 
Building databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with KnockoutjsBuilding databound JavaScript apps with Knockoutjs
Building databound JavaScript apps with Knockoutjs
 
Profile summary
Profile summaryProfile summary
Profile summary
 
Use Your WebDev Skills to Create Mobile Apps in Telerik Appbuilder (Jonathan ...
Use Your WebDev Skills to Create Mobile Apps in Telerik Appbuilder (Jonathan ...Use Your WebDev Skills to Create Mobile Apps in Telerik Appbuilder (Jonathan ...
Use Your WebDev Skills to Create Mobile Apps in Telerik Appbuilder (Jonathan ...
 

More from Lohith Goudagere Nagaraj

More from Lohith Goudagere Nagaraj (20)

Porting Hybrid Apps to Native Apps
Porting Hybrid Apps to Native AppsPorting Hybrid Apps to Native Apps
Porting Hybrid Apps to Native Apps
 
Hybrid Mobile App Development With Cordova
Hybrid Mobile App Development With CordovaHybrid Mobile App Development With Cordova
Hybrid Mobile App Development With Cordova
 
Building Web Apps & APIs With Node JS
Building Web Apps & APIs With Node JSBuilding Web Apps & APIs With Node JS
Building Web Apps & APIs With Node JS
 
Even Quicker Development with Xamarin Forms Using Telerik UI for Xamarin
Even Quicker Development with Xamarin Forms Using Telerik UI for XamarinEven Quicker Development with Xamarin Forms Using Telerik UI for Xamarin
Even Quicker Development with Xamarin Forms Using Telerik UI for Xamarin
 
You Know Angular 2, You Know Native Mobile App Development
You Know Angular 2, You Know Native Mobile App DevelopmentYou Know Angular 2, You Know Native Mobile App Development
You Know Angular 2, You Know Native Mobile App Development
 
Connecting your .Net Applications to NoSQL Databases - MongoDB & Cassandra
Connecting your .Net Applications to NoSQL Databases - MongoDB & CassandraConnecting your .Net Applications to NoSQL Databases - MongoDB & Cassandra
Connecting your .Net Applications to NoSQL Databases - MongoDB & Cassandra
 
Angular JS 2.0 & React with Kendo UI
Angular JS 2.0 & React with Kendo UIAngular JS 2.0 & React with Kendo UI
Angular JS 2.0 & React with Kendo UI
 
Seamless Access to Data from BI Tools using DataDirect Cloud
Seamless Access to Data from BI Tools using DataDirect CloudSeamless Access to Data from BI Tools using DataDirect Cloud
Seamless Access to Data from BI Tools using DataDirect Cloud
 
The Bleeding Edge - Whats New in Angular 2
The Bleeding Edge - Whats New in Angular 2The Bleeding Edge - Whats New in Angular 2
The Bleeding Edge - Whats New in Angular 2
 
Introduction to UWP - Universal Windows Platform Application Development
Introduction to UWP - Universal Windows Platform Application DevelopmentIntroduction to UWP - Universal Windows Platform Application Development
Introduction to UWP - Universal Windows Platform Application Development
 
Cross Platform Web Applications Using ASP.NET Core 1.0
Cross Platform Web Applications Using ASP.NET Core 1.0Cross Platform Web Applications Using ASP.NET Core 1.0
Cross Platform Web Applications Using ASP.NET Core 1.0
 
Build Leaner, Faster Web Applications with ASP.NET
Build Leaner, Faster Web Applications with  ASP.NETBuild Leaner, Faster Web Applications with  ASP.NET
Build Leaner, Faster Web Applications with ASP.NET
 
JavaScript Task Runners - Gulp & Grunt
JavaScript Task Runners - Gulp & GruntJavaScript Task Runners - Gulp & Grunt
JavaScript Task Runners - Gulp & Grunt
 
Visual Studio 2015 - Whats New ?
Visual Studio 2015 - Whats New ?Visual Studio 2015 - Whats New ?
Visual Studio 2015 - Whats New ?
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
Online Spreadsheet for your Web Applications using Kendo UI
Online Spreadsheet for your Web Applications using Kendo UIOnline Spreadsheet for your Web Applications using Kendo UI
Online Spreadsheet for your Web Applications using Kendo UI
 
NativeScript + Push Notifications
NativeScript + Push NotificationsNativeScript + Push Notifications
NativeScript + Push Notifications
 
10 Useful New Features of ECMA Script 6
10 Useful New Features of ECMA Script 610 Useful New Features of ECMA Script 6
10 Useful New Features of ECMA Script 6
 
New Enterprisre Capabilities in Telerik Platform
New Enterprisre Capabilities in Telerik PlatformNew Enterprisre Capabilities in Telerik Platform
New Enterprisre Capabilities in Telerik Platform
 
Creating Custom HTML Helpers in ASP.NET MVC
Creating Custom HTML Helpers in ASP.NET MVCCreating Custom HTML Helpers in ASP.NET MVC
Creating Custom HTML Helpers in ASP.NET MVC
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

MVVM & Validation with Kendo UI

  • 1. Kendo UITHE WAY OF HTML5
  • 2. Introductions Lohith G N Dev Evangelist, Telerik Lohith.nagaraj@telerik.com @kashyapa www.kashyapas.com www.telerikhelper.net
  • 4. Why MVVM ? • Device & OS Proliferation – Desktops, Laptops, Tablets, Phones, Netbooks etc. • Only delivery on all platforms – Web App – Complex on client side, Need to model data on client as well as server • Need to keep up with changes in Server, UI and State of App
  • 5. MVVM • Design Patterns • Acronym – M = Model – V = View – VM = ViewModel • Separate Model (Data) from the View (UI) • View-Model responsible for exposing data objects • Many frameworks available in the market
  • 6. Where Are We Today? A Quick Look At The Problem With Client-Side Development Today
  • 7. The Problem • Multiple Small-Scoped Libraries • Non-Unified Frameworks • Unpredictable Road Maps • Unsupported Code
  • 8. Kendo UI to the Rescue! How It Makes Your JavaScript Development A Piece Of Cake
  • 9. In a Nutshell • JavaScript Library • Based on jQuery • HTML5 • CSS3 • UI Framework Solution – Desktop – Mobile
  • 10. Why Kendo UI? • A Single Package – UI Widgets – Framework – Modular • Data Binding – Data Source – MVVM • Data Visualization • Native-Like & Hybrid Mobile Apps • Latest Web Standards • Aggressive Release Schedule
  • 11. Kendo UI Packages Web • UI Widgets • Framework • Browsers • Desktop • Mobile DataViz • Visualizations • Charts • Gauges Mobile • Hybrid Apps • HTML & CSS • Native UI Kendo UI Complete Kendo UI Complete Wrappers
  • 12. Kendo UI Web • UI Widgets – Grid, Menu, TabStrip, Editor etc. • Client-Side Data Source • MVVM • Templates • Drag & Drop • Animations • Built-In Touch Support
  • 14. MVVM in Kendo UI • 3 core pieces • ObservableObject • ObservableArray • Bindings are supported with UI elements – Attr, Checked, Click, Disabled, Enabled, Events, Html, Invisible, Source, Style, Text, Value, Visible
  • 15. ObservableObject • kendo.data.ObservableObject • Supports change tracking & notifies subscribers • Inherits Observable • var vm = new kendo.data.ObservableObject(,field1:””-) • Var vm = new kendo.observable(,field1:””-)
  • 16. ObservableObject • Fields – uid • Methods – bind – get – parent – set – toJSON • Events – change – set – get
  • 17. ObservableArray • Wraps existing Array with change tracking capabilities • var arr = new kendo.data.ObservableArray([{name:”L”-+) • var arr = new kendo.data.ObservableArray(*“Loh”,”Adi”+) • Provides all Array constructs
  • 19. Validation in Kendo UI Lets check some data
  • 20. HTML5 Form Validation • Validation Attributes - Anticipated feature of HTML5 • Set constraints on HTML inputs • Required, Pattern, Min/Max, HTML5 Data Types • Browser will validate inputs to constraints before form submission • Input fails constraints, browser displays message
  • 21. Problems • HTML5 Form validation is great - But…. • Problems – Old Browsers offer no support to HTML5 – Support in modern browsers incomplete – Browser created validation error messages – difficult to re style • Solution – Augment HTML5 form validation with JS
  • 22. Kendo UI Validator • Augments HTML’s form validation with JS • Works with standard HTML5 form attibs • Automatically makes these work in all browsers (IE7+) • Gives you more customizability • Usage – var validator = $(“#form”).kendoValidator(); – var isValid = validator.validate();
  • 23. Customization • Custom Rules • Custom Validation Messages $("#myform").kendoValidator({ rules: { custom: function(input){ return input.val() === "Test";} }, messages: { custom: "Your name must be Test“ } });