Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

CodeDom

Has anyone been working with the System.CodeDom namespace??

I created a scriptable report server using it and was just blown away by what's possible!

Richard Caetano
Thursday, September 19, 2002

Illuminate its purposes for us .net newbies please...

mahup
Thursday, September 19, 2002

The CodeDOM lets one programmatically generate, um, code. :-)  By using the CodeDOM types, one can do all sorts of neat things: Generate strongly typed collections on-the-fly, create new types and insert them into a working system dynamically, and optimize algorithms by generating custom code based on algo parameters.

There's a good starting tutorial on GotDotNet:
http://samples.gotdotnet.com/quickstart/howto/doc/listbuilder.aspx


~ j.

John Barnette
Thursday, September 19, 2002

Yes Indeed!


With my report server I needed the ability to script simple data access code, the standard Open Connection, Read Data, hand of to a report, etc.  In my system it loads the script from a file (either C# or VB.NET) and compiles it in memory.  At this point I have a reference to a loaded assembly from which I can create objects from.

Richard Caetano
Thursday, September 19, 2002

15seconds.com is featuring a series on this technology.

The first part is available at http://www.15seconds.com/issue/020917.htm

The next parts will be show up on
http://www.15seconds.com/focus/.NET.htm

Bernard Vander Beken
Thursday, September 19, 2002

Let's get back to self modifying code...

Anonymous
Thursday, September 19, 2002

Richard:
I've done something similar with a visual build tool that I've been working on (loading code from files (or an editor window, or a field in the database)),  and I store the generated assembly on disc.  The assembly is only regenerated when the source code changes.

John Barnette
Thursday, September 19, 2002

*  Recent Topics

*  Fog Creek Home