A visual designer the DDD way. Part 2

As I told you in my previous article, my limited understanding of what DDD is and my most-than-evident passion for the MVVM architectural pattern led me to try a rather unusual way of making a simple visual designer.

First of all, I analyzed my domain. For the moment, it consist of a document that is composed of another level of  “subdocuments”. And those are composed of “simple” items like shapes (rectangles, lines, ellipses and rich text…) and other data-bound items (fields) which you can assign variables from a data schema to dynamically show content (text, generally).

A more advanced feature is that a child document can contain more child documents (a perfect candidate for the Composite pattern). All in all, you have a Main Document with child documents, and each child document can have shapes, “dynamic” content and other child documents.

As you can see, I am focusing on my domain. A very simple domain, for the moment! but I’m not thinking about how to represent it, how to persist it or how to process it. In fact, this picture of the possible relationships between each element is what will give us a great level of abstraction and freedom.

Imagen

This is the class diagram I got. I think you can get the idea behind it.

To continue…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s