 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

January 7th, 2013, 04:13 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
|
|
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
|
|

January 8th, 2013, 03:59 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

January 8th, 2013, 02:12 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
|
|
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
|
|

January 8th, 2013, 03:06 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

January 8th, 2013, 04:19 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
|
|
Thank you. This was very helpful!
Tulsi
|
|

January 10th, 2013, 02:36 PM
|
|
Friend of Wrox
|
|
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
|
|
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
|
|

January 11th, 2013, 03:45 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes, as it uses semantic elements and CSS for the layout; not tables to defined a fixed design....
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
Tulsi (January 11th, 2013)
|
|
 |
|