|
-
May 14th, 2003, 07:51 AM
#1
Thread Starter
Fanatic Member
Common Functions DLL
I have decided to implement a DLL that encapsulates common functions and validations so that I only have to write these methods once. Can you guys think of any commonly used methods that you come across? I want to make this DLL as robust as possible - so throw your ideas at me!
--Thanks!
-
May 14th, 2003, 08:38 AM
#2
Lively Member
we have a number of common class library assemblies containing classes of similar functionality; i.e. form controls, file access/manipulation classes, database classes. Each assembly is sub-divided using namespaces, i.e Database.GUI, Database.Business etc...
Absoultely anything that can be reused outside the scope of the current project is placed in the common assemblies to aid re-use.
-
May 14th, 2003, 08:49 AM
#3
Thread Starter
Fanatic Member
So you have a separate DLL for each (i.e. Database GUI, Database Business, …)? Is this more efficient than putting it all in one DLL and just having a Database GUI class, a Database Business class, …? I don’t have that much to put in it yet, and my thought was to do something like you do when I have too much to manage.
If I kept it in one DLL and add the reference to it in another project, am I not efficient because I am importing everything, when I am only actually using the Database GUI class? Or does this not matter?
-
May 14th, 2003, 09:04 AM
#4
Lively Member
By having each type (by that I mean all database functions or all form controls) in separate assemblies as opposed to one, means that if a different app doesn't use databases then the database assembly does not have to be included at all, simplifying that project. This is similar to the way .NET assemblies are organised.
We don't have a separate DLL for Database GUI and Database Business. One assembly, with multiple namespaces Database.GUI and Database.Business. We use this namespace separation to aid in the implementation of the MVC architecture. Implementations that use the database GUI import both namespaces while are batch processing procedure which doesn't use a GUI only imports the Business namespace.
I don't know of any guidelines that necessarily support this but it works well for us.
-
May 14th, 2003, 09:23 AM
#5
Thread Starter
Fanatic Member
Gotcha - good idea!
Anyone else have any suggestions on common methods to include?
-
May 14th, 2003, 09:34 AM
#6
Lively Member
Originally posted by VBCrazyCoder
Anyone else have any suggestions on common methods to include?
Surely this is something you'll work out as you develop your own soultions. What is the point of including someone else's ideas that you may never use?
Unless, of course, you are developing a common library solution to sell to others.
-
May 14th, 2003, 09:40 AM
#7
Thread Starter
Fanatic Member
My idea was to try to put everything in up front, then there will be less to add later. I know that there will always be stuff to add, but the more robust, the less maintenance (in theory at least!).
-
May 14th, 2003, 09:47 AM
#8
Lively Member
Actually I'd argue that if you try and put everything in upfront you are making more work for yourself than adding stuff on a need to use basis. Why spend the time writing and testing code you may never use?
-
May 14th, 2003, 09:57 AM
#9
Thread Starter
Fanatic Member
I agree with you, but this is in preparation for a large project that is coming up - and while I have some time, I am trying to organize and prepare. If I don't think I would use something, I wouldn't put it in. But I am trying to identify the more common things. I don't have alot of programming experience, so I guess this is somewhat a learning experience as well.
-
May 14th, 2003, 10:00 AM
#10
I have a few conversion functions, any extended controls (i.e. ImageCombo), and an AppSettingsWriter class in mine.
-
May 14th, 2003, 10:47 AM
#11
Thread Starter
Fanatic Member
I currently have a few DB methods such as testing the connection to the DB with the given ConnString, a few encrypt / decrypt methods, and some basic validation.
-
May 14th, 2003, 12:31 PM
#12
PowerPoster
If you use SQL Server, you will want this near by. It saves a hell of a lot of time...
http://www.msdn.microsoft.com/archit...ml/daab-rm.asp
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|