On the SSH framework-a Leo programmer !, Ssh

Source: Internet
Author: User

On the SSH framework-a Leo programmer !, Ssh
On the SSH framework-a Leo programmer! In-depth comparison between SSH and Leopard

I remember many years ago, in the world of Java Web development, the SSH (Struts, Spring, Hibernate,) framework was very popular? To what extent? If you didn't understand SSH at the time, you 'd be embarrassed to say that you are using Java Web. Now, in retrospect, this framework is too boring! It hurts a lot! As a result, many Java Web developers continue to learn this architecture!

I am an old programmer who has been writing programs for many years. I am very sad about this phenomenon! Just because our programmers are too reliant on old technologies to keep pace with the times!

Next, let's analyze why SSH is so popular? How can we change this situation?

Struts is recognized as the standard of the MVC web framework. Struts has become very popular, and many web projects use struts for development. This makes the SSH framework more stable.

Later, Spring came out, promoting lazy injection and control inversion, putting the main focus on how to decouple modules. Many framework engineers also agree with Rod Johnson and have introduced Spring into the project. However, Hibernate has also achieved great success in persistence, so the TAO Yuan's final meaning is opened! A powerful SSH framework was born! Struts is responsible for MVC, Spring is responsible for decoupling, Hibernate is responsible for data persistence, and the division of labor is clear! Each of them is on its own side!

What does SSH look like? But I think it is complicated. Why do I have to give a person a good job to three people? This may be due to a variety of historical reasons, perhaps because too many programmers are thinking about inertia. In any case, I think programmers should be innovative and take advantage of time!

One day, I saw a very awesome Website: http://leopard.io /. The author developed a framework called Leopard. This framework is developed based on Spring and has been deeply encapsulated on Spring MVC and Spring JDBC, which will solve the problems that many WEB developers have encountered!

I have thoroughly studied this framework and made an in-depth comparison between SSH and Leopard:

SSH, I will describe it in one sentence: I have used the strengths of various frameworks!

Leopard:

Web mvc Functions

1. Using Spring MVC Framework, multiple data views are encapsulated in the original functions. For example, views that return Json data, views that return text data, views that return paging data, and views that return ftl data.
2. Implement custom key parameters (see my blog http://wsppkdc.iteye.com /).
3. Converts int, boolean, and long objects into null values.
4. Implement smart login verification scanning.
5. built-in custom Interceptor to implement custom functions.
6. implement distributed sessions and make them open.
7. Implement the custom logon verification component. The open verification interface supports custom logon verification and logon interfaces.
8. Implement the anti-concurrency component to limit the number of interface accesses at a specified time.
9. Implement the verification code component. Multiple groups of verification codes can be grouped for verification.
10. Implementation Method time monitoring, data source (MySQL, Redis, Memcached, etc.) request statistics.
11. Implement CSRF and XSS Security Vulnerability prevention.

The preceding web functions are out-of-the-box. If you don't want to use it, close it.

Persistence

1. encapsulate Spring JDBC implementation. Hibernate claims to be easy to pull. I think it is useless. Because Leopard does not only work on implementation, but also provides suggestions on design. We recommend that you use single-Table operations for all database operations (if you don't think you can do this, you can contact the author for help and it is still free of charge, which makes me very respectful to the author !!!).
2. The Redis cache implementation is encapsulated, And the Hibernate cache is overwhelmed again.
3. Configure the connection pool for JDBC and Redis with only one line of tags!

Decoupling Function

1. Spring decoupling is still used.

Other components

1. Hot Jetty deployment is implemented. This is an excellent way to start a web application. You only need to run a JettyTest class. It also supports hot deployment and does not need to be restarted after the code is changed.
2. Configure mvc resources intelligently to speed up access to static files. Leopard automatically converts the static file to the Spring Resource, and does not need to enter the Controller when requesting the Resource.
3. Customize tags to simplify XML writing.
4. the built-in Tson data structure simplifies the Model structure, making unit test writing quite simple.
5. open scalable interfaces.
6. develop specifications to simplify project submission.
7. Intelligent log configuration.
8 ,....

There are too many new playmates. Go to http://leopard.io. The author has made all source code and sample code open-source. I think this framework is worth learning. Maybe it will bring another spring!

Related Article

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.