tags:

views:

1823

answers:

8

ATG is a suite services built on top of J2EE which uses it's own proprietary flavor of ORM (like Hibernate but not), dependency injection (like Spring but not), and JSP tag libraries to offer and integrate services like customer profiling and targeting, e-commerce (shopping cart, billing, inventory, etc.), e-mail blasting, content management, A/B testing, customer service, etc.

In my opinion, it's a grossly bloated, overcomplicated, and antiquated platform, which makes it a royal pain to work with. Productivity grinds to a halt as you deal with writing countless lines of XML and Java to achieve the simplest of tasks. Unit testing is nigh impossible due to the webwork of dependencies necessary to bootstrap the framework, compounded by the lack of documentation of its inner workings to help you mock or stub-out the hairy bits. Concepts like convention over configuration and avoiding leaky abstraction were abandoned by the wayside.

So my question to you is what are the alternatives that do not involve gluing together a hodgepodge of third-party silo solutions?

A: 

Some would argue that ATG was a bit before their time. Before the JSP standard, they had those ugly "droplets" and it went from there...

If you are looking for a comprehensive platform, I would start looking at JBOSS - standards-based (maybe a bit lagging compared to Glassfish, not my opinion but that of some) and has a nice big fat stack that covers almost everything. From ORM though to Portal, Rules and a host of other goodies such as Seam. A nice overview of the stack can be found at:

http://www.jboss.org/projects/

In short, everything you may needs comes from the same stable and they are trying to make integration less nightmare-ish.

A: 

Your question asks for something that does not involve "gluing together a hodgepodge of third-party silo solutions". The Spring Framework provides the glue for you so you don't have to do the gluing. I use Spring to be the glue for applications that need some of the things you mention. In most cases, Spring provides it's own way to easily add dependency injection, ORM, tag libs and all of the other stuff you need.

Yes, it does use third-party tools but you also get to pick exactly the pieces you need.

Chris Dail
A: 

I think your question needs to be more precise. Are you looking for a replacement of the ORM, dependency injection and caching stuff? Or do you need a replacement for the ecommerce stuff or both. If you are solely going to use ORM, dep-injection and caching I would not use ATG (it's definitely showing its age, and will cost big bucks) If you want to replace the ecommerce stuff it all depends on your site, the size etc. There are some nice open source solutions out there. Do they scale like ATG? I'm not sure.

Ronald Pulleman
+1  A: 

The whole point of ATG is that you don't have to glue a hodgepodge of features together. Spring and Hibernate are the logical choice if you're looking for a 'free' solution, but they have their own quirks, and there's notable blood under the bridge when it comes to Hibernate's transaction management vs Spring.

In addition, ATG has an number of features that Spring and Hibernate are still catching up to. Nucleus offers container and environment support well beyond anything Spring does. Spring's support for session scoping was added as a direct response to ATG's session and request scoped components. Hibernate only supports a single repository at a time, has noticably poorer monitoring, and features like distributed caching across servers are completely beyond Hibernate.

Unit testing is a mixed bag. You can mock most things with interfaces, but for stuff like droplets, you have to use EasyMock with the class extension, or jMockit.

Having said that: jBoss. ATG can be packaged as a J2EE application inside of jBoss, so you can maintain your existing codebase if you're not comfortable with the way ATG does things.

Will Sargent
+1  A: 

If you are oppose to using ATG you can try out Apache OFBiz (I have just started to read the documentation on it)

Like many I have worked on both ATG and a home grown solutions. I would have to say that I like ATG much better. It is a very powerful platform once you start to get a handle on what it can really do for you.

boyd4715
+2  A: 

For unit testing with ATG I can only recommand ATG DUST: http://atgdust.sourceforge.net/project-info.html

While it's still pretty raw it can definitely be used. We used it on one of the projects I worked on.

We also implemented MockRepositories which would read object information from xml files and return objects populated with this information for complex relationships which were impossible to mock (think order ecosystem). Combined with a custom config layer and JMock this allowed us to create a unit test suite which ran orders of magnitude faster than simply using the cactus dynamo module(http://www.onwhichsubject.com/DynaCactus/)

As for finding an prepackaged open source eqwuivalent of ATG, I have never heard of something coming close to it's level of features but checking the OFBiz from @boyd4715 it looks like it may be able to compete (not sure it will be cleaner though)

Jean
+11  A: 

The thing with ATG is that it is both a framework and a solution.

At the framework level, it is a Java based application platform for hosting web-based applications, as well as RMI accessible business components, with an ORM layer, a component container, an MVC framework, and a set of tag libraries for JSP.

However, describing it thus is selling it short - even if you ignore the fact that they had most of this stuff before there was a J2EE spec.

For starters, the ORM (Repositories) does more than just mapping to relational databases. It can handle LDAP, XML and file system data sources in a coherent and consistent manner.

The component framework (The Nucleus) does far more than, say, the Spring bean container does - though I agree that properties files are less expressive than XML files

The MVC framework (the basic Formhandler pattern) is more elegant, cleaner and easier to work with than most other web MVC frameworks I have seen, and the APIs are more consistent with the Servlet APIs

The JSP tags for binding form elements on a page to values on business objects etc. are more elegent and cleaner than the form binding tags in any other framework I have seen. The mechanism of writing your own tag library equivalents (Droplets) is much more4 consistent with the Servlet API than standard J2EE tags.

(While I am on the subject of consistency, I should mention that the APIs for writing the equivalent of filters (Pipeline Servlets) is a lot more consistent with the Servlet API than filters are).

What's more, the framework at the basic level gives you an RMI container, distributed caching, distributed locking and distributed singletons, distributed events and messaging, a task scheduler, a rules engine and a mechanism for defining business workflows with custom actions and outcomes, a graphical editor for business workflows, support for versioned data, support for roles and rights, logging and auditing - all out of the box, and all using very coherent and consistent APIs

Then at the solution level, you have the components and the APIs for dealing with user profiling, identity management and personalisation, content authoring and publishing, content search, product catalogs for tangible and intangible goods, product search and guided navigation, pricing, tax calculation, promotions, shopping carts, gift lists and wish lists, payment types, shipping methods, order tracking, customer relationship management etc.

In addition, the extension points and integration points are usually very well designed and quite well documented. They support integration with pretty much anyone who is anyone in the e-commerce and publishing space for things like authoring and content management, identity management and security, product catalogs, search and guided navigation etc. Also, almost all areas of the framework are extensible and pluggable so you can write your own components to enhance or replace the ones out of the box.

Together, this makes a very compelling platform.

However, because of the way it was developed - possibly the very thing that makes it so consistent - means it is a very strange beast to most J2EE developers. ATG usually has its own way of doing pretty much everything that is now considered standard in J2EE. It used to have its own form of JSP called JHT^ML (I ahve heard that they invented it and donated the technology to Sun to become JSP), it has its own component container to host and manage the lifecycle of POJOS using dependency injection and reflection (sound familiar? they had it about a decade before Spring), it has its own APIs for developing tag libraries called Droplets, it has its own APIs for developing filters (Pipeline Servlets) and its own filter chain (the Pipeline), they have gone through two iterations of ORM - the first (Relational Views) only did ORM and used POJOs, reflection and bean mapping files (sounds familiar? they had this about a decade before Hibernate) and the second (Repositories) uses value dictionaries and gives a very consistent API for sourcing data from relational databases, LDAP, XML files and other sources. Moreover, ATG has (or rather, had) its own application server.

Not to say that ATG is not J2EE compliant - it is. You can host WARs and EARs in an ATG server, and they just work.

Over time, they seem to be moving away from the proprietary nature of things at the framework level while adding more and more value at the business solution level. They have moved away from JHTML and now use standard JSP - they have implemented all their custom tags as JSP tag libraries. They have moved away from their proprietary application server and now support deploying applications as EARs on Weblogic, WebSphere and JBoss.

Likewise, I do not think they are averse to open source - they use quite a few open source frameworks internally - but they are certainly not open source. I doubt they will be - though I would like to see them open source some of their core framework components or migrate to more widely supported open source replacements - perhaps a Spring-based Nucleus?

So, to answer your question, I do not think that there is an open source alternative to ATG. While you will find many open source alternatives to the framework bits - such as logging, ORM, bean container, tag libs, etc. you will be hard pressed to find a solution that can do so much so consistently.

Of course, depending on what you want out of a free open source replacement for ATG, you could start with a JBoss based application that uses either EJB3 or Spring, and either EJB3 or Hibernate for your compoennt container and ORM. You can then add Drools for the rules and workflow engine, Spring MVC for the MVC and form binding tags, JSTL for other tags, Commons-DBCP for your datasources, Log4J for logging, Quartz for scheduling. You could look into integrating Apache Lucene with Hibernate for advanced searching.

Acegi can provide security in Spring - but I do not know what open source frameworks can provide the full identity management/user profiling functionality that ATG provides.

You can probably hand-roll the versioning support and a content authoring workflow on top of these technologies.

There are a few open source 'shopping cart' applications out there - but I am not too familiar with how extensive they are.

Perhaps the question is best asked "Which free and open source frameworks would you recommend for replacing which aspect of ATG". I have gone and created another question framed in this way. See http://stackoverflow.com/questions/100588

Vihung
that's a heckuvan answer, @Vihung - thanks :)
warren
A: 

i suppose grails can be a good open-source alternative to ATG, isn`t it?

dementiev
No. There is several orders of magnitude difference between functionality provided in ATG and Grails. Unfortunately, there is also an order of magnitude difference in complexity (ATG is way more complex). Obviously there is also huge difference in price too
Miro A.