By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,813 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

namespaces when reusing source code

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.