The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Breaking the Last Dependency
Subject:  Bad idea (in most cases)
Date:  2005-04-15 02:23:18
From:  terkans


Whether you are writing class names into a properties file, or into a java file, it's still programming. It's just that doing it in a property file loses all your edit-time and compile-time checks.

If implementation classes for some interfaces/factories need to be modified after delivery, I would suggest using a Registry (not windows registry) based approach, allowing plugins to modify the set of implementation classes at runtime.

Or use a jar-scanner approach as suggested earlier in these comments.

In general, this looks like extra pain for no real gain.

 Feed java.net RSS Feeds