473,385 Members | 1,341 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,385 software developers and data experts.

DLL vs Dynamic Compile

Currently I'm working on a C# app for a large organization (700 users
nationwide). This App is still under development. I have setup code in my
App to pull C# source code from a database and dynamically compile it at
runtime. All source code stored in the database will be of Type Form and all
forms will load as children of an MDI. Once I compile the code I store it on
the local machine as a DLL. I do this so that the next time a user on that
local machine elects to use a form, I check to see if that form exists
locally in a DLL first. If it does I load it from the local DLL and cut down
on both load time and network traffic. I also check to see if there are
newer versions of the code in the DB and will pull/recompile as needed.

My question is: Can anyone give me pros/cons to storing either the C# code
in the database or the already compiled DLL's? I could circumvent the need
to compile on the fly if I stored the DLL's direct, but I'm not sure I
recognize all the pros/cons to doing it either way. I do know that the DLL's
are larger than the raw source code so network traffic would be up slightly.
I think this would be nominal at best though.

Any thoughts/suggestion on storing raw source or a DLL would be greatly
appreciated.

Security?
Speed?
Preference?

Thanks,
John F
Nov 17 '05 #1
4 2756

IMHO I'd store the compiled .DLL. 700 users grabbing an updated .DLL a few
times a years seems like a small price to pay in order to keep source code
out of sight. If bandwidth is that big of an issue then perhaps you could
compress/decompress the .DLL - there are freeware compression APIs - I think
one is called "ZipLib"??

Also I'm assuming that your compiled C# .DLL contains IL, not native
compiled code. If so then .NET will version check the IL and recompile it
before executing if you replace a .DLL with a newer one...

"John F" wrote:
Currently I'm working on a C# app for a large organization (700 users
nationwide). This App is still under development. I have setup code in my
App to pull C# source code from a database and dynamically compile it at
runtime. All source code stored in the database will be of Type Form and all
forms will load as children of an MDI. Once I compile the code I store it on
the local machine as a DLL. I do this so that the next time a user on that
local machine elects to use a form, I check to see if that form exists
locally in a DLL first. If it does I load it from the local DLL and cut down
on both load time and network traffic. I also check to see if there are
newer versions of the code in the DB and will pull/recompile as needed.

My question is: Can anyone give me pros/cons to storing either the C# code
in the database or the already compiled DLL's? I could circumvent the need
to compile on the fly if I stored the DLL's direct, but I'm not sure I
recognize all the pros/cons to doing it either way. I do know that the DLL's
are larger than the raw source code so network traffic would be up slightly.
I think this would be nominal at best though.

Any thoughts/suggestion on storing raw source or a DLL would be greatly
appreciated.

Security?
Speed?
Preference?

Thanks,
John F

Nov 17 '05 #2

"John F" <jf@rt.com> wrote in message
news:91**********************************@microsof t.com...
Currently I'm working on a C# app for a large organization (700 users
nationwide). This App is still under development. I have setup code in
my
App to pull C# source code from a database and dynamically compile it at
runtime. All source code stored in the database will be of Type Form and
all
forms will load as children of an MDI. Once I compile the code I store it
on
the local machine as a DLL. I do this so that the next time a user on
that
local machine elects to use a form, I check to see if that form exists
locally in a DLL first. If it does I load it from the local DLL and cut
down
on both load time and network traffic. I also check to see if there are
newer versions of the code in the DB and will pull/recompile as needed.

My question is: Can anyone give me pros/cons to storing either the C# code
in the database or the already compiled DLL's? I could circumvent the
need
to compile on the fly if I stored the DLL's direct, but I'm not sure I
recognize all the pros/cons to doing it either way. I do know that the
DLL's
are larger than the raw source code so network traffic would be up
slightly.
I think this would be nominal at best though.

Any thoughts/suggestion on storing raw source or a DLL would be greatly
appreciated.

Security?
Speed?
Preference?


You are going to want to store the compiled binaries for all these reasons.
Speed and security right off, there are reasons to prefer binaries:

-A compiled assembly has an AssemblyVersion burned into it, while source
code does not.
-A compiled assembly can be compiled from any number of source files.
-A compiled assembly can be signed, and loading compiled, signed, safe
assemblies can be done in a low-trust context.
David
Nov 17 '05 #3
Thanks David
--
John F
"David Browne" wrote:

"John F" <jf@rt.com> wrote in message
news:91**********************************@microsof t.com...
Currently I'm working on a C# app for a large organization (700 users
nationwide). This App is still under development. I have setup code in
my
App to pull C# source code from a database and dynamically compile it at
runtime. All source code stored in the database will be of Type Form and
all
forms will load as children of an MDI. Once I compile the code I store it
on
the local machine as a DLL. I do this so that the next time a user on
that
local machine elects to use a form, I check to see if that form exists
locally in a DLL first. If it does I load it from the local DLL and cut
down
on both load time and network traffic. I also check to see if there are
newer versions of the code in the DB and will pull/recompile as needed.

My question is: Can anyone give me pros/cons to storing either the C# code
in the database or the already compiled DLL's? I could circumvent the
need
to compile on the fly if I stored the DLL's direct, but I'm not sure I
recognize all the pros/cons to doing it either way. I do know that the
DLL's
are larger than the raw source code so network traffic would be up
slightly.
I think this would be nominal at best though.

Any thoughts/suggestion on storing raw source or a DLL would be greatly
appreciated.

Security?
Speed?
Preference?


You are going to want to store the compiled binaries for all these reasons.
Speed and security right off, there are reasons to prefer binaries:

-A compiled assembly has an AssemblyVersion burned into it, while source
code does not.
-A compiled assembly can be compiled from any number of source files.
-A compiled assembly can be signed, and loading compiled, signed, safe
assemblies can be done in a low-trust context.
David

Nov 17 '05 #4
Thanks Richard
--
John F
"Richard" wrote:

IMHO I'd store the compiled .DLL. 700 users grabbing an updated .DLL a few
times a years seems like a small price to pay in order to keep source code
out of sight. If bandwidth is that big of an issue then perhaps you could
compress/decompress the .DLL - there are freeware compression APIs - I think
one is called "ZipLib"??

Also I'm assuming that your compiled C# .DLL contains IL, not native
compiled code. If so then .NET will version check the IL and recompile it
before executing if you replace a .DLL with a newer one...

"John F" wrote:
Currently I'm working on a C# app for a large organization (700 users
nationwide). This App is still under development. I have setup code in my
App to pull C# source code from a database and dynamically compile it at
runtime. All source code stored in the database will be of Type Form and all
forms will load as children of an MDI. Once I compile the code I store it on
the local machine as a DLL. I do this so that the next time a user on that
local machine elects to use a form, I check to see if that form exists
locally in a DLL first. If it does I load it from the local DLL and cut down
on both load time and network traffic. I also check to see if there are
newer versions of the code in the DB and will pull/recompile as needed.

My question is: Can anyone give me pros/cons to storing either the C# code
in the database or the already compiled DLL's? I could circumvent the need
to compile on the fly if I stored the DLL's direct, but I'm not sure I
recognize all the pros/cons to doing it either way. I do know that the DLL's
are larger than the raw source code so network traffic would be up slightly.
I think this would be nominal at best though.

Any thoughts/suggestion on storing raw source or a DLL would be greatly
appreciated.

Security?
Speed?
Preference?

Thanks,
John F

Nov 17 '05 #5

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

Similar topics

1
by: Terry | last post by:
Hi, could someone please exmaplin to me what dynamic method dispatching is and how it's connected to virtual methods? Thanks Terry
5
by: traceable1 | last post by:
I am trying to create a stored procedure with dynamic sql referencing the V$SESSION table (view). I need to use this dynamically, because the procedure will not compile if the user does not have...
9
by: Tom | last post by:
What I mean is why can I only allocate const size stuff on the stack in C++? If I want to allocate a variable amount I need to use the OS API (Win32 in my case). Thanks, Tom.
5
by: The Directive | last post by:
Does C++ support dynamic programming? I hope I'm using the correct term. I want to write code that can dynamically rewrite itself! I want to dynamically create functions and call them and etc. If...
4
by: Leslaw Bieniasz | last post by:
Cracow, 20.10.2004 Hello, As far as I understand, the generic programming basically consists in using templates for achieving a static polymorphism of the various code fragments, and their...
6
by: chris | last post by:
Hi all, I need to know, what is the difference between dynamic memory allocation, and stack allocation ? 1. If I have a class named DestinationAddress, when should I use dynamic memory...
8
by: George Meng | last post by:
I got a tough question: The backgroud for this question is: I want to design an application works like a engine. After release, we can still customize a form by adding a button, and source code...
6
by: Tom | last post by:
I am developing my pages on my development machine and then copying to the production server. I am not pre-compiling, I am using the 'dynamic compile' feature. This is working fine except that...
11
by: Sean M. DonCarlos | last post by:
I have an unmanaged Win32 app that looks up the name of a DLL (unknown at compile time) from an external location, loads it with LoadLibrary, and then uses GetProcAddress on three exported...
13
by: Krivenok Dmitry | last post by:
Hello all! Perhaps the most important feature of dynamic polymorphism is ability to handle heterogeneous collections of objects. ("C++ Templates: The Complete Guide" by David Vandevoorde and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.