Date post: | 18-Nov-2014 |
Category: |
Technology |
Upload: | itcamp |
View: | 1,252 times |
Download: | 1 times |
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
Fast, Faster … Async ASP.NET
Tiberiu Covaci, Senior Technical Trainer
Many-core
[email protected] / blog.many-core.se / @tibor19
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
IT Camp 2011
• Thanks for coming!
• ITCamp is made possible by our sponsors:
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
Who am I?
• Tiberiu ’Tibi’ Covaci
• Software engineer, over 20 years experience
• MCT since 2004, teaching .NET
• Researcher at KTH • INETA Speaker & Country Lead for Sweden
• Telerik MVP & Insider
• @tibor19
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
Session agenda
• ASP.NET Page lifecycle
• Load test your application
• Asynchronous pages
• Asynchronous actions
• Async support in C# vNext
• Q&A
• Feedback & prizes
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
ASP.NET Page lifecycle
Init
Load
PreRender
PreRender Complete
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
DEMO
Introducing the Application
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
Synchronous vs Ansynchronous
• Synchronous – Call method => Wait for result – One method at a time – Easy to program/understand
• Asynchronous – Call method => Return right away – Result / method completion provided via
callback – Run several methods at the same time – Scalability – Harder to program
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
ASP.NET Asynchronous Page lifecycle
Init
Load
PreRender
PreRender Complete
Async calls
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
DEMO
Asynchronizing the Application
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
Async support in C# vNext
• “Looks like” synchronous programming
• Uses Task/Task<T> behind the courtains
• Two new contextual keywords – async marks a method as asynchrnous
– await yields control while waiting on a task to complete
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
DEMO
Modernizing the Application
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
Summary
• ASP.NET Page lifecycle
• Load test your application
• Asynchronous pages
• Asynchronous actions
• Async support in C# vNext
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
Q&A
@itcampro / #itcampro Premium conference on Microsoft’s Dev and ITPro technologies
Don’t forget!
Get your free Azure pass!
• 30+15 days, no CC req’d
– http://bit.ly/ITCAMP11
– Promo code: ITCAMP11
We want your feedback!
• Win a WP7 smartphone
– Fill in your feedback forms
– Raffle: end of the day