Python is the programming language that is implicitly selected when choosing Plone as a content management system (CMS). While Plone can be used out of the box, understanding Python allows users to fully customize and extend Plone's functionality through the creation of applications and modules. Python is a powerful yet accessible language that offers many advantages for both Plone development and general web development.
2. You just chose Plone as a CMS
Congratulations. You might not realize it yet, but
in addition to picking a great CMS, you have
implicitly selected a programming language:
Python.
3. Make it an explicit choice
Unless you plan to only use Plone's out of the box
functionality and third party products, you will need
Python at some point.
It's better to dive in and get to know the language,
because Plone can be used to create fantastic content
based applications that extend the platform, but you
need Python for that.
You can of course depend on one of the many Plone
companies around (we thank you for your business),
but if you are the kind of organization that has its own
developers, it easy to introduce them to Python.
4. About Python
”The Python paradox: if a company chooses to write its software in
a comparatively esoteric language, they'll be able to hire better
programmers, because they'll attract only those who cared enough
to learn it.”
Paul Graham
Python is powerful... and fast
Python plays well with others
Python runs everywhere
Python is friendly... and easy to learn
Python is Open
Python developers care about Python
5. Python the language
very clear, readable syntax
strong introspection capabilities
intuitive object orientation
natural expression of procedural code
full modularity, supporting hierarchical packages
exception-based error handling
very high level dynamic data types
extensive standard libraries and third party modules for virtually every task
extensions and modules easily written in C, C++ (or Java for Jython, or .NET
languages for IronPython)
embeddable within applications as a scripting interface
6. Python the community
Global, diverse community
Regional conferences all over the world
The Python Foundation oversees the
advancement of the language and supports
community groups and efforts
The community is friendly and open
Many Plone developers are very involved with
the language
7. Python package index
Repository of software for the Python
programming language
17,489 packages and counting
Packages can be installed from the command
line directly from this repository
Plone uses it to get third party products (and
Plone's components as well)
8. The Zen of Python
cguardia@hal9001:~/work/eye$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
9. With Python you can extend Plone
You can create new content types
You can create portlets
You can define special views for your content
You can personalize existing views
You can manipulate your site's content
programatically
Basically, you can make Plone do your bidding
But...
10. You'll also know when NOT to use Plone
As we saw, Python offers tons of packages
and tools in many different areas
Python is specially strong in web development
Plone is a great CMS, but it's not meant to be
used for all your website needs
Trust me, you don't want to meet FrankenPlone
11. Warning signs
If you are thinking ”we need something like
Plone, but without this and this and this...”
Or ”we could use Plone, except we'll have to
add this and this and this”
Resist the temptation. Here's a rule of thumb: if
yours is not a content application or if Plone's
functionality would get in the way of what you
want to do, you might be better of with
something else.
12. Combining Plone with other Python tools
Need reporting? Plone is not well suited for many
writes to the database. But with Python and
SQLAlchemy you can create a reporting app and
make Plone push data there.
Need to share data? You can have Plone return JSON
data and another Python app can use it.
Plone can also easily get data from other applications
in a variety of formats. With Python, many times this
means a library import and a few lines of code.
Need to analyze your Plone database? Why not write
a pure Python app that connects to a copy of your
ZODB directly?
13. Python for Web Development
Sometimes Plone may not be the right tool for
the job. Need a financial system, an accounting
package or a web store?
There are many Python frameworks that can
help you create web applications.
Pyramid (personal favorite), Flask, Django are
all great choices.
Using Python for all gives you advantages like
having common library code specific for your
organization and allowing team members to
work on the different web applications
14. In Conclusion
Python is a great language, give it a chance
Consider using it for more than your Plone site
Know when to extend Plone and when to go
with somethimng else.
Statistics show that you'll have happier
developers
Some developers end up not working with
Plone when they change jobs to somewhere
where it's not used. They never leave Python,
though.