Recently, I've been exploring the Java space, and I came across the Spring Framework.
Is this a web app framework like CodeIgniter or Rails? If so, is Springs used for developing ente开发者_开发问答rprise web applications that run on Java EE technology?
I am curious, why is Spring getting lot of attention? Isn't it a lot cheaper to simply use LAMP + CI or Rails to develop web applications?
Can Spring be used to develop desktop applications?
Recently, I've been exploring the Java space, and I came across the Spring Framework.
Is this a web app framework like CodeIgniter or Rails? If so, is Springs used for developing enterprise web applications that run on Java EE technology?
Spring can be used as a "general purpose DI/IoC/AOP" container, among other things (it has grown larger over the years). You can use it to develop "enterprise web applications than run on Java EE technology", yes.
I am curious, why is Spring getting lot of attention? Isn't it a lot cheaper to simply use LAMP + CI or Rails to develop web applications?
Are you writing a Java/Scala/Groovey/Other-JVM-Language application, or are you writing a Rail/Python/Perl/PHP/Whatever application? It's not as simple as "switching" from LAMP+CI+Rails to Spring+SomeJVMLanguage. You have to define requirements first. I would say "cheaper" depends a good bit on if quality tested code is written -- bad code is seldom "cheap" in the long run.
Note that Spring is not a full web-stack, rather Spring is designed to integrate (and be integrated into) a stack. It is "the glue".
Let's look at how this compares with "LAMP" (which is such a dated 'concept'):
- L: You can replace Linux with: Any suitable OS on which the JVM runs (including Linux).
- A: You can replace Apache with: Any Servelet container. I like Jetty.
- M: You can replace MySQL with: Numerous data abstractions over numerous back-ends. Hibernate is quite popular. I prefer some of the "No SQL" databases.
- P: You can replace PHP with: Java is less horrendous than PHP. I would recommend using Scala on the JVM. Scala is less horrendous than Java.
So, in short, apples and oranges and 'wth' :-)
Can Spring be used to develop desktop applications?
Yes. That is, Java can be used to develop desktop applications and the relevant parts of the Spring framework can be used (DI/IoC/AOP, etc.). However, Java desktop applications in general do not seem terribly common (and applications which use Spring would be a small subset of that and probably use Guice for DI/IoC). But, perhaps more common than a "Rails desktop application" ;)
http://en.wikipedia.org/wiki/Spring_Framework
精彩评论