Re: DLL vs Dynamic Compile




"John F" <jf@xxxxxx> wrote in message
news:919E90BE-5DF6-41A3-B967-266F36A52F30@xxxxxxxxxxxxxxxx
> 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


.



Relevant Pages

  • DLL vs Dynamic Compile
    ... This App is still under development. ... All source code stored in the database will be of Type Form and all ... Once I compile the code I store it on ... the local machine as a DLL. ...
    (microsoft.public.dotnet.languages.csharp)
  • DLL vs Dynamic Code
    ... This App is still under development. ... All source code stored in the database will be of Type Form and all ... Once I compile the code I store it on ... the local machine as a DLL. ...
    (microsoft.public.dotnet.general)
  • RE: DLL vs Dynamic Compile
    ... times a years seems like a small price to pay in order to keep source code ... before executing if you replace a .DLL with a newer one... ... Once I compile the code I store it on ... > local machine elects to use a form, I check to see if that form exists ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C++/TCL Need Solution to Compile Error c2784
    ... There's always the "Platform SDK" from MSDN if you need the window.h stuff, ... Since I'm using the Command Prompt rather than the GUI to compile the ... I then tried to compile your source code and I kept getting the same ...
    (comp.lang.tcl)
  • Re: getting access to classes in separate vb files
    ... about the timing of the compile. ... > execute without assemblies (.dll or exes). ... >> to access methods in those classes from the webform source code ... I upload files in the same directory but errors ...
    (microsoft.public.dotnet.framework.aspnet)