Support > Wagby Developer Network(R7) > Customize with Java > Concept of Java customization
ja | en

I will explain Wagby's architecture and customization policy.

Wagby is based on open source middleware such as Spring, Hibernate.(*1)

We recommend 7 or more as the base Java.(*2)

Figure 1 Configuration diagram of R7 architecture
(* 1) Commercial middleware is not included.
(* 2) It is designed to operate even in Java 6.

Wagby generates both server side (Java) and client (HTML, JavaScript) code.Here are some typical classes on the server side.

class Description
Model Class that stores data.It does not include business logic.Model classes are prepared according to the purpose such as persistence, screen display, list display, and search condition storage.
Controller A class that mediates UI and business logic.Spring MVC base.A basic controller corresponding to the screen function defined by Wagby is prepared.
Service Business processing class.It is called mainly from Controller.It becomes a transaction boundary, and calls a plurality of Dao as necessary.Transaction control uses Spring 3 @ Transactional annotation.
Dao Data access class.One Dao is responsible for CRUD processing on one model.Search processing does not write SQL, but uses the Criteria query API (provided by Hibernate 4).
Helper Instantiate and calculate model classes with appropriate initialization, and mutual conversion of models.Various properties described in the design information are coded classes.
Meta Meta information on the model (information such as the item name and type, as well as which item the primary key is) is managed.

Figure 2 shows the relationship between Controller, Service, Dao, and Helper.

Figure 2 Process flow

You can customize Java source code automatically generated by Wagby.The recommended customization method is called Generation Gap pattern.Prepare a customization class that inherits automatically generated classes and override the necessary methods.

Figure 3 Generation gap pattern

In the example of Figure 3, MyCustomerHelper which inherits the automatically generated CustomerHelper is prepared.If you store this class in the customize folder and build it, it will be recognized automatically.Within the application, instances of MyCustomerHelper will be used instead of CustomerHelper.

The flexibility of customization with this approach is high, you can override most processing.

The next theme concerns activation of Wagby, so it can not be customized.

  • Change of logon authentication part
  • Handling of authority

Customization of authentication/authorization system including single sign-on correspondence will be individually handled by Jasmine software.Please inquire details.