One of the skills that 70-564 exam measures is the ability to choose appropriate controls based on business requirements. And when I look at the projects or Web applications I worked with, I don't recall any of them that wouldn't use some data-bound controls. Whether it was displaying shopping cart, list of managed assets, dashboard of CRM system, list of registered users in system, history of mortgage loan installment payments or simply search results based on some criteria, they all have been designed using some data-bound controls.Fortunately, the books do pretty good job describing available data-bound controls, but I haven't found yet a book that would present a simple comparison of those controls so instead of going through 50 - 100 pages, you could just simply look at some chart or 1 page and choose appropriate control based on the requirements. I have found that kind of summaries very helpful - I can better see the similarities and differences, which helps me a lot during exams but also at work when I can instantly propose the appropriate solution, which what every thriving developer should be able to do.
- Single record data-bound controls

- Multi records data-bound controls

There is a few data-bound controls a developer can choose from and as always fully based on the business requirements. I think new control in .NET 3.5 - ListView - has made a big difference in choosing an appropriate data-bound control. The charts summarize the choice criteria, which are layout (table or custom elements with css) and functionality (sorting, inserting, paging). The principal key is to know which control can support out of the box what we want to achieve. Red
X means that the feature is not supported at all, green
X means that there is a placeholder for the feature but it requires some custom code (ie. DataGrid out of the box shows Pager item and support setting Pager Size but nothing happens when Next Page button is clicked), and green
V means the feature is fully supported. For example, repeater doesn't have any concept of grouping but of course it could be achieved with customizing the control, but there is also DataList or ListView control that support grouping without wasting developer's time on something that somebody has already successfully developed and tested. And when it comes to new DataPager control support, only new control ListView supports it. But of course any data-bound control can support it as long as it implements IPageableItemContainer interface, so we could create a custom control that would inherit from Repeater and implement that interface, hence create a very lightweight data-bound control supporting paging. As always any customization should be first supported by good arguments (improved performance, meeting business rules, improved functionality, etc.) as what we get out of the box should really cover most scenarios of data-driven ASP.NET applications - it's just a matter of knowing what functionality is supported by what control. And with the good cheat sheet it shouldn't be hard to remember it and use it either during the exam or during developing your next ASP.NET application.
0 comments: