Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

Minimizing Compile Time Dependencies

Thread view: 
gatescope@gatescope.com - 06 Jan 2006 23:07 GMT
In C++ minimizing Compile Time dependencies is a fundamental physical
design issue.  The class designer tries to create as minimal
dependencies to other classes using forward declarations and
eliminating as many include directives he can, usually implementing the
class details using an envelope - letter (pimpl) pattern.

Is a similar approach doable in Java ?

Please note that there are three types of changes :

1)    Adding new methods
2)    Modifying the body of a method
3)    Modifying the signature of an existing method

For cases 1 and 2 compiling the class does not break existing clients
of it (my understanding is that the VM is using Reflection to map
method calls), which is fine.

BUT case 3  causes callers of the method to throw a RUNTIME exception.
The only way around it is to recompile the client class.

If we use timestamp comparison to recompile we are going to end up
recompiling even for cases 1 and 2.

I don't know if the only way around it, is for the developer to
enforce a coding rule not to modify the signature of a class unless he
is willing to recompile his entire application.....

Any help will be greatly appreciated

Thanks

John
Chris Smith - 06 Jan 2006 23:39 GMT
> I don't know if the only way around it, is for the developer to
> enforce a coding rule not to modify the signature of a class unless he
> is willing to recompile his entire application.....

Language-aware incremental build tools, such as the compiler in Eclipse,
are capable of dealing with this and doing incremental builds.  
Otherwise, yes you rebuild the entire application.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.