As far as I see it, this is the first step on the road to making aspects part of the language.
What makes this more useful than just a naming convention is when you're doing work with APIs like EJBs. Currently a developer has to jump through various hoops to provide extra information to a special "ejb compiler" so that it can verify that you have a valid component. This extra information is then used to do things like generate stubs/skeletons for Remote Method Invocation and other container generated classes that wrap around your code and provide features like concurrency management/transaction handling/persistence/etc.
Unfortunately this situation has evolved and grown more complicated over time. For example to define a Container Managed Persistence Entity Bean I have to write the bean implementation class (containing various abstract method definitions for getting/setting properties as well as implementations of all the code that the various interfaces will use), write one or two interface definition files for the business methods (where the actual business logic gets executed) so that the container which of the implementation classes it can expose, write one or two 'home' interface definition files (which acts like a definition of the various 'static' methods for creating, finding and removing instances of this bean from the database), write a descriptor for the component specifying the security restrictions on each method. Then I write one more vendor-specific descriptor detailing the object-relational mapping for the bean's properties to fields in the database.
As you can imagine this is repetitive and error-prone. What they're trying to do with this proposal is to start shifting that kind of semantic meta-information into the source code rather than using tricks like naming conventions, reflection and numerous descriptor files.
As I understand it, the aim is to move the meta-data into the thing it's describing and help the standard java compiler do various sanity checks rather than having individual developers writing their own tools to manage the morass I described above.
|