Connect with life
www.connectwithlife.co.in
Sundararajan SubramanianSDE | Microsoft R&D India Pvt Ltd.,http://blogs.msdn.com/sundararajan
Session Summary
Introducing Dynamic DataCustomization OptionsDemosFeedback and Q&A
The traditional approach
Create your modelCreate ASP.NET pagesAdd data controls and data source controlsAdd validation logic in the pageIssues:
Fair bit of work to get startedLogic lives in the wrong placeIgnores valuable schema informationReuse and customization is difficult
The Dynamic Data approach
Create your modelInstantly get a fully functional app!
Customize the app piece by piece:ModelFieldsPagesRoutes
Dynamic Data At a Glance
Meta Model
Register contexts/providersGet Tables/PathDynamic Data Folder Virtual PathField Template Factory
Meta Model
Meta Table
Meta Column
Meta Column
Meta Table
Meta Column
Meta Column
URL Generation
Routing Pipeline
URL RoutingModule
Dynamic Route
Route Table
ASPX PageDynamic
RouteHandler
Request
Response
Ensures:1) Table2) Action
Checks for:1) Custom Page2) Scaffold Page
UI Customization
Dynamic Data provides UI customization at many levels (from least to most control)
Annotating the model
Metadata on model drives the behaviorDefault metadata inferred from schema
Data types and relationshipsRequired fields, string length, …
Add additional metadataValidationField labels and descriptionsPartial methods
Annotating the model
Field templates
Fields are rendered using templatesSelected based on field data typeHandle rendering, data binding and validation
Template selection can be overriddenCan be overriden with DataType and UIHint attributes or properties
Simple ascx files that can easily be reused across projects
Field templates
Customizing pages
Page templatesAffect shared behavior across tables
Custom pages for individual tablesChoose the column setCustomize the rendering
Dynamic Data Controls
DynamicDataManagerGridView, DetailsView
DynamicDataField
ListView, FormViewDynamicControl
LinqDataSource, EntitiesDataSourceDynamicControlParameterDynamicQueryStringParameter
DynamicValidatorDynamicFilter (UserControl), FilterRepeater
Customizing pages
Dynamic Data Wizard
Final thoughts
Try the .Net 3.5 SP1 todayUpdate the DynamicData with the preview available in CodePlexForum: http://forums.asp.net/1145.aspxBlogs:
http://blogs.msdn.com/davidebb/http://blogs.msdn.com/scothu/http://blogs.msdn.com/marcinon/
Feedback / QnA
Your Feedback is Important!
For detailed feedback, use the form at http://www.connectwithlife.co.in/vtd/helpdesk.aspx
Or email us at [email protected]
Use the Question Manager on LiveMeeting to ask your questions now!
Contact
Blog Addresshttp://blogs.msdn.com/sundararajan
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Top Related