472,111 Members | 2,042 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Sharing Code/Classes Across Projects and Applications


A little advice on code sharing across projects, namespaces and dll's for

I've got an application that is split between three different projects (one
for a service, one for manual operation of the service and web client for
the interface to the user). There are a lot of functions that are shared
through these projects and I'm using the following format which is store in
ApplicationNamspace.vb and doesn't seem to work right and looking into
namespaces and how to reference across projects.

Namespace ApplicationName

Public Class ActiveDirectory

Functions to interact with active directory
End Class

Public Class SqlDatabase

Functions to insert data into sql database

End class

Class ActiveDirectoryUser

Private GuidObjectGUID As Byte()
Private strDisplayName As String

Public Property ObjectGUID() As Byte()
Return GuidObjectGUID
End Get

Set(ByVal Value As Byte())
GuidObjectGUID = Value
End Set

End Property

Public Property DisplayName() As String
Return strDisplayName
End Get

Set(ByVal Value As Byte())
GuidObjectGUID = Value
End Set
End Class
End Namespace

Is it better to have a different file for each class e.g.
ActiveDirectory.vb, ActiveDirectoryUser and SqlDatabase (the class file
could get big and might only use one class from the .vb file in future
projects). The other thing I'm looking at is namespace and each of these
ActiveDirectory, ActiveDirectoryUser and SqlDatabase would be a namespace in
the same .vb file.

I'm changing these classes as the application is developed, is it acceptable
to insert the ApplicationNamspace.vb into each project I'm going to use the
classes in or should it be compiled to a dll then referenced, what are the

I little new to classes and organising code, want to start on the right

Thanks for your advice in advance.

Nov 21 '05 #1
0 1405

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Simon Neve | last post: by
5 posts views Thread by Tinius | last post: by
5 posts views Thread by geoffblanduk_nospam | last post: by
4 posts views Thread by dbcuser | last post: by
3 posts views Thread by Shikari Shambu | last post: by
2 posts views Thread by Jeff Dege | last post: by
45 posts views Thread by =?Utf-8?B?QmV0aA==?= | last post: by

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.