Borort

The sky’s the limit…

Archive for the ‘CMS’ Category

Plone Gov Brings Os To Public Sector

without comments

 

Written by borort

June 2, 2008 at 4:18 pm

Posted in CMS, Plone, Research

ArchGenXML /UML and Plone – How To

with 6 comments

ArchGenXML is a code-generator for CMF/Plone applications (Products) based on the Archetypes framework. It parses UML models in XMI-Format (.xmi, .zargo, .zuml), created with applications such as ArgoUML, Poseidon or ObjectDomain.

What is Archetypes?
Framework for developing Plone products
- Automatically creates view and edit pages
- Maintains unique object IDs
- Creates references between objects

Archetypes framework
Field validation
- Standard security setup
- Alternate storage options
- Data transformation capabilities

How to..(in Windows XP)

Before installing AGX, we need to have Plone install (Here my Plone version is 3.1.1).

Step 1: Download ArchGenXML from Plone website (Plone.org). The latest version of Plone requires the latest version of ArchGenXML which is available on SVN (Sub Version Control) repository: https://svn.plone.org/svn/archetypes/ArchGenXML/trunk/

Since i use the latest version of Plone so I need to download SGX from the SVN.

Step 2: Install SVN in order to download the repository. (http://tortoisesvn.net/downloads).

Step 3: Create a folder name “archGenXML” (in order to be easy to work with this i create it in C)

Step 4: Right Click on “archGenXML” folder > Click “SVN Checkout”. Enter the URL of SVN repository “https://svn.plone.org/svn/archetypes/ArchGenXML/trunk/” in URL of reposity field > Click OK. All the repository file and folder will be copied to your archGenXML folder.

Alternatively you can use command: svn co https://svn.plone.org/svn/archetypes/ArchGenXML/trunk/  from the command prompt to checkout the repository.

Step 5: Set up Path to “C:\Program Files\Plone 3\Python” and “C:\Program Files\Plone 3\Python\Scripts“ in PATH environment variable

Step 6: Go to command prompt: C:\archGenXML>python setup.py install

Step 7: Type: C:\>easy_install archgenxml

Step 8: Create a file name: .agx_zope_path (create this file using command prompt) in C:\archGenXML\src\archgenxml. Put one single line: “C:/Program Files/Plone 3/Zope/lib/Python” into the file.

Step 9: Install UML software. Here I use ArgoUML (http://argouml.tigris.org/)

Step 10: Create a simple UML model. 

Example: Make a new UML model and give it a name HelloWorld . Choose the tool for class creation and add a class to the diagram. Give it a name such as “HelloType” and add an attribute HelloText with type String.

Step 11: Save/export your model as an XMI file with the name MyFirstExample.xmi (You may save this file in drive C). Then go to the command line and execute: C:\>archgenxml MyFirstExample.xmi

ArchGenXML will begin code generation. When it completes, you will have a new folder HelloWorld on your file system

Step 12: Move the HelloWorld folder to: C:\Program Files\Plone 3\Data\Products. Restart Zope server and open Plone in a browser and log in as Admin. Choose Site Setup from the personal bar and choose Add-on Products. A new product HelloWorld should now appear in the list of products available for install. Choose it and click install. Go to your personal folder. In the list of addable items you’ll find the new product as an addable content type. Add a test instance to see if it works.

If you still have any problem please let me know.. ;)

Reference:
http://plone.org/documentation/manual/archgenxml2
http://www.jazkarta.com/presentations/ArchGenXML-UML-talk.pdf

Written by borort

June 1, 2008 at 2:55 pm

Posted in CMS, Plone, Research