Tutorial :Best practice for Parent / Child UI design in ASP.Net?



Question:

Coming from a desktop client background, with no real data-driven web design experience, I am studying ASP.NET UI design to determine the best UI pattern for Parent/Children data.

I always tend to experiment with Parent/Child presentation when learning a new UI platform, so that is where I have started here. Thinking I should use ASP.NET 2.0, I am studying the various ways of architecting a UI form which contains a master list of Parent records, and then showing the related children records in a second grid on the page when you click on a parent. Eventually, even the child records are parents to other children, so I'll need to deal with that also.

Think: Customers with Open Orders / Open Orders for Selected Customer / Line Items on Selected Open Order... like this screen where I built the same thing in WPF: http://www.twitpic.com/26w26

Some of techniques I've seen simply creates a plain old-shcool table of href links for the parents, with some method call to query the children based on the selected parent, while some techniques I've seen use the ASP.NET 2.0 data controls to work all this out. Are the ASP.NET 2.0 data controls cheating? Do real developers use these out-of-the box controls, or do they output their own HTML so they can have more control?

Also, it seems like ASP.NET MVC is all the rage right now, so I though I should consider that. When I looked at a few intro's about it, it seems to take a step back in time as it looks like you have to manually create much the HTML to present lists and datagrids, rather than being able to use the ASP.NET 2.0 controls.

I'm kinda lost as to where to spend my energy.


Solution:1

I won't comment on the Parent/Child portion of what you're asking, but rather on the WebForms vs ASP.NET MVC you asked about at the end.

I found developing using WebForms highly annoying. Every time I wanted to do something out of the "norm" I had to fight with the framework to get it to work the way I wanted.

ASP.NET MVC relieves you of these burdens greatly. However, it does so at the expense of having all kinds of cool components you can use out of the box. So yes, there is more hand-coding of the HTML, but ultimately that's what's going to make developing your pages a lot more pleasant.


Solution:2

Coming back to this question 6 months after I asked it, now that I've gained some experience with ASP.Net webforms, I'm going to answer my own question. Using the actual Asp.net controls like ListView and GridView is not really all that hard, and I can see that it is indeed a common practice to use them on forms and not feel like you a cheating. Sure MVC forces you to lower level html coding, but using Asp.Net controls on WebForms app is fine and actually not nearly as hard as I was affraid it would be.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »