CN102681852B - Agile development method based on JavaEE - Google Patents
Agile development method based on JavaEE Download PDFInfo
- Publication number
- CN102681852B CN102681852B CN201210151211.6A CN201210151211A CN102681852B CN 102681852 B CN102681852 B CN 102681852B CN 201210151211 A CN201210151211 A CN 201210151211A CN 102681852 B CN102681852 B CN 102681852B
- Authority
- CN
- China
- Prior art keywords
- data
- interface
- inquiry
- query
- 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.)
- Active
Links
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, relate to a kind of agile development method based on JavaEE.
Background technology
In the systems development process based on JavaEE technology, in most cases all to relate to changing the basic additions and deletions of database table and look into, and most of system can adopt Struts, Spring, Hibernate or similar framework to carry out auxiliary development, although these third-party Open Frameworks have the modularization of assembly, dirigibility and reusability, simplify the exploitation of the weblication based on MVC, but lack a kind of general agile development method to improve the development efficiency of project.
Under the ssh framework composition of Struts+Spring+Hibernate, development process general is at present as follows: 1, use the PO Core Generator that carries of myeclipse or other PO Core Generator database table to be generated corresponding PO class and hibernate configuration file and put into the project of eclipse; 2, the Action class (Struts1 also will write corresponding form) of Struts and the configuration file of configuration Struts is write; 3, write the Logic interface of logical layer and realize class, the configuration file of configuration Spring, is injected into the Bean of definition in the Action of Struts and calls for key-course; 4, write the Dao interface of persistent layer and realize class, about the configuration file of Hinbernate in configuration Spring, the Bean of definition being injected in the Bean of Logic layer and calling for logical layer; 5, write the JSP of inquiring about displaying, interpolation, amendment accordingly, and in Struts configuration file, configure JSP turn to; 6, debug allomeric function, and need to develop corresponding code according to function.
In this development process, although achieve assembly mould blocking, flexible configuration, improve code reusability, also simplify exploitation to a certain extent simultaneously, but still trifling numerous and diverse, particularly for the simple functional module of some operation flows, wherein additions and deletions change the workload looked into and account for about 50%, develop in this case, programmer has just been absorbed in the machinery work repeated.
In order to solve above Problems existing, people are seeking a kind of desirable technical solution always.
Summary of the invention
The object of the invention is for the deficiencies in the prior art, thus a kind of agile development method based on JavaEE is provided, this agile development method can alleviate the work working strength of programmer greatly, improves development efficiency, programmer is freed from the work of numerous and diverse repetition.
To achieve these goals, the technical solution adopted in the present invention is: a kind of agile development method based on JavaEE, first, realizes one and possesses additions and deletions and change the framework looked into;
This framework is formed by with lower class:
SearchAction: this class receives user's request, automatically user request information is encapsulated in SearchCondition attributes object by Struts, and the data that user asks are carried out corresponding encapsulation, then the codes implement of calling logic layer is to the inquiry of data, Query Result is put into the object of rows attribute, if what carry out is paging query, then the paging information after inquiry is put into the attribute of request, so that the page carries out the tissue of data exhibiting;
DivideInfo: this class wrapper paging request information of user, deposit three information, every page of line number, current request number of pages, record and total line number, wherein the first two obtains by the request of user, by framework, rear acquisition is inquired about to data for 3rd, this class supplying method generates the HTML information of paging, and after data query terminates, the example of this class will stored in request;
ISearchCondition: this interface is combined into SQL statement according to the query argument that user asks and calls for framework thus carry out the inquiry of data; This interface comprises following three methods, getSearchSql is used for obtaining user and asks the SQL statement that converts to, initCondition is used for carrying out initialization operation when generating SQL statement to parameter, fromSQLQuery is used for the Organization of Data in the ResultSet object inquired being become Java object, so that the page carries out data display;
DataMaintainAction: this Similar integral is from SearchAction, the basis of query function encapsulates the function that additions and deletions change, comprise following methods, add is used for opening and adds interface and preserve the data that will add, modify is used for opening amendment interface and preserving the data that will revise, del is used for performing the operation of deleting data, when receiving the solicited message of user, is automatically encapsulated into by required parameter in po attributes object by Struts;
IBaseLogic: this interface defines the due operation of logical layer, comprise inquiry and additions and deletions change the logic realization method of operation, comprise following methods, getSearchResult is used for carrying out query manipulation according to SearchCondition to data, addPo adds PO object, modifyPo revises PO object, and delPo deletes PO object;
IBaseDao: this interface defines the due operation of persistent layer, comprise inquiry and additions and deletions change the logic realization method of operation, comprise following methods, getSearchResult is used for carrying out query manipulation according to SearchCondition to data, getDivideResultInfo is used for carrying out data according to SearchCondition the query manipulation of paging information, addPo adds PO object, and modifyPo revises PO object, and delPo deletes PO object;
IBaseLogic, IBaseDao: these two classes achieve IBaseLogic and IBaseDao two interfaces respectively;
Develop additions and deletions change look into function time, only need develop following code: 1, realize ISearchCondition interface, realize corresponding method, be specify the database table and querying method that will inquire about, then realize capable for the data-base recording key code being converted to object; 2, use third party's instrument according to database table structure or write PO mapped file and mapping class by Hibernate specification; 3, the interface, foreground of inquiry, interpolation, amendment is write according to template; 4, the configuration file content of Struts, Spring, Hibernate is write according to template.
Hinge structure of the present invention has outstanding substantive distinguishing features and marked improvement, and specifically, the present invention has the following advantages:
1, by system core code set, reduce code to pollute: adopt after this method, only need develop a small amount of code, common additions and deletions can be realized and change and look into function, originally the additions and deletions be dispersed in everywhere are changed and looks into code and be brought together, allow programmer more can be absorbed in the exploitation of operation flow.
2, improve the standardization of code to the full extent: this method is concentrated core code, define interface and interface template simultaneously, developer only needs to understand how to use this method, the program that high-quality, code structure are extremely similar can be developed, have very large raising to the standardization of code, the developer be convenient between project team or even project carries out exchange and conmmunication.
3, improve the development efficiency of system: in daily management information system, modal operation is exactly carry out additions and deletions to data to change and look into operation, and pass through this method, these operations can be realized with few size of code, few workload, additionally provide the function of extension simultaneously, change the demand looked into outside function to provide additions and deletions, the development efficiency for project approximately can promote more than 30%.
Embodiment
Below by embodiment, technical scheme of the present invention is described in further detail.
Based on an agile development method of JavaEE, first, realize one and possess additions and deletions and change the framework looked into, the interface that open frame can be inherited and realize and superclass, inherit interface in framework and class by developer, change with minimum codes implement additions and deletions and look into function.
Framework is formed by 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 that user asks are carried out corresponding encapsulation, then the codes implement of calling logic layer is to the inquiry of data, Query Result is put into the object of rows attribute, if what carry out is paging query, then the paging information after inquiry is put into the attribute of request, so that the page carries out the tissue of data exhibiting;
DivideInfo: this class wrapper paging request information of user, deposit three information, every page of line number, current request number of pages, record and total line number, wherein the first two obtains by the request of user, by framework, rear acquisition is inquired about to data for 3rd, this class supplying method generates the HTML information of paging, and after data query terminates, the example of this class will stored in request;
ISearchCondition: this interface is combined into SQL statement according to the query argument that user asks and calls for framework thus carry out the inquiry of data.This interface comprises following three methods, getSearchSql is used for obtaining user and asks the SQL statement that converts to, initCondition is used for carrying out initialization operation when generating SQL statement to parameter, fromSQLQuery is used for the Organization of Data in the ResultSet object inquired being become Java object, so that the page carries out data display;
DataMaintainAction: this Similar integral is from SearchAction, the basis of query function encapsulates the function that additions and deletions change, comprise following methods, add is used for opening and adds interface and preserve the data that will add, modify is used for opening amendment interface and preserving the data that will revise, del is used for performing the operation of deleting data, when receiving the solicited message of user, automatically required parameter is encapsulated into po attributes object (being injected by Spring) by Struts;
IBaseLogic: this interface defines the due operation of logical layer, comprise inquiry and additions and deletions change the logic realization method of operation, comprise following methods, getSearchResult is used for carrying out query manipulation according to SearchCondition to data, addPo adds PO object, modifyPo revises PO object, and delPo deletes PO object;
IBaseDao: this interface defines the due operation of persistent layer, comprise inquiry and additions and deletions change the logic realization method of operation, comprise following methods, getSearchResult is used for carrying out query manipulation according to SearchCondition to data, getDivideResultInfo is used for carrying out data according to SearchCondition the query manipulation of paging information, addPo adds PO object, and modifyPo revises PO object, and delPo deletes PO object;
IBaseLogic, IBaseDao: these two classes achieve IBaseLogic and IBaseDao two interfaces respectively.
Developer develop additions and deletions change look into function time, only need develop following code: 1, realize ISearchCondition interface, realize corresponding method, be specify the database table and querying method that will inquire about, then realize capable for the data-base recording key code being converted to object; 2, use third party's instrument according to database table structure or write PO mapped file and mapping class by Hibernate specification; 3, the interface, foreground of inquiry, interpolation, amendment is write according to template; 4, the configuration file content of Struts, Spring, Hibernate is write according to template.
The principle of inquiry: for inquiry, any not same inquiry all possesses following key element: inquire about SQL statement used, the paging information of inquiry, the inquiry mode of paged data, the paging object information of data, the paging information output of inquiry, the foreground showing interface of Query Result.For different inquiries, only have inquiry SQL statement used, Query Result foreground show this two content differences, other content and treatment step are identical, according to the principle of abstraction of software, identical content and step can be carried out abstract, so encapsulate whole query script, only leave SearchCondition and foreground displayed page is realized by developer, the process of inquiry and paging is encapsulated, namely program structure is simplified, turn improve the standardization of code, the most important thing is the correctness that ensure that core code.
The principle that additions and deletions change: after ORM mapping tool occurs, to the additions and deletions of Java object, operation is changed with regard to becoming to the operation that the additions and deletions of database table change, greatly facilitate developer, for this kind of characteristic, this method is improved to have gone to additions and deletions again and is again encapsulated, the details of ORM is hidden, only the operation organizing Java object has been opened to developer, realize changing the additions and deletions of database table looking into function by the operation of Java object.
Finally should be noted that: above embodiment is only in order to illustrate that technical scheme of the present invention is not intended to limit; Although with reference to preferred embodiment to invention has been detailed description, those of ordinary skill in the field are to be understood that: still can modify to the specific embodiment of the present invention or carry out equivalent replacement to portion of techniques feature; And not departing from the spirit of technical solution of the present invention, it all should be encompassed in the middle of the technical scheme scope of request of the present invention protection.
Claims (1)
1. based on an agile development method of JavaEE, it is characterized in that: first, realize one and possess additions and deletions and change the framework looked into;
This framework is formed by with lower class:
SearchAction: this class receives user's request, automatically user request information is encapsulated in SearchCondition attributes object by Struts, and the data that user asks are carried out corresponding encapsulation, then the codes implement of calling logic layer is to the inquiry of data, Query Result is put into the object of rows attribute, if what carry out is paging query, then the paging information after inquiry is put into the attribute of request, so that the page carries out the tissue of data exhibiting;
DivideInfo: this class wrapper paging request information of user, deposit three information, every page of line number, current request number of pages, record and total line number, wherein the first two obtains by the request of user, by framework, rear acquisition is inquired about to data for 3rd, this class supplying method generates the HTML information of paging, and after data query terminates, the example of this class will stored in request;
ISearchCondition: this interface is combined into SQL statement according to the query argument that user asks and calls for framework thus carry out the inquiry of data; This interface comprises following three methods, getSearchSql is used for obtaining user and asks the SQL statement that converts to, initCondition is used for carrying out initialization operation when generating SQL statement to parameter, fromSQLQuery is used for the Organization of Data in the ResultSet object inquired being become Java object, so that the page carries out data display;
DataMaintainAction: this Similar integral is from SearchAction, the basis of query function encapsulates the function that additions and deletions change, comprise following methods, add is used for opening and adds interface and preserve the data that will add, modify is used for opening amendment interface and preserving the data that will revise, del is used for performing the operation of deleting data, when receiving the solicited message of user, is automatically encapsulated into by required parameter in po attributes object by Struts;
IBaseLogic: this interface defines the due operation of logical layer, comprise inquiry and additions and deletions change the logic realization method of operation, comprise following methods, getSearchResult is used for carrying out query manipulation according to SearchCondition to data, addPo adds PO object, modifyPo revises PO object, and delPo deletes PO object;
IBaseDao: this interface defines the due operation of persistent layer, comprise inquiry and additions and deletions change the logic realization method of operation, comprise following methods, getSearchResult is used for carrying out query manipulation according to SearchCondition to data, getDivideResultInfo is used for carrying out data according to SearchCondition the query manipulation of paging information, addPo adds PO object, and modifyPo revises PO object, and delPo deletes PO object;
IBaseLogic, IBaseDao: these two classes achieve IBaseLogic and IBaseDao two interfaces respectively;
Develop additions and deletions change look into function time, only need develop following code: 1, realize ISearchCondition interface, realize corresponding method, be specify the database table and querying method that will inquire about, then realize capable for the data-base recording key code being converted to object; 2, use third party's instrument according to database table structure or write PO mapped file and mapping class by Hibernate specification; 3, the interface, foreground of inquiry, interpolation, amendment is write according to template; 4, the configuration file content of Struts, Spring, Hibernate is write 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 CN102681852A (en) | 2012-09-19 |
CN102681852B true 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 (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 |
Families Citing this family (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 |
CN106325833B (en) * | 2015-06-18 | 2019-10-29 | 中国石油化工股份有限公司 | A kind of code generating 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 |
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 (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 |
Also Published As
Publication number | Publication date |
---|---|
CN102681852A (en) | 2012-09-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102681852B (en) | Agile development method based on JavaEE | |
CN102750145A (en) | Network system software system framework and implementation method thereof | |
CN103049251B (en) | A kind of data base persistence layer device and database operation method | |
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 | |
CN111026777A (en) | Entity class code generation method and device, computer equipment and storage medium | |
CN103617167B (en) | A kind of general metadata/Hibernate | |
CN106951254B (en) | Method and device for multiplexing similar service function modules in payment system | |
CN111984176A (en) | Software online development platform and development method | |
CN105677324A (en) | Method for automatically generating entity type codes | |
CN105205103B (en) | The method and apparatus for accessing database | |
CN106469223A (en) | A kind of compatibility space of ArcGIS and the unified control method of attribute data and system | |
Abi-Antoun et al. | Enabling the Refinement of a Software Architecture into a Design | |
CN102999371B (en) | Interface Development method and system based on Lua script | |
CN103593188A (en) | System and method for managing what-you-see-is-what-you-get menus of instrument | |
CN104598622A (en) | Method and system for implementing data modification log as well as application server | |
CN110427185A (en) | A method of man-machine browser function is realized based on electric power scripting language | |
Rivero et al. | Improving user involvement through a model-driven requirements approach | |
CN107368377A (en) | Network request processing method and processing device in a kind of Android application programs | |
CN108845793B (en) | ORM design method and device | |
CN111198899B (en) | Development system and method for entity rendering in application program | |
CN109597611A (en) | Front end data flow control Components Development system, method, equipment and storage medium | |
Murakami et al. | Dbpowder: A flexible object-relational mapping framework based on a conceptual model | |
CN110019522A (en) | Multi-source heterogeneous data integrated system based on XML | |
Ren et al. | Design on Data Manipulation Class Based on ADO. NET |
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 |