Best Practices - solution - namespaces - classes

  • Thread starter Craig Deelsnyder
  • Start date
C

Craig Deelsnyder

I would say that the projects should be divided logically into reusable
units, not too big, not too small. Most times, most of your projects are
built into a class library, which is a .dll that someone else can use in
their project, or know is in the GAC, etc. You want to structure them
logically, whatever makes the most sense. Most often you'll have a security
library (project/dll), data access library, etc., as these are components
most other projects need, and is the logical unit they'd borrow at.

Then all you have left are the actual projects that are your applications.
They use these class libraries you've already built.

My opinion is that there should only be one class per file. It's an old
habit from Java, and makes it easier to navigate thru your code.

And yes, everything should go into a namespace, which can also be set at the
project level. But I recommend another old Java habit, of having all
namespaces start with your company's internet domain name backwards...if you
are company ABC at abc.com (just pretend :) ), then all packages from your
company should be named

com.abc.security
com.abc.apps.app1
com.abc.....

etc. This way, if you ever distribute your library, you're almost assured
it will have a unique namespace. Don't know if this practice ever caught on
in .NET, but it was the way we did it when I used to do Java....

HTH, just some ideas....
 
V

Vincent V

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
3. Web Services
4. Mobile Pages

Question 2:
How should i structure my classes
Should i have many .vb class files with one Class in each vbfile
Should i put many related Classes in one vbfile
Should i structure all my class files into namespaces

Question 3:
Any one have any good info related to .net best practices(apart from the ms
practice docs)
ANy one have any info on best css practices

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,229
Latest member
GloryAngul

Latest Threads

Top