Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 20th, 2012, 03:18 PM
Friend of Wrox
Points: 550, Level: 8
Points: 550, Level: 8 Points: 550, Level: 8 Points: 550, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 113
Thanks: 31
Thanked 2 Times in 2 Posts
Default Chapter 8 - p.271

Hi Imar,

On p.271 it says, "Besides master pages, themes, and skins, ASP.NET 4 has another feature that enables you to create reusable and thus consistent blocks of information: User Controls".

Are these also ways of centralizing the presentation and separating it from the processing? When is it important to this?

Thanks.
Tulsi
Reply With Quote
  #2 (permalink)  
Old March 20th, 2012, 03:26 PM
Imar's Avatar
Wrox Author
Points: 66,975, Level: 100
Points: 66,975, Level: 100 Points: 66,975, Level: 100 Points: 66,975, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,177
Thanks: 65
Thanked 1,401 Times in 1,381 Posts
Default

Quote:
Are these also ways of centralizing the presentation and separating it from the processing? When is it important to this?
Yes. User Controls enable you to build a block of presentaton and logic you can reuse throughout the site. For example, you can create a contact form you can add to multiple pages. Then when you update the UC, all pages that use that UC are updated automatically. This way you can centralize presentation and behavior and minimize the need to write the same functionality twice.

Hope this answers the question.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old March 21st, 2012, 03:46 PM
Friend of Wrox
Points: 550, Level: 8
Points: 550, Level: 8 Points: 550, Level: 8 Points: 550, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 113
Thanks: 31
Thanked 2 Times in 2 Posts
Default

Thank you.

I truly enjoy reading this book because it has lots of references on how to centralize the presentation and focus on code re-use. As I'm reading each chapter, I'm finding all the examples on pushing the formatting/layout to
CSS files and Master Pages very helpful.

My last real-world project was using classic ASP and I remember that maintaining the code was difficult because the presentation and processing were all mixed in one file.

I'm currently reading the chapter on AJAX and your articles on N-Layered Web Applications with ASP.NET 2.0.

Would it be correct to say that...

(1) Master Pages, CSS, Themes, Skins, and User controls are all ways to centralize the presentation?
(2) Encapsulating the business logic using well-defined classes is a way to centralize the processing?


Tulsi
Reply With Quote
  #4 (permalink)  
Old March 21st, 2012, 04:09 PM
Imar's Avatar
Wrox Author
Points: 66,975, Level: 100
Points: 66,975, Level: 100 Points: 66,975, Level: 100 Points: 66,975, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,177
Thanks: 65
Thanked 1,401 Times in 1,381 Posts
Default

Quote:
(1) Master Pages, CSS, Themes, Skins, and User controls are all ways to centralize the presentation?
(2) Encapsulating the business logic using well-defined classes is a way to centralize the processing?
Yes, that would be correct indeed. You could also centralize behavior in, say, the code behind of a User Control but even then it would be better to encapsulate it in a separate class for further reuse (if you have the need).

Quote:
I truly enjoy reading this book because it has lots of references on how to centralize the presentation and focus on code re-use.
Thank you. That was one of my main goals. It's easy to write a mess in Web Forms as well, but I wanted to show ways to avoid or at leats minimize that....

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
Tulsi (March 22nd, 2012)
  #5 (permalink)  
Old March 22nd, 2012, 12:41 PM
Friend of Wrox
Points: 550, Level: 8
Points: 550, Level: 8 Points: 550, Level: 8 Points: 550, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 113
Thanks: 31
Thanked 2 Times in 2 Posts
Default

Thank you.

It's been a while since I've been in the job market, but is N-Layered Development, Separating the presentation from the processing, Centralizing presentation/processing... Are these all things I can highlight as strengths on my resume?

Or is it assumed you will be doing these things using the WebForms model of development?

Tulsi
Reply With Quote
  #6 (permalink)  
Old March 23rd, 2012, 03:29 PM
Imar's Avatar
Wrox Author
Points: 66,975, Level: 100
Points: 66,975, Level: 100 Points: 66,975, Level: 100 Points: 66,975, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,177
Thanks: 65
Thanked 1,401 Times in 1,381 Posts
Default

It depends on how well you master them, I guess.

I've seen a lot of spaghetti implementations with Web Forms with Code Behind pages of hundreds or thousands of lines of code. So, it's not something everybody does and as such can be a good strength on a resume...

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #7 (permalink)  
Old March 26th, 2012, 03:59 PM
Friend of Wrox
Points: 550, Level: 8
Points: 550, Level: 8 Points: 550, Level: 8 Points: 550, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 113
Thanks: 31
Thanked 2 Times in 2 Posts
Default

Thank you. This info was very helpful.

Tulsi
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 10 page 271 Shuffle method xpw BOOK: Beginning Visual C# 2010 0 February 9th, 2012 05:44 AM
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:02 AM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM
Chap 8 - Try It Out Page 270 - 271 VB Deano252 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 May 30th, 2007 07:34 AM



All times are GMT -4. The time now is 05:38 AM.


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