使用ArchGenXML结合UML工具开发Product(一)
最近在用ArchGenXML结合UML工具开发Plone的Product,很有一些收获,想将这些收获积累下来写成学习笔记,做日后的积累知识,或给大家参考之用。 学习笔记说明: 这不是一本手册,里面记录的大都是我在用Arc...
最近在用ArchGenXML结合UML工具开发Plone的Product,很有一些收获,想将这些收获积累下来写成学习笔记,做日后的积累知识,或给大家参考之用。
学习笔记说明:
这不是一本手册,里面记录的大都是我在用ArchGenXML结合UML工具开发中一些细节问题的处理,然后就是对现有的一些关于ArchGenXML使用手册及相关资料的翻译及我的理解。
还需说明的是,学习笔记里可能有错误或不足,大家发现后请指出!
以下是参考的资料:
* ArchGenXML - Getting started
* ArchGenXML入门(中文)
* How to subclass an ATContentType in 7 Minutes
* Building a Solution Providers Directory using ArchGenXML
* Subclassing ATContentTypes with ArchGenXML
* Building Custom Content Types with ArgoUML and ArchGenXML and Permitting Anonymous Content Submission
* Using ArgoUML model with ArchGenXML data types, stereotypes and tagged values
ArchGenXML介绍
通过ArchGenXML你完全可以实现Python 零代码编程。它可以通过UML模型(.xmi,.zargo,.zuml等格式) 产生基于Archetypes框架的 产品。可以做到schema的定义、schema的继承关系,工具生成、引用、父子关系、工作流、国际化等
用ArchGenXML的理由有:
- You want to save time
- You are a lazy programmer
- You don't like to reinvent the wheel
- You dont like copying and pasting code and bugs
- You make heavy use of references and interfaces
- You have big projects with many different custom types
- You want or need a well-documented interface to your product
- You like structured model- and pattern-driven software development
- You want to maintain your project in future without getting a headache
and many more good and odd other reasons.
安装
先决条件:
python2.3+ 或者 python2.4+
plone2+的环境
archetype1.3.x +
安装:
- PyXML: http://pyxml.sourceforge.net
- i18ndude: http://svn.plone.org/collective/i18ndude
- stripogram: http://www.zope.org/Members/chrisw/StripOGram
- ArcheGenXML: http://svn.plone.org/archetypes/ArchGenXML
UML工具:
poseidon www.gentleware.com,
argouml http://argouml.tigris.org
......这个是个人的习惯,我用过poseidon,argouml,两者都非常好,过后的例子我以argouml为例。
UML简单介绍
uml是一种统一建模语言,在ArchGenXML我们用到了类图和状态图。
类图
接口、内容类型、工具、属性、方法、相互关系
状态图
工作流,定义工作流及角色权限关系