Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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
  #1 (permalink)  
Old January 30th, 2005, 11:36 AM
Friend of Wrox
 
Join Date: Apr 2004
Location: Preston, Lancashire, United Kingdom.
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to RPG SEARCH
Default General Application Questions.

Hi There! :D

Just a couple of questions really so that I can get into the swing of 'good application design' as my lecturer says (he doesn't know anything about .NET though). Some of these questions are probably lame but its really to settle my curiousity.

Is it best to have a standard aspx page with code that just replaces .ascx files whenever a link is clicked? Or is it best to create new pages with .ascx files included in them.

Also would values be able to be able to be passed from one .ascx file to another on a page....

And for an application do you think it is better to declare every last variable as a global variable? That you could never make a mistake with naming etc.

Does anyone actually sit down and write out things first with a good old pen and paper or do you just jump in?

Apart from commenting what other good practices should i incorporate?

I just got unlimited MySQL databases on my hosting and want to use them. Is it harder than Access?

Anyone know a good tutorial to make my first proper application to run me through the basics. I really hate the wrox(sorry!) united site in the beginning vb.net book.

Thanks.

David
__________________
David Jenkins
  #2 (permalink)  
Old March 1st, 2005, 06:56 PM
Registered User
 
Join Date: Mar 2005
Location: Little Elm, TX, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

David;

Ok let’s start from the top.

1. Web Forms with web controls. Web controls are synonymous with classic include files which purpose was to modularize code. Ok, what does all that mean? Often times, web applications incorporate template shell with content displayed to users. A template example would be a top header or menu that's standard throughout a site or application. Template changes affect the whole site. So in response, it's a good practice to use .ascx files to handle template real estate areas on web forms or applications with content dynamically displayed based on unique business logic.

2. Passing value between .ascx files is possible using properties or methods. However, I'd steer away from this practice as coupling components too tightly could span significant issues. Also passing parameters is highly dependent on the page processing hierarchy (i.e. get parameters in init() to use them, etc.).

3. Declaring all variable as global has scope dependencies. I'd follow the use and get rid of principle. Use only what you need and get rid of it. Declaring all variables as global would not categorize as a best practice.

4. Most programmers don't do design they just build. Exceptional programmers design and then build. I ALWAYS DESIGN, NO MATTER THE TIME COST. Design saves time in the end.

5. Most full-scale databases are harder then Access. If you're not use to command line sql, I'd pick up a book. A good one is "SQL in 10 mins."

6. Resources
Excellent
http://www.devguru.com
http://www.asp.net
http://www.gotdotnet.com

Good Luck.
DeLeon


  #3 (permalink)  
Old March 2nd, 2005, 12:38 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Quote:
quote:Originally posted by RPG SEARCH
 Also would values be able to be able to be passed from one .ascx file to another on a page....

Just to add my $0.02:

Some people build web applications with the "single page-multiple user controls" design. This has it merits but could be a pain to manage and maintain. Every "page" url has to have some query string argument to identify the "page" you want so the actual single page knows which user control to load. If you have an application that has lots of pages this can get clumsy.

As far as passing data between pages (using either method of application design) you can do so easily with query string arguments or by using the session collection.

I agree with DeLeon on the point about coupling user controls together. You want to avoid having controls inter-dependant, however there is plenty you can do to make the controls work together through the context of the page. You can create public properties and events on the controls. The page can get/set property values and handle events that the control raises. This way you can have the page talk to both controls so they can work together but not have to depend on each other.

-Peter


Similar Threads
Thread Thread Starter Forum Replies Last Post
General XSLT Questions in the XSLT Forum jminatel BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 0 March 31st, 2008 07:50 PM
General solution to handle web application errors? woojtii Internet Information Services 1 March 27th, 2007 08:42 AM
General Question stu9820 ASP.NET 1.0 and 1.1 Basics 2 September 23rd, 2003 03:36 PM
General Help JonathanCharles Java GUI 2 June 12th, 2003 06:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.