How to migrate your applications from version 0.1.1 to 0.5

Follow the following steps:

First you need to create the appropriate web methods for your content classes. For this reason create a new "webmethods" Python package inside your application's directory. Inside this package I recommend creating one file per content class. Therefore, if you need to add web methods to two content classes this package will contain two python files. It is also advised to edit the "__init__.py" file of the aforementioned package and then add the "__all__" special attribute containing a list of all of its contained modules. This is because in the next steps we will use something like "from com.mycompany.myapp.webmethods import *". The typical imports required for each one of these modules are:

Inspect the "store.xml.bak" file (this is actually a backup kept temporarily and can be safely deleted after the migration process is finshed). Typically, for each registration serving UIs inside your application's package node you need to create a new web method. A registration of the this type:

@webmethods.remotemethod(of_type="MyContainerClass")
def method_name(self):
[PASTE THE CODE OF THE method_name METHOD OF THE com.mycompany.myapp.XMLRPC.MyContainerClass SERVLET HERE]

It is worth mentioning that registrations such as the one below DO NOT need to be migrated since these kind of methods are bound to the base content classes and they are already there for all sub-classes:

The required parameters of this web method are the "of_type" and the "template". The others' default values are shown above. This method is called by issuing an HTTP GET on "http://SERVER/porcupine.py/OBJECT_ID?cmd=my_method". Use the special name "__blank__" if no cmd parameter is required. The later also applies for QuiX web methods.

Binding PSP pages to objects is no longer supported. Thus, if any of your "store.xml" registrations' action attribute points to a PSP page then you have to transfer the logic of this server page inside a web method.

Update your PSP pages' code. All system objects passed in a PSP page now begin with a capital letter. Required replacements are:

Activate your web methods. In order for the web methods to added to your content classes you must import them. Most of the times placing this import in you application's main package "__init__.py" is sufficient:

from com.mycompany.myapp.webmethods import *

On the UI side, if you application is using splitters then you have to make some final adjustments. The new Splitter widget derives from Box. The first change that you have to make is to invert the splitters' orientation; that is vertical become horizontal and horizontal become vertical. Next remove all the "pane" tags and transfer the positioning and sizing attributes to the inner widget. If a pane contains has more than one child widget then transform in place into a rectangle. On-off panes are no longer an option. All panes are collapsing when double clicking on the splitter handles.

That's it. For a more detailed view of changes introduced in this version and not mention in this guide see the Main.ChangeLog