473,405 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

namespaces when reusing source code

Hi,

With languages like c# having namespaces, I was wondering what's the
recommended practice for reusing source code. I'm not talking big stuff like
log4net that's version controlled and usually distributed as binaries, just
packages of a few classes.

a typical small component will be distributed as open source with a
copyright statement and will usually include a project file and use a
namespace of the author's own choosing. however, it is quite possible I
might need to dink the code in some way for my application

should I include it all into my source tree and replace the namespaces with
my own (but obviously leave the copyright statements intact)? or should I
keep the separate project and distribute (yet) another DLL with my
application?

Andy
Nov 17 '05 #1
2 1162
You are not required to have exactly one namespace in one DLL. You can have
a class a.a.a referencing b.b.b and both beeing compiled into the same DLL.

Just leave the namespace, even the file, as is ;)

Markus

"Andy Fish" <aj****@blueyonder.co.uk> schrieb im Newsbeitrag
news:Oj**************@tk2msftngp13.phx.gbl...
Hi,

With languages like c# having namespaces, I was wondering what's the
recommended practice for reusing source code. I'm not talking big stuff
like log4net that's version controlled and usually distributed as
binaries, just packages of a few classes.

a typical small component will be distributed as open source with a
copyright statement and will usually include a project file and use a
namespace of the author's own choosing. however, it is quite possible I
might need to dink the code in some way for my application

should I include it all into my source tree and replace the namespaces
with my own (but obviously leave the copyright statements intact)? or
should I keep the separate project and distribute (yet) another DLL with
my application?

Andy

Nov 17 '05 #2
Hi Andy,

sorry I missunderstood your question.

I would recommend you to make least changes to the source code. If you want
to use the component from several of your applications put it into a
seperate library, otherwise compile it into your application.

Leaving the code unchanged makes it possible to replace it more easily.

Please keep in mind the Opensource license terms, too. Normally you must
send your changes back to where your component came from.

Markus
"Andy Fish" <aj****@blueyonder.co.uk> schrieb im Newsbeitrag
news:Oj**************@tk2msftngp13.phx.gbl...
Hi,

With languages like c# having namespaces, I was wondering what's the
recommended practice for reusing source code. I'm not talking big stuff
like log4net that's version controlled and usually distributed as
binaries, just packages of a few classes.

a typical small component will be distributed as open source with a
copyright statement and will usually include a project file and use a
namespace of the author's own choosing. however, it is quite possible I
might need to dink the code in some way for my application

should I include it all into my source tree and replace the namespaces
with my own (but obviously leave the copyright statements intact)? or
should I keep the separate project and distribute (yet) another DLL with
my application?

Andy

Nov 17 '05 #3

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

Similar topics

6
by: BigMan | last post by:
I've come to the decision to use multiple namespaces for a very specific reason: I like to use descriptive names of UDTs and I sometimes come up with long UDT names (and file names too, since I...
2
by: Jon Davis | last post by:
I would like to parse RSS 1.0 (not RSS 2.0) files. But I don't know how to work with these XML namespaces! And when namespaces are improperly used in RSS 2.0 files, I don't know how to deal with...
9
by: Patty O'Dors | last post by:
Hi Can somebody please tell me what namespaces are actually for? I notice that when I start a new project in C#, it puts everything in a namespace of the same name as the project. I found them...
11
by: Random | last post by:
I'm confused about the proper use and usefulness of namespaces. I beleive I understand the purpose is so the developer can put classes within namespaces to essentially organize your code. And I...
3
by: jason | last post by:
Please pardon my completely lack of understanding on the topic. I have a website I developed with another developer. We are both far from experts in VB.NET and OOP. We developed the site WITHOUT...
1
by: Epetruk | last post by:
Hello, I have a solution with two projects. One of the projects is called MyProj with a root namespace called MyProj.Obj. The single source (vb) file for MyProj has a class called Obj....
4
by: Hal Vaughan | last post by:
I feel like I should know this or be able to find the answer, but I can't. I've read a few tutorials or articles on namespaces, but this applies to files and I don't see much on namespaces in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.