Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 13th, 2004, 06:20 AM
Authorized User
 
Join Date: Aug 2004
Location: Liverpool, , United Kingdom.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Solution for solution

Hello

I need a solution for a solution.


I am sure I am not the only one who is baffled by the ThePhilePage Class section on page 57. I re-read the paragraph so much I almost wore the page out.

I eventually located an answer on this Forum:

Topic author: buzzterrier
Subject: Frustrations with setting up site in VS.NET!!!
Posted on: 01/16/2004 01:05:37 AM

My thanks to: Reply author: planoie

I totally agree with the sentiments of buzzterrier.

The book should have given an example. Or in my opinion at least cited that a more complete explanation might be required for baffled readers and perhaps given reference to where such an example might be found. Instead they just “left it out to save space”. Very poor.

It has left me wondering if, when I reach the next baffling chapter, skulking about the book, whether it is just me naturally getting confused or have crucial explanations have been omitted?

I am still having difficulty getting my head around namespaces.
I have eventually created my PhilPage Class ( following the instructions from planoie). However, my solution files inhabit a separate folder located underneath, is that right?

Whereas in the downloaded Wrox folders (not yet set up) the solution files reside within the ThePhil folder? Is that because, as the application is deployed the solution files automatically move into the upper folder?

1. Or do I need to drag solution files in before I continue?
2. Or do I leave them alone?

3. Or am I missing a fundamental step and need to start again

I am reluctant to move and eventually get to the end and find that I have set it up incorrectly.


Thanks.
__________________
Lynn
  #2 (permalink)  
Old August 13th, 2004, 06:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is the way Visual Studio works. If you create the Virtual Dir yourself, then you create the solution, you can put it in the virtual dir.

If you have VS create the virtual dir when you create the solution, then it doesn't alwys put the solution file where you expect it.

It really doesn't matter what folder this .sln file goes in. It's basically a list of project files, and the project files have a list of other files.

---

Don't be afraid of namespaces. The concept is easy, and it doesn't have any definite tie to directories, although lots of people like to organize directories according to namespaces. Think of a classroom that has 2 students named John. The teacher says "I'll have to use your firstname and lastname so you will know who I mean when I say your name".

Maybe you have a lot of projects that have a class named ProcessXML. Now, maybe you want to create an instance of this handy class in a new project. How does the compiler know which of the ProcessXML classes you want to create? It knows because of the namespace. You might want the ProcessXML class from the Acme.Employee namespace. When you create the class you can either specify it as "Acme.Employee.ProcessXML", or you can import the namespace into your project (using for c#, Imports for VB), and then you can just call it ProcessXML.

Maqny people get confused between a "reference" and the importing of a namespace. The purpose of a reference is to give the compiler the metadata that defines the objects in an assembly. This is used for several things, like intellisense and type checking during the compile. Just because you create a reference to an assembly doesn't mean that you want to import the namespace. You can use objects from an assembly without importing the namespace. If it automatically imported the namespace of every assembly you reference, then you'd have lots of namespaces imported, and there might be naming conflicts. You have to specifically tell the compiler which namespaces you want to import to help avoid the odds of having a conflict.

With my school example, if I "import" the students from 2 or 3 classrooms, then I won't get too many name conflicts. There might be some, but then I could use the first and last name of a couple students and I'm still OK. But, if I import the students from 100 classrooms there will be a bigger chance of having name conflicts, and it will be hard for me to keep the students separate - I don't want to use the fullname of every student.

Eric
  #3 (permalink)  
Old August 14th, 2004, 04:33 AM
Authorized User
 
Join Date: Aug 2004
Location: Liverpool, , United Kingdom.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Eric

Thank you so much for taking the trouble explaining in so much detail. I admit the namespace concept is daunting and rather scary.

I have since fiddled around and managed to get my solution files to reside within the base folder, which I feel happier about, because it looks similar to ThePhile.

Here is how I did it (although I am not using ThePhile namespaces, because I want to create my own project).

1. Opened VS.net
File:
New:
Blank Project:

Name: MySite

Location: C:\Project\MyWebSite\MyProjectName

OK:
This created the solution files contained within MySite.
____________________
Internet Information Service
Right click on Default Web Site
New:
Virtual Directory
Alias: MyWebSite
Directory: MyWebSite
Permissions Yes

__________________

Open VS.Net
File:
New:
Project
ASP.Net WebApplication

location: http://localhost/MyWebSite/MySite (which already has solution file)

I hope that has been useful to another struggler, it looks so simple, but it took me forever to get my head around it.

Lynn


  #4 (permalink)  
Old August 14th, 2004, 08:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Be advised that you won't find all of the code you need in the book. Some people try to develop the whole project from scratch by following the book. This won't work.

They didn't try to cover all of the code in the book in order to save space. They assume that everyone will look at the code download to get the code not specifically printed in the book.

The book is only meant to explain some of the key procedures and code routines. It's not a detailed step-by-step set of procedures to build this project.

Eric
  #5 (permalink)  
Old August 15th, 2004, 11:07 AM
Authorized User
 
Join Date: Aug 2004
Location: Liverpool, , United Kingdom.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the advice.

Lynn

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
need solution nandhamca22 CSS Cascading Style Sheets 1 February 7th, 2006 10:16 AM
please tell me the solution prashar SQL Server 2000 0 December 9th, 2005 12:11 PM
Solution! Aaron_j XSLT 1 July 30th, 2005 08:05 AM
what's the best solution for: eresina ASP.NET 1.0 and 1.1 Basics 2 November 16th, 2004 10:46 AM
Which solution should go eureka BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 5th, 2004 12:09 AM



All times are GMT -4. The time now is 09:02 PM.


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