Microsoft ASP.NET

Insert YouTube videos in PowerPont slides with aS Desktop
Views:
 
Category: Entertainment
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

ASP.NET MVC 2 Best Practices – Part 2 : 

Hattan Shobokshi ASP.NET MVC 2 Best Practices – Part 2

Housekeeping Part 1 : 

Housekeeping Part 1 Stuttering is a communication disorder involving disruptions, or “disfluencies,” in a person’s speech. Across all cultures, roughly 1% of people currently has a stuttering disorder. http://westutter.org/

Housekeeping Part2 : 

Housekeeping Part2 Book raffle at the End.

Who am I? : 

Who am I? Senior Software Engineer ASP.NET Web Forms & ASP.NET MVC Windows Mobile C#, VB.NET, VBScript, JavaScript… TSQL www.hattanshobokshi.com Email: hattan@gmail.com

Goals for this talk : 

Goals for this talk Static Content via Html Helpers T4 Templates Custom View & Controller Templates Diagnostic Tools Telerik Grid Control

Static Content via Html Helpers : 

Static Content via Html Helpers Use Url.Content for ALL static content Create HtmlHelper methods to simply the process

T4 : Text Template Transformation Toolkit : 

T4 : Text Template Transformation Toolkit Code Generation Tool Built into Visual Studio (2008 and 2010) .tt File Extension No syntax highlighting by default Clarius Visual T4 Add-on http://www.visualt4.com/ Tip: Windows 7/Vista unblock zip file, unblock individual files More informationhttp://www.olegsych.com/2007/12/text-template-transformation-toolkit/

T4MVC : 

T4MVC T4 template for ASP.NET MVC Creates strongly typed helpers Eliminates magic strings (View names, HtmlHelper parameters) http://mvccontrib.codeplex.com/wikipage?title=T4MVC http://forums.asp.net/1215.aspx http://blogs.msdn.com/b/davidebb/archive/2010/03/12/a-better-way-to-auto-run-t4mvc-when-you-build.aspx

T4MVC : 

T4MVC <%= Html.ActionLink(“New Dinner", “Create", "Dinners")%> <%= Html.ActionLink(" New Dinner", MVC.Dinners Create())%> <img src="/Content/nerd.jpg" /> <img src="<%= Links.Content.nerd_jpg %>" /> http://mvccontrib.codeplex.com/wikipage?title=T4MVC_doc&referringTitle=T4MVC

T4 Code Templates : 

T4 Code Templates Custom Tooling Customize Default View Templates Add new View Templates Customize Controller Template T4 Templates ~\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC 2 ~\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\VisualBasic\Web\MVC 2

Route Debugger : 

Route Debugger Add Reference to Dll Enable route debugging with 1 line of codeRouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes); http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx

MVC Diagnostics : 

MVC Diagnostics Environment Information MVC Assembly Version Referenced Assembly Information Web Forms page, not an mvc page http://bradwilson.typepad.com/blog/2010/03/diagnosing-aspnet-mvc-problems.html

Telerik Grid Control : 

Telerik Grid Control http://demos.telerik.com/aspnet-mvc/ Grid Control Out of the box support for Sorting, Filtering Out of the box paging support Out of the box ajax support Very little javascript you have to write! 

What did we just talk about? : 

What did we just talk about? Static Content via Html Helpers T4 Templates Custom View & Controller Templates Diagnostic Tools Telerik Grid Control

Contact Information : 

Contact Information Email: hattan@gmail.com www.hattanshobokshi.com

The End : 

The End Thank you!