To Java or not to Java? Depends what you need. The BC4J framework is designed to allow completely declarative components to be defined using only the component XML files if you have no need to write custom Java code for the component. By default, we generate the entity object Java class, the view object Java class, and the application module Java class. But you can explicitly turn off the Java file on a component by component basis (on the "Java" panel of the respective editors), as well as globally change the defaults for whether we generate Java files or not. You can change the defaults in the Tools | Preferences... dialog, under the Business Components / Java Generation panel. Try building yourself an Emp/Dept example with EO's, VO's, and AppModule all without Java and test it in the tester to see that it all works. For components that don't have a custom Java file, the BC4J framework baseclass is used at runtime instead.
Of course, if you don't generate the Java, then you don't get the typesafe accessors generated and need to work with the attributes of entities and view object rows using the generic getAttribute() method, but being aware of this feature you can be more conscious about when to use it and when not to.
12:56:48 AM
|
|