Experiences with the flex development process designer (2)

Source: Internet
Author: User

The first article was written more than two months ago. During the Spring Festival, at the same time, a new task was arranged at the end of last year, and I was busy with other research. There is another reason, because during the intermittent development of the Flex designer prototype system, many original design details were found to be insufficient, and a lot of detailed reconstruction and improvement were made. In the past few days, the prototype implementation of a phase has been completed, so that the system can be idle and then write a summary.
Article 1 Address: http://blog.csdn.net/james999/archive/2008/11/16/3313861.aspx

 

First, review the previous article. In fact, the previous article is a very "principled Design Concept". Many people may feel very empty after reading it, but in the development process, such seemingly empty guiding ideology and ideas are truly valuable. -- Believe it or not, you can try to do it from scratch, and you will find out what you really need.

The previous article focuses on several principles:

(1) The MVC Architecture is required. This MVC Architecture does not mean the framework architecture such as puremvc, but refers to the design structure of "flow graphics", "process model", and "controller, that is, the architecture of "model-editpart-figure" in eclipse GEF.

(2) the glass plate Technology intercepts mouse and keyboard events and handles them.

(3) command mode to process operations. You can easily solve redo-Undo problems. Keep in mind that your command is intended for "model" rather than "graphics ".

(4) use the layer mode to place different elements on different layers. For example, the underlying grid is placed on a layer, the active node is placed on a layer, the connection line is placed on a layer, and the drag and drop shadow is placed on a layer.

(5) use the editor, editordomain, selectmanager, and other objects to maintain the management space for the current process. This is a basic concept in eclipse GEF. If you are not clear about it, please refer to the relevant documents.

 

Now go to the topic.

 

Workbenchpart, Editorpart, Viewpart

If you know about eclipse GEF/UI, you must know what to say next when you see these three objects.

For a flex process designer, it is not just a flowchart, but you also need to involve some additional "views". For example, you may need to display the outline of the current flowchart, you may need to display the problem list, XML format view, and so on. It is very good to learn from the design ideas of editorpart and viewpart in eclipse GEF/UI.

 


For example, the implementation of the ieditorpart interface represents a graphical design area Editor, while the iviewpart represents a view. Each viewpart has a viewer to represent the true view implementation. Note: The viewer itself is not a flash displayobject object, or a flex uicomponent object. Its internal viewercontrol indicates the actual Display object of the view, such as a tree or a DataGrid, or other uicomponent.

Ieditorpart and iviewpart are not displayobjects. They only indicate a view or editor object and index some resources.

 

Let's take a look at the iworkbenchpart interface:

 Package COM. primeton. framework. workbench <br/> {<br/> Import MX. core. container; <br/> Import MX. core. uicomponent; </P> <p> Public interface iworkbenchpart {</P> <p> function createpartcontrol (parent: Container = NULL): container; <br/>}< br/>}

 

 

This interface allows the parent contaier Display object to be passed in for building, or not to be passed in. Both editorpart and viewpart must implement this interface method to initialize the Display object implementation.

 

Today, I wrote a little less, and I will try again later.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.