Learn some of the feelings of the Robot Framework IDE

Source: Internet
Author: User

Some time ago to learn the Robot Framework IDE (RIDE) source code, but also according to the sample implementation of a. Net platform RIDE.

There are a few feelings deep:

1. The difference between dynamic and static language

Learn RIDE source code before the use of dynamic language has been written in the scale of the program. The RIDE source of learning, let me feel: 1.1 Python Flexible language features can greatly accelerate the development speed . If you do not need to define an interface, you can pass different types of data into the same method, as long as the parameter types have implemented the required properties or methods. But that could also be a very small problem:
1.2 (Duck Typing) has no "interface" constraints, which makes it very difficult for other programmers to extend their original code.

Cases:

> If you want to add a new type of incoming parameter, you must first understand that the new type has to implement those properties or methods;

> If you add calls to parameters for other properties or methods within a method that receives the parameters, make sure that the parameters are implemented by these properties or methods.

and "Interface" is the best specification of these "necessary conditions".

2. Specific differences between WxPython and Windows Forms

When I rewrite RIDE with Windows Forms, I feel that the way they are used in general is similar, but there are some places where it can be tricky to imitate. Example: 2.1 The sequence of calls to execute code blocks when an event is triggered may vary considerably.

For example, there is a Callafter method in WxPython that allows a method to execute a specified piece of code after all the code in the current event has been executed, and the clock effect is cumbersome to mimic in Windows Form, possibly customizing the callback process.

2.2 WxPython Some event- triggering effects before and after the control is rendered.

For example: WxPython, if you set the control focus before the control renders, the focus does not change after rendering, and in Windows Forms, the focus is repositioned to the default control.

2.3 The wrong with the control library brings trouble with migration rewriting

Many of the more complex controls in WxPython do not have a more appropriate alternative to Windows Forms. You can only customize the control at this time. This can be a lot of work, not necessarily in performance and ease of use (it's not easy to develop a standard control).

Did not do very well in imitating the ride's cue box (a bit more code):



Size: 44.7 KB View picture Attachments

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.