SlideShare uma empresa Scribd logo
1 de 33
Bling-bling with MVC and jQuery Being a pimp without Silverlight Maarten Balliauw	@maartenballiauw Kris van der Mast	@KvdM
Who are we? – Maarten Maarten Balliauw Antwerp, Belgium www.realdolmen.com Focus on web ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, … MVP ASP.NET http://blog.maartenballiauw.be http://twitter.com/maartenballiauw
Who are we? – Kris Kris van der Mast Antwerp, Belgium www.ordina.be Focus on web technologies ASP.NET, ASP.NET MVC, WCF, Silverlight, ... MVP for ASP.NET ASP Insider http://blog.krisvandermast.com http://www.twitter.com/KvdM
Agenda ASP.NET WebForms ASP.NET MVC jQuery Resources Q&A
ASP.NET MVC Mega Very Cool?
The ASP.NET family ASP.NET Dynamic Data  & AJAX Presentation ASP.NET WebForms ASP.NET MVC ASP.NET Core Core  Runtime
ASP.NET WebForms
ASP.NET WebForms Taken programming model from WinForms Fake stateful model Automatic testing is hard
ASP.NET MVC Testability Control over HTML Extensibility It makes you think Learn new concepts “if you are allergic to porc,don’t go work in a sausage factory”
Model-View-Controller in ASP.NET MVC Model (“DTO” between C and V) Controller (Input) Request Response Application Logic View (Presentation)
Characteristics Maintain Clean Separation of Concerns Easy Testing  Red/Green TDD  Highly maintainable applications by default Extensible and Pluggable Support replacing any component of system
Characteristics Enable clean URLs and SEO SEO friendly URL structures Great ASP.NET integration All providers are supported Membership, Caching, Session, … ASP.NET designer in VS2008/VS2010
New in ASP.NET MVC2... Validation Strongly Typed HTML Helpers Templated HTML Helpers Areas Async Controllers
DEMO ASP.NET MVC
jQuery What is jQuery? JavaScript Abstraction “LINQ to DOM” Why use jQuery? Making JavaScript and the DOM suck less Easy to Use Rich Plug-in Ecosystem Cross Browser Support
Money, money, money! $
The Basics jQuery() and $() The ready() Function Effective when DOM is ready jQuery(document).ready(main); $(document).ready(main); $(document).ready(function() { … } ); $(function()  { … } ); function main() {     … }
jQuery Basics jQuery Wrappers jQuery Selectors $(selector) jQuery(selector)
Selectors Basic Selectors #id .class element	 selector1,selector2,selectorN,… * $(this)
Selectors Other Selector Categories Form Attribute Hierarchy Filter Content Child
It gives you power! functionvalidateForm() {     var f = document.forms[0];     var atLeastOneChecked = false; for (var i = 0; i < document.forms[0].length; i++) {         var e = document.forms[0][i]; if (e.type == "checkbox" &&  e.className == "group1" && e.checked) { atLeastOneChecked = true;         }     } if (!atLeastOneChecked) {         alert("Please check at least one item!");     }     return atLeastOneChecked; } functionvalidateForm() { if ($(".group1:checked").length == 0) { alert("Please check at least one item!");         return false; }    return true; }
Unobtrusive JavaScript Start with “plain old HTML” Layer on some CSS styling providing visual style Layer on some JavaScript providing enhanced behaviour
Events Unobtrusive JavaScript Cross Browser Support $(<selector>).eventname(<functionpointer> or inline);
Event Binding Binds events to matched sets $(selector).bind(“eventName",function);
Chaining Powerful Fluent $(selector).method $(selector).method({…}).method2({…});
Manipulating HTML html() Gets/sets the innerHTML  text() Gets/sets the innerText Method, not property syntax Other Methods append() prepend() appendTo() prependTo() remove
Plug-ins Rich Plug-in Ecosystem Thousands available Downloadable .js files You can create your own http://jQuery.com/plugins
Ajax Web Services WCF XMLHttpRequest $.ajax()
Ajax $.ajax({       type: "POST",       url: webMethod,       data: parameters,       contentType: "application/json; charset=utf-8",       dataType: "json",       success: function(msg) {                   $(selector).html(msg.d);       },       error: function(e){               $(selector).html(“error message");                                 } });
DEMO Want to see it being used?
Resources Learn more!
Resources http://www.jquery.com http://www.asp.net/mvc http://jqueryui.com/demos/ http://www.bing.com http://www.trirand.net/demoaspnetmvc.aspx
Questions? More information? http://asp.net/mvc http://jquery.com Contact us! http://blog.maartenballiauw.be http://blog.krisvandermast.com Thank you!

Mais conteúdo relacionado

Mais procurados

Build an App with JavaScript and jQuery (DTLA, 06/21)
Build an App with JavaScript and jQuery (DTLA, 06/21)Build an App with JavaScript and jQuery (DTLA, 06/21)
Build an App with JavaScript and jQuery (DTLA, 06/21)Thinkful
 
EXPERTALKS: Jul 2012 - Build using Gradle
EXPERTALKS: Jul 2012 - Build using GradleEXPERTALKS: Jul 2012 - Build using Gradle
EXPERTALKS: Jul 2012 - Build using GradleEXPERTALKS
 
Creating asynchronous flows on AWS
Creating asynchronous flows on AWSCreating asynchronous flows on AWS
Creating asynchronous flows on AWSMetin Kale
 
Queueing at the Checkout
Queueing at the CheckoutQueueing at the Checkout
Queueing at the CheckoutWilliam Tracz
 
Building single page applications with angular.js
Building single page applications with angular.jsBuilding single page applications with angular.js
Building single page applications with angular.jsDieter De Mesmaeker
 
Creating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with ReactCreating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with ReactJp DeVries
 
Polymer, HTML includes y core-ajax
Polymer, HTML includes y core-ajaxPolymer, HTML includes y core-ajax
Polymer, HTML includes y core-ajaxRadamantis Torres
 
JQuery Conf Berlin - Ondrisek - From Java To AngularJS (without pain)
JQuery Conf Berlin - Ondrisek - From Java To AngularJS (without pain)JQuery Conf Berlin - Ondrisek - From Java To AngularJS (without pain)
JQuery Conf Berlin - Ondrisek - From Java To AngularJS (without pain)Barbara Ondrisek
 
Bentobox Exercise
Bentobox ExerciseBentobox Exercise
Bentobox ExerciseEster Kais
 
Breaking the Server-Client Divide with Node.js and React
Breaking the Server-Client Divide with Node.js and ReactBreaking the Server-Client Divide with Node.js and React
Breaking the Server-Client Divide with Node.js and ReactDejan Glozic
 
WebNano - Ideas for Web Frameworks
WebNano - Ideas for Web FrameworksWebNano - Ideas for Web Frameworks
WebNano - Ideas for Web Frameworksguestf89f9cb
 
Access Net Web Services From Java
Access  Net Web Services From JavaAccess  Net Web Services From Java
Access Net Web Services From JavaGuo Albert
 
Custom routing in asp.net mvc
Custom routing in asp.net mvcCustom routing in asp.net mvc
Custom routing in asp.net mvcCapgemini India
 
Rails-like Asp.Net Development Shared
Rails-like Asp.Net Development SharedRails-like Asp.Net Development Shared
Rails-like Asp.Net Development Sharedcurtismitchell
 
Which watcher watches CloudWatch
Which watcher watches CloudWatch Which watcher watches CloudWatch
Which watcher watches CloudWatch David Lutz
 
Dynamic to-static
Dynamic to-staticDynamic to-static
Dynamic to-staticbiilmann
 

Mais procurados (20)

Build an App with JavaScript and jQuery (DTLA, 06/21)
Build an App with JavaScript and jQuery (DTLA, 06/21)Build an App with JavaScript and jQuery (DTLA, 06/21)
Build an App with JavaScript and jQuery (DTLA, 06/21)
 
WebMatrix
WebMatrixWebMatrix
WebMatrix
 
EXPERTALKS: Jul 2012 - Build using Gradle
EXPERTALKS: Jul 2012 - Build using GradleEXPERTALKS: Jul 2012 - Build using Gradle
EXPERTALKS: Jul 2012 - Build using Gradle
 
Creating asynchronous flows on AWS
Creating asynchronous flows on AWSCreating asynchronous flows on AWS
Creating asynchronous flows on AWS
 
Queueing at the Checkout
Queueing at the CheckoutQueueing at the Checkout
Queueing at the Checkout
 
Building single page applications with angular.js
Building single page applications with angular.jsBuilding single page applications with angular.js
Building single page applications with angular.js
 
Creating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with ReactCreating Hyper Performant Web Apps with React
Creating Hyper Performant Web Apps with React
 
Polymer, HTML includes y core-ajax
Polymer, HTML includes y core-ajaxPolymer, HTML includes y core-ajax
Polymer, HTML includes y core-ajax
 
Sprockets
SprocketsSprockets
Sprockets
 
What is new in ASP.NET Core
What is new in ASP.NET CoreWhat is new in ASP.NET Core
What is new in ASP.NET Core
 
JQuery Conf Berlin - Ondrisek - From Java To AngularJS (without pain)
JQuery Conf Berlin - Ondrisek - From Java To AngularJS (without pain)JQuery Conf Berlin - Ondrisek - From Java To AngularJS (without pain)
JQuery Conf Berlin - Ondrisek - From Java To AngularJS (without pain)
 
Bentobox Exercise
Bentobox ExerciseBentobox Exercise
Bentobox Exercise
 
Breaking the Server-Client Divide with Node.js and React
Breaking the Server-Client Divide with Node.js and ReactBreaking the Server-Client Divide with Node.js and React
Breaking the Server-Client Divide with Node.js and React
 
WebNano - Ideas for Web Frameworks
WebNano - Ideas for Web FrameworksWebNano - Ideas for Web Frameworks
WebNano - Ideas for Web Frameworks
 
Ajax3
Ajax3Ajax3
Ajax3
 
Access Net Web Services From Java
Access  Net Web Services From JavaAccess  Net Web Services From Java
Access Net Web Services From Java
 
Custom routing in asp.net mvc
Custom routing in asp.net mvcCustom routing in asp.net mvc
Custom routing in asp.net mvc
 
Rails-like Asp.Net Development Shared
Rails-like Asp.Net Development SharedRails-like Asp.Net Development Shared
Rails-like Asp.Net Development Shared
 
Which watcher watches CloudWatch
Which watcher watches CloudWatch Which watcher watches CloudWatch
Which watcher watches CloudWatch
 
Dynamic to-static
Dynamic to-staticDynamic to-static
Dynamic to-static
 

Semelhante a Being a pimp without silverlight - ASP.NET MVC 2 and jQuery

CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklum Ukraine
 
JSF Component Behaviors
JSF Component BehaviorsJSF Component Behaviors
JSF Component BehaviorsAndy Schwartz
 
Scti 2011 minicurso jquery
Scti 2011 minicurso jqueryScti 2011 minicurso jquery
Scti 2011 minicurso jqueryciberglo
 
Enhance Web Performance
Enhance Web PerformanceEnhance Web Performance
Enhance Web PerformanceAdam Lu
 
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar TechnologiesRob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologiesgeorge.james
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Chris Alfano
 
Web performance essentials - Goodies
Web performance essentials - GoodiesWeb performance essentials - Goodies
Web performance essentials - GoodiesJerry Emmanuel
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introductionTomi Juhola
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCSunpawet Somsin
 
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)Dave Bost
 
Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real us...
Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real us...Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real us...
Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real us...Fwdays
 
Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...Thinqloud
 
JavaScript Misunderstood
JavaScript MisunderstoodJavaScript Misunderstood
JavaScript MisunderstoodBhavya Siddappa
 

Semelhante a Being a pimp without silverlight - ASP.NET MVC 2 and jQuery (20)

CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce
 
JSF Component Behaviors
JSF Component BehaviorsJSF Component Behaviors
JSF Component Behaviors
 
Scti 2011 minicurso jquery
Scti 2011 minicurso jqueryScti 2011 minicurso jquery
Scti 2011 minicurso jquery
 
Enhance Web Performance
Enhance Web PerformanceEnhance Web Performance
Enhance Web Performance
 
Walther Aspnet4
Walther Aspnet4Walther Aspnet4
Walther Aspnet4
 
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar TechnologiesRob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
 
Web performance essentials - Goodies
Web performance essentials - GoodiesWeb performance essentials - Goodies
Web performance essentials - Goodies
 
Introduccion a HTML5
Introduccion a HTML5Introduccion a HTML5
Introduccion a HTML5
 
html5
html5html5
html5
 
Asp.Net MVC Intro
Asp.Net MVC IntroAsp.Net MVC Intro
Asp.Net MVC Intro
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introduction
 
ASP.NET 4.0 Roadmap
ASP.NET 4.0 RoadmapASP.NET 4.0 Roadmap
ASP.NET 4.0 Roadmap
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
 
Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real us...
Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real us...Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real us...
Alexey Kupriyanenko "The State of Modern JavaScript and Web in 2020 - Real us...
 
Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...Learning jQuery made exciting in an interactive session by one of our team me...
Learning jQuery made exciting in an interactive session by one of our team me...
 
You Know WebOS
You Know WebOSYou Know WebOS
You Know WebOS
 
JavaScript Misunderstood
JavaScript MisunderstoodJavaScript Misunderstood
JavaScript Misunderstood
 

Mais de Kris van der Mast

Mais de Kris van der Mast (9)

Microsoft chatbots - Conversations as a Platform
Microsoft chatbots - Conversations as a PlatformMicrosoft chatbots - Conversations as a Platform
Microsoft chatbots - Conversations as a Platform
 
Visual Studio Code
Visual Studio CodeVisual Studio Code
Visual Studio Code
 
Meteor.js
Meteor.jsMeteor.js
Meteor.js
 
F12 tools in Edge
F12 tools in EdgeF12 tools in Edge
F12 tools in Edge
 
Orchard - the new cms in town
Orchard -  the new cms in townOrchard -  the new cms in town
Orchard - the new cms in town
 
A second life in the cloud for existing applications
A second life in the cloud for existing applicationsA second life in the cloud for existing applications
A second life in the cloud for existing applications
 
Azug feweb2010
Azug feweb2010Azug feweb2010
Azug feweb2010
 
Being a pimp without silverlight
Being a pimp without silverlightBeing a pimp without silverlight
Being a pimp without silverlight
 
Leb Dev Mvc2
Leb Dev Mvc2Leb Dev Mvc2
Leb Dev Mvc2
 

Último

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Último (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

Being a pimp without silverlight - ASP.NET MVC 2 and jQuery

  • 1. Bling-bling with MVC and jQuery Being a pimp without Silverlight Maarten Balliauw @maartenballiauw Kris van der Mast @KvdM
  • 2. Who are we? – Maarten Maarten Balliauw Antwerp, Belgium www.realdolmen.com Focus on web ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, … MVP ASP.NET http://blog.maartenballiauw.be http://twitter.com/maartenballiauw
  • 3. Who are we? – Kris Kris van der Mast Antwerp, Belgium www.ordina.be Focus on web technologies ASP.NET, ASP.NET MVC, WCF, Silverlight, ... MVP for ASP.NET ASP Insider http://blog.krisvandermast.com http://www.twitter.com/KvdM
  • 4. Agenda ASP.NET WebForms ASP.NET MVC jQuery Resources Q&A
  • 5. ASP.NET MVC Mega Very Cool?
  • 6. The ASP.NET family ASP.NET Dynamic Data & AJAX Presentation ASP.NET WebForms ASP.NET MVC ASP.NET Core Core Runtime
  • 8. ASP.NET WebForms Taken programming model from WinForms Fake stateful model Automatic testing is hard
  • 9. ASP.NET MVC Testability Control over HTML Extensibility It makes you think Learn new concepts “if you are allergic to porc,don’t go work in a sausage factory”
  • 10. Model-View-Controller in ASP.NET MVC Model (“DTO” between C and V) Controller (Input) Request Response Application Logic View (Presentation)
  • 11. Characteristics Maintain Clean Separation of Concerns Easy Testing Red/Green TDD Highly maintainable applications by default Extensible and Pluggable Support replacing any component of system
  • 12. Characteristics Enable clean URLs and SEO SEO friendly URL structures Great ASP.NET integration All providers are supported Membership, Caching, Session, … ASP.NET designer in VS2008/VS2010
  • 13. New in ASP.NET MVC2... Validation Strongly Typed HTML Helpers Templated HTML Helpers Areas Async Controllers
  • 15. jQuery What is jQuery? JavaScript Abstraction “LINQ to DOM” Why use jQuery? Making JavaScript and the DOM suck less Easy to Use Rich Plug-in Ecosystem Cross Browser Support
  • 17. The Basics jQuery() and $() The ready() Function Effective when DOM is ready jQuery(document).ready(main); $(document).ready(main); $(document).ready(function() { … } ); $(function() { … } ); function main() { … }
  • 18. jQuery Basics jQuery Wrappers jQuery Selectors $(selector) jQuery(selector)
  • 19. Selectors Basic Selectors #id .class element selector1,selector2,selectorN,… * $(this)
  • 20. Selectors Other Selector Categories Form Attribute Hierarchy Filter Content Child
  • 21. It gives you power! functionvalidateForm() { var f = document.forms[0]; var atLeastOneChecked = false; for (var i = 0; i < document.forms[0].length; i++) { var e = document.forms[0][i]; if (e.type == "checkbox" && e.className == "group1" && e.checked) { atLeastOneChecked = true; } } if (!atLeastOneChecked) { alert("Please check at least one item!"); } return atLeastOneChecked; } functionvalidateForm() { if ($(".group1:checked").length == 0) { alert("Please check at least one item!"); return false; } return true; }
  • 22. Unobtrusive JavaScript Start with “plain old HTML” Layer on some CSS styling providing visual style Layer on some JavaScript providing enhanced behaviour
  • 23. Events Unobtrusive JavaScript Cross Browser Support $(<selector>).eventname(<functionpointer> or inline);
  • 24. Event Binding Binds events to matched sets $(selector).bind(“eventName",function);
  • 25. Chaining Powerful Fluent $(selector).method $(selector).method({…}).method2({…});
  • 26. Manipulating HTML html() Gets/sets the innerHTML text() Gets/sets the innerText Method, not property syntax Other Methods append() prepend() appendTo() prependTo() remove
  • 27. Plug-ins Rich Plug-in Ecosystem Thousands available Downloadable .js files You can create your own http://jQuery.com/plugins
  • 28. Ajax Web Services WCF XMLHttpRequest $.ajax()
  • 29. Ajax $.ajax({ type: "POST", url: webMethod, data: parameters, contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { $(selector).html(msg.d); }, error: function(e){ $(selector).html(“error message"); } });
  • 30. DEMO Want to see it being used?
  • 32. Resources http://www.jquery.com http://www.asp.net/mvc http://jqueryui.com/demos/ http://www.bing.com http://www.trirand.net/demoaspnetmvc.aspx
  • 33. Questions? More information? http://asp.net/mvc http://jquery.com Contact us! http://blog.maartenballiauw.be http://blog.krisvandermast.com Thank you!

Notas do Editor

  1. MVC is a design pattern that stands for Model-View-Controller. What is strives to do is separate the concerns of an application’s presentation layer by assigning specific roles to the three different components.The Controller is responsible for handling all user input. Once input has been received, the Controller will perform any operations/actions it needs to, which might include interacting with the Model.The Model represents the core concern/logic of the application. Once the Controller retrieves some model data and performs any work with the model/etc it needs to it constructs a presentation model that describes the model in terms the View can understand.The View is the visual representation of the model. It presents the model data to the actual user in a way that is meaningful. In a web application, this would typically be HTML.With these three pieces in place, your presentation layer becomes cleanly separated in such a way that each component can be developed/tested independently.
  2. -Model has onepurpose-Controller has onepurpose-View really handles the view, no business logic in there!-Each part is replacable-Source code availableonCodePlex. Not open source, butenablesyou to buildyourown, private flavour
  3. -Usersexpect clean URLsnowadays-Notreplacing ASP.NET  built on top of it
  4. -Usersexpect clean URLsnowadays-Notreplacing ASP.NET  built on top of it