Remember my factory method design pattern example to compute the first name and last name from a full name?
![]()
No? It’s really easy. You only have to provide a full name, like “John Doe” or “Doe, John” and the business logic computes the correct first name and last name.
This time we are not interested in the business logic and data binding, but we are going to generate the graphical user interface!
First, we have to model the form.
We can do that with UML. Use your favorite UML tool (StarUML), export to XMI. Finally, feed the XMI to a code generator (MyGeneration) using the right templates.
That’s all there is!
Comments