开发者

uses of spring framework in java

开发者 https://www.devze.com 2023-02-08 16:41 出处:网络
I have read that the main uses of spring is DI and AOP. As far as i understand spring in 3 weeks , i开发者_JAVA技巧 feel that AOP can be done in aspectj

I have read that the main uses of spring is DI and AOP.

As far as i understand spring in 3 weeks , i开发者_JAVA技巧 feel that AOP can be done in aspectj and DI is technique not specific to spring with API's.

so is i am missing anything. spring only creates beans.

is that it


I have read that the main uses of spring is DI and AOP.

And the modules and libraries that come with both. Spring is a three-legged stool, in my opinion.

As far as i understand spring in 3 weeks , i feel that AOP can be done in aspectj

Of course AOP can be done with AspectJ - as long as you don't mind byte code alterations. You can also use Spring's original AOP, which uses proxies and is less invasive.

and DI is technique not specific to spring with API's.

I'm not sure I understand your point here. The wording isn't very clear. If your point is that DI can be done without Spring, then I'd say you are correct.

so is i am missing anything. spring only creates beans.

I'd say you're missing everything.

is that it

What else do you want it to do?

What alternative do you prefer?

UPDATE:

I don't know about PHP, but there's a version of Spring for Python: Spring.py. This suggests to me that you can certainly do both DI and AOP in Python. I would say that they're possible in any language that's truly object-oriented. The ideas of DI and AOP are like any other OO pattern: language agnostic.


It is a container and MVC web application framework as well. There is also OSGI support. Spring consists of many parts/modules, which can be integrated with other frameworks such as Hibernate.

http://www.springsource.org/about


Spring is in my opinion a defacto standard when it comes to developing web applications/services, or even general application development.

It provides dependency injection as one of its strongpoints, to offer the conveniance of having all necessary tools in one package.

AoP on the other hand nicely integrates with Spring, but is in no way a fundamental reason to use spring. In fact, I dare to claim that alot of people probably don't explicitly (the underlying framework might still do it for you though). You can probably use spring a lifetime without having to explicitly use AoP.

0

精彩评论

暂无评论...
验证码 换一张
取 消