0

When developing for Alfresco, are there any advantages to using the MMT over Integrated Deployment? Is there anything you can develop using one method, but not the other?

Browsing through Alfresco's SDK examples, I noticed many of them used integrated deployment, and the same went for all of the Share webscripts I saw on Google Code. Right now I'm just using the Integrated Deployment method, and everything seems to be working well, but I'm curious if I'm missing out on anything by not using the MMT.

patorjk
  • 2,164
  • 1
  • 20
  • 30

1 Answers1

3

Modules and integrated deployments are exactly the same in terms of code capabilities. The main difference is about distributing your customization: if you need/want to

  • provide your customizations to the external world or
  • reusing them across different projects or
  • port them to different Alfresco versions

then modules are the way to go, especially if you're not releasing the source code. The only downside of AMPs is that they write something in the DB but you currently can't uninstall them, even if there are some tricks you can try out.

I personally still prefer using AMPs as much as I can for my customization, leaving to embedded changes only stuff that can't go into an AMP (e.g. overriding original Alfresco files). The maven way also helps (and drives you a little) towards this practice.

skuro
  • 13,414
  • 1
  • 48
  • 67
  • Though can't the jars used in integrated deployments also be given to the external world to integrate into their deployments? – patorjk Sep 29 '11 at 14:17
  • There are things that are not easily embeddable into normal jars (e.g. spring contexts, JSP) – skuro Sep 29 '11 at 14:36
  • Spring contexts work in JARs, even resources like images and JS can be put in JARs in the latest Share releases (/share/res/..). At least for Share customizations you can put everything in a JAR in /tomcat/shared/lib (only custom JAVA code needs deployment to WEB-INF/lib. I suggest using the ANT build.xml from the Share-Extras project, it can create JARs and AMPs. – Florian Sep 30 '11 at 10:16
  • @Florian: older Share versions used named resources instead of name patterns for Spring contexts, hence the difficulty in embedding them into JARs. You may well end up hiding them from users and come to nasty conflicts. – skuro Oct 04 '11 at 07:45