Hibernate's side title is called: O / R persistence in accordance with Java practices, revealing the major problems of the three-layer structure, which is the three-layer non-uniform. So far, it is still difficult to implement the shortcut user interaction of "Master-Detail", "Lookup" in the C / S mode on the Web interface. The current common web application structure includes web browser / application server / data. Database is still a classic E / R model. This model is based on rows, so Data Source / Table Set is based on rows, ODBC / JDBC Driver Based on rows. The DBGRID of the View layer is also based on rows, and the Entity model is very good, the development is simple and intuitive, I believe this is one of the key reasons for the C / S mode. "Master-Detail", "Lookup" is extremely common and intuitive association modes in C / S mode. But in essence, Object Pascal / Java is object-oriented. Here, a major non-uniform: OO Vs E-R appeared. The solution that appears is EJB and O / R mapping tools. EJB's Entity Bean is an early ENTITY package. But and now the advanced tool represented by Hibernate (permanent to POJO) is compared, it is cumbersome and difficult to use in OO and ER. In these tools, the most essential feature that represents OO and E-R is the corresponding relationship between the inheritance tree and the table structure. Hibernate2 supports the entire inheritance tree corresponding to a table, inherited each class in the tree corresponding to two basic correspondence, and the JOIN tag introduced by Hibernate 3 can be combined with both, and achieve each class. The base class is lasting or saved in the same table or in a new table, it can be said that Hibernate 3 has completed this corresponding task very well. "Master-Detail", "Lookup" corresponds to "One-Many", "Many-One" in the mapping file such as HBM.xml. After Database is completed with Java, the next step is to inevitably the integration between existing web clients and server-side code. From the surface, the Web Client is mostly completed by HTML / JavaScript, and the server side uses Java output. The two is a simple command / feedback model. After the model develops from Model 1 to the MVC model, the written code becomes clear. But developers still find that writing Web App is still not a simple matter. Struts / Webwork is still only a very basic basis, which is no help to write client business objects. For example, when the server-side JAVA program is modeled, everyone has become accustomed to analyze the order / client / product, but when writing the Web Client, Struts / WebWork can only help you complete the page submission / feedback process, but you can't help You analyze the client business: When you create a new order, after selecting the customer, it is said that this customer has enough pre-receipts, such a simple case reflection in the mindset of the programmer is still the input tag for each field, each page POST MODEL, and how to render the next page again with the processing of Action. The biggest problem is that the web client end code of the performance layer is subjected to semantic out of the server-side code.
Specific performance in: When using the MVC structure such as Struts / Webwork, it is usually not considered to perform business control in the client, such as whether the pre-pre-receipt is sufficient by JavaSCIPT. Therefore, you need to make a constant page refresh to complete the entire logic. To resolve this issue, you can usually use the business logic to the client, JavaScript XMLHTTP or JavaScript Web Service, Java Applet / Application, and even the Office platform (embedded code to Excel) completes the entire business logic. There are also many questions: 1. To implement business logic on the client, the client code does not correspond to the foundation Object facility like Pojo. JavaScript lacks an infrastructure such as Interface. The Excel program is more difficult to do, because the language involved in the development is much more, and the development difficulty is increased, and the project control is difficult. Direct consequences are difficult to define "Master-Detail", "Lookup", etc. in the client code. Even in the project plan, the POJO (Plain Old JavaScript Object) and its association are defined in JavaScript, it is also difficult to use the high-class association described with HBM.XML. 2, the client infrastructure is difficult to perform interface element binding. When processing a lot of data, the Excel scheme reflects outstanding advantages, customers' acceptance of Excel's Excel is very high, but the disadvantage is that this Excel program is difficult to make dynamic queries such as XMLHTTP. 3. The client infrastructure is difficult to interact with the server side. XMLHTTP and Web Service are optional, but low efficiency in enterprise applications may bring server pressure hidden dangers, reduce performance and throughput. If the Excel scheme, it is also facing a problem with server data interaction. Whether it is an XMLHTTP program or an Application program, it is facing the requirements of discarding Struts / WebWork reinforced request / response dispatch. 4, the client infrastructure is difficult to carry out unit testing. There is JUnit4JS, Port of JUnit 3.8.1, but there is no mature stub / mock tool. The Excel scheme is almost impossible to test. 5. Client infrastructure is difficult to debug. JavaScript lacks log tools like log4j (log4jshttp://www.petrusrex.com/programmes/jslib.htm
This tool is still far less mature), and it is difficult to track. The Excel scheme is a complete VBA environment. 6. The client infrastructure is low. JavaScipt / VBA is interpreted that language is difficult to implement complex logic, and its performance decisions can only be controlled with their fine-grained interface. 7. Due to the splitting of the browser, the application is difficult to use across platforms. The operation of this type AOP can be used on the IE platform, but it cannot be implemented in Mozilla. The JSF program is expected to be an alternative, but according to the current situation of MyFaces, more complex flexible controls can be completed in order to achieve more complex flexible controls. The breakthrough of the software development method, looking forward, there may be a breakthrough in design, the MDA is the direction; the other direction is backward to the specific implementation of the specific implementation, similar to WebApp, Application is also facing similar Problem), for whether the definition of Model can be directly brought into the performance layer, JSF and .NET may have a new round of competition.