473,569 Members | 2,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2764

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******** *************** ***********@mic rosoft.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******** *************** ***********@mic rosoft.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
2481
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
9728
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 access to this table. The $ is what's causing the trouble: declare v_sql varchar2(4000); begin v_sql := 'select * from v$session;'; execute...
9
4954
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
2955
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 not, are there any plans to add support for it in the future? What other popular programming languages support dynamic programming? --The...
4
4414
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 reuse for various template parameters. I wonder if there exist techniques for achieving a dynamic polymorphism using the generic programming. Is this...
6
8186
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 allocation to create object of that class ? 2. If it says "dynamic memory allocation", is it mean the following code : DestinationAddress* dest = new...
8
2004
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 for the button. (This is done by the form itself, not by using VS.Net) (button and source code should be a record in database, these information...
6
2652
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 everytime I change a page on the production server I need to restart IIS to effect the change. If I don't restart IIS, it tries to recompile but gets...
11
2061
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 functions (whose names and signatures are known at compile time). The app then calls these functions as needed throughout its execution. Depending on...
13
14601
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 Nicolai M. Josuttis. Chapter 14.) How to implement analogue of this technique via static polymorphism? Perhaps there is special design pattern for...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7679
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6287
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 project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.