p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=560)
-   -   ch. 15 - Hand Coding Data Acess Code (http://p2p.wrox.com/showthread.php?t=89095)

Tulsi January 7th, 2013 04:13 PM

ch. 15 - Hand Coding Data Acess Code
 
Imar,

It seems that hand coding is the best option for implementing the Add/Edit page. It does mean more work, but like you said on p.561
Quote:

you do gain a lot of flexibliity and - when done right - you end up with a page that's a lot easier to maintain.
Just curious as to what's more common practice in real world applications...

Is it more common to use ready-made controls and use the AddEditReview.aspx implementation or is it more common to use hand-coding and use the AddEditReviewHandCoded.aspx implementation?


Thank you.
Venu

Imar January 8th, 2013 03:59 AM

I don't have any hard figures, but I think both are common. For complex, professional type of pages I follow the hand coding pattern. For simpler sites, or demo-ware I use the built-in controls.

Cheers,

Imar

Tulsi January 8th, 2013 02:12 PM

Thank you..this makes sense :)

I guess for more complex pages, hand-coding would give you the greater flexibility that u would need, but add some extra work. For smaller sites and prototypes, using the built-in controls will allow you to speed up the development.

But I just want to make sure I understand this correctly...

Hand-coding means using the HTML table for defining the layout with basic asp.net controls such as textbox, dropdown, etc.. and not using the built-in databound/datasource contols such as ListView/sqldatasource? Is this correct?

Thanks.
Tulsi

Imar January 8th, 2013 03:06 PM

Well, yes and no.

You don't *have* to use a table; it's just very convenient. In most modern web sites you'll see a CSS based layout in favor of tables for layout. For admin pages I don't care that much; that's why I used a table.

In addition, even in a hand coded page you can use the standard datasource and data bound controls. For example, for the Genre drop-down to create a review, you can use a LinqDataSource or any other data source to get the data from the database.

In other words; it's not black and white. You can mix concepts from either into the other.

Cheers,

Imar

Tulsi January 8th, 2013 04:19 PM

Thank you. This was very helpful!

Tulsi

Tulsi January 10th, 2013 02:36 PM

Hi Imar,

Sorry for coming back to this, but just wanted to make sure....

Is the master page (FrontEnd.Master) an example of a CSS based layout?

Thanks,
Tulsi

Imar January 11th, 2013 03:45 AM

Yes, as it uses semantic elements and CSS for the layout; not tables to defined a fixed design....

Cheers,

Imar


All times are GMT -4. The time now is 03:27 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.