Cloud and Microsoft technologies enthusiast architect in Switzerland RSS 2.0
# Wednesday, November 12, 2008

<Disclaimer>This is personal notes of what I retained during the session. This can be incomplete, partially right or wrong. It is just  part of the notes I took and what retained my attention. Nothing prevents the user to get more information on their favorite web site.</Disclaimer>

Hadi Hariri started by explaining that the ASP.NET MVC framework is based on the routing mechanism that has been part of the ASP.NET frameword itself since the beginning, meaning that it is available for webforms development as well. The only thing is that the ASP.NET MVC framework relies on the MvcHttpHandler class. Basically, routing are declared in the Global.asax file ordered from the more restrictive routing first to the generic one. Like we do for exception catching, meaning that if the most generic routing is declared first, this will be the only one that will be used. Routing can use constraints, such as regular expression or even on custom classes, implementing the Match method. Then, during the first demo, Hadi shows us hot to define routes using constraints and how to debug such routing. One of his advice is to always test routing. Indeed, most of the issues are coming from wrong route declaration.
On the Controllers side, the MvcHttpHandler instanciates a ControllerFactory which in turn instantiates the right controller using reflection. Reflection can be a performance killer, but in this case, the controllers are stored in the ControllerTypeCache, avoiding to make the use of the reflection everytime. Following this explanation, a demo using the Unity IoC container is showed.
Actions find the right method, bind parameters and execute the actions. Filter pipeline can be used : IAuthorizationFilter calls IActionFilter which in turn calls IResultFilter. On its side, HttpAuth delegates the authentication to another class.
About the view engine, its only role is to look for a view. It is not of its responsability to render the result.
When using the ASP.NET MVC framework, standard ASP.NET user controls can be used, but only in read-only.

Wednesday, November 12, 2008 12:56:22 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
TechEd2008
All comments require the approval of the site owner before being displayed.
OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview
Google Cloud Platform Certified Professional Cloud Architect
Ranked #1 as
French-speaking SharePoint
Community Influencer 2013
Navigation
Currently Reading :
I was there :
I was there :
I was exhibiting at :
I was there :
I was a speaker at :
I was a speaker at :
I was a speaker at
(January 2013 session):
I was a speaker at :
I was a speaker at :
United Nations (UN) SharePoint Event 2011
I was a speaker at :
I was there !
I was there !
I was there !
I was there !
Archive
<October 2022>
SunMonTueWedThuFriSat
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2022
Yves Peneveyre
Sign In
Statistics
Total Posts: 290
This Year: 0
This Month: 0
This Week: 0
Comments: 20
Themes
Pick a theme:
All Content © 2022, Yves Peneveyre
DasBlog theme 'Business' created by Christoph De Baene (delarou)