由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - discussion: why do we need entry_points in python (setup_t (转载)
相关主题
请教有关java spring MVC的问题问个spring的问题
问个Spring LDAP searchFilter 配置问题a c++ question.
.net里面有对应Spring等的东西吗Linq不是syntactic sugar
[合集] Re: 碰上这样的程序员,无语感觉JVM上的FP语言都有个大问题
有没有人用过org.json.JSONObject?github就是ruby写的,你们有什么不服的?
@Autowired可以多次装配一个被@Component修饰的类吗?哪位大侠有如下书籍的电子版,或者下载地址,多谢
spring di的projecthibernate问题
why i hate spring请大侠推荐一本PYTHON的入门书
相关话题的讨论汇总
话题: spring话题: entry话题: name话题: factory话题: beans
进入Programming版参与讨论
1 (共1页)
c******n
发帖数: 4965
1
【 以下文字转载自 Linux 讨论区 】
发信人: creation (努力自由泳50m/45sec !), 信区: Linux
标 题: discussion: why do we need entry_points in python (setup_tools) ?? --- and others
发信站: BBS 未名空间站 (Fri Oct 18 03:29:57 2013, 美东)
my impression is that it provides something similar to beans in java Spring,
so that other users can just grab your beans from your package.
but then it brings me to the very question of the point of using Spring
beans: why can't we simply use a factory class ? in fact in Spring
annotation-based configuration, you have something like :
@Bean(name="mybeanName")
MyBeanClass getMyBean() {
return ...
}
this is exactly a factory class , as we use them before Spring. the only
extra is adding this bean name associated with the factory method. such a
name only provides a syntactic sugar vs forcing the user code writer to
remember the factory class and method.
coming back to python,
instead of "load_entry_points('entry_name_id')" I could simply do
obj = namespace.package.Class.createObj('entry_name_id')
or am I missing something?
thanks
1 (共1页)
进入Programming版参与讨论
相关主题
请大侠推荐一本PYTHON的入门书有没有人用过org.json.JSONObject?
java如何保护传入的参数不被函数改动?@Autowired可以多次装配一个被@Component修饰的类吗?
xml schema beginner questionspring di的project
谁在实际工作中写过c#或Java的custom attribute?why i hate spring
请教有关java spring MVC的问题问个spring的问题
问个Spring LDAP searchFilter 配置问题a c++ question.
.net里面有对应Spring等的东西吗Linq不是syntactic sugar
[合集] Re: 碰上这样的程序员,无语感觉JVM上的FP语言都有个大问题
相关话题的讨论汇总
话题: spring话题: entry话题: name话题: factory话题: beans