473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Best Practise: Many Small or viewer Large assemblies

When one architects a new project one of the first steps in the decision is
to decide on the layers. (In my opinion anyway)

One architecture that I have used before is to go solid OO and create
objects, which normally are very small and only deals with the stuff
pertaining to that object, then break it down into Business Process, Process
Controllers and Data Access Objects for each "Object", each of which is
created in it's very own .Net project and becomes a completely separate
assembly (Dll). The thing is that the assemblies are often very small.

Another way is to dump all the Business components for an entire application
together into a single assembly. Doing the same for the DAL and the BPC's
essentially creating only a few larger assemblies.

Personally I like the first option, since I don't have to load this monster
assembly into memory to start only one class and execute one or two small
methods. Also, it makes more logical sense (to me anyway) and is therefore
more manageable.

One problem with this though is that on large applications you could end up
with hundreds of projects in a single solution, but that can easily be
overcome as we all know by just creating smaller work specific solutions.

What would be the Best Practise kind of answer to this?

Thanks
David
Jan 3 '07 #1
4 2028
I think it best option is based on case to case basis. In my opinion,
if project is larger and team size is biger then first option suite
where well. Since number of people can work at simultaneously. If the
team size is less and project is also small and less reusability then
few assemblies opens suite were well.

Sunil Raskar (MCSD)
W1ld0ne74 wrote:
When one architects a new project one of the first steps in the decision is
to decide on the layers. (In my opinion anyway)

One architecture that I have used before is to go solid OO and create
objects, which normally are very small and only deals with the stuff
pertaining to that object, then break it down into Business Process, Process
Controllers and Data Access Objects for each "Object", each of which is
created in it's very own .Net project and becomes a completely separate
assembly (Dll). The thing is that the assemblies are often very small.

Another way is to dump all the Business components for an entire application
together into a single assembly. Doing the same for the DAL and the BPC's
essentially creating only a few larger assemblies.

Personally I like the first option, since I don't have to load this monster
assembly into memory to start only one class and execute one or two small
methods. Also, it makes more logical sense (to me anyway) and is therefore
more manageable.

One problem with this though is that on large applications you could end up
with hundreds of projects in a single solution, but that can easily be
overcome as we all know by just creating smaller work specific solutions.

What would be the Best Practise kind of answer to this?

Thanks
David
Jan 4 '07 #2

W1ld0ne74 wrote:
When one architects a new project one of the first steps in the decision is
to decide on the layers. (In my opinion anyway)

One architecture that I have used before is to go solid OO and create
objects, which normally are very small and only deals with the stuff
pertaining to that object, then break it down into Business Process, Process
Controllers and Data Access Objects for each "Object", each of which is
created in it's very own .Net project and becomes a completely separate
assembly (Dll). The thing is that the assemblies are often very small.

Another way is to dump all the Business components for an entire application
together into a single assembly. Doing the same for the DAL and the BPC's
essentially creating only a few larger assemblies.

Personally I like the first option, since I don't have to load this monster
assembly into memory to start only one class and execute one or two small
methods. Also, it makes more logical sense (to me anyway) and is therefore
more manageable.

One problem with this though is that on large applications you could end up
with hundreds of projects in a single solution, but that can easily be
overcome as we all know by just creating smaller work specific solutions.

What would be the Best Practise kind of answer to this?

Thanks
David
Jan 4 '07 #3
Thanks for the response...

Bear in mind though that my question is not so much about people being able
to work simultaneously on a project. This can still be achieved if the large
assemblies contain several classes (In separate cs files) each.

My question is more about performance. I heard somewhere that smaller
assemblies may cause "Memory fragmentation". Is this true? And what is the
impact?

In a high performance application where many thousands of instances of a
class could be started, I can not imagine it being that great to have these
large assemblies each taking up a major chunk of memory for the application
to only use very little functionality in each.

If only a single class is instantiated in a “large” assembly containing many
other classes (that in this instance will not be used), surely the OS must
load the entire assembly (or dll) into memory, wasting the space required for
all the other classes that will not be used.

As for memory fragmentation, if the application is running many instances of
a small class, surely the assemblies/class will be pooled and thus not be
unloaded from memory every time and therefore not cause memory fragmentation.

Have I just answered my own question? When the application is expected to
deal with very high usage, with many hundreds and/or thousands of "users"
using the application, and pooling is enabled/possible, the assemblies should
be small, while for a large application that will deal with one transaction
every 60 seconds, you might as well, load large assemblies, since the smaller
one's will not be pooled anyway, since they are only used once in a while and
it may exceed there lifetime, so they will be loaded, and unloaded and
reloaded, and therefore may cause memory fragmentation???!!???

Any other references, suggestions, questions, comments and/or concerns would
be most appreciated.

Thanks
David

"SUNILR" wrote:
I think it best option is based on case to case basis. In my opinion,
if project is larger and team size is biger then first option suite
where well. Since number of people can work at simultaneously. If the
team size is less and project is also small and less reusability then
few assemblies opens suite were well.

Sunil Raskar (MCSD)
W1ld0ne74 wrote:
When one architects a new project one of the first steps in the decision is
to decide on the layers. (In my opinion anyway)

One architecture that I have used before is to go solid OO and create
objects, which normally are very small and only deals with the stuff
pertaining to that object, then break it down into Business Process, Process
Controllers and Data Access Objects for each "Object", each of which is
created in it's very own .Net project and becomes a completely separate
assembly (Dll). The thing is that the assemblies are often very small.

Another way is to dump all the Business components for an entire application
together into a single assembly. Doing the same for the DAL and the BPC's
essentially creating only a few larger assemblies.

Personally I like the first option, since I don't have to load this monster
assembly into memory to start only one class and execute one or two small
methods. Also, it makes more logical sense (to me anyway) and is therefore
more manageable.

One problem with this though is that on large applications you could end up
with hundreds of projects in a single solution, but that can easily be
overcome as we all know by just creating smaller work specific solutions.

What would be the Best Practise kind of answer to this?

Thanks
David

Jan 4 '07 #4
W1ld0ne74 wrote:
When one architects a new project one of the first steps in the decision is
to decide on the layers. (In my opinion anyway)
....
What would be the Best Practise kind of answer to this?
....
"The granule of reuse is the granule of release".

This may be helpfull:
http://ifacethoughts.net/2006/04/04/...ncy-principle/

Regards,
Goran
Jan 5 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: assi | last post by:
Hello all We are developing a large dotnet application, which includes ~ 120 assemblies. (total size of all binaries is ~ 20MB). Our application also references the following dotnet assemblies:...
4
by: arak123 | last post by:
Lets say i have file with the following structure and the following code snippet: --------------------BEGIN FILE----------------------- name1 name2 name3 name4 ; name5
0
by: David Levine | last post by:
This is a lengthy post; please bear with me... This will be a large system with dozens of plugins. In addition to plugins developed internally there will be 3rd parties that will write their own...
3
by: Paul Say | last post by:
I have a asp.net application that will need to create a document/report from data in a database. The user will fill out a form supplying various criteria for parameters. I would like the...
16
by: JD | last post by:
Hi guys What's the best way to specify font size using CSS? I try to avoid absolute units like pt and px because then users can't resize the fonts in IE, but % and em are a complete pain to use...
13
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those...
16
by: Rex | last post by:
Hi All - I have a question that I think MIGHT be of interest to a number of us developers. I am somewhat new to VIsual Studio 2005 but not new to VB. I am looking for ideas about quick and...
0
by: jobs | last post by:
Re: SSRS report viewer Execution ' ' cannot be found (rsExecutionNotFound) Reserved.ReportViewerWebControl.axd Every now and then, my users get this error while in the Reportviewer. Usually,...
41
by: =?Utf-8?B?VGltIE1hcnNkZW4=?= | last post by:
Hi, I am after suggestions on the best practice declaring and destroying objects. some example code: Private Sub MySub Dim frmMyForm As MyForm Try
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.