Interface code reconstruction

xiaoxiao2021-03-06  73

Today, a long period of interface is refreshed as follows:

1. Test, or test

Because there is no test, it is simply nothing to say during the process of reconstruction. I don't know where to go, I don't know what to do next.

2. MVC, old talk, or test

In fact, it is related to the topic. There is no test because the interface is not test, and then it is also a view under the Eclipse framework, and it is more troublesome. Resolutely decided to use MVC (I don't think, this code is a interface responsible for controlling multiple voice cards, so it is more suitable for MVC), after using MVC, don't say, test better, just need to target The newly added control class can be tested, and the control class is related to any interface related to any interface, no need to establish the interface environment and inspection interface.

Pre-reconstruction: (pseudo VB code)

FORM_LOAD: Startup Card ....

Startup card _Click: Startup card, refresh screen on the card content display ...

....

After the reconstruction:

Add a CardManager class to move most of the control code to this class.

Plugin_Load: Startup Card

FORM_LOAD: CardManager.addcardListener (this);

Start card _click: start card

This_CardStarted: Refresh the screen on the screen.

转载请注明原文地址:https://www.9cbs.com/read-92623.html

New Post(0)