What spring can offer us

Source: Internet
Author: User
Tags generator

Me: Spring seems pretty popular now.

Passers-by: NN! I've used it for projects I've developed.

Passerby B: Why use it? Does it offer three packs of service?

Passers-by: Others use it, the eldest brother said with it, use him Bai!

Passers-by: three packs, three bags No. But I heard he can help us manage the object, 6 not 6?

Me: Managing objects? Isn't it good for us to manage our new object ourselves? If you want new, you don't have to do it. The garbage collection mechanism provides a full service cleanup service.

Passers-by: it seems that the reason ~.~!

Big New Gae: In traditional application development, a complete application consists of a set of mutually collaborative objects. So, in addition to developing business logic, the most common way to develop an application is to focus on how to make these objects work together to accomplish the required functionality, and to be low-coupled and high cohesion. Business logic development is unavoidable, if there is a framework to help us create objects and manage the dependencies between those objects. It may be said that, for example, "abstract factory, factory method design pattern" Can not help us to create objects, "generator mode" to help us to deal with the dependencies between objects, can not do these functions? But these need us to create another factory class, generator class, we have to manage these classes, add our burden, if we can have a configuration to create objects, to manage the dependencies between objects, we do not need to through the factory and generator to create and manage the dependencies between objects, So do we reduce a lot of work, speed up development, and save a lot of time to do other things. The spring framework came out primarily to complete this function.

Passerby B: Whoa! That's awesome!

Passers-by: The original boss is to reduce our work to use spring Ah!

Me: How do I create objects by configuration and manage the relationships between objects?

Big New Gae: Why so many questions? And I'm going to save the world with my Code!

Me: the Great God! Save me first!

Well-intentioned person A: you just know the object you want to manage to add annotations on the class, controller class on the addition of @controller,service class on the addition of @service,dao class added @repository

Me: A good man is safe in life

Passers-by B: OK three guarantees, there is no

Nice person B: Spring Framework In addition to help us manage objects and their dependencies, but also provide such as general-purpose logging, performance statistics, security control, exception handling and other aspect-oriented capabilities, but also to help me manage the most headache of database transactions, itself provides a set of simple JDBC access implementation, Provides integration with third-party data access frameworks (such as Hibernate, JPA), integration with various Java EE technologies (such as Java Mail, task scheduling, and so on), provides a set of its own web-tier framework, spring MVC, and is also very simple to integrate with third-party web frameworks. From here we can think of spring as a super-bonding platform that, in addition to its own functionality, provides the ability to glue other technologies and frameworks, giving us a freer choice of what technology to use for development.

Passerby B: Whoa! It's so much better!

I: Seems a bit more, I first remember a management object, ask the great God come to teach me!

What spring can offer us

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.