Maik Derstappen: State of Plone back-end development today
Talk by Maik Derstappen at the Plone Conference 2019 in Ferrara.
Frontend is nice, but it needs a backend, so let's talk about that. I will talk about plonecli, plone.api, Plone snippets for VS Code and plone.restapi.
You should use plonecli. It saves a lot of time for boring stuff. It helps you to create a product and enhance it step by step. It can cleanup and create a fresh virtualenv with a specific Python version and requirements and run buildout.
It has sub templates, for example to add a content type to your package. Now a sub template for a restapi service. Also one for upgrade steps, adding an upgrade profile per upgrade step.
We create a structure and files, and if you don't use some parts you can ignore or remove them. We will check if you have a clean git status before, and ask to commit, and afterwards we automatically commit.
You have good test coverage right from the start. All features added by plonecli have at least basic test coverage. You only write the tests for your own code. We make a tox environment to test different Plone and Python versions.
You can configure plonecli/mr.bob to your taste, changing the default answers or ignoring questions in a .mrbob file.
It is extensible, you can write your own custom bobtemplate packages and register them for the plonecli.
Visual Studio Code: snippets for Plone
There are snippets for schemas, fields, registry xml.
Use plone.api. It makes add-on code much easier to understand, without arcane incantations.
Ideas for the future.
- plonecli:
- add option to set Interface for view, viewlet.
- REST API sub templates for de/serializer.
- Graphical UI (ncurses-like) to make selecting options easier.
- VS Code: plone.api autocompletion. VS Code is not so smart with namespaces. And it does not know buildout. You can use a buildout recipe that helps here though. Or use the generated zopepy script as your Python.
I would love more contributions. Don't be shy. There is no grand jury who makes decisions. Publish your own bobtemplates. Improve the VS Code snippets, or for other editors. Meet me at the sprints.
Question: is there a bobtemplate to create a new bobtemplate?
Answer: No. Should be possible.