Results 1 to 12 of 12

Thread: Common Functions DLL

  1. #1

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681

    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!

  2. #2
    Lively Member
    Join Date
    Feb 2003
    Location
    UK
    Posts
    95
    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.

  3. #3

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    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?

  4. #4
    Lively Member
    Join Date
    Feb 2003
    Location
    UK
    Posts
    95
    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.

  5. #5

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    Gotcha - good idea!

    Anyone else have any suggestions on common methods to include?

  6. #6
    Lively Member
    Join Date
    Feb 2003
    Location
    UK
    Posts
    95
    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.

  7. #7

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    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!).

  8. #8
    Lively Member
    Join Date
    Feb 2003
    Location
    UK
    Posts
    95
    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?

  9. #9

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    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.

  10. #10
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I have a few conversion functions, any extended controls (i.e. ImageCombo), and an AppSettingsWriter class in mine.

  11. #11

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    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.

  12. #12
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    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
  •  



Click Here to Expand Forum to Full Width