Please correct me if I am wrong. I am using vjc to compile the classes into
a dll. Is it possible to alter the dll, and add a new class to it? Or do I
need to recompile everything everytime?
Sure, if you're an assembly psycho
Just recompile.
| Please correct me if I am wrong. I am using vjc to compile the classes into
| a dll. Is it possible to alter the dll, and add a new class to it? Or do I
| need to recompile everything everytime?
Hi Jason - Your option to recompiling everything when using the command
line compiler is to modulerize or componentize your library to multiple
assembly files.
Here is more information on creating a multi-file assembly:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconbuildingmulti-file
assembly.asp
This way, you can build only the module you are working on, if desired.
But, if you want everything built to the same assembly file, you do have to
build everything each time as the J# compiler doesn't support incremental
compilation, which would be your other option.
The J# compiler does support conditional compilation with the /define:
switch, which can be used to selectively compile source, but this is
typically used to insert or strip out debugging and tracing code in the
resultant image.
Hope this helps,
-Bob
George Birbilis [MVP J#] [9880] - 17 Jun 2004 22:17 GMT
I suppose J# doesn't force you to have all classes of package x.y.z into one
assembly file ("sealed" packages in JAR files do force you to do so, normal
ones don't)
So you could even have one .DLL per class.
This also seems to be the approach ASP.net (for any .net language) is going
to in .NET 2.0, cause you had to bring down and reload your whole
webapplication when you were updating one class of it (the webapplication
was one DLL, not its one DLL per webpage/class)
Not sure how much extra baggage an assembly .DLL carries compared to a
.class file though, if you were to have one .DLL per class. Plus you'd need
one solution in VS.net to be able to include other solutions (not just
projects) since you'd effectively need to have one project per class to do
the above (unless you play with the command-line compiler instead)
If one have a system uses dynamic class updating and loading as in Java,
you'd definitely need to do the above, esp. to be able to have your classes
code travel arround between machines (for example ObjectSpace's [now
Reflection's] Voyager distributed system uses such a concept [mobile
agents/classes]). Not sure what .NET Remoting is doing with such scenarios,
maybe it doesn't support mobile implementation code (not having the class
installed at the other end from beforehand Voyager will have the class
implementation travel through the wire [the Voyager ORB was using HTTP, like
normal web servers])
cheers,
George
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis <birbilis@kagi.com> [J# MVP9880]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime VCL and ActiveX controls (for PowerPoint/VB/Delphi etc.)
+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)
+ TransFormations, VB6 forms to ASP.net WebForms convertion
http://www.kagi.com/birbilis
+ Robotics
http://www.mech.upatras.gr/~robgroup
........................................................................
> | Please correct me if I am wrong. I am using vjc to compile the classes
> into
[quoted text clipped - 7 lines]
>
> Here is more information on creating a multi-file assembly:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconbuildingmulti-file
> assembly.asp
>
[quoted text clipped - 7 lines]
> typically used to insert or strip out debugging and tracing code in the
> resultant image.