Pharo Morphic framework guidance

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Pharo Morphic framework guidance

Zeeshan Ansari
Hello All,

I am required to use Pharo for a OO class project. In short, my project is to build a simple UML editor which allows a user to share his/her design with other users in real-time. I have chosen to do this in Morphic.

I am looking for guidance/best practices for the following:

Is there a recommended pattern to structuring the application. Should all my application objects be derived from Morph objects? Or should a morph be composed within my own domain objects and use morphs for the visual part?

Any guidance on proper mouse handling techniques. Which methods to override. Writing event-handlers, etc.

How can I achieve multiple inheritance. For example, I want all my drawing objects (use case, class, actor, etc.) to derive from a common class but at the same time each drawing object seems to be a natural extension of an existing morph. For example, use case can derive from EllipseMorph, class can derive from RectangleMorph, etc.

Are there any similar applications in SqueakSource which I can look at to get some guidance.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Pharo Morphic framework guidance

Carla F. Griggio
Hello!
I'm super busy right now so here's just a quick answer. Check smallUML: http://squeaksource.com/@ove2LM8opVGNawjT/fA1QDg4I, it's a project I did some time ago to build UML diagrams. It already deals with the mouse event handling for drag and drop for example. 

The diagrams are saved as text in methods, and you can rebuild a diagram from that, so maybe it's useful for what you want to do (you just send the text that will rebuild a diagram to the other user).

Feel free to ask questions here about this and I will try to answer!

Cheers,
Carla.

PS: Google "smallUML + Pharo" to read past emails about it


On Mon, Apr 8, 2013 at 6:36 PM, Zeeshan Ansari <[hidden email]> wrote:
Hello All,

I am required to use Pharo for a OO class project. In short, my project is to build a simple UML editor which allows a user to share his/her design with other users in real-time. I have chosen to do this in Morphic.

I am looking for guidance/best practices for the following:

Is there a recommended pattern to structuring the application. Should all my application objects be derived from Morph objects? Or should a morph be composed within my own domain objects and use morphs for the visual part?

Any guidance on proper mouse handling techniques. Which methods to override. Writing event-handlers, etc.

How can I achieve multiple inheritance. For example, I want all my drawing objects (use case, class, actor, etc.) to derive from a common class but at the same time each drawing object seems to be a natural extension of an existing morph. For example, use case can derive from EllipseMorph, class can derive from RectangleMorph, etc.

Are there any similar applications in SqueakSource which I can look at to get some guidance.

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: Pharo Morphic framework guidance

stephane ducasse
In reply to this post by Zeeshan Ansari
We are interested in the result and have a look at SmallUML

Stef

On Apr 8, 2013, at 6:36 PM, Zeeshan Ansari <[hidden email]> wrote:

> Hello All,
>
> I am required to use Pharo for a OO class project. In short, my project is to build a simple UML editor which allows a user to share his/her design with other users in real-time. I have chosen to do this in Morphic.
>
> I am looking for guidance/best practices for the following:
>
> Is there a recommended pattern to structuring the application. Should all my application objects be derived from Morph objects? Or should a morph be composed within my own domain objects and use morphs for the visual part?
>
> Any guidance on proper mouse handling techniques. Which methods to override. Writing event-handlers, etc.
>
> How can I achieve multiple inheritance. For example, I want all my drawing objects (use case, class, actor, etc.) to derive from a common class but at the same time each drawing object seems to be a natural extension of an existing morph. For example, use case can derive from EllipseMorph, class can derive from RectangleMorph, etc.
>
> Are there any similar applications in SqueakSource which I can look at to get some guidance.
>
> Thanks.