467,161 Members | 935 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

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
  • viewed: 1256

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@yahoo.co.uk | last post: by
4 posts views Thread by dbcuser@gmail.com | 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 this site, you agree to our Privacy Policy and Terms of Use.