为 drupal 生成 UML 类图
您好,我正在使用 Drupal 6 进行我的最后一年项目,我需要为我的网站创建类图,所以您能否指出用于此任务的有用工具。
谢谢
Hi I am using Drupal 6 for my final year project, I am required to create class diagrams for my website, so can you point to useful tools for this task.
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Drupal 不是面向对象的,它不容易用类图来记录。所以我不希望有任何工具可以生成它们。然而,您可以使用任何 UML 工具来创建高级功能文档。
Drupal is not Object Oriented, it won't easily documented with classes diagrams. So I don't expect any tools to be available to generate them. You can hoewever use any UML tools to create high level functional documentation.
我正在专门研究drupal的编写插件的方式。我写了一篇关于此的博客并附有组件图。首先,我为菜单子系统准备了一个组件图,如下所示,
还有一个组件图对于博客模块,
最后,我没有拿出任何类图。但组件图有助于很好地理解内部工作原理。
更新
在drupal的新(8x)版本中,这里有关于类图的讨论 。
I was specifically studying the drupal way to write plugin. I wrote a blog on this accompanied by component diagrams. At first I prepared a component diagram for the menu subsystem as in the following,
Also there is a component diagram for the blog module,
Finally, I did not come up with any class diagram. But the component diagrams help to understand the internal working pretty well.
Update
In new(8x) edition of drupal there are talks for class diagrams here.
Drupal 使用 doxygen 标准来记录代码。您可以使用 doxygen 生成 Drupal Core 的整个 API 以及在 Drupal 应用程序中安装的所有模块和主题。关于类图,您将能够生成如下所示的类图。下面的示例使用 graphviz 库,但您不需要它来生成这些图像。
Drupal uses the doxygen standard for documenting code. You can generate the entire API of Drupal Core and all modules and themes you've installed in you Drupal application using doxygen. With regards to class diagrams, you will be able to generate class diagrams such as the one shown below. The example below uses graphviz library but you don't need it to generate those images.
您可以尝试使用逆向工程工具来获取 drupal 使用的数据库表的类图。应该足够好了。
You could just try to use a reverse engineering tool to get a class diagram of the database tables that drupal uses. Should be good enough.