Software industry is most dynamic industry among other. The biggest challenge being in this domain is to keep updating your knowledge day-by-day. Though this challenge is applicable to everybody in software domain, its applicable more to the people using open source tools and frameworks.
It may not be that complex to learn new framework but to implement with right practice. Best practice comes with experience only. Using Alfresco for quite a long, I thought to share my experience so that you can leverage it in your project.
Best practice is very wide topic so I will divide it in following section,
In this blog, we will learn development best practices. If you are new to Alfresco development, this blog will guide you to know what you should follow most religiously while development. I feel following 4 are important topics you should put in practice,
Most simple and easiest way to learn any open source framework is to see how out-of-the-box functionality works. It’s often observed that developer doing R&D makes changes in existing file to see how existing functionality works and end up making change in same file and save in code repository.
Alfresco provide extension points to develop custom features. There are three category of extension,
Each category mentioned above has its way to extend or add new features to Alfresco. I would strongly recommend you to refer extension points guide on Alfresco documentation before you start with development.
Another wrong practice we observed with newbie developer is, they google for the content model, find matching solution someone provided in blog or tutorial, copy-and-paste same file in their code and start adding their project code. The tutorials and materials you find through googling are just to explain you about concept. You should read those files, understand the concept and implement content model for your project on your own. This will help avoiding unnecessary code in your project.
Nothing wrong to read through out-of-box codes and clear your understanding how out of the box implementation works. The wrong practice starts when you mix the code structure of Alfresco and your custom code. When you are using open source framework, you have to be very conscious while implementing custom code. You always have to be through full for naming and packaging your custom code to avoid keeping same package paths, XML file names or package path.
As a developer we put over most energy in coding and deprioritize packaging aspect of custom code. The real trouble starts from here. Packaging code in right way is equally important as coding. If you are following standard practice of packaging Alfresco code, you will have luxury of monitoring your module status from admin console.
There are two possible ways of packaging your custom code,
Refer extension packaging Alfresco custom code to know more on this.
In my next blog, I will share about best practice in architecture and deployment. Stay tuned! Keep learning! 🙂