Wmframework growth diary (1)-framework Introduction

Source: Internet
Author: User

I plan to write a growth log for wmframework, but I have never had time and I don't know what I have done. Wmframework is a framework of my own, a self-developed solution that resides in the J2EE system. I started to plan and write wmframework. It should have been because 2006 was used in Shenzhen for the project. From that project, I saw the powerful use of XML. Based on this, it took me some time to gain an in-depth understanding of XML, not to mention the depth of understanding, at least the entry level. The same is true for wmframework data transmission. I have always considered using XML encapsulation. In the Article , I will introduce my wmframework in combination with JSP + JS + XML + Ajax + struct + spring + ibatis.

I have not introduced the concept of wmframework. wmframework is a web system framework created by myself. It has been developed to version 2.0. W is the beginning of its English name, M is the English name of another person in my life ). Wmframework advocates abandoning the conventional deployment and one-stop development model, and proposes to use the MVC combined workflow to compile Code . I will explain it again. Everyone knows that our common software code is to allocate specific functional modules to project team members, it will complete the display page painting from the front-end JSP, js-assisted script writing, to the background action writing, model design, ORM Data Exchange implementation. Combined with the wmframework framework, the writing process will be changed. The Program staff no longer focus on writing a single module, it is based on the division of labor and collaboration of individual capabilities. M_actor model performer completes the background business processing model, mainly the Data Interaction layer Dao and sqlmap writing; v_actor view performer completes the foreground form view, mainly JSP, HTML, and JS compiling; the operator of the c_actor controller completes the compilation of the action and model layer service. The previous blog introduced the development of the MVC combination mode, if you are interested, refer to the article "system development with WM framework for MVC team combination mode.

next, I will briefly introduce a business processing process of wmframework. The presentation layer JSP is implemented by HTML static tags + custom tags. in HTML static tags, I have added several custom attributes, including issave, fieldname, require, and datatype. of course, such attributes can be named by yourself, because the html dom object itself supports such a feature, you can add your own defined attributes in the tag, when using JS object recognition, you can take the initiative to obtain the value of the current attribute. This can be tested. The JSP display is complete. The following is the data validation and Data encapsulation, here, wmframework calls a common JS object (you only need to assign values to the attributes in the static tag ), for a save operation, you may only need to write 10 lines of js to complete data verification and submission. After the page form data passes the final verification, it will be encapsulated in an XML file and sent to the background by the XMLHTTPRequest object. The submission of the entire presentation layer ends. Next, the processing of the action, after obtaining the current request, the Action reads the form data string currently submitted from the htttprequest object and converts the XML string to the pojo object through the xmlmapping object, finally, the pojo objects in the list bucket will be handed over to the service. Here, the list bucket is used to facilitate the delivery of multiple identical or different data objects at a time to complete different data operations, after the service object receives the list, it performs necessary data validation and delivers it to Dao for use. In Dao, it splits the current list bucket, obtains its pojo object, and calls the ibatis built-in API, communicates with the database to complete data processing. After the request is completed, the Response Message is returned by response. wmframework also uses XML encapsulation strings to read the resposetext/resposexml Response Message and parse the current XML encapsulation string, to initialize the JSP presentation layer and prompt the user. The entire process is roughly like this, providing a simple sequence diagram.


In fact, from the above introduction, you may think that wmframework process operations are very simple. If such a process is worthy of the Framework title, I will not defend it here. Just feel good about myself, O (partition _ partition) o... haha. In fact, wmframework advocates simple procedures for writing modules and wmframework for writing system code. In many cases, the action, service, and, dao only needs a few items and discard too many redundant configurations of JavaBean, instead of a previous module corresponding to an action, service, and Dao system. Simplifies the process of writing actions, services, and Dao, and accelerates development to the maximum extent.
This is the beginning of wmframework. It is mainly intended to introduce wmframework to the whole body. It should be said that it is a more appropriate preface. In future articles, I will introduce wmframework gradually. Since wmframework has been implicated in several production systems, it cannot be openedSource code(Don't mind ). However, the source code is not very useful. It is the most basic thing to understand its design philosophy. After all, writing code is a matter where outsiders look complicated and pedestrians know simple things, this is the same as that of a primary school student who writes a text. He doesn't have to say much about it, but his design philosophy is very important, because any framework is based on the design of a framework ......
Write it here first and have dinner .........

(Note: All my articles are original articles. Please indicate the source for reprinting! 20100523 is written in Shenzhen .)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.