Chapter 9. Creating Skeleton Apps with Coily

Spring Python has many useful building blocks. In the last chapter we used these features in concert to build a simple banking application. This illustrated the bottom line task for software developers: delivering runnable applications.

To speed up the process for building apps, Spring Python provides the Python script coily. This script is built to support extensible plugins. The first plugin provided by the Spring Python team is gen-cherrypy-app, which is based on creating a skeleton CherryPy application using Spring Python IoC and security.

In this chapter, we will learn:

  • The plugin driven approach of coily, which allows us to utilize plugins written by other developers or to write our own
  • The easy-to-code requirements of creating a plugin
  • Building a CherryPy application from scratch, with fully configured security, using the template-based gen-cherrypy-app plugin

Plugin approach of Coily

coily is a Python script designed from the beginning to provide a plugin based platform for building Spring Python apps. Another important feature is version control of the plugins. Developers should not have to worry about installing an out-of-date plugin that was designed for an older version of Spring Python. coily allows different users on a system to have different sets of plugins installed. It also requires no administrative privileges to install a plugin.

Key functions of coily

coily is included in the standard installation of Spring Python, as documented earlier in this book. To see the available commands, just ask for help.

Key functions of coily

The following table elaborates these commands.

--help

Prints out the help menu. It is worth noting that when plugins are installed, they will also be listed as well.

--list-installed-plugins

Lists the plug-ins already installed in this account. Each installed plugin exists in a sub-folder in HOME/.springpython.

--list-available-plugins

Lists the plugins available for installation. coily is currently configured to search SpringSource's S3 site where Spring Python downloads are found for officially supported plugins.

It also looks in the current directory where coily is being run, so that you can develop plugins locally.

--install-plugin

Installs a plugin by copying its files into HOME/.springpython.

--uninstall-plugin

Uninstalls the plugin by deleting its directory from HOME/.springpython.

--reinstall-plugin

Shortcut command that uninstalls a plugin and then installs it again. This is very useful when developing a new plugin in an iterative fashion.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.120.136