Window Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 3 March 2009

Lap Around ASP.NET Dynamic Data 4.0 Preview

Posted on 23:30 by Unknown

I was just going through my Last Dynamic Data article, and while surfing I came across ASP.NET Dynamic Data 4.0 Preview 1 & 2 (I am going to call it as Dynamic Data Future simply). I was exploring that throughout, so I though it will be good to share with you all if you are unaware of this.

Basically, ASP.NET Dynamic Data 4.0 requires to have Visual Studio 2008 and .NET Framework 3.5 SP to be installed first. I downloaded the bits from Codeplex and there you will find a big note like :

NOTE: These previews contains features that may not be in the next version of the framework. These previews are not production quality and should be used at your own risk.

So right now don’t plan this for your production bits unless you are confident about it. Even I am just still evaluating this one and now note from me : "No harm in Evaluating it, Its too Good !!”

There are few new attributes and Field Templates given, Dynamic Data 4.0 Preview also talks about BusinessLogicDataSource Control (In Common man’s term : Something which sync your UI and BL), It is now also go hand in hand with ASP.NET MVC, Beside Image handler the thing I like most is now we can add Search Capability to Dynamic Data and will be able to tweak it as we like it the way it should be.

Right now I am exploring Image Capabilities in Dynamic Data and sharing the same with you. Below screens are from walkthrough which I have downloaded from Codeplex and I will use same bits to explain you various features.

To enable Dynamic Data Grid with Images you have following newly introduce “Field Templates” :

  • DbImage.ascx
  • Edit_ DbImage.ascx
  • FileImage.ascx

To make Image mechanism smooth, you then need to add HTTP handler in your Web.Config File like this :

<add verb="*" path="ImageHandler.htm" type="Microsoft.Web.DynamicData.ImageHandler"/>

Rest of the steps like adding LINQ-to-SQL data model, drag table which you want to display etc steps are still same like in old one. (Sample bits gives you “Northwind” Database and you have “Categories” table which capable of storing images), Also whatever we do modifications in Global.asax are as it was in old.

To map Image field in database, job is now done by ImageAttributes which you need to add manually, which you will get from namespaces Microsoft.Web.DynamicData and System.ComponentModel.DataAnnotations ,well attributes seems to be powerful since they do allow you to set size of images too. But you need a partial class to map Categories Table which you can do by adding class file and declaring partial class in it like this :

[MetadataType(typeof(CategoryMetadata))]
public partial class CategoryMetadata{}
You can see now first entry page also slightly modified, previously we use to see List of Tables which we include in data model, now for Preview it has been modified slightly like this :
pic0
Once you click on link under “Display database Image columns” you will get output like below :
pic1
If you go ahead and check I done some editing of one field (Check lotus image in above grid, on which I experimented), you add new image or delete particular one like this :
pic2
pic3
A File Uploader makes job easy to add new image from your local physical storage and once you upload image you will promptly see changes in Grid (This image which you can see are actually Cached) and after updating you can see output like this : (lotus image is now replaced by Sunset image)
pic5
Well, That was all about Displaying Images in Dynamic Data,Surely in my future articles I will discuss all these in depth.
What is the Future of Dynamic Data ?? :
http://aspnet.codeplex.com/Wiki/View.aspx?title=dynamic%20data%20roadmap&referringTitle=Dynamic%20Data 

Where you can find more about ASP.NET Dynamic Data 4.0 Preview 1 & 2 ?? :

Preview 1 :

http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=18803

Preview 2 :

http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=20628

Lost in Jungle? Confused ? Looking for something which will be step-by-step?? :

http://quickstarts.asp.net/previews/dynamicdata/dd_WhatsNewInDynamicData.htm

Hope you find this information useful, so don’t wait, download bits from Codeplex and start exploring them with me !

Vikram.

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • First Windows Phone 7 update February 2011 - Small update but Big start
    After tons of rumors and set of predictions on Windows Phone 7 all over Internet, Microsoft came up with first Windows Phone 7 minor update ...
  • The little Story of “I Unlock Joy” event by Microsoft and Pune User Group
      This post is about recent “I Unlock Joy” event happened in Pune which was conducted by Microsoft and Pune User Group. Little History : ...
  • Silverlight On Mobile : Windows Phone 7 Splash Screen and Customization
    After talking about 3D capabilities on Windows Phone 7 using Silverlight in last article , Now I am moving ahead with small but equally impo...
  • Silverlight 5 : Platform Invoke (PInvoke) in Silverlight
      Two days back Microsoft announced availability of Silverlight 5 RC,I encourage you to download bits from here , My friend Pete Brown alr...
  • Introduction to Speech Capabilities in Windows Phone 8 – Part 1
    After a long..I am writing blog, I hope and I wish I will resume blogging like I use to in past. Lots of things happened in past few months....
  • MCTS : Microsoft Silverlight 4 Development Exam Guide (70-506) by Packt Publishing
      Hello, After a long time I got chance to come back here.I will soon resume blogging in month of August. Last 4-5 months were horrible due...
  • Introduction to Speech Capabilities in Windows Phone 8 – Part 2
    Hope you enjoyed my last article on Speech Capability in Windows Phone 8, Today I am posting another part or you can say little extension t...
  • Silverlight 3 : Insert & Update Data using WCF Service with DataForm and DataGrid
    In my Lap around Silverlight 3 series, I have written a separate article on DataForm in Silverlight 3, This article is a basic extension to ...
  • Mango : Using DeviceStatus in Windows Phone 7.1
    First of all “Thank You” for your wonderful response and comments on my last article on Silverlight Vs HTML5 ,I hope you like the points I ...
  • Silverlight, HTML5 & Windows 8 : Where we are heading to ?
    This is not the post or yet another post on most happening debate of Silverlight and HTML5, This is just a visit to all of them to realize t...

Blog Archive

  • ►  2013 (4)
    • ►  August (1)
    • ►  April (3)
  • ►  2012 (4)
    • ►  July (1)
    • ►  March (2)
    • ►  January (1)
  • ►  2011 (24)
    • ►  December (1)
    • ►  September (4)
    • ►  August (2)
    • ►  July (1)
    • ►  June (4)
    • ►  May (3)
    • ►  April (3)
    • ►  March (1)
    • ►  February (4)
    • ►  January (1)
  • ►  2010 (21)
    • ►  December (1)
    • ►  November (2)
    • ►  October (3)
    • ►  September (2)
    • ►  August (4)
    • ►  July (5)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  January (1)
  • ▼  2009 (49)
    • ►  December (1)
    • ►  November (5)
    • ►  October (2)
    • ►  September (1)
    • ►  August (5)
    • ►  July (5)
    • ►  June (1)
    • ►  May (5)
    • ►  April (5)
    • ▼  March (9)
      • Your Chance to Become Microsoft Most Valuable Prof...
      • Silverlight 3 : Master Pages implementation with N...
      • Silverlight 3 : DataForm control features – Part 3
      • Silverlight 3 : Explore Power of Blend 3 Preview –...
      • Silverlight 3 : Lap around Silverlight 3 Beta 1 :...
      • Silverlight 3 and Blend 3 is finally here…!!!
      • Start Windows…
      • 3D in Silverlight 2 with Kit3D
      • Lap Around ASP.NET Dynamic Data 4.0 Preview
    • ►  February (4)
    • ►  January (6)
  • ►  2008 (43)
    • ►  December (3)
    • ►  November (9)
    • ►  October (7)
    • ►  September (4)
    • ►  August (2)
    • ►  July (3)
    • ►  June (4)
    • ►  May (3)
    • ►  March (3)
    • ►  February (5)
Powered by Blogger.

About Me

Unknown
View my complete profile