Naming conventions

Just as there are OFBiz conventions that cover Component and Application, directory and file layout, Java file-naming best practices have been established to help organize and locate resources.

How to do it...

The following are the OFBiz naming conventions:

  • Use Java CamelCase when picking a name for your Java class file or your method. CamelCase names are names in which compound words, such as "My Application", are joined together without spaces to form "MyApplication".
  • Class files that contain OFBiz Services have a suffix of "Services.java". For example, a Java class file containing Services could be called "MyServices.java". Only place OFBiz Services inside a file with the "Services.java" suffix.
  • Class files that contain OFBiz Events have a suffix of "Events.java". Only place OFBiz Events inside a file with the "Events.java" suffix.
  • Other Java class files that you may see have suffixes such as "Worker.java" or "Helper.Java". These files should not contain OFBiz Events or Services.
  • All OFBiz class files have packaging notation that maps to the directory hierarchy relative to the src directory in the containing Component.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.235.176