Quantcast
Channel: Flex"i"MMI
Viewing all articles
Browse latest Browse all 10

Doctrine 2, ZendAmf, Flex and Acceleo - Part 1: generating entities from UML

$
0
0

I am more and more interested in the integration of PHP and Flex. Especially, using Doctrine2 as an ORM. So, I walked trough a great article written by Mihai Corlan, giving an example of how to work with Doctrine2, ZendAmf and Flex, using Flash Builder, of course. It was clear, easy to reproduce and the data-centric development feature of Flash Builder, the Data/Service tab, is really a great feature to introspect PHP classes and create the service wrappers as well as the AS3 value objects. It is a long time that I wanted to test this feature. It is very cool but I was actually really amazed until I opened the code generated by Flash Builder for services and value objects. It was too complicated and totally unmanageable for me. So, in a project, either I manage this part as a black box (which is probably the easiest way to do, trusting Adobe team in generating a light-weight and performant code), either, I find another code generator.

The second point that made me uncomfortable, with Doctrine2, this time, is that I missed a way to get the "big picture" of the entities: a diagram. In the Mihai’s example, the context is very simple, 4 entities… ok. But in a real, big project, managing (I mean, creating and maintaining) more than 40 entities and their relationships would be terrific without a diagram… a UML diagram.

So I decided to reproduce Mihai’s example in a different way. I want to:

  • start from a UML diagram, modelling the application - just including Doctrine2 entities and php services,
  • generate and maintain Doctrine2 entities that I don’t want to care,
  • generate the server-side services (at least a skeleton of methods),
  • replace the code generated by FB4 on the client side.

I don’t want to:

  • rewrite the client application (just reuse Mihai’s methods),
  • rewritte the php services (just reuse Mihai’s methods),

my main goal being to test the feasiblity of a full code generation in the Doctrine2 / ZendAmf / Flex configuration, based on a UML diagram.

… [visit site to read more]

Related posts


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images