I'm studying the frameworks I can use to develop an ERP system.

I have never used Spring and I have no idea whatsoever about it. But I've been using Tapestry IoC for a long time now, but I haven't used all it's features though.

Here is what I have reached so far:

Tapestry IoC The application can be easily distributed among modules (JAR files), each module can contribute the following:

  • Service definitions
  • Service configurations: Services can be constructed using collections, these collections can be fed by different modules. It has some limitations though, like conditional overriding of an element in that collection, Like checking for a contributed configuration element before deciding whether to overriding it or not.

(Feel more than welcome to correct me if I'm wrong)

There are much more to Tapestry IoC, I'm sure about that, I just haven't explored it yet.

The main concern I have is to distribute my application among modules as in different JAR files. This helps plugging in new features easily and securely.

Has anyone used the latest versions of Tapestry IoC and Spring IoC so he would kindly offer insight into both of them ?

  • Does Spring offer the concept of distributed configuration like Tapestry ?
  • At which aspect does a on of these frameworks excel more than the other ?
  • Can Spring be easily learned in a short period of time ?
  • Which would be easier and more efficient to integrate with an ajax based front-end such as GWT or SmartGWT ?
  • Which would be easier and more efficient in providing enterprise services such as security, pipeline, scheduling, transactions (and any other service that you may suggest) ?
  • Any thing else I should be asking about ???
有帮助吗?

解决方案

the safe answer is always Spring (same as struts ;)).

Advantage of spring is that you'll find more sources about it (books, articles, blog posts). So if you need a ton of examples then Spring is a no-brainer, especially that someone probably already tried using Spring and GWT together. Also latest version of Spring is not so bad in terms of configuration ;)

On the other hand, Tapestry is very powerful. You get a lot of stuff out of the box (e.g. mentioned modularization) which in Spring are possible but I don't know if they are available out of the box (may be, I've never used Spring, after 2.0, that way). Thing that's worth mentioning is that with Tapestry you get a full Spring support, so even if something won't work in T5, you still can create Spring beans and use them in T5 ^^

其他提示

I used GWT and Tapestry back in 2008. It worked well and was quite easy to setup. I am doing a Tapestry project myself at the moment so I am quite into it.

I found the Spring IOC to be quite easy to understand and learn. You should be capable of learning the basics in well a weekend or so.

Tapestry by the other side is a bit harder to master but much more rewarding. The tapestry IOC is also reuseable in many other environment and I use it for simple non-web related projects too. The Tapestry Documentation is way better these days. Also the Jumpstart Demo Application of Tapestry is very good in explaining and testing the basics and more advanced topics.

The advantage of tapestry is, it is easy to use once you understand it. I find myself easily to dive into the source code and have not much of a problem to understand it. I dislike the services being proxies in the first place. But its more a taste.

Also note that tapestry never got the momentum it deserved. And of cause get familar that the @CommitAfter mechanism in Tapestry is as broken as it was back in 2008 and I was not able to get those people in charge to fix it. (I tried lately and failed again).

The rest of tapestry is a joy to use.

Spring on the other hand has lots of business support and tons of information. Also it is widely used in the Java world. So if you get into it you have a strong asset for your professional resume.

So in the end you are free to choose. My heart says go for Tapestry but my brain says Spring wins. Since following your heart makes you happy but following your brain makes you well more successfully, the answer is clear. Spring wins hands down. But spare some days and try out Tapestry as well. Especially the Tapestry IOC is a very reusable tool that might get handy everywhere in your daily programmer life.

you can found a comparison of tapestryIoc and another IoC frameworks:

From: http://tapestry.apache.org/ioc.html

Spring is the most successful IoC container project. The Spring project combines a very good IoC container, integrated AspectJ support, and a large number of libraries built on top of the container. Spring is an excellent application container, but lacks a number of features necessary for a framework container:

Spring beans can be wired together by name (or id), but it is not possible to introduce additional naming abstractions. Tapestry 4's "infrastructure:" abstraction was the key to allowing easy spot overrides of internal Tapestry services without having to duplicate the large web of interrelated services (nearly 200 in Tapestry 4.0).

Although Spring allows beans to be intercepted, it does so in the form of a new bean, leaving the un-intercepted bean visible (and subject to misuse). Tapestry IoC "wraps" the service inside interceptors, preventing un-intercepted access to the core service implementation.

Spring's XML configuration files are quite verbose. This has improved with Spring 2.0, but still far more verbose that T5 IoC module classes.

Spring has a simple map/list/value configuration scheme, but it is not distributed; it is part of a single bean definition. Tapestry 5 IoC allows a service configuration to be assembled from multiple modules. This is very important for seamless extensibility of the framework, with zero configuration (just drop the module into the classpath and everything hooks together).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top