SlideShare uma empresa Scribd logo
1 de 55
UsabilityAJAX and other ASP.NET Features Presented by Peter Gfader Senior Software Architect
Peter Gfader SSA @ SSW Loves C# and .NET (Java not anymore) Specializes in  Windows Forms ASP.NET TFS testing Automated tests Silverlight
Homework? Add validation controls onto the EditTemplate of the FormView.   Required Fields 	... Regular Expression Postal Code (must be a number)
Course Website http://sharepoint.ssw.com.au/Training/UTSNET/ Course Timetable Course Materials
Mono  Supports ASP.NET 1.1 and most of ASP.NET 2.0http://mono-project.com/FAQ:_ASP.NET Web server Hosting Mono Apache with mod_mono FastCGI XSP http://mono-project.com/ASP.NET Fist session questions
Postback Last week
Postback Bring data to web Databinding Last week Data Data source
Postback Bring data to web Databinding Passing parameters Validation Last week Client Show/view Data Enter Client Server
Database connection with LINQ2SQL Where is it? How can I change it? How do I maintain it across different servers/installations? Last week - Additionals
Session 8: Rich Web Forms AJAX & Other Features
Agenda User experience Usability AJAX Cross Page Post-backs Validation Groups Maintaining Scroll Positions Control Focus, Default Buttons, Error Focus
Agenda Client Script Handlers XML Databinding URL Rewriting/Mapping for Vanity Urls ASP.NET 4 SSW Rules to better…
http://www.ebay.com.au/ Search drill down http://www.altavista.com/image/ Searching for images http://secretgeek.net/W3SCG.asp Code generator Browsing experience - bad
Site is slow Site is a static something Site is back and forth of data Flicker on load Focus gets lost on working with page Page gives no feedback during input Losing context during navigation Site is not alive Pain
User experience
User experience
UX - Look
UX - Usability
Make site feel alive React fast Interact with user “Joy of use” UX - Feel
http://www.facebook.com/ Photo gallery http://www.live.com/?scope=images Drill down http://www.google.com/ig http://maps.google.com/ http://docs.google.com http://secretgeek.net/wscg.htm Code generator Browsing experience - Good
How can we improve UX
AJAX?
What is AJAX? Not a cleaning product... A technology that enables rich interactive web applications RIA Asynchronous JavascriptAnd XML
How does AJAX work? Page loads up [23KB] Parts of the page uses javascript to send a request to the webserver/webservice asking for some data [3 KB] The javascript on the page then renders the returned data on the current page without needing to refresh the whole page[8 KB]
How does ASP.NET AJAX work? UpdatePanel posts partial page back ScriptManager manages client script for ASP.NET AJAX
Why should I use AJAX? We just retrieve the information we need In the past we had to retrieve the whole page again! Makes your applications more responsive Users can browse around during AJAX call Users don’t get lost by presenting them a new page
Who uses AJAX? Google was a big proponent of AJAX Almost all new sites use some form of AJAX http://www.go2web20.net/
How do I use AJAX? ,[object Object],http://ajaxcontroltoolkit.codeplex.com/ Download the Control Toolkit
Recap - Microsoft AJAX Easy way to enable AJAX on your web site UpdatePanel UpdateProgress Many user contributed controls in the AJAX Toolkit. http://ajax.asp.net/ajaxtoolkit Highlights: Autocomplete (like google suggest) Calendar Filtered Text Box
Commercial AJAX Frameworks for .NET Component Art  www.componentart.com RadControls www.telerik.com Infragistics www.infragistics.com
Other cool features URL Rewriting XML Databinding Validation Groups Cross Page Posting
What’s new in ASP.NET 4.0
SEO – Routing & Permanent Redirect... Google Juice Live Data Binding... Enhancements to Dynamic Data MVC QueryExtender Control Deployment ASP.NET 4
What looks nicer?
Ugly URLs http://www.ssw.com.au/ssw/Products/ProdCategoryList.aspx?GroupCategoryID=10DOTNET http://www.ssw.com.au/ssw/Products/ProdCategoryList.aspx?GroupCategoryID=1SQL Nice URLs http://www.ssw.com.au/Products/DotNet http://www.ssw.com.au/Products/SQLServer Make URLs look nice P01
Broken link!
protectedvoidApplication_BeginRequest(object sender, EventArgs e) {     if (Request.FilePath == "/about-us.aspx")      {          Response.Redirect ("/about.aspx", true);     }  } Response.Redirect
protectedvoidApplication_BeginRequest(object sender, EventArgs e) {      if (Request.FilePath == "/about-us.aspx")      {          Response.RedirectPermanent("/about.aspx", true);      } } Response.RedirectPermanent P02
What is the difference then? Response.Redirect("/products.aspx", true); Response.RedirectPermanent("/about.aspx", true); Behind the scenes
Response.Status = "301 Moved Permanently"; Response.StatusCode = 301;    Response.AddHeader("Location","/new-page.asp"); Response.End(); Note: Can be done already with ASP.NET
? Add code to Global.asax to log 404s to a database (OLD_URL, NEW_URL) Maintain the NEW_URL field Change Global.asax to: Look up the 404 in the database If you find a broken link do a permanent redirect to the new URL Otherwise insert broken link 404 Maintenance #1
? Bing Webmaster center,  Google Webmaster tools,  ELMAH,  IIS SEO toolkit 404 Maintenance #2
Recommendations and How-to’s Make content search engine-friendly Improve volume and quality of traffic Control how search engines access and display Web content  Inform search engines about locations that are available for indexing Show broken pages IIS SEO toolkit
Rewrite and redirect URLs Handles requests before ASP.NET is aware of (performance!!) Rewrite module for IIS7 P03
Allow client side data binding in javascript Can bind to  JSON objects ADO.NET Data Services Live Binding P04
Two way binding in ASP.NET (like Silverlight or WPF) <ulid="imageListView"class="list sys-template">         <li>             <spanclass="name">{{ Name }}</span>             <spanclass="value">{{ Description }}</span>         </li>     </ul> Live Binding
Instead of <%# Eval(“FirstName”) %> Use XAML style binding {{FirstName}} – One way/One time binding { binding FirstName, mode=twoWay } – Two way binding Support for converters {binding Height, convert=toFeet, convertBack=fromFeet} Summary - Live Binding is cool
New field templates for URLs and Email Addresses Support for inheritance in the data model Support for Many to Many in EF Support for Enums Dynamic Data Enhancements
ASP.NET rocks!!
SSW Standards and Rules
Google Ajax playground http://code.google.com/apis/ajax/playground/ http://code.google.com/apis/ajaxlibs/ FireBug http://getfirebug.com/ YSlow http://developer.yahoo.com/yslow/ Ajax Tutorial http://www.w3schools.com/Ajax/ Resources
3things… PeterGfader@ssw.com.au http://peitor.blogspot.com twitter.com/peitor

Mais conteúdo relacionado

Mais procurados

Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web application
Rahul Bansal
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
sasidhar
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentation
teach4uin
 

Mais procurados (20)

ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
 
Tutorial asp.net
Tutorial  asp.netTutorial  asp.net
Tutorial asp.net
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
 
All About Asp Net 4 0 Hosam Kamel
All About Asp Net 4 0  Hosam KamelAll About Asp Net 4 0  Hosam Kamel
All About Asp Net 4 0 Hosam Kamel
 
Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010
 
Build a SharePoint website in 60 minutes
Build a SharePoint website in 60 minutesBuild a SharePoint website in 60 minutes
Build a SharePoint website in 60 minutes
 
Access SharePoint Remotely
Access SharePoint RemotelyAccess SharePoint Remotely
Access SharePoint Remotely
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web application
 
Deep-dive building solutions on the SharePoint Framework
Deep-dive building solutions on the SharePoint FrameworkDeep-dive building solutions on the SharePoint Framework
Deep-dive building solutions on the SharePoint Framework
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
 
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentation
 
ECS19 Bert Jansen - Modernizing your existing sites
ECS19 Bert Jansen - Modernizing your existing sitesECS19 Bert Jansen - Modernizing your existing sites
ECS19 Bert Jansen - Modernizing your existing sites
 
Developing Sandbox Solutions
Developing Sandbox SolutionsDeveloping Sandbox Solutions
Developing Sandbox Solutions
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
Asp.net
 Asp.net Asp.net
Asp.net
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 

Destaque (6)

ASP.NET, AJAX and jQuery
ASP.NET, AJAX and jQueryASP.NET, AJAX and jQuery
ASP.NET, AJAX and jQuery
 
Introducing Asp.Net Ajax 4.0 Preview
Introducing Asp.Net Ajax 4.0 PreviewIntroducing Asp.Net Ajax 4.0 Preview
Introducing Asp.Net Ajax 4.0 Preview
 
A Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NETA Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NET
 
Learn ASP.NET AJAX in 5 Minutes
Learn ASP.NET AJAX in 5 MinutesLearn ASP.NET AJAX in 5 Minutes
Learn ASP.NET AJAX in 5 Minutes
 
Introduction To Asp.Net Ajax
Introduction To Asp.Net AjaxIntroduction To Asp.Net Ajax
Introduction To Asp.Net Ajax
 
Ajax and ASP.NET AJAX
Ajax and ASP.NET AJAXAjax and ASP.NET AJAX
Ajax and ASP.NET AJAX
 

Semelhante a Usability AJAX and other ASP.NET Features

ASP.NET 4 and AJAX
ASP.NET 4 and AJAXASP.NET 4 and AJAX
ASP.NET 4 and AJAX
KulveerSingh
 
Reach End Users With Next Generation Web Applications
Reach End Users With Next Generation Web ApplicationsReach End Users With Next Generation Web Applications
Reach End Users With Next Generation Web Applications
Jeff Blankenburg
 
New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0
Dima Maleev
 
Creating Dynamic Web Application Using ASP.Net 3 5_MVP Alezandra Buencamino N...
Creating Dynamic Web Application Using ASP.Net 3 5_MVP Alezandra Buencamino N...Creating Dynamic Web Application Using ASP.Net 3 5_MVP Alezandra Buencamino N...
Creating Dynamic Web Application Using ASP.Net 3 5_MVP Alezandra Buencamino N...
Quek Lilian
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
Adil Mughal
 

Semelhante a Usability AJAX and other ASP.NET Features (20)

Walther Aspnet4
Walther Aspnet4Walther Aspnet4
Walther Aspnet4
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
ASP.NET 4 and AJAX
ASP.NET 4 and AJAXASP.NET 4 and AJAX
ASP.NET 4 and AJAX
 
Reach End Users With Next Generation Web Applications
Reach End Users With Next Generation Web ApplicationsReach End Users With Next Generation Web Applications
Reach End Users With Next Generation Web Applications
 
New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0
 
Introduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and SilverlightIntroduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and Silverlight
 
Creating Dynamic Web Application Using ASP.Net 3 5_MVP Alezandra Buencamino N...
Creating Dynamic Web Application Using ASP.Net 3 5_MVP Alezandra Buencamino N...Creating Dynamic Web Application Using ASP.Net 3 5_MVP Alezandra Buencamino N...
Creating Dynamic Web Application Using ASP.Net 3 5_MVP Alezandra Buencamino N...
 
Visual Studio2010
Visual Studio2010Visual Studio2010
Visual Studio2010
 
Web API with ASP.NET MVC by Software development company in india
Web API with ASP.NET  MVC  by Software development company in indiaWeb API with ASP.NET  MVC  by Software development company in india
Web API with ASP.NET MVC by Software development company in india
 
Asp dot net long
Asp dot net longAsp dot net long
Asp dot net long
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
 
Web development concepts using microsoft technologies
Web development concepts using microsoft technologiesWeb development concepts using microsoft technologies
Web development concepts using microsoft technologies
 
The Future of ASP.NET
The Future of ASP.NETThe Future of ASP.NET
The Future of ASP.NET
 
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...
New Features Of Microsoft Visual Studio 2008 And .Net Framework 3.5 To Comsof...
 
ASP.NET OVERVIEW
ASP.NET OVERVIEWASP.NET OVERVIEW
ASP.NET OVERVIEW
 
ASP.NET WEB API Training
ASP.NET WEB API TrainingASP.NET WEB API Training
ASP.NET WEB API Training
 
SynapseIndia asp.net2.0 ajax Development
SynapseIndia asp.net2.0 ajax DevelopmentSynapseIndia asp.net2.0 ajax Development
SynapseIndia asp.net2.0 ajax Development
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
 
Real-Time Web Applications with ASP.NET WebAPI and SignalR
Real-Time Web Applications with ASP.NET WebAPI and SignalRReal-Time Web Applications with ASP.NET WebAPI and SignalR
Real-Time Web Applications with ASP.NET WebAPI and SignalR
 
Entity framework and how to use it
Entity framework and how to use itEntity framework and how to use it
Entity framework and how to use it
 

Mais de Peter Gfader

SQL Server - Full text search
SQL Server - Full text searchSQL Server - Full text search
SQL Server - Full text search
Peter Gfader
 

Mais de Peter Gfader (20)

Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity
 
You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019
You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019
You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019
 
You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)
You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)
You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)
 
How to make more impact as an engineer
How to make more impact as an engineerHow to make more impact as an engineer
How to make more impact as an engineer
 
13 explosive things you should try as an agilist
13 explosive things you should try as an agilist13 explosive things you should try as an agilist
13 explosive things you should try as an agilist
 
You cant be agile if your code sucks
You cant be agile if your code sucksYou cant be agile if your code sucks
You cant be agile if your code sucks
 
Use Scrum and Continuous Delivery to innovate like crazy!
Use Scrum and Continuous Delivery to innovate like crazy!Use Scrum and Continuous Delivery to innovate like crazy!
Use Scrum and Continuous Delivery to innovate like crazy!
 
Innovation durch Scrum und Continuous Delivery
Innovation durch Scrum und Continuous DeliveryInnovation durch Scrum und Continuous Delivery
Innovation durch Scrum und Continuous Delivery
 
Speed = $$$
Speed = $$$Speed = $$$
Speed = $$$
 
Qcon london2012 recap
Qcon london2012 recapQcon london2012 recap
Qcon london2012 recap
 
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeployContinuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeploy
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...
 
Clean Code Development
Clean Code DevelopmentClean Code Development
Clean Code Development
 
Data Mining with SQL Server 2008
Data Mining with SQL Server 2008Data Mining with SQL Server 2008
Data Mining with SQL Server 2008
 
SSAS - Other Cube Browsers
SSAS - Other Cube BrowsersSSAS - Other Cube Browsers
SSAS - Other Cube Browsers
 
Reports with SQL Server Reporting Services
Reports with SQL Server Reporting ServicesReports with SQL Server Reporting Services
Reports with SQL Server Reporting Services
 
OLAP – Creating Cubes with SQL Server Analysis Services
OLAP – Creating Cubes with SQL Server Analysis ServicesOLAP – Creating Cubes with SQL Server Analysis Services
OLAP – Creating Cubes with SQL Server Analysis Services
 
Business Intelligence with SQL Server
Business Intelligence with SQL ServerBusiness Intelligence with SQL Server
Business Intelligence with SQL Server
 
SQL Server - Full text search
SQL Server - Full text searchSQL Server - Full text search
SQL Server - Full text search
 
Work with data in ASP.NET
Work with data in ASP.NETWork with data in ASP.NET
Work with data in ASP.NET
 

Último

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Último (20)

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 

Usability AJAX and other ASP.NET Features

  • 1. UsabilityAJAX and other ASP.NET Features Presented by Peter Gfader Senior Software Architect
  • 2. Peter Gfader SSA @ SSW Loves C# and .NET (Java not anymore) Specializes in Windows Forms ASP.NET TFS testing Automated tests Silverlight
  • 3. Homework? Add validation controls onto the EditTemplate of the FormView.   Required Fields ... Regular Expression Postal Code (must be a number)
  • 5. Mono Supports ASP.NET 1.1 and most of ASP.NET 2.0http://mono-project.com/FAQ:_ASP.NET Web server Hosting Mono Apache with mod_mono FastCGI XSP http://mono-project.com/ASP.NET Fist session questions
  • 7. Postback Bring data to web Databinding Last week Data Data source
  • 8. Postback Bring data to web Databinding Passing parameters Validation Last week Client Show/view Data Enter Client Server
  • 9. Database connection with LINQ2SQL Where is it? How can I change it? How do I maintain it across different servers/installations? Last week - Additionals
  • 10. Session 8: Rich Web Forms AJAX & Other Features
  • 11. Agenda User experience Usability AJAX Cross Page Post-backs Validation Groups Maintaining Scroll Positions Control Focus, Default Buttons, Error Focus
  • 12. Agenda Client Script Handlers XML Databinding URL Rewriting/Mapping for Vanity Urls ASP.NET 4 SSW Rules to better…
  • 13. http://www.ebay.com.au/ Search drill down http://www.altavista.com/image/ Searching for images http://secretgeek.net/W3SCG.asp Code generator Browsing experience - bad
  • 14. Site is slow Site is a static something Site is back and forth of data Flicker on load Focus gets lost on working with page Page gives no feedback during input Losing context during navigation Site is not alive Pain
  • 19. Make site feel alive React fast Interact with user “Joy of use” UX - Feel
  • 20. http://www.facebook.com/ Photo gallery http://www.live.com/?scope=images Drill down http://www.google.com/ig http://maps.google.com/ http://docs.google.com http://secretgeek.net/wscg.htm Code generator Browsing experience - Good
  • 21. How can we improve UX
  • 22. AJAX?
  • 23. What is AJAX? Not a cleaning product... A technology that enables rich interactive web applications RIA Asynchronous JavascriptAnd XML
  • 24. How does AJAX work? Page loads up [23KB] Parts of the page uses javascript to send a request to the webserver/webservice asking for some data [3 KB] The javascript on the page then renders the returned data on the current page without needing to refresh the whole page[8 KB]
  • 25. How does ASP.NET AJAX work? UpdatePanel posts partial page back ScriptManager manages client script for ASP.NET AJAX
  • 26. Why should I use AJAX? We just retrieve the information we need In the past we had to retrieve the whole page again! Makes your applications more responsive Users can browse around during AJAX call Users don’t get lost by presenting them a new page
  • 27. Who uses AJAX? Google was a big proponent of AJAX Almost all new sites use some form of AJAX http://www.go2web20.net/
  • 28.
  • 29.
  • 30. Recap - Microsoft AJAX Easy way to enable AJAX on your web site UpdatePanel UpdateProgress Many user contributed controls in the AJAX Toolkit. http://ajax.asp.net/ajaxtoolkit Highlights: Autocomplete (like google suggest) Calendar Filtered Text Box
  • 31. Commercial AJAX Frameworks for .NET Component Art www.componentart.com RadControls www.telerik.com Infragistics www.infragistics.com
  • 32. Other cool features URL Rewriting XML Databinding Validation Groups Cross Page Posting
  • 33. What’s new in ASP.NET 4.0
  • 34. SEO – Routing & Permanent Redirect... Google Juice Live Data Binding... Enhancements to Dynamic Data MVC QueryExtender Control Deployment ASP.NET 4
  • 36. Ugly URLs http://www.ssw.com.au/ssw/Products/ProdCategoryList.aspx?GroupCategoryID=10DOTNET http://www.ssw.com.au/ssw/Products/ProdCategoryList.aspx?GroupCategoryID=1SQL Nice URLs http://www.ssw.com.au/Products/DotNet http://www.ssw.com.au/Products/SQLServer Make URLs look nice P01
  • 38. protectedvoidApplication_BeginRequest(object sender, EventArgs e) { if (Request.FilePath == "/about-us.aspx")     {         Response.Redirect ("/about.aspx", true);     } } Response.Redirect
  • 39. protectedvoidApplication_BeginRequest(object sender, EventArgs e) {     if (Request.FilePath == "/about-us.aspx")     {         Response.RedirectPermanent("/about.aspx", true);     } } Response.RedirectPermanent P02
  • 40. What is the difference then? Response.Redirect("/products.aspx", true); Response.RedirectPermanent("/about.aspx", true); Behind the scenes
  • 41. Response.Status = "301 Moved Permanently"; Response.StatusCode = 301;   Response.AddHeader("Location","/new-page.asp"); Response.End(); Note: Can be done already with ASP.NET
  • 42. ? Add code to Global.asax to log 404s to a database (OLD_URL, NEW_URL) Maintain the NEW_URL field Change Global.asax to: Look up the 404 in the database If you find a broken link do a permanent redirect to the new URL Otherwise insert broken link 404 Maintenance #1
  • 43. ? Bing Webmaster center, Google Webmaster tools, ELMAH, IIS SEO toolkit 404 Maintenance #2
  • 44. Recommendations and How-to’s Make content search engine-friendly Improve volume and quality of traffic Control how search engines access and display Web content Inform search engines about locations that are available for indexing Show broken pages IIS SEO toolkit
  • 45. Rewrite and redirect URLs Handles requests before ASP.NET is aware of (performance!!) Rewrite module for IIS7 P03
  • 46.
  • 47.
  • 48. Allow client side data binding in javascript Can bind to JSON objects ADO.NET Data Services Live Binding P04
  • 49. Two way binding in ASP.NET (like Silverlight or WPF) <ulid="imageListView"class="list sys-template"> <li> <spanclass="name">{{ Name }}</span> <spanclass="value">{{ Description }}</span> </li> </ul> Live Binding
  • 50. Instead of <%# Eval(“FirstName”) %> Use XAML style binding {{FirstName}} – One way/One time binding { binding FirstName, mode=twoWay } – Two way binding Support for converters {binding Height, convert=toFeet, convertBack=fromFeet} Summary - Live Binding is cool
  • 51. New field templates for URLs and Email Addresses Support for inheritance in the data model Support for Many to Many in EF Support for Enums Dynamic Data Enhancements
  • 54. Google Ajax playground http://code.google.com/apis/ajax/playground/ http://code.google.com/apis/ajaxlibs/ FireBug http://getfirebug.com/ YSlow http://developer.yahoo.com/yslow/ Ajax Tutorial http://www.w3schools.com/Ajax/ Resources
  • 56. Thank You! Gateway Court Suite 10 81 - 91 Military Road Neutral Bay, Sydney NSW 2089 AUSTRALIA ABN: 21 069 371 900 Phone: + 61 2 9953 3000 Fax: + 61 2 9953 3105 info@ssw.com.auwww.ssw.com.au

Notas do Editor

  1. Peter Gfader shows asp.net AJAX
  2. Java current version 1.6 Update 171.7 released next year 2010Dynamic languages Parallel computingMaybe closures
  3. XSP is a standalone web server written in C# that can be used to run your ASP.NET applications with minimal effort.
  4. Open solution from last weekWhere is the database connection stored?show database connection settingsall forms share same connection
  5. Olga,NovikPaul,RyanJohn,GoulderHeng,LuHongLi,DangFrancois,TranDerek,KouchJessie,NandLeo,MansillaSaurabh,GargJulia,SusantoMaris,GregorioMarwan,ChamasRay,O&apos;BrienGeoffrey,LaytonSkattarSingh,HundalGerard,O&apos;connorShelley,ChenBryan,ChelliahDaniel,HowesLevi,RobertsKunjal,SolankiPatrick,O&apos;NeillJamal,HazimAnthony,ParkerSridevi,GangichettuOlga,NovikPaul,RyanJohn,GoulderHeng,LuHongLi,DangFrancois,TranDerek,KouchJessie,NandLeo,MansillaSaurabh,GargJulia,SusantoMaris,GregorioMarwan,ChamasRay,O&apos;BrienGeoffrey,LaytonSkattarSingh,HundalGerard,O&apos;connorShelley,ChenBryan,ChelliahDaniel,HowesLevi,RobertsKunjal,SolankiPatrick,O&apos;NeillJamal,HazimAnthony,ParkerSridevi,GangichettuOlga,NovikPaul,RyanJohn,GoulderHeng,LuHongLi,DangFrancois,TranDerek,KouchJessie,NandLeo,MansillaSaurabh,GargJulia,SusantoMaris,GregorioMarwan,ChamasRay,O&apos;BrienGeoffrey,LaytonSkattarSingh,HundalGerard,O&apos;connorShelley,ChenBryan,ChelliahDaniel,HowesLevi,RobertsKunjal,SolankiPatrick,O&apos;NeillJamal,HazimAnthony,ParkerSridevi,GangichettußßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßHi $1 $2,We have 10000000 dollars to get out of Nigeria. If would help us with the transfer we will give you a cut.Hong Kong Phooey, number one super guy. Hong Kong Phooey, quicker than the human eye. He&apos;s got style, a groovy style, and a car that just won&apos;t stop. When the going gets tough, he&apos;s really rough, with a Hong Kong Phooey chop (Hi-Ya!). Hong Kong Phooey, number one super guy. Hong Kong Phooey, quicker than the human eye. Hong Kong Phooey, he&apos;s fan-riffic!Ulysses, Ulysses - Soaring through all the galaxies. In search of Earth, flying in to the night. Ulysses, Ulysses - Fighting evil and tyranny, with all his power, and with all of his might. Ulysses - no-one else can do the things you do. Ulysses - like a bolt of thunder from the blue. Ulysses - always fighting all the evil forces bringing peace and justice to all.Thunder, thunder, thundercats, Ho! Thundercats are on the move, Thundercats are loose. Feel the magic, hear the roar, Thundercats are loose. Thunder, thunder, thunder, Thundercats! Thunder, thunder, thunder, Thundercats! Thunder, thunder, thunder, Thundercats! Thunder, thunder, thunder, Thundercats! Thundercats!I never spend much time in school but I taught ladies plenty. It&apos;s true I hire my body out for pay, hey hey. I&apos;ve gotten burned over Cheryl Tiegs, blown up for Raquel Welch. But when I end up in the hay it&apos;s only hay, hey hey. I might jump an open drawbridge, or Tarzan from a vine. &apos;Cause I&apos;m the unknown stuntman that makes Eastwood look so fine.There&apos;s a voice that keeps on calling me. Down the road, that&apos;s where I&apos;ll always be. Every stop I make, I make a new friend. Can&apos;t stay for long, just turn around and I&apos;m gone again. Maybe tomorrow, I&apos;ll want to settle down, Until tomorrow, I&apos;ll just keep moving on.This is my boss, Jonathan Hart, a self-made millionaire, he&apos;s quite a guy. This is Mrs H., she&apos;s gorgeous, she&apos;s one lady who knows how to take care of herself. By the way, my name is Max. I take care of both of them, which ain&apos;t easy, &apos;cause when they met it was MURDER!Hong Kong Phooey, number one super guy. Hong Kong Phooey, quicker than the human eye. He&apos;s got style, a groovy style, and a car that just won&apos;t stop. When the going gets tough, he&apos;s really rough, with a Hong Kong Phooey chop (Hi-Ya!). Hong Kong Phooey, number one super guy. Hong Kong Phooey, quicker than the human eye. Hong Kong Phooey, he&apos;s fan-riffic!Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn&apos;t commit. These men promptly escaped from a maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune. If you have a problem and no one else can help, and if you can find them, maybe you can hire the A-team.Regards,Prince Gfader of Nigeria
  6. Site is ugly
  7. User Experience consists of usability, look and feelWe want to improve the feel and usability
  8. ease with which people can employ a particular tool or other human-made object in order to achieve a particular goal
  9. Make the site feel alive
  10. Code generatorhttp://secretgeek.net/wscg.htmDrill down searchFacebookphotogallery
  11. How can we make our users happy
  12. http://www.google.com.au/webhp?complete=0&amp;hl=enhttp://www.google.com.au/webhp?complete=1&amp;hl=enInstead of posting back and receiving the whole page when you click a buttonOnly get back the bits that have changedOnly send to the server the parameters for updating something (e.g. keyword in a search)This is what happens:User clicks a button to update somethingJavascript makes a post back behind the sceneA request is made to the server and the AJAX components on the server figure out which chunks to send backJavascript on the client side process the data and update the page dynamically
  13. http://www.google.com.au/webhp?complete=0&amp;hl=enhttp://www.google.com.au/webhp?complete=1&amp;hl=enInstead of posting back and receiving the whole page when you click a buttonOnly get back the bits that have changedOnly send to the server the parameters for updating something (e.g. keyword in a search)This is what happens:User clicks a button to update somethingJavascript makes a post back behind the sceneA request is made to the server and the AJAX components on the server figure out which chunks to send backJavascript on the client side process the data and update the page dynamically
  14. As you saw in the earlier example using AJAX Efficiency!If you have a large page (200KB)Each postback will return a page roughly the same size even if you are only updating a labelWith AJAX only the updated label (plus some viewstate and extra AJAX markers) get sent back (~5KB)We can see the actual responses and requests using tools like IE Developer Toolbar, FireBug (Firefox), HTTP FiddlerMore interactive user experienceWhile the user is waiting for an action to occur he/she can be looking at other parts of the siteLike windows formsUsers can see what’s going on (e.g. a progress bar or other loading animation)
  15. http://www.go2web20.net/
  16. http://www.asp.net/ajax/ajaxcontroltoolkit/samples/
  17. XML Databinding&lt;asp:XmlDataSource&gt; control enables data source binding against XML filesOptional XPath expression to scope results&lt;asp:DataList&gt; supports binding against &lt;asp:XMLDataSource&gt; Use “XPath(expression)” statement in templates“XPathSelect(expression)” selects a node listTip: Can be used on mockups!Validation GroupsEnable validation controls to only apply in response to a specific button/actionToday validation controls apply “all or nothing”Indicated via “ValidationGroup” propertySupported by all Validation and Postback controlsControls in ValidationGroup validate with postbackProgrammatic Support for Validating GroupsIf (Page.Validate(“group_name”)) ThenPage.IsValid evaluates ValidationGroupPostbackCross Page PostingASP.NET 2.0 Supports Cross Page PostbacksScenario: Search or lookup button at top of pagePostback target via “PostBackUrl” property&lt;asp:buttonPostBackUrl=“b.aspx” runat=“server”/&gt;Can be declaratively or programmatically setPostback “target page” has full access to server controls for “originating page”Access controls via “Page.PreviousPage” property&lt;%@ PreviousPageVirtualPath=“a.aspx” %&gt;
  18. URL-routing for web forms No dependency on MVCFriendly URL handling for web formsConfiguration model for url routing
  19. Someone links to your wrong AboutUs page
  20. Uses HTTP 301 headerShow Firebug output for this 2 URLs
  21. http://weblogs.asp.net/scottgu/archive/2009/06/03/iis-search-engine-optimization-toolkit.aspxhttp://www.iis.net/extensions/SEOToolkit
  22. Solves both problems: redirecting broken pages and creating nice URLsVarious rule actions. Instead of rewriting a URL, a rule may perform other actions, such as issue an HTTP redirect, abort the request, or send a custom status code to HTTP client.
  23. Easy install with the web platform installer
  24. Nice graphical rule editorRegex pattern matching for requests and rewritesURL rewrite module v2 adds support for outbound response rewriting Fix up the content of any HTTP response by using regular expression pattern matching (e.g. modify links in outgoing response)
  25. http://www.ssw.com.au/SSW/Standards/default.aspx