CN102681852A - Agile development method based on JavaEE - Google Patents
Agile development method based on JavaEE Download PDFInfo
- Publication number
- CN102681852A CN102681852A CN2012101512116A CN201210151211A CN102681852A CN 102681852 A CN102681852 A CN 102681852A CN 2012101512116 A CN2012101512116 A CN 2012101512116A CN 201210151211 A CN201210151211 A CN 201210151211A CN 102681852 A CN102681852 A CN 102681852A
- Authority
- CN
- China
- Prior art keywords
- data
- interface
- mainly
- inquiry
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides an agile development method based on JavaEE. The method comprises the following steps of: realizing a frame capable of increasing, deleting, modifying and checking; during development of functions for increasing, deleting, modifying and detecting, only developing the following codes: 1, realizing an ISearchCondition interface, realizing a corresponding method, mainly specifying a database table to be inquired and an inquiry method, and converting a database record line into a key code of an object; 2, compiling a PO mapping file and a mapping type by using a third party tool or following a Hibernate standard according to a database table structure; 3, compiling a foreground interface for inquiring, adding and modifying according to a template; and 4, compiling configuration film contents of Struts, Spring and Hibernate according to the template. Due to the adoption of the agile development method, the labor working strength of a programmer can be relieved greatly, developing efficiency is increased, and a programmer is liberated from complex repeated labor.
Description
Technical field
The present invention relates to a kind of computer program development approach, specifically, related to a kind of agile development method based on JavaEE.
Background technology
In systems development process based on the JavaEE technology; In most cases all will relate to basic additions and deletions to database table changes and looks into; And most of system can adopt Struts, Spring, Hibernate or similar framework to come auxiliary development, though these third-party frameworks of increasing income have the modularization of assembly, and dirigibility and reusability; Simplified exploitation, but lacked the development efficiency that a kind of general agile development method improves project based on the weblication of MVC.
Under the ssh of Struts+Spring+Hibernate frame combination, at present general development process is following: 1, use PO Core Generator that myeclipse carries or other PO Core Generator that database table is generated corresponding PO class and hibernate configuration file and put into the project of eclipse; 2, write the Action class (Struts1 also will write corresponding form) of Struts and the configuration file of configuration Struts; 3, write the Logic interface of logical layer and realize type, the configuration file of configuration Spring is injected into the Bean of definition among the Action of Struts and calls for key-course; 4, write the Dao interface of persistent layer and realize type, about the configuration file of Hinbernate, the Bean of definition is injected among the Bean of Logic layer and calls among the configuration Spring for logical layer; 5, write the JSP page that corresponding inquiry is showed, added, revises, and the configuration JSP page turns in the Struts configuration file; 6, debug allomeric function, and develop corresponding code according to the function needs.
In this development process,, improved code reusability though realized assembly moduleization, flexible configurationization; Also simplified simultaneously exploitation to a certain extent; But still trifling numerous and diverse, particularly for the simple functional module of some operation flows, wherein additions and deletions change to look into and have accounted for about 50% workload; Exploitation in this case, the programmer just has been absorbed in the machinery work that repeats.
In order to solve the problem of above existence, people are seeking a kind of desirable technical solution always.
Summary of the invention
The objective of the invention is deficiency to prior art; Thereby a kind of agile development method based on JavaEE is provided; This agile development method can alleviate programmer's work working strength greatly, improves development efficiency, and the programmer is freed from the work of numerous and diverse repetition.
To achieve these goals, the technical scheme that the present invention adopted is: a kind of agile development method based on JavaEE, at first, realize that one possesses additions and deletions and changes the framework of looking into;
This framework is by constituting with lower class:
SearchAction: this class receives user's request; Automatically user request information is encapsulated in the SearchCondition attributes object by Struts, and the data of user's request are carried out corresponding encapsulation, the code of calling logic layer is realized the inquiry to data then; Query Result is put into the object of rows attribute; If what carry out is the paging inquiry, the branch page information after then will inquiring about is put into the attribute of request, so that the page carries out the tissue of data exhibiting;
DivideInfo: this type encapsulated user's paging solicited message; Mainly deposit three information, every page of line number, current request number of pages, record and total line number are obtained in wherein preceding two requests by the user; By framework data being inquired about the back for the 3rd obtains; This type of HTML information that provides method to generate paging, after data query finishes, the instance of this type will deposit among the request;
ISearchCondition: supply framework to call the inquiry of carrying out data thereby the query argument that this interface is mainly asked according to the user is combined into SQL statement; This interface mainly comprises following three methods; GetSearchSql is used for obtaining the SQL statement that user's request converts to; InitCondition is used for when generating SQL statement, parameter being carried out initialization operation; FromSQLQuery is used for the data set in the ResultSet object that inquires is made into the Java object, so that the page carries out data display;
DataMaintainAction: this class is inherited from SearchAction; On the basis of query function, encapsulated the function that additions and deletions change, mainly comprised following method, add is used for opening and adds the interface and preserve the data that will add; Modify is used for opening and revises the interface and preserve the data that will revise; Del is used for carrying out the operation of deleted data, when receiving user's solicited message, automatically required parameter is encapsulated in the po attributes object by Struts;
IBaseLogic: this interface definition the due operation of logical layer; Comprise that mainly inquiry and additions and deletions change the logic realization method of operation; Mainly comprise following method, getSearchResult is used for based on SearchCondition data being carried out query manipulation, and addPo adds the PO object; ModifyPo revises the PO object, delPo deletion PO object;
IBaseDao: this interface definition the due operation of persistent layer; Comprise that mainly inquiry and additions and deletions change the logic realization method of operation, mainly comprise following method, getSearchResult is used for according to SearchCondition data being carried out query manipulation; GetDivideResultInfo is used for according to SearchCondition data being carried out the query manipulation of branch page information; AddPo adds the PO object, and modifyPo revises the PO object, delPo deletion PO object;
IBaseLogic, IBaseDao: these two classes have realized IBaseLogic and two interfaces of IBaseDao respectively;
Change when looking into function in the exploitation additions and deletions; Only need the following code of exploitation to get final product: 1, to realize the ISearchCondition interface; Realizing corresponding method, mainly is to specify database table and the querying method that will inquire about, realizes then the capable key code that converts object into of data-base recording; 2, use third party's instrument or write PO mapped file and mapping class according to database table structure by the Hibernate standard; 3, write the interface, foreground of inquiry, interpolation, modification according to template; 4, write the configuration file content of Struts, Spring, Hibernate according to template.
The relative prior art of the present invention has outstanding substantive distinguishing features and marked improvement, and specifically, the present invention has the following advantages:
1, with in the system core code set; Reducing code pollutes: after adopting this method, only need a small amount of code of exploitation, can realize that common additions and deletions change to look into function; Changed and look into code and be brought together being dispersed in everywhere additions and deletions originally, and let the programmer can more be absorbed in the exploitation of operation flow.
2, improved the standardization of code to the full extent: this method is concentrated core code; Interface and interface template have been defined simultaneously; The developer only need understand how to use this method; Can develop the extremely similar program of high-quality, code structure, the standardization of code is had very big raising, the developer of being convenient between project team or even the project carries out exchange and conmmunication.
3, improved the development efficiency of system: in daily MIS; Modal operation is exactly that data are carried out additions and deletions and changes and look into operation; And, can realize these operations with few size of code, few workload through this method, the function of extension also is provided simultaneously; Providing additions and deletions to change to look into the demand outside the function, approximately can promote more than 30% for the development efficiency of project.
Embodiment
Through embodiment, technical scheme of the present invention is done further detailed description below.
A kind of agile development method based on JavaEE at first, realizes that one possesses additions and deletions and changes the framework of looking into, interface and superclass that open frame can be inherited and realize, by the developer inherit in the framework interface and type, realize with minimum code that additions and deletions change and look into function.
Framework is by constituting with lower class:
SearchAction: this class receives user's request; Automatically user request information is encapsulated into SearchCondition attributes object (this object is injected by Spring) by Struts; And the data of user request are carried out corresponding encapsulation; The code of calling logic layer is realized the inquiry to data then, and Query Result is put into the object of rows attribute, if what carry out is the paging inquiry; Branch page information after then will inquiring about is put into the attribute of request, so that the page carries out the tissue of data exhibiting;
DivideInfo: this type encapsulated user's paging solicited message; Mainly deposit three information, every page of line number, current request number of pages, record and total line number are obtained in wherein preceding two requests by the user; By framework data being inquired about the back for the 3rd obtains; This type of HTML information that provides method to generate paging, after data query finishes, the instance of this type will deposit among the request;
ISearchCondition: supply framework to call the inquiry of carrying out data thereby the query argument that this interface is mainly asked according to the user is combined into SQL statement.This interface mainly comprises following three methods; GetSearchSql is used for obtaining the SQL statement that user's request converts to; InitCondition is used for when generating SQL statement, parameter being carried out initialization operation; FromSQLQuery is used for the data set in the ResultSet object that inquires is made into the Java object, so that the page carries out data display;
DataMaintainAction: this class is inherited from SearchAction; On the basis of query function, encapsulated the function that additions and deletions change, mainly comprised following method, add is used for opening and adds the interface and preserve the data that will add; Modify is used for opening and revises the interface and preserve the data that will revise; Del is used for carrying out the operation of deleted data, when receiving user's solicited message, automatically required parameter is encapsulated into po attributes object (being injected by Spring) by Struts;
IBaseLogic: this interface definition the due operation of logical layer; Comprise that mainly inquiry and additions and deletions change the logic realization method of operation; Mainly comprise following method, getSearchResult is used for based on SearchCondition data being carried out query manipulation, and addPo adds the PO object; ModifyPo revises the PO object, delPo deletion PO object;
IBaseDao: this interface definition the due operation of persistent layer; Comprise that mainly inquiry and additions and deletions change the logic realization method of operation, mainly comprise following method, getSearchResult is used for according to SearchCondition data being carried out query manipulation; GetDivideResultInfo is used for according to SearchCondition data being carried out the query manipulation of branch page information; AddPo adds the PO object, and modifyPo revises the PO object, delPo deletion PO object;
IBaseLogic, IBaseDao: these two classes have realized IBaseLogic and two interfaces of IBaseDao respectively.
Developing additions and deletions the developer changes when looking into function; Only need the following code of exploitation to get final product: 1, to realize the ISearchCondition interface; Realizing corresponding method, mainly is to specify database table and the querying method that will inquire about, realizes then the capable key code that converts object into of data-base recording; 2, use third party's instrument or write PO mapped file and mapping class according to database table structure by the Hibernate standard; 3, write the interface, foreground of inquiry, interpolation, modification according to template; 4, write the configuration file content of Struts, Spring, Hibernate according to template.
The principle of inquiry: for inquiry, any not same inquiry all possesses following key element: inquire about the branch page information of used SQL statement, inquiry, the inquiry mode of paged data, the paging object information of data, the branch page information output of inquiry, the foreground showing interface of Query Result.For different inquiries, have only the foreground of the used SQL statement of inquiry, Query Result to show these two content differences, other content and treatment step are identical; The principle of abstraction according to software; Identical content and step can be carried out abstract, so whole query script is encapsulated, only stay SearchCondition and the foreground displayed page is realized by the developer; Process to inquiry and paging encapsulates; Promptly simplify program structure, improved the standardization of code again, the most important thing is to guarantee the correctness of core code.
The principle that additions and deletions change: after the ORM mapping tool occurs; The operation that the additions and deletions of database table are changed changes operation with regard to the additions and deletions that become the Java object, greatly facilitates the developer, to this specific character; This method is improved to have gone to additions and deletions again and is encapsulated once more; The details of ORM is hidden, only the developer has been opened the operation of organizing the Java object, the operation through the Java object realizes that the additions and deletions to database table change and looks into function.
Should be noted that at last: above embodiment is only in order to technical scheme of the present invention to be described but not to its restriction; Although with reference to preferred embodiment the present invention has been carried out detailed explanation, the those of ordinary skill in affiliated field is to be understood that: still can specific embodiments of the invention make amendment or the part technical characterictic is equal to replacement; And not breaking away from the spirit of technical scheme of the present invention, it all should be encompassed in the middle of the technical scheme scope that the present invention asks for protection.
Claims (1)
1. agile development method based on JavaEE is characterized in that: at first, realize that one possesses additions and deletions and changes the framework of looking into; This framework is by constituting with lower class: SearchAction: this class receives user's request; Automatically user request information is encapsulated in the SearchCondition attributes object by Struts; And the data of user request are carried out corresponding encapsulation; The code of calling logic layer is realized the inquiry to data then, and Query Result is put into the object of rows attribute, if what carry out is the paging inquiry; Branch page information after then will inquiring about is put into the attribute of request, so that the page carries out the tissue of data exhibiting; DivideInfo: this type encapsulated user's paging solicited message; Mainly deposit three information, every page of line number, current request number of pages, record and total line number are obtained in wherein preceding two requests by the user; By framework data being inquired about the back for the 3rd obtains; This type of HTML information that provides method to generate paging, after data query finishes, the instance of this type will deposit among the request; ISearchCondition: supply framework to call the inquiry of carrying out data thereby the query argument that this interface is mainly asked according to the user is combined into SQL statement; This interface mainly comprises following three methods; GetSearchSql is used for obtaining the SQL statement that user's request converts to; InitCondition is used for when generating SQL statement, parameter being carried out initialization operation; FromSQLQuery is used for the data set in the ResultSet object that inquires is made into the Java object, so that the page carries out data display; DataMaintainAction: this class is inherited from SearchAction; On the basis of query function, encapsulated the function that additions and deletions change, mainly comprised following method, add is used for opening and adds the interface and preserve the data that will add; Modify is used for opening and revises the interface and preserve the data that will revise; Del is used for carrying out the operation of deleted data, when receiving user's solicited message, automatically required parameter is encapsulated in the po attributes object by Struts; IBaseLogic: this interface definition the due operation of logical layer; Comprise that mainly inquiry and additions and deletions change the logic realization method of operation; Mainly comprise following method, getSearchResult is used for according to SearchCondition data being carried out query manipulation, and addPo adds the PO object; ModifyPo revises the PO object, delPo deletion PO object; IBaseDao: this interface definition the due operation of persistent layer; Comprise that mainly inquiry and additions and deletions change the logic realization method of operation, mainly comprise following method, getSearchResult is used for according to SearchCondition data being carried out query manipulation; GetDivideResultInfo is used for according to SearchCondition data being carried out the query manipulation of branch page information; AddPo adds the PO object, and modifyPo revises the PO object, delPo deletion PO object; IBaseLogic, IBaseDao: these two classes have realized IBaseLogic and two interfaces of IBaseDao respectively; Change when looking into function in the exploitation additions and deletions; Only need the following code of exploitation to get final product: 1, to realize the ISearchCondition interface; Realizing corresponding method, mainly is to specify database table and the querying method that will inquire about, realizes then the capable key code that converts object into of data-base recording; 2, use third party's instrument or write PO mapped file and mapping class according to database table structure by the Hibernate standard; 3, write the interface, foreground of inquiry, interpolation, modification according to template; 4, write the configuration file content of Struts, Spring, Hibernate according to template.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210151211.6A CN102681852B (en) | 2012-05-16 | 2012-05-16 | Agile development method based on JavaEE |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210151211.6A CN102681852B (en) | 2012-05-16 | 2012-05-16 | Agile development method based on JavaEE |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102681852A true CN102681852A (en) | 2012-09-19 |
CN102681852B CN102681852B (en) | 2015-05-13 |
Family
ID=46813829
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210151211.6A Active CN102681852B (en) | 2012-05-16 | 2012-05-16 | Agile development method based on JavaEE |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102681852B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103677846A (en) * | 2013-12-25 | 2014-03-26 | 拉卡拉支付有限公司 | SQLite database development kit and development method thereof |
CN103677788A (en) * | 2012-09-25 | 2014-03-26 | 深圳市金正方科技股份有限公司 | Reuse framework generating method, device and application system based on J2EE distributed architecture |
CN103793471A (en) * | 2013-12-31 | 2014-05-14 | 青岛中科软件股份有限公司 | MVC (model view controller)-based paging inquiring system |
CN106325833A (en) * | 2015-06-18 | 2017-01-11 | 中国石油化工股份有限公司 | Code generation method for enterprise information management |
CN109542405A (en) * | 2018-11-02 | 2019-03-29 | 大唐网络有限公司 | The instantiation method and device of class |
CN110069246A (en) * | 2019-03-28 | 2019-07-30 | 北京众智益成科技有限公司 | The plateform system and its application that a kind of Java Web application is quickly developed |
CN110162295A (en) * | 2019-04-01 | 2019-08-23 | 贵州力创科技发展有限公司 | A kind of quick development method and system |
CN114089979A (en) * | 2021-11-29 | 2022-02-25 | 中国联合网络通信集团有限公司 | Persistent layer code updating method, system, terminal device and computer storage medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109558125A (en) * | 2018-12-17 | 2019-04-02 | 太原市高远时代科技有限公司 | A kind of implementation method improving general information management software development efficiency |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101697120A (en) * | 2009-11-05 | 2010-04-21 | 河南辉煌科技股份有限公司 | Relational database based generation method of J2EE code |
EP2194467A1 (en) * | 2008-12-01 | 2010-06-09 | Sap Ag | Extend CRUD to support lifecycle management and business continuity |
CN101876893A (en) * | 2009-04-28 | 2010-11-03 | 上海亿客网络科技有限公司 | Automatic generation method of WEB project code |
CN102279750A (en) * | 2011-08-30 | 2011-12-14 | 浙江大学 | Iterative code generation method based on domain knowledge sharing |
-
2012
- 2012-05-16 CN CN201210151211.6A patent/CN102681852B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2194467A1 (en) * | 2008-12-01 | 2010-06-09 | Sap Ag | Extend CRUD to support lifecycle management and business continuity |
CN101876893A (en) * | 2009-04-28 | 2010-11-03 | 上海亿客网络科技有限公司 | Automatic generation method of WEB project code |
CN101697120A (en) * | 2009-11-05 | 2010-04-21 | 河南辉煌科技股份有限公司 | Relational database based generation method of J2EE code |
CN102279750A (en) * | 2011-08-30 | 2011-12-14 | 浙江大学 | Iterative code generation method based on domain knowledge sharing |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103677788A (en) * | 2012-09-25 | 2014-03-26 | 深圳市金正方科技股份有限公司 | Reuse framework generating method, device and application system based on J2EE distributed architecture |
CN103677846A (en) * | 2013-12-25 | 2014-03-26 | 拉卡拉支付有限公司 | SQLite database development kit and development method thereof |
CN103793471A (en) * | 2013-12-31 | 2014-05-14 | 青岛中科软件股份有限公司 | MVC (model view controller)-based paging inquiring system |
CN106325833A (en) * | 2015-06-18 | 2017-01-11 | 中国石油化工股份有限公司 | Code generation method for enterprise information management |
CN109542405A (en) * | 2018-11-02 | 2019-03-29 | 大唐网络有限公司 | The instantiation method and device of class |
CN110069246A (en) * | 2019-03-28 | 2019-07-30 | 北京众智益成科技有限公司 | The plateform system and its application that a kind of Java Web application is quickly developed |
CN110162295A (en) * | 2019-04-01 | 2019-08-23 | 贵州力创科技发展有限公司 | A kind of quick development method and system |
CN114089979A (en) * | 2021-11-29 | 2022-02-25 | 中国联合网络通信集团有限公司 | Persistent layer code updating method, system, terminal device and computer storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN102681852B (en) | 2015-05-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102681852B (en) | Agile development method based on JavaEE | |
US6944845B2 (en) | Implementation for an object oriented run-time extensible item | |
JP4855656B2 (en) | How to serialize multiple objects | |
US9146955B2 (en) | In-memory, columnar database multidimensional analytical view integration | |
CN103383645B (en) | Code generating method and system | |
CN111026777B (en) | Entity class code generation method, entity class code generation device, computer equipment and storage medium | |
US6038565A (en) | Object oriented data format mapping mechanism | |
Zhang et al. | Research on lightweight MVC framework based on spring MVC and mybatis | |
CN103500087A (en) | Code generation method and device based on maven plug-in and freemarker template | |
CN112130856B (en) | Strong-expansibility front-end visual interface generation method, system, medium and terminal | |
CN102750145A (en) | Network system software system framework and implementation method thereof | |
CN108388622A (en) | Api interface dynamic creation method, device, computer equipment and storage medium | |
CN111125440B (en) | Monad-based persistent layer composite condition query method and storage medium | |
CN105677324A (en) | Method for automatically generating entity type codes | |
CN111984176A (en) | Software online development platform and development method | |
CN103309650A (en) | Generating method and device of persistence layer codes | |
CN103152433B (en) | A kind of use, interaction and the request processing method at Distributed Services end | |
CN110069248A (en) | Call method, device, equipment and the computer readable storage medium of interface data | |
CN105138646A (en) | Database operation method based on Hibernate | |
CN113094039B (en) | Automatic code generation system based on database table | |
CN104598622A (en) | Method and system for implementing data modification log as well as application server | |
CN108845793B (en) | ORM design method and device | |
KR101902191B1 (en) | Apparatus and method for dynamic customization and execution of query based software logic for multitenant | |
CN109597611A (en) | Front end data flow control Components Development system, method, equipment and storage medium | |
CN105653277A (en) | Method for querying appointed field data of data table under simplified JAVA program, multi-table conjunctive query method under simplified JAVA program and statistical query method under simplified JAVA program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |