是什么使Spring框架成为轻量级的容器? [英] What makes the Spring framework a lightweight container?

查看:204
本文介绍了是什么使Spring框架成为轻量级的容器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当人们提到Spring与其他框架相比是轻量级的容器时,这是什么意思?是它占用了系统中较少的内存,还是没有像EJB容器那样的启动停止等操作,并且它没有使用特殊的容器?

When people mention that Spring is a lightweight containter compared to other frameworks, do they mean? That it occupies less memory in the system or it does not have the operations like start stop that we have for EJB containers and it doesn't use a special container?

是什么使Spring成为轻量级的容器?

What makes Spring a lightweight container?

推荐答案

无论是轻量级"还是重量级",都是与比较有关.与普通的J2EE容器进行比较时,我们认为Spring是轻量级的.就提供的功能(例如事务控制,生命周期,组件依赖项管理)而言,在占用额外内存的意义上来说,它是轻量级的.

Whether it is "lightweight" or "heavyweight", it is all about comparison. We consider Spring to be lightweight when we are comparing to normal J2EE container. It is lightweight in the sense of extra memory footprint for the facilities provided (e.g. Transaction Control, Life Cycle, Component dependency management)

但是,有时还需要比较其他标准来比较容器的重量",例如设计和实施中的侵入性;提供的设施等.

However, there are sometimes other criteria to compare for the "weight" of a container, e.g. intrusiveness in design and implementation; facilities provided etc.

具有讽刺意味的是,与其他基于POJO的容器(例如Guice和Plexus)相比,Spring有时被视为较重的容器.

Ironically, Spring is sometimes treated as heavy weight container when compared to other POJO-based container, like Guice and Plexus.

这篇关于是什么使Spring框架成为轻量级的容器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆