Did not find a how-to for your problem?

Ask me to write the how-to post by writing to the mailing-list at cps-devel [@] lists [.] nuxeo [.] com or writing to me to joseluisdelarosa+cpshowto [@] gmail [.] com. Note: I'll keep all conversations on the official mailing list.

Monday, June 4, 2007

How to develop (some advices)

These are just some thoughts about how to delve with the day-by-day development tasks on CPS:
  • When there's an exception, don't get upset. Look carefully what is going on around it, which is the error message, where did it occur, put it all together and try to understand why. All this information it's essential for you and even more if you ask for help to other developers.
  • Extending is better than customizing. Extending respects the original code and allows you to easily review it without possible dirty customizations. Besides, extending forces you to think much more about what you are doing.
  • Do not use ZMI for development. ZMI is annoying when you are in a real development project. Create your own product and write everything in filesystem, working this way will increase your productivity. If you are completely new and you would like to tinker with CPS before writing any code, use the ZMI and move to filesystem as soon as you make up your mind.
  • Do not base your code on the name of the host, port or identifier of the portal, any of these values depend on the production environment.
  • When you use a method from the API make sure it belongs to the same level of abstraction to the level you are programming, preferably a high level (CPS layer). E.g. If you are creating the view of a folder and want to retrieve the folder items, the CPS's script getFolderContents is better than the Zope's method objectValues as it will give you more flexibility and abstraction.

  • Contribute as much as you can to the community. No matter how you do it: documentation, code, answers to others, money or whatever. That will help others and yourself in a way you can't imagine.
And that's all, I think...

No comments: