SPRING4+MVC+HIBERNATE4 Full Annotated environment construction (i.)

Source: Internet
Author: User

Statement:

Any of the following opinions and understandings may be wrong, that is to say that the author in a moment combined with his own learning experience and thinking of the point of view, it is clear that such a premise many may be wrong. Please don't be gullible when you see any suspicious views, and I would appreciate it if you could tell me the reason when you sprayed me. Like what "You Know", "Of course!" What else could it be. "In that case, I am afraid that neither can persuade me nor persuade others."

So far I have known these frameworks:

My understanding is not necessarily right, but I would like to first clarify why I chose the spring4+mvc+hibernate4.

Spring is used to provide an IOC container, which implements a bean factory, collects the definitions of the classes I write, and gives them new when I need them (at least when I start building this platform). If you've ever built a platform like this, then those suffixes have DAO, service, and the last instance of working in memory may be the spring framework new.

2012 I beginner Struts2, when the MVC Control layer Open source framework share, is already struts2:springmvc=3:2, this is only four years, now SPRINGMVC new projects emerge endlessly, and Struts2 feel plummeted, Only the original company products, including STRUTS2, continue to be used on new projects.

Speaking of the difference between the two, I only know a little, but also never to confirm. It is said that Struts2 's implementation principle is based on the JSP filter, while SPRINGMVC is based on the servlet. I'm not quite sure how the filter and servlet works in JSP, and I don't know how much of that will actually affect the Web MVC framework in essence.

Hibernate, the famous long-lasting layer of the framework, its competitors countless, its own shortcomings and advantages seem obvious, in the forum, the blog has endless discussion. Jeesite used is mybatis, but I still finally chose hibernate, the reason is very simple, neither involved in the level two cache, nor involved hibernate learning curve.

I personally think that in the design, I expect the entity class itself to be able to explain its relationship with the database tables, Views (hibernate can now be fully annotated configuration), no need for additional XML to describe. Second, because my original intention does not involve the database product switch, I personally feel like the programming language Community flowers bloom, the technology should deal with what it is good at doing, if business data management is more similar to the two-dimensional table, the data processing is more similar to the calculation of relational algebra in the data set, Then this part of the business should be moved to the database side to achieve. The characteristics of the object, and the design patterns that have evolved over the years, illustrate what it is good at doing, functional programming languages, and statistical r languages flourish in their respective fields.

Maybe there are some things that are hard to do, in fact, we are not thinking about what kind of technology to implement the design at the beginning of the system design, but see whether the team understands Java more or understands. NET to decide whether it is javaweb or Microsoft products. This is indeed an unavoidable practical problem, and we may have the same choice in the face of this situation. But if it is a technical discussion, then we have no need to discuss them, the hammer is suitable for hitting the nail, whether you can afford it or can't afford it, the purpose of this article is also the case. So for hibernate and its full annotations, it corresponds to the table of one by one for such a simple reason that I chose hibernate.

Front page I use Easyui. Although Bootstrap seems to be more Internet-based, but because this is an outdated information management system platform, so I personally think Easyui looks a little better (here is the good point: when I see Easyui, it is more in line with my mind the information management platform look, Just as Steve Jobs saw the star of Xerox and said in his car, "That's it," again.

(not finished, some XML configuration will be elaborated tomorrow.) But I may also omit them because they have been pasted countless times in various blogs.

SPRING4+MVC+HIBERNATE4 Full Annotated environment construction (i.)

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.