When making a plone 5 addon, how do we add our own resources to the registry now? (aka our own css and js to the outgoing bundles?)
I've read http://docs.plone.org/adapt-and-extend/theming/resourceregistry.html and it isn't helpful...
Can someone point me to a working example of a collective addon or some better addon documentation?
vangheem's example.plone5resource in the collective on github has examples of several strategies. The examples vary with the extent to which you need requirejs to handle dependencies and whether or not you want the resources compiled by the bundle manager. "Legacy" bundles are the easiest if you're updating a Plone 3 or 4 resource.
Related
I have recently started learning about Alfresco Content Service.
I have some questions:
My understanding is that the standard way to add customization is to create AMP's.
Why create an amps for each customization instead of adding it directly to the configurations of ACS? Are there some benefits like not having to restart the service or something?
If apply_amps adds all custom amps to the alfresco server (.war files), won't there be a risk of customizations writing over each other?
E.g if two different amps change the same standard button in the share service.
I have found that there are 2 ways to add these customizations as well:
Add dependency to the pom file. (works only for .jar)
Actually compile the .amp and move it to the correct folder and run apply_amps.sh.
From the documentation it seems to my like AMP-files used to be the standard way of adding customization but that there have now been a move away from this in favor of using regular jar files and eventually in 7.1 and forward use JSON instead.
Yet other tutorials I find mentions things like "always use .amp". Which then seems strange if it contradicts the information on the official documentation.
Also I found something about adding amps through the share interface? Or must they always be added when building the server (.war)?
Could someone provide me with a thorough explanation of the best practice for applying customizations to the alfresco content service? Preferably with details regarding a live production setting.
Thanks for helping me make some of this clearer.
I'll try to give you helpful answers:
Making app packages (APMs or JARs) is much better than changing config manually. It's good for versioning, portability (TEST vs PROD or between projects), composition (you can add some addons witch are often very useful)... It is standard and good way how to build a web app.
About conflict of customizations, I'm not sure how it works. Is good practise always use own namespace for every AMP.
If AMPs write to the same file, result is always append (share-config-custom.xml can get be very big).
Problem about JARs and AMPs is simple. Old version of Alfresco supports more AMPs than JARs. Now it does not matter with way you use. Try to look inside these packages they look very similarly.
I never heard about adding AMPs through the share interface. Have you some source? Only thing which is similar is creating content model through Model manager (https://docs.alfresco.com/content-services/latest/tutorial/model/)
I use for PROD combination of AMPs and JARs. I have a lot of legacy code and addons in AMPs and new things in JARs. Alfresco work with them same...
Is there any documentation bundle for Symfony? Where simple help pages can be created / edited? Or separate software that can be integrated but not in iframe?
For real good documentations Sphinx is much better. You can generate different formats from your sources it's very cool.
http://www.sphinx-doc.org/en/stable/
The only bundle for SF i know is the APIDocBundle but that is more for Api documentations.
https://symfony.com/doc/master/bundles/NelmioApiDocBundle/index.html
I am trying to find a documentation or a tutorial about creating and publishing symfony2 bundles for other developer use.
I tried to look at some source code for some public bundles but it seems it needs more in dept understanding.
Is there any official documentation about this ?
You can find most of the recommendations from the official symfony documentation : http://symfony.com/doc/master/cookbook/bundles/best_practices.html
I also encourage you to read this slides from the famous #stof70 and #lsmith, that exposes the most recent best practices about bundles (composer, travis, knpbundles, etc) : http://friendsofsymfony.github.com/slides/there_is_a_bundle_for_that.html#1
There is no official documentation on this topic. But from my point of view I can tell you, that most important things for you bundle are:
Uniqueness
README
Tests
Avoiding dependencies
Good practice also is to tag stable releases.
By the way, at KnpBundles you can see the number left to the bundle name. It represents respectability of bundle within community. You can check most respectable and the looser ones, compare and analyze them to define points, that make bundles successful.
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.
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.
I am creating a web app that allows people to debate topics. I started prototyping with Django and have a functional app. I have not yet decided on what framework to use.
I've read about Plone the app and Plone the framework. I just can't seem to find any online documentation on using Plone as a framework. I'm looking for a tutorial or something that will show me how to build a web app starting with Plone. I just want to evaluate Plone before I choose my framework.
Anyone have any refs or recommendations on learning how to use Plone as a framework?
You should start here:
http://plone.org/documentation
A really good book is:
http://www.packtpub.com/Professional-Plone-web-applications-CMS/book
Plone is build on Zope Application Server (zope.org). You should read into the zope book too. Its free.
The IRC Channel (#plone) on freenode is full of experts that are willing to help. They like to discuss with :)
Don't use Plone as Framework.
Plone is an CMS. You can use it as framework,You can use Zope2 application server + Zope3 component architecture but I don't recomended to do this. Plone was designed to be a CMS so why You want use it as framework?
Why you shouldn't use Plone as framework?:
Plone is Slow!!!
30 sec. on every restart is too much. When You change something, you need restart. Autorestart(http://plone.org/products/collective.autorestart) doesn't help, you still need to restart Plone any time You change a zcml, portlet's code and sometime with python code.
Plone is too complex.
So big code base. Different coding styles (old Zope2, new component base Zope3, some parts are written with Grok).
You will need write xml (Generic Setup).
Nobody can say what you must use Archetypes, Formlib, z3c.form or Dexterity?
Plone doesn't have good documentation. Too much old documentation (plone.org/documentation) and there is no place where you can read what is the right way to do. The only good documentation is in Martin Aspeli's book (martinaspeli.net/plone-book) but you will need more and this book isn't open, so You will need buy it.
Plone has so many products but if you need really stable and quality stuff you will need write your own.
Plone is Slow!!! Forget test driven development.
I think that the most important factor in choosing a framework is the existence of good documentation. If you can't find good docs for using plone in the way that you want without having to ask here first, that's all the "evaluation" you need.
I'd stick with Django.