MIX08 Day 2: T34 Building Great AJAX Applications from Scratch Using ASP.NET 3.5 and Visual Studio 2008

Thursday, 6 March 2008 10:55 by joelevi

Brad Abrams, Group Program Manager, .NET Framework, http://blogs.msdn.com/brada; http://blogs.msdn.com/brada/archive/2008/03/06/mix08-session-overview-building-great-ajax-applications-from-scratch-using-asp-net-3-5-and-visual-studio-2008.aspx

  • Visual Studio 2008 has a MUCH better way of letting you interact with your CSS (even in  external documents)
  • real-time preview of your css rules -- at last!
  • handles on your elements (in preview mode) let you dynamically resize divs and automagically wire your css ruls accordingly -- FTW!
  • the automatic preview in VS2008 uses a custom rendering engine that is supposed to be uber-compatible mode (not using the IE7 or even the IE8 rendering engine)... makes me wonder why IE7/IE8 isn't using this engine ;)
  • Use the solution's property page to change the target framework between.NET 2.0, 3.0, and 3.5
  • .NET framework 3.0 and 3.5 are layered upon .NET 2.0 which makes multi-targeting easier, and easier for hosts
    • future versions of the CLR will be completely separate
  • NEW CONTROL: List view
    • rather than using a repeater with an unordered list, List View lets you do the same thing, but gives you a LayoutTemplate (which looks like a combined HeaderTemplate and FooterTemplate...
    • you just have to nest an <asp:PlaceHolder in the LayoutTemplate,
    • and reference the LaoutTemplate in the ItemTemplate attributes
  • LINQ: A common way to work with data
    • Embedding tSQL and stored procedures in your code is probably not the best thing
    • in the .dbml file you drop in your tables, and you can rename any element (just in case your DBA named things kind of screwy)
    • same syntax to talk to a SQL database, Oracle, MySQL, XML, Flickr, Amazon a9 (?), Google (?), in-memory data objects, etc.
    • You can tier your LINQ statements, to pull in a big chunk of data from the data source, then run another LINKQ statement against that in-memory data set (to reduce load on the database and time to return the data)
  • var:
    • new variable type, lets the compiler decide what type it should be
    • good for prototyping and initial developing, but you should go back and type it correctly
  • NEW CONTROL: DataPager
    • Fields
      • <asp:NumericPagerFields
  • UpdatePanel
    • An AJAX control that defines an area that can be updated asynchronously
    • ProgressTemplate to show when the panel is being updated (if needed; if you're on a fast connection and the time to render is very short, the progress indicator won't be shown -- avoiding unnecessary distractions)
  • Javascript debugging
    • No more need to do "Alert" style debugging!
    • Can set breakpoints
  • Extenders (from the AjaxControlToolkit)
    • extenders are now available via hover in design view (easy, fast, sweet)
    • no need to manually wire up extenders to (say) textboxes, use the wizard and do it fast

Open thoughts:

  1. Why not extend the existing components (datalist, datagrid, etc.) to include AJAX update properties (such as Async=true and a Triggers collection
  2. Why not add a "AddBrowserHistory" flag to maintain "back" functionality of the browser

If you liked this post, please be sure to subscribe to my RSS Feed.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , , , ,
Categories:   MIX08
Actions:   E-mail | Permalink | Comments (3) | Comment RSSRSS comment feed

Related posts

Comments

March 6. 2008 18:43

Bertrand Le Roy

1. GridView has had Ajax capabilities since it shipped in ASP.NET 2.0
2. Back button management is already in ASP.NET 3.5 SP1, with both client and server-side APIs.

Hope that helps.

Bertrand Le Roy

March 10. 2008 12:12

Brad Abrams

Thanks for your post!

Good suggestions... For 1, we are looking at changes to existing controls to make them more Ajax aware..
For 2, we will have that in a servicing release of the ASP.NET later this year.. ScriptManager.EnableHistory and AddHistoryPoint()... It will work in all browsers..

Brad Abrams

March 10. 2008 14:40

joelevi

@Bertrand, I think I remember that about GridView, now that you mention it; thank you for refreshing my memory. My point was that all built-in controls that would logically lend themselves to async-postbacks should have that feature built in (why should I have to wrap a control within an update panel when the control could have an "AsyncEnabled=true" property which then exposes a Triggers collection and can be extended via an update animation extender? It just seems like it "should be able to do that" and would really simplify the source view.

@Brad, I look forward to the improvements to the existing controls! IMHO that can't happen too soon. Regarding #2, I look forward to the "Servicing Release" update, but the idea here was again, incorporating the AddHistoryPoint functionality into existing and future controls as an additional property -- so that when a GridView is paged or edited (etc.) it can invoke an AddHistoryPoint; or maybe we could have an AddHistoryPoint collection (similar to the Triggers collection) that would let the developer add a history point on paging, but not on editing as an example.

What are your thoughts?

Thanks, both of you, for your comments! They're GREATLY appreciated!

- www.JoeLevi.com

joelevi

Comments are closed