PC Review


Reply
Thread Tools Rate Thread

How to develop class library?

 
 
Rainer Queck
Guest
Posts: n/a
 
      16th Feb 2007
Hi,

What would be the best way to develop a class library?
I am planing to develop a couple of classes, needed in our company
enviroment.
These classe will be later used in several projects.

Are there any "how to" links available on how to do that with visual studio?
Would it be best to have a "Windows" or "Console" application to develop and
test each class and then put it into a library later on or is it possible to
have a Library project that can be included into a test application and
thereby still be debuggable?

Thanks for hint, links and help.

Regards
Rainer Queck


 
Reply With Quote
 
 
 
 
Peter Bradley
Guest
Posts: n/a
 
      16th Feb 2007
Just select the Class Library project type in VS when you start your new
solution.

To test it you'll want to add a Windows.Forms or Console project to your
solution that you can build as a client for your class library. Make it the
startup project for your solution. Whether you use a Windows.Forms project
or a Console project makes absolutely no difference, as long as it exercises
all the methods of all the classes in your library, in accordance with your
test plan. It's only for test purposes. So it's up to you: whatever you
feel happiest with.

You do have a test plan, don't you? :0)

Make sure all your classes in your library are in the same namespace: and
pick your namespace wisely. This is probably more important than having all
the classes in the same assembly. I'd make sure all the assemblies that
make up the library (namespace) were signed, so that they can be deployed to
the GAC. This will help you with versioning.

Of course you could always do things the other way around and start your
solution with the test executable and then include another project for your
library (right click on the solution -> Add -> new project, and then select
"Class library"). As the Perl guys say, "TMTOWTDI". The end result will be
exactly the same.

HTH


Peter


"Rainer Queck" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> What would be the best way to develop a class library?
> I am planing to develop a couple of classes, needed in our company
> enviroment.
> These classe will be later used in several projects.
>
> Are there any "how to" links available on how to do that with visual
> studio?
> Would it be best to have a "Windows" or "Console" application to develop
> and test each class and then put it into a library later on or is it
> possible to have a Library project that can be included into a test
> application and thereby still be debuggable?
>
> Thanks for hint, links and help.
>
> Regards
> Rainer Queck
>



 
Reply With Quote
 
pfc_sadr@hotmail.com
Guest
Posts: n/a
 
      16th Feb 2007
classes are bloatware, they add complexity, verbosity and slow code
execution

I've got a dozen books that state this as fact




On Feb 15, 11:45 pm, "Rainer Queck" <Rai...@noemail.noemail> wrote:
> Hi,
>
> What would be the best way to develop a class library?
> I am planing to develop a couple of classes, needed in our company
> enviroment.
> These classe will be later used in several projects.
>
> Are there any "how to" links available on how to do that with visual studio?
> Would it be best to have a "Windows" or "Console" application to develop and
> test each class and then put it into a library later on or is it possible to
> have a Library project that can be included into a test application and
> thereby still be debuggable?
>
> Thanks for hint, links and help.
>
> Regards
> Rainer Queck



 
Reply With Quote
 
Rainer Queck
Guest
Posts: n/a
 
      16th Feb 2007
Hi Peter,

thanks for you help and tips.

Rainer

"Peter Bradley" <(E-Mail Removed)> schrieb im Newsbeitrag
news:%(E-Mail Removed)...
> Just select the Class Library project type in VS when you start your new
> solution.
>
> To test it you'll want to add a Windows.Forms or Console project to your
> solution that you can build as a client for your class library. Make it
> the startup project for your solution. Whether you use a Windows.Forms
> project or a Console project makes absolutely no difference, as long as it
> exercises all the methods of all the classes in your library, in
> accordance with your test plan. It's only for test purposes. So it's up
> to you: whatever you feel happiest with.
>
> You do have a test plan, don't you? :0)
>
> Make sure all your classes in your library are in the same namespace: and
> pick your namespace wisely. This is probably more important than having
> all the classes in the same assembly. I'd make sure all the assemblies
> that make up the library (namespace) were signed, so that they can be
> deployed to the GAC. This will help you with versioning.
>
> Of course you could always do things the other way around and start your
> solution with the test executable and then include another project for
> your library (right click on the solution -> Add -> new project, and then
> select "Class library"). As the Perl guys say, "TMTOWTDI". The end
> result will be exactly the same.
>
> HTH
>
>
> Peter
>
>
> "Rainer Queck" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi,
>>
>> What would be the best way to develop a class library?
>> I am planing to develop a couple of classes, needed in our company
>> enviroment.
>> These classe will be later used in several projects.
>>
>> Are there any "how to" links available on how to do that with visual
>> studio?
>> Would it be best to have a "Windows" or "Console" application to develop
>> and test each class and then put it into a library later on or is it
>> possible to have a Library project that can be included into a test
>> application and thereby still be debuggable?
>>
>> Thanks for hint, links and help.
>>
>> Regards
>> Rainer Queck
>>

>
>



 
Reply With Quote
 
Matt Lacey
Guest
Posts: n/a
 
      16th Feb 2007
On 16 Feb, 08:33, pfc_s...@hotmail.com wrote:
> classes are bloatware, they add complexity, verbosity and slow code
> execution
>
> I've got a dozen books that state this as fact


It all depends on how they are used.

The purpose of a class library is to aid code reuse.
If code is reused wisely it will reduce bloat over multiple projects.
Obviously, if you include a large library for a small amount of code
this will increase the size (bloat) of a single binary.

Complexity and verbosity are issues resulting from design. In that
almost(?) everything in C# starts from a class library. (How much can
you do with no using statements?) Conceptually, the use of customer
libraries shouldn't add to much confusion.

Code will be slightly slower is using library code, but if it is
noticeable, it will be down to what the code is doing and how it is
being run, rather than it being in a separate library.

The most important reason to use libraries is for code reuse. This
reduces testing and development. It also saves time in support and
maintenance, making changes and bug fixes quicker/easier/cheaper.
Professional software development is a business and if you can do
something quicker, it will also be cheaper. This is a good thing in
business.

 
Reply With Quote
 
Joanna Carter [TeamB]
Guest
Posts: n/a
 
      16th Feb 2007
<(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed)...

| classes are bloatware, they add complexity, verbosity and slow code
| execution

So, I take it you don't use the .NET framework, where even the basic types
like int and string are classes ? After all, you wouldn't want to use
classes if they are slow and bloated :-)

| I've got a dozen books that state this as fact

Hmmm, they should come in useful for levelling up your desk :-)

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer


 
Reply With Quote
 
Joanna Carter [TeamB]
Guest
Posts: n/a
 
      16th Feb 2007
<(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed)...

Why did I waste time replying ? What a troll !!!

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer


 
Reply With Quote
 
Marc Gravell
Guest
Posts: n/a
 
      16th Feb 2007
Don't waste your time; he's trolling.

The correct response is [Delete], perhaps stopping to add to your
blocked list...

Marc


 
Reply With Quote
 
Peter Bradley
Guest
Posts: n/a
 
      16th Feb 2007
Very interesting. What are you proposing to use instead of classes?

Peter

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> classes are bloatware, they add complexity, verbosity and slow code
> execution
>
> I've got a dozen books that state this as fact
>
>
>
>
> On Feb 15, 11:45 pm, "Rainer Queck" <Rai...@noemail.noemail> wrote:
>> Hi,
>>
>> What would be the best way to develop a class library?
>> I am planing to develop a couple of classes, needed in our company
>> enviroment.
>> These classe will be later used in several projects.
>>
>> Are there any "how to" links available on how to do that with visual
>> studio?
>> Would it be best to have a "Windows" or "Console" application to develop
>> and
>> test each class and then put it into a library later on or is it possible
>> to
>> have a Library project that can be included into a test application and
>> thereby still be debuggable?
>>
>> Thanks for hint, links and help.
>>
>> Regards
>> Rainer Queck

>
>



 
Reply With Quote
 
Joanna Carter [TeamB]
Guest
Posts: n/a
 
      16th Feb 2007
"Peter Bradley" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed)...

| Very interesting. What are you proposing to use instead of classes?

Easy! VBA spaghetti and globals :-)

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enterprise Library - Class Library Greif. =?Utf-8?B?QUo=?= Microsoft ASP .NET 7 6th Dec 2007 09:33 AM
Looking for a library to help develop a synoptical board =?Utf-8?B?VFQgKFRvbSBUZW1wZWxhZXJlKQ==?= Microsoft Dot NET 0 4th Jul 2006 10:20 AM
Basic How To Question: Class Library or Windows Control Library eBob.com Microsoft VB .NET 3 20th Feb 2006 08:12 PM
Class Library in CF vs Windows Class Library TechGladiator Microsoft Dot NET Compact Framework 3 27th Jan 2006 12:55 AM
Big Faceless PDF Library 2.2.3 - A Java class library for importing and creating PDF documents. Gordon Darling Freeware 0 13th Jul 2004 09:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:03 AM.