Cobra-entering the Ajax age

Source: Internet
Author: User

At present, the company is accumulating related technologies of Web2.0, and Cobra is used to train its hands. In the future, Cobra will abandon the wxpython-based GUI, but instead use the DHTML + Ajax-based technology. It is really tedious to make dynamic visual effects on the GUI, but JavaScript + DOM can be easily used. Currently, the GUI space that displays the decompilation results is only web-oriented. In terms of visual effects, it is easy to feel the productivity improvement.

Currently, the backend is implemented based on Django. In fact, the Cobra project does not deal with databases, so Django is relatively simple to use, the Web backend serves as a transfer station between the Web Front-end and the python server.

Is the initial interface, select the source code file to be decompiled, click the "Submit" button:

 

After "Submit", connect to the backend Web server through Ajax technology, complete the disassembly of the source file, then feedback the results, and display the results of the disassembly, as shown in

 

In the previous article, we saw the ability to select a line of code based on path in the GUI control. Similarly, the web-based Cobra also supports this capability, enter the path in the edit box at the bottom of the Code area and click the "Goto" button to highlight the line of code corresponding to the path, as shown in:

 

For me, Cobra's Web Orientation has already reflected the liberation of productivity, Because Cobra's goal is to visualize Python virtual machines. Since it is visualization, the main job is the GUI part. To be honest, I have made some effort in Gui programming. In the student age, I initiated a wtl-based Wui open-source project, including multiple "fashionable" UI-style controls, although the end is complete, there is still considerable experience in Windows GUI. Even so, my deepest feeling is that desktop GUI programming is too cumbersome. Of course, if you use a GUI library, it will save some effort, but the workload will still be huge, especially when you need a pretty dazzling UI effect.

For example, for highlighting the selected code lines, in the GUI control, I simply select that line to distinguish normal lines, but in the Cobra after the web, by dynamically changing the element class, I can immediately make a very beautiful highlight effect. This effect needs to be implemented in the GUI, which is simply a nightmare.

In terms of UI, Web has matured into an era where something can be done. Although cross browser is still a tough topic, the various JavaScript frameworks that have been created can save a lot of effort in this regard. On the other hand, wxpython is a relatively narrow technology, and the Web is different. This seems to be helpful for attracting more people to participate in Cobra :)

Related Article

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.