Saturday 12 September 2009

Mindmap tool for Drupal

Hi Readers,

As always, long time no see. I intend to write a small wrap-up about my new development, GraphMind: http://drupal.org/project/graphmind - Flex source
Origin of the project is Kristof Van Tomme's, our CEO idea. If you know FreeMind, you have to admit how useful organizing your ideas, tasks and everything in a mindmap. A whole theory is built around that (ex: GTD).
This a quick demo about how the code worked a week ago:

If you check the project page on drupal.org you'll get an overview about the features. You can try it also.
For me, the most interesting part was the inner structure of the code. I like to work with actionscript, especially in Flex Builder. Hardest challenge is to handle interaction in a way that doesn't require too much public variables and static classes. First I found a really useful approach: manager classes. For this project we need a small amount of managers for handling events between the different tiers. These magagers, of course, are singleton entities. There is one for the stage logic, one for the connection logic ...etc. Another new (for me) way to handle event driven flows are (as I called them) temporary transfer objects. For instance you need to load data through a connection, you work with the data itself, some state object (reflect the state of the flow) and some others. In an event driven flow you should pass all these items through numerous functions. That is where temporary transfer objects help a lot. When a new data load starts, a temporary object instantiated. During the connection stages (ex: connect, authentication, data load, data receive) the temporary object populates with new properties. At the end of the process you get the temp object with all the required data.
Other thing I'm not sure, if you have a display object represents data what classes you should use. For now I have a display class (subclass of UIComponent) with a property that a data-object class. It works fine, but it's possible there is a better way.
In flex you have a cool feature: view states. You can bind transition effect for state changes. One flaw this feature has is the lack of mixed states. But - now I realized you can do something similar if you group stage elements and use view states on groups (MXML components). Anyway:)
Ok, let's ruin that pink cloud, what about the annoying habits of flash?
I found key events and focus handling a bit messy. Why? Triggering key events you need a display object can receive focus (as far as I know). I use canvas for mindmap which seems incapable of receiving key events. You have to click on another element (textbox, datagrid..) if you want use keys. Ridiculous. Anybody has an idea how to solve it?
Next is onblur events for textinput fields. Onblur event triggered when it lose the focus. But if you click on a canvas element, onblur event on textfield don't triggered. WTF? And these things are quite important.
A small bug from yesterday was save() function for FileReference. It is in the reference but Flex Builder can't find it and so, can't compile. I updated to flex sdk 3.4 and still nothing. Any idea?
I have an education-version key for Flex Builder and it gave me right to get a Gumbo beta extension key (Flash Builder). I was really happy. Yesterday I downloaded and played with it. Importing my old project was seamless, however, Application.application is now deprecated, but the suggested class is not working for me. Needs searching. There is a bunch of new improvements I really want to try. First let's mention themes. And service builder. So cool stuffs. But still in beta. I'll try to upgrade GraphMind to the 4th version of the sdk.

Regards,
Peter

2 comments:

  1. What's new with GraphMind? It's such a great idea. It would be a powerful feature for Drupal to have access to in version 7 and/or version 8.

    ReplyDelete
  2. The development of GraphMind at the moment is on hold: http://drupal.org/project/graphmind
    We are looking for supporters who could help us to pay for the new features. If you are interested in that please, contact us. You can find our contact on the Drupal module page.
    Thanks!

    ReplyDelete

Note: only a member of this blog may post a comment.