|
-
Apr 22nd, 2004, 10:18 AM
#1
Thread Starter
Addicted Member
n-tier architecture - split up dll's or one large dll
Hi,
I have an app which follows the n-tier architecture ie.
UI > Buz Obj > Data Obj > Db
The classes in my buz objects can be grouped into 5 sections based on the functions that they perform in the app.
I understand that the more dll's the more you are likely to enter dll hell territory, however for updating/maintenance it seems that having them grouped will mean a smaller file sizes to send in the event of update/maintenance.
Is it better to compile all the classes in the buz object into one large dll or compile them as 5 smaller dll's ?
Jack
-
Apr 22nd, 2004, 11:04 AM
#2
This is a difficult one.
I think one of the main questions is "Would you gain anything?"
If you have a DLL that is 10Mb and splitting it into 10 1Mb DLL's would speed your app up a little and wouldn't hog sys resources as much.
I have many n-tier projects...I have 7 DLLs, 2 Active X EXEs and 2 EXEs in one of them.
The app works a treat. It's VERY easy to maintain and doesn't hog sys resources.
But obviously going over the top can make things worse. Say you split your 10Mb DLL into 200 50k DLLs. This would be silly. 200 DLL's Arrrghghghghhhh! What a night mare this would be to maintain 

Woka
-
Apr 22nd, 2004, 11:08 AM
#3
I have just done the opposite to you in fact.
I had some multithreading in my app, and had numerous DLL's for that and winsock:
- Winsock DLL
- Winsock Wrapper DLL
- Subclassing DLL
- Msg Window DLL
- API Timer DLL
- Multithreading Proxy DLL
This got a little silly so I combined them and now have:
- Winsock DLL
- Multithreading DLL
This is way easier to maintain and the code is more compact and easier to use.
It's a fine balance between too many or too little DLLs...
Woka
-
Apr 22nd, 2004, 11:16 AM
#4
Let me in ..
Without going in the details of N-Tier with WOKA .... 
You should split DLLs where it makes sense. A DLL for all Global functions that are going to be used throughout the application for instance is a good choice. You need to architecturally categorize your functions in the DLLs. If you are planning to use any COM based S/W like MTS or COM+ or something its genereally a good idea to split the DLLs. Like WOKA mentioned it could save you some system resources, furthermore when you make a RPC call to your methods in your DLLs entire DLL is loaded in the memory even if you call a single function so you would not want to load a 10 MB DLL in the memory if you only need to call a global function which could be in a separate DLL of lets say 100 KB.
-
Apr 22nd, 2004, 11:19 AM
#5
Fanatic Member
Only split them up if they are not directly related to one another.
Here is an example:
In the paper industry, we have to register the rolls that are made. When the roll is made, the roll information is computed, saved and a label is printed for the roll. A winder object is responsible for the manipulation of the roll object.
I split my component into 2 so that 1 component controlls the computing and storing of the business information and the other would control the logic of ouputing to the label printer. The reason I did this is that the label printing is not directly related to the roll calculations. The nice thing about this is that I can now change the printronix_label.dll for a zerox_label.dll so that I can print to a new printer without affecting my business logic.
On the other hand, we have a strapping station that puts straps onto the roll for packaging. More manipulation needs to be done on the roll object by the strapline object. Instead of placing the strapline object in a new component, I place it into the same component as the wrapline and roll object. Reason being, they are all closely related.
Check out coupling and cohesion
The idea is to always have loose coupling and strong cohesion.
-
Apr 22nd, 2004, 11:31 AM
#6
Thread Starter
Addicted Member
I felt that logically it would make sense to split up the classes into their distinct groups and compile each group as a dll.
This discussion clarified my thinking - thanks to all for your comments.
Jack
-
Apr 22nd, 2004, 12:22 PM
#7
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
|