Joke Collection Website - Blessing messages - What is a mobile phone by platform? WaiNa Xia

What is a mobile phone by platform? WaiNa Xia

Brief introduction of BysArchitecture platform

1 design objective

Based on J2EE platform and component-oriented technology, the middleware platform for enterprise-level application development, operation, management, monitoring and maintenance, drawing lessons from MVC architecture of SSH(Struts, Spring and Hibernate), commonly used functions are componentized, and the front-end development supports jsp, AJax and popular Flex, so as to realize the perfect interaction between display interface and man-machine, which not only meets the development needs of complex business, workflow, WEB report and business foundation, but also improves it as much as possible.

According to the user's role (post), access to system functions is controlled. Different roles have different access rights to functions, and the administrator assigns a list of functions that each role can operate.

According to the user group (department), the access rights to system resources are controlled. System resources refer to files, directories and data forms; Owners can assign access rights to system resources to different user groups;

Access the log. Every time a user accesses the system and resources, the user name, access time, IP address, accessed function (URL) and accessed resources (files) are recorded; Detailed records of errors and error information;

Realize the upload/export mechanism of multi-format data import and export, that is, you can export Excel, PDF, RTF and HTML, and import metadata into the database according to the Excel template to realize batch data update;

According to the set rules (for example, the freight data will expire), the system will automatically judge whether an alarm or prompt information is needed, and feed back the business processing results to relevant personnel.

Bilingual support in Chinese and English;

2 technical scheme

Generally speaking, it is realized by using the multi-layer technical architecture of MVC design idea, which is divided into Oracle database, open source Hibernate data object access layer (model), open source Spring technical transaction control and system service management layer (service) and open source Struts controller layer (controller). Servlet filter is used in the access control and content filtering layer, and on top of it is the Html+Flex page presentation layer (view).

Requests submitted by HTML+Flex presentation layer need to be intercepted by Servlet filters.

1) Verify the legality of the access;

2) At the same time, check and convert the page data into I 18N international code and so on.

Requests submitted by HTML+Flex presentation layer need to be processed by Servlet Filter and handed over to ActionServlet in Struts controller layer for page flow control and logical processing of requests and responses. In the process of processing, the API of Spring transaction control and service management layer is generally called.

In the transaction control and service management layer of Spring, it controls the transaction integrity and data consistency of system access, executes specific business logic and data processing, obtains processing results, and feeds back the results to the caller (Servlet/HTML) when necessary, so as to respond the feedback information to the user. At this time, when processing data, Hibernate data object will be called to access the layer data object, and the data update and query of Oracle database will be realized.

Schematic diagram of collaborative work/mutual call at all levels is as follows:

In addition to encapsulating the above technical framework and formulating development specifications, we also developed upload/download, email, schedule, portal and other components to meet the functional and technical requirements of the system:

BysArchitecture platform has built-in portal menu management component, e-mail component and upload/download file component; In the service layer, organization, account, permission, workflow, timer and schedule components can be directly called and used at any time without development.

3 key technology realization

3. 1 Role-based access control of system operation function

The system has multiple group functions, and each group function forms an interface menu item; Each group is grouped to form a folder node on the functional directory tree; Each group contains multiple operation function points.

Each role in the system is equivalent to a position in a real organization. A user may have multiple positions, so he should be assigned multiple "roles" in the system. In this way, users in the system have multiple roles, and each role has an operable function list. Therefore, each user can get his own list of operable functions, and he can and can only access those functions assigned his own role.

3.2 Resource Access Control Based on Content Filtering

The resource access control mechanism based on content filtering first divides the user identity into owner, group and others. Users who create folders and files are automatically set as the "owner" of the resource, and the owner has the right to assign initial resource access rights;

The owner can assign Read, Write and Execute permissions to himself, all members of his account group and other users respectively (r/w/e).

Therefore, the access control attribute value field is always attached to a file or data form, and different combined values represent different permissions (r/w/e) of different identities (owner/group/other). For example, the permission attribute value of form0 1 is "0620", which means: 1) The owner has the right to read and write (0400+0200)form 0 1, and the group to which the owner belongs has the right to write (0020)form 0 1. Other users don't have any permissions on the form 0 1 (0400 is read by the owner +0200 is written by the owner +0020 is writable in the group +0000 is not accessible by other users =0620).

This is a very mature authority control mechanism of Unix operating system, and maintaining authority is very simple and effective.

Permission attribute setting and explanation table based on content filtering;

Results of some user attribute values

User 0400 allows the owner to read.

0200 Allow owner to write.

0 100 For files, the owner is allowed to execute, and for directories, the owner is allowed to search in the directory.

Group 0040 allows group members to read.

0020 Allow group members to write.

00 10 For files, group members are allowed to execute, and for directories, group members are allowed to search in the directories.

Other users 0004 allows other users to read.

0002 Allow other users to write.

000 1 For files, other users are allowed to execute, and for directories, other users are allowed to search in the directories.

For example, to set read and write permissions for other users, you can add 0004 and 0002 to get 0006. Similar operations can be performed on users and groups, and three totals can be added together to produce a fully qualified numerical pattern.

Read: query, export;

Write: create, update, delete and import;

Execute: background operation.

3.3 Good support for logs

Fine-grained logging using Spring AOP technology. This system is mainly embodied in the log record, freight entry log, freight query usage and other functions.

In addition, through the Servlet filter, users can record the time of each access to the system and resources, that is, user name, access time, IP address, accessed function (URL) and accessed resources (files), without exception. At the same time, it is not necessary to develop a separate log function for each functional module, but to carry out unified log management and record errors and error information in detail.

3.4 Identity authentication system

No matter string object (password/session ID), streaming fingerprint and digital certificate file stream object, they are all abstracted as object objects. In the Filter Filter of technical architecture, the object object and object type are passed as parameters to the Authentication component to verify the identity, and the result is returned to the filter filter.

In the Authentication component, objects call different methods for authentication according to different object types; Return an error page or a prompt page to the browser for the access that fails verification; After verification, it is downloaded to ActionServlet for further processing.

Therefore, the abstraction of identity authentication technology makes the system have the identity authentication capabilities of user passwords, digital certificates, time stamps, fingerprints and other object types.

3.5 upload/export mechanism

The FileUpload component provided by Apache, a well-known open source organization, is used to upload files. JasperReport, an advanced open source project in the industry, can be used to export multi-format data, such as Excel, PDF, RTF and HTML.

3.6 Early warning, reminder and feedback mechanism

According to the set rules (for example, the freight data will expire), the system will automatically judge whether an alarm or prompt information is needed, and feed back the business processing results to relevant personnel.

Design alarm classes and alarm interface classes. Business classes implement interfaces, and call interface methods to pass message objects to alarm classes. Some alarm classes process and send messages to users according to specific conditions.

Timer and task scheduling component can support setting the running time interval of early warning and alarm background programs in the system, such as running every minute, running at a certain time in a day, running at a certain time in January, etc., to check whether there is an early warning and alarm boundary. You can call the police by email, SMS and pop-up. Of course, you can also integrate MSN alarm.

3.7 Implementation of transaction control technology

For cross-system access, asynchronous question and answer is used to call directly, and corresponding logic processing and reliability processing are carried out according to the returned results, without cross-system transactional encapsulation;

The transaction management of local database access uses JDBC-based transaction management technology supported by hibernate.

3.8 International Multilingual Technology Realization

Both Flex and JAVA support international coding and international resource allocation. You can set the locale property set and load the language property at runtime to realize a bilingual interface.

4 the introduction of leading technology

4. 1 elasticity

Since the rapid popularization of B/S architecture, we have been faced with such a problem: how to achieve accurate control of presentation layer and good user experience like C/S? RIA (Rich Internet Application) came into being.

What does RIA mean?

Extraordinary network function

Lower maintenance cost

The learning cost is lower

Better user experience

A more powerful user interface

Better interactivity

More advanced development mode

More powerful multimedia functions

Better data management

Better program control

4. 1. 1 Advantages

Intuitively, the user's clearest understanding is as follows:

It is more interactive. Compared with traditional websites, the user's sense of interface can almost be regarded as a multimedia interactive environment with sound, light and shadow.

The implementation mechanism of reducing server load technology is different from the improvement and optimization of server, and it is a platform-level performance improvement scheme.

In data transmission, the customer disconnects, while the online data is still there, which is similar to the web? 2.0 Some advantages of technical specifications.

When I first visited the flex website, it was a little slower than the traditional website. However, if you visit the website repeatedly, the next visit will definitely be faster than the traditional website, because the user's non-data update experience has been downloaded to the local client.

4. Business case of1.2flex

Nasdaq stock market

SAP expenditure analysis

Hp print studio

Google Searchmash

Financial Analysis of China Merchants Bank's Online Banking

Yahoo map system

The 2008 Olympic flame came to my home-Sohu Olympic Games.

AOL, Yi Bei, PayPal, Business Object, SAP.

4.2 Jasper Report

JasperReports is a powerful report generation tool, which can describe rich content to screen, printer or PDF, EXCEL, HTML, XLS, CSV and XML files.

Completely written in Java, it can be used in various Java applications (including J2EE or WEB applications) to generate dynamic content. Its main purpose is to help create oriented pages in a simple and flexible way.

JasperReports receives data from relational database through JDBC according to the report design defined in XML file. In order to fill the report with data, you must first compile the report design. In fact, compiling the report design means compiling all Java expressions defined in the XML file that describes the report design. In order to check the consistency of the report design, various tests will be conducted at compile time. Prepare to fill the results into the report design and then use it to generate documents with different data sets.

JasperReports is a stable and high-performance system (PDF, EXCEL, HTML, XLS, CSV and XML files) that has been tested for many years. It can be embedded into java programs and become an embedded stable component in the system.

4.3 Apache file upload

The FileUpload component technology released by Apache, a famous open source organization, can upload one or more files and receive ordinary form data.

It can feed back the progress information of uploaded files to the caller through streaming technology, so that users can monitor the progress of uploaded files and give feedback on the causes of problems, which is very friendly.

After years of application, inspection and improvement of countless systems around the world, it has become a mature, stable and high-performance component. It can set the size limit of uploaded files and optimize the transmission speed and performance of uploaded files through streaming technology.

When Flex and Apache FileUpload are used together, users can clearly see the upload speed and any possible problems through the browser flash interface.