473,788 Members | 3,068 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best Practices - namespaces

Hi,
I'm building a website in ASP.NET. I will have a default.aspx file in each directory and sub-directory of the site. What is the best / accepted way of avoiding class naming conflicts by using Namespaces. I read somewhere that each directory should have it's own namespace, but that doesn't seem right to me....
thanks
--
/dave
Nov 22 '05 #1
1 1251
I your app has the name Foo, your company has the name Bar then a classfile
in the dir \Fun\Fancy\ should have the namespace "Bar.Foo.Fun.Fa ncy".
This is common practice and folloved by most most companies.

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"Dave" <Da**@discussio ns.microsoft.co m> schrieb im Newsbeitrag
news:EC******** *************** ***********@mic rosoft.com...
Hi,
I'm building a website in ASP.NET. I will have a default.aspx file in each directory and sub-directory of the site. What is the best / accepted way of
avoiding class naming conflicts by using Namespaces. I read somewhere that
each directory should have it's own namespace, but that doesn't seem right
to me.... thanks
--
/dave

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
273
by: Dave | last post by:
Hi, I'm building a website in ASP.NET. I will have a default.aspx file in each directory and sub-directory of the site. What is the best / accepted way of avoiding class naming conflicts by using Namespaces. I read somewhere that each directory should have it's own namespace, but that doesn't seem right to me.... thanks -- /dave
1
1722
by: William Sullivan | last post by:
I've been trying to research my question, but I haven't found a difinitive guide yet. My company is starting to build projects using dotnet. There isn't much coordination in namespaces, so I am trying to find out what the best practices are. I'm thinking that it would be something along the lines of: ..... Any suggestions?
3
1721
by: Johan Nilsson | last post by:
I've seen many alternatives when it comes to referring to types defined in parent/sibling/other namespaces. Consider the following hypothetical namespace layout: namespace company { namespace lib { class SomeClass {};
217
9231
by: gyromagnetic | last post by:
The following url points to an article written by Damian Conway entitled "Ten Essential Development Practices": http://www.perl.com/pub/a/2005/07/14/bestpractices.html Althought the article has Perl as a focus, I thought that some of the general points made might be of interest to the Python community. It would certainly be interesting to put together an analogous version of this article that centers on Python. Best Regards,
1
2073
by: johnmack | last post by:
In my XML instances I want to use the XLink namespace for attributes on certain elements. I'm having quite a hard time determining how to reflect this properly in my DTD and XML instances. In my instance, to declare the namespace, I have this on my root element: <root xmlns:xlink="http://www.w3.org/1999/xlink"> ... <mylink xlink:href="http://foo.com"> ....
3
2444
by: xzzy | last post by:
I was wondering why we have to have using System.Data using System.Configuration using etc.... why are they not all lumped into one 'using'? In other words, is there a best way to use project classes with 'using' meaning
1
2280
by: Vincent V | last post by:
Hey i am just starting a new project and from the start i want to make sure my app is as Object Orientated as possible I have a couple of questions in relation to this Question 1: Should i Struction my solution in numerous projects ie 1. Webpage Files(ui) 2. Classes
2
3487
by: steve | last post by:
Can someone point me to some information on namespace best practices? Questions I have are as follows: 1) Should I use .NET namespaces or URL, URI and URN's? Ie mycompany.mydivision.myapp vs http://www.mycompany.com/division/app? 2) Should I use namespace prefixes? I thought I read something using prefixes is a bad idea? 3) etc. Thanks in advance.
3
4037
by: _DD | last post by:
I believe Balena's Best Practices book suggests grouping quite a few classes into each namespace. I don't remember a number, but this has me curious about how other programmers handle this. If classes are obviously related, then I use the same namespace. Problem is that this doesn't seem to happen often. I could understand Balena's numbers in the context of a specific library, but in the scope of a large program, many corners are...
6
5255
by: Daniel Kraft | last post by:
Hi all, in my C++ projects, I usually make "heavy use" of namespaces to "encapsulate" my code. When I have for instance something like this: namespace project { namespace part1 { ... } namespace part2 { ... } }
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5535
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.