Today I attended TechED-09. Here are the updates from the sessions I attended and some of the interesting things I found out

ASP.NET 4.0 Features from Stephen Walther, Program Manager, ASP.NET
  • Source based development, more focus on a neater and readable code
  • control’s client side ID code looked weird, so if you were using a client side script framework like JQuery it would be difficult to identify the control’s id in case a control lives inside a Master page. In ASP.Net 4.0 there is a property called {Control}.ControlID that will allow to the users to specify a more neater feature
  • Auto rendering of the code with "runat=server” attribute once picked from intelli sense  for common controls
  • <asp:formview> and <asp:listview> now allows you to render them in div mode apart from the traditional table mode
  • Viewstate can be disabled at the page level and then enabled for particular controls .  This is different from the EnableViewState mode since ViewState is inherited to the child controls whereas the EnableViewState does not
  • Response.Redirect was not SEO friendly and search engine had issues with indexing them . Now 4.0 enables you to use Response.PermanentRedirect which emits a status code that is recognized by Search Engines(i believe it is status code 301 if i am remembering this correctly)
  • New control added in 4 –>  QueryExtender . More about this here
  • Features added to ASP.Net Core are
    • Cache Extensibility using Velocity
    • Browser capabilities extensibility
    • Session state compression using 2 main industry standards . One of them is GZIP

Some of the interesting questions asked by attendees are and there answers by Stephen

  • Can i deploy ASP.NET application to the cloud(Microsoft Azure) ?
      You can use visual studio 2008 azure toolkit to deploy the applications to Azure
  • When do we use Silverlight vs ASP.NET Web Forms vs ASP.NET MVC vs ASP.Net Ajax
    These are targeted to different needs and hence different problems.
  • How can i combine some features from 4.0 and dynamic data . Can we club them ?
    Yes you can.
  • Check ASP.Net 4.0 and VS 2010 features White paper here
ASP.Net MVC from Stephen Walther

Well most of this talk was a walk through of a demo application and it was quite interesting. Some of the main features from MVC RTM that needs to be mentioned are

  • SEO based URLs
  • PartialAjaxUpdate
  • Velocity code templates available(this one refers to the java Velocity)
  • Create your own code generation for View creation using T4 templates
LINQ Deep Drive from Sanjay Vyas

This session was like starting from the beginning like how Linq works. So I am not going to spend time detailing it , there is plenty information already available on the net. I will post some interesting questions asked in the session and my answers to the same

  • Is the var keyword reflected at runtime ?
    No, the CompilerService actually converts it to a type but does not give it a name. It actually looks something like this  if you use ILDasm

    class [System.Core]System.Func`2<int32,class '<>f__AnonymousType0`1'<int32>> LinqTest.Program::'CS$<>9__CachedAnonymousMethodDelegate4'

  • Can we use Linq for existing Datasets ?
    Yes, but only if you compile it with .net 3.5 framework. Here is more details about this on  MSDN 

  • Whats the benefit of Property initializers , can’t i use constructors instead ?
    In a normal code you can but when you are writing a Linq Select statement and creating a new type the initializer becomes handy

  • Is the return type of the following query an IList<int> 

    List<int>list=newList<int>() {1,2,3,4,5 };

    var res=from o in
    where o >
    select(new{iVal =o});

        No, instead would be a type of IEnumerable<int>

  • Is there a performance hint while using Linq
    Not that we know of , but in case you find one, send us a repro code with the details of the delay  

  • What is the difference between IQueryable and IEnumerable
    Graphically put


    Simply put IQueryable allows the mechanism for expression evaluation using queries. IEnumerator allows you to enumerate the collection. IQueryable on evaluation of a query expression gives you back a Enumerator for the resultant collection

Until next post :)