| |

VerySource

 Forgot password?
 Register
Search
View: 890|Reply: 4

A problem that has troubled me for a long time, what is the advantage of everyone using spring?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-4 14:00:01
| Show all posts |Read mode
I have a few questions
Because time is too late, I ca n’t understand many problems by myself
So here are a few words, hoping to get a satisfactory answer


Now there is a project
The structure is as follows

| -------- dao
| -------- entity
| -------- service
| -------- action- | --- action
                | --- actionform

(Each represents a bag)

Assuming all beans have been injected into the spring configuration file, all relationships have been written
The role of the service layer is
Use the packaged dao for the corresponding operation (using set injection, the reference relationship in the spring configuration file is also written)
Now, use getbean in the action to get a class instance in the service layer
The general relationship is like this
      action (getbean)->> a class of service is instantiated ---> in this instantiated class, inject a corresponding dao ---> in the service, use this dao to perform the corresponding operation

I do n’t know if everyone understands
1. I would like to ask, can the benefits of spring be reflected in such an application?
If so, what are the benefits? (If you know the benefits in other applications, you can also talk about it)

2. Also, how to explain portability in spring? Which part is portable? Very confused

3. Is it lightweight because of the small amount of code in the component?

Now eagerly want to know people who have done projects with spring
Experience of spring after the project
Based on the actual situation, I hope everyone will tell me the advantages of spring
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-5-20 18:15:01
| Show all posts
Like yourself
Help the top when passing by
Very anxious
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-5-21 21:30:02
| Show all posts
Spring is actually a binder that supports most of the current j2ee development framework or methods, such as Ioc, AOP, JNDI, JTA, JMS, EJB, DAO, JDBC, ORM, remote services, JSF, Hibernate, structs, etc. Is the advantage.
Reply

Use magic Report

0

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-7-21 15:45:02
| Show all posts
I think SPRING's AOP is better for bonding with other open original frameworks.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-21 23:00:01
| Show all posts
I don’t think spring is particularly good. It emphasizes that spring can help decoupling. Although we have achieved a high degree of loose coupling between classes and classes through spring, it has brought other problems. That is, the class we wrote has an inseparable dependency with the spring framework, the IOC container. From the word "inversion of control", we can know that the control of the object we get is transferred to the IOC container, so our program is far away from the IOC container unless the code is refactored.
In fact, if Spring develops well, then we rely on it, and it’s not too bad. I’m afraid that Spring will be over someday. . . .
In prayer. . . .
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list