Information Technology Reference
In-Depth Information
If the need of application is expanded, requiring to query more information, what
we just need to do is to add a new query class inheriting from abstract class DataMod-
elList, the new query class has to override the abstract method getDetachedCriteria
(),then it can be used as the already existing query classes. The reason is the query
logic is completely alike, except the query conditions. The key of Middle Layer is ex-
tracting the same code and logic to abstract class so that it can achieve maximum code
reuse. A parallel case, if the query logic need to be modified, just change the
implementation of the abstract class method, then test one query class, if one query
class can be debug successfully, with the same way, other query classes can be
adjusted thus, it really relent the programmers's modify task.
3 Summary
Nowadays, there is a prevalent trend of framework-based programming. Under this back
ground, how to use framework flexibility and how to integrate different frameworks
effectively have already become the major problems faced by programmers.
As a solution, this paper proposed a design of Middle Layer used in off-line query
platform based on JSF and Hibernate framework. The Middle Layer applies the idea
of multi-layer and polymorphism, so that it can be more reliability, more
maintainability and more expansibility. in other off-line query application, the Middle
Layer can be modified to adapt to complicated application.
References
1. Zhou, J., Liu, G.-y., Zhang, G.-p.: Developing Web Interface Using JSF. Journal of East
China Jiaotong University (February 2007)
2. Zhang, C., Li, C.-p.: Improvement of search based on O/R MAPPING technology. Journal
of Computer Applications (February 2006)
 
Search WWH ::




Custom Search