SlideShare une entreprise Scribd logo
1  sur  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 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!

Contenu connexe

Tendances

Tendances (20)

WebNano - Ideas for Web Frameworks
WebNano - Ideas for Web FrameworksWebNano - Ideas for Web Frameworks
WebNano - Ideas for Web Frameworks
 
Wicket Live on Stage
Wicket Live on StageWicket Live on Stage
Wicket Live on Stage
 
Creating asynchronous flows on AWS
Creating asynchronous flows on AWSCreating asynchronous flows on AWS
Creating asynchronous flows on AWS
 
Ajax and RJS
Ajax and RJSAjax and RJS
Ajax and RJS
 
Sprockets
SprocketsSprockets
Sprockets
 
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)
 
Queueing at the Checkout
Queueing at the CheckoutQueueing at the Checkout
Queueing at the Checkout
 
Ajax3
Ajax3Ajax3
Ajax3
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 
Service workers
Service workersService workers
Service workers
 
Optimizing AngularJS Application
Optimizing AngularJS ApplicationOptimizing AngularJS Application
Optimizing AngularJS Application
 
The Art of Angular in 2016 - Devoxx France 2016
The Art of Angular in 2016 - Devoxx France 2016The Art of Angular in 2016 - Devoxx France 2016
The Art of Angular in 2016 - Devoxx France 2016
 
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
 
Polymer, HTML includes y core-ajax
Polymer, HTML includes y core-ajaxPolymer, HTML includes y core-ajax
Polymer, HTML includes y core-ajax
 
The Art of Angular in 2016 - vJUG24
The Art of Angular in 2016 - vJUG24The Art of Angular in 2016 - vJUG24
The Art of Angular in 2016 - vJUG24
 
RxJS - The Basics & The Future
RxJS - The Basics & The FutureRxJS - The Basics & The Future
RxJS - The Basics & The Future
 
ComponenKit and React Native
ComponenKit and React NativeComponenKit and React Native
ComponenKit and React Native
 
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
 
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...
 
Ian Selby: Server Side JS (SF JS #3)
Ian Selby: Server Side JS (SF JS #3)Ian Selby: Server Side JS (SF JS #3)
Ian Selby: Server Side JS (SF JS #3)
 

En vedette (8)

Search For the Golden Moon Bear Preview
Search For the Golden Moon Bear PreviewSearch For the Golden Moon Bear Preview
Search For the Golden Moon Bear Preview
 
Tricky Issues With Local Search Presentation
Tricky Issues With Local Search PresentationTricky Issues With Local Search Presentation
Tricky Issues With Local Search Presentation
 
20100914 cfi social media watch-no.21
20100914 cfi social media watch-no.2120100914 cfi social media watch-no.21
20100914 cfi social media watch-no.21
 
Michael metcalf
Michael metcalfMichael metcalf
Michael metcalf
 
The Economic Value of Broadcast Innovation
The Economic Value of Broadcast InnovationThe Economic Value of Broadcast Innovation
The Economic Value of Broadcast Innovation
 
DirectoryM
DirectoryMDirectoryM
DirectoryM
 
PHPBenelux 2011 - Seeing PHP throug a blue azure sky
PHPBenelux 2011 - Seeing PHP throug a blue azure skyPHPBenelux 2011 - Seeing PHP throug a blue azure sky
PHPBenelux 2011 - Seeing PHP throug a blue azure sky
 
Layar
LayarLayar
Layar
 

Similaire à Being a pimp without silverlight

Being a pimp without silverlight - ASP.NET MVC 2 and jQuery
Being a pimp without silverlight - ASP.NET MVC 2 and jQueryBeing a pimp without silverlight - ASP.NET MVC 2 and jQuery
Being a pimp without silverlight - ASP.NET MVC 2 and jQuery
Kris van der Mast
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce
Ciklum Ukraine
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
Chris Alfano
 
Enhance Web Performance
Enhance Web PerformanceEnhance Web Performance
Enhance Web Performance
Adam 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 Technologies
george.james
 

Similaire à Being a pimp without silverlight (20)

Being a pimp without silverlight - ASP.NET MVC 2 and jQuery
Being a pimp without silverlight - ASP.NET MVC 2 and jQueryBeing a pimp without silverlight - ASP.NET MVC 2 and jQuery
Being a pimp without silverlight - ASP.NET MVC 2 and jQuery
 
JSF Component Behaviors
JSF Component BehaviorsJSF Component Behaviors
JSF Component Behaviors
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce
 
Scti 2011 minicurso jquery
Scti 2011 minicurso jqueryScti 2011 minicurso jquery
Scti 2011 minicurso jquery
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
 
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
 
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
 
Sherlock Homepage - A detective story about running large web services - NDC ...
Sherlock Homepage - A detective story about running large web services - NDC ...Sherlock Homepage - A detective story about running large web services - NDC ...
Sherlock Homepage - A detective story about running large web services - NDC ...
 
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)
 
JavaScript Misunderstood
JavaScript MisunderstoodJavaScript Misunderstood
JavaScript Misunderstood
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
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...
 
ASP.NET 4.0 Roadmap
ASP.NET 4.0 RoadmapASP.NET 4.0 Roadmap
ASP.NET 4.0 Roadmap
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introduction
 
Sherlock Homepage (Maarten Balliauw)
Sherlock Homepage (Maarten Balliauw)Sherlock Homepage (Maarten Balliauw)
Sherlock Homepage (Maarten Balliauw)
 
Sherlock Homepage - A detective story about running large web services (VISUG...
Sherlock Homepage - A detective story about running large web services (VISUG...Sherlock Homepage - A detective story about running large web services (VISUG...
Sherlock Homepage - A detective story about running large web services (VISUG...
 

Plus de Maarten Balliauw

Plus de Maarten Balliauw (20)

Bringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxBringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptx
 
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
 
Building a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to Space
 
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
 
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
 
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
 
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
 
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchNDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
 
Approaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days PolandApproaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days Poland
 
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
 
Approaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologne
 
CodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory lane
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
 
ConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttling
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NET
 
VISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttling
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Being a pimp without silverlight

  • 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 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!

Notes de l'éditeur

  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