Reputation: 5940
Alfresco offers both dynamic and static deployment of custom content model [1]. However, it is still not very clear to me why would one renounce to the dynamic deploy advantages.
When should one go with bootstrap deployment? What are functional differences between the two?
[1] http://docs.alfresco.com/5.0/concepts/content-model-deploy.html
Upvotes: 1
Views: 701
Reputation: 3818
As stated in the Alfresco documentation:
There are restrictions on what changes you can make to a content model XML file and when you can delete a content model XML file. Only incremental additions are allowed; i.e., changes that do not require modifications to existing data in the content repository, or do not modify existing definitions and their properties. You can delete the content model only if it is not used by any data in the content repository.
I do not think that dynamic deployment is a good option during development because you will likely need to modify your content model often with changes that are not incremental (such as removing a property). There are steps that you can follow to remove a property from a model dynamically loaded, but they will be much slower and error prone than a restart.
Dynamic deployment is good only in some particular use cases (for example if you need to add a new content type on the fly).
To test that a content model is well formed, you do not need to deploy it. Instead, use the "TestModel" class as described in
and in many other forum posts
Upvotes: 1
Reputation: 2037
Both approaches have it's pros and cons.
In case of dynamic deployment your model is stranded away from all other customization related code. So, whenever you deploy all your customization on particular instance you will not be able to include them in your amp file.
In case of bootstrap deployment if you have any syntactical error in model you will get to know during bootstrap with information on possible cause of issue. So, it's easier to rectify.
Dynamic deployment seems to be better suited for your development environment if you want to quickly implement your model and check changes.
Upvotes: 1