Working with Embedded Wizard: Structuring projects
When you start a new project it is always a good thing to reflect first a little bit about that undertaking. The intention behind it is to find an optimal and reasonable structure for your GUI application. Doing this makes the following development process more straightforward and simplifies eventual later adaptations of your software.
Break the application in components
Embedded Wizard Studio follows a component-based software development approach. If you are familiar with object-oriented concepts, components can be considered as classes. At the runtime your application can create instances of the component and present them on the screen. For example, almost every GUI application requires some push buttons. You can imagine, in Embedded Wizard the push button is represented by a component. The push buttons you see on the screen are instances of the push button component.
What you should do in the first step of your reflection is thus to divide your GUI application in individual components. For example, does the GUI design of your application include a slider? Then you should consider to implement a slider component. Similarly, if the application contains an alert panel to display messages, then think about that panel also as a component.
When dividing the application in components you should know that with Embedded Wizard you can easily assemble one component from other components. This means, for example, if the alert panel contains a push button to dismiss it, you should implement the push button component separately and embed it as an instance within the alert panel component. In this manner you avoid duplicating the push button implementation.
Another aspect you should consider when reflecting about the components is the possibility to derive one component from another one and thus inherit its entire implementation. Let's image again the simple push button component you plan to implement. If your GUI design contains various versions of a push button (one is round, another is flashing, etc.) it would be ideal to put the common push button functionality in a generic push button component. From it you derive then new components and implement there the particular button specific functionality. In this manner you avoid duplicating the button implementation. Moreover, when you later correct an error in the generic button implementation all derived and specialized buttons do benefit from it automatically.
Specify the interface to every component
When dividing the application in components you should consider what information will be exchanged with an instance of a particular component at the runtime. This means, you should think about the interface the component exposes. Let's imagine again the simple alert panel to display a message to the user. The interface of such component should thus include the possibility to provide a message text to its instances. Similarly, if the alert panel contains push buttons you can use the interface to receive from the panel some information about the button activated by the user.
Break the application in units
Embedded Wizard manages the project information in units, which permits you to easily divide complex projects in separate blocks or frameworks. For example, you can plan to create a unit named Widgets and put there all components for buttons, sliders, switches, scrollbars, etc. Another unit, e.g. Panels can accommodate all message panels needed in your application.
Finally, how you divide the project in units its up to you. If you are working in a team you can assign to every developer an individual unit or several units. In this manner you reduce the probability, that several team members would interfere with each other.
Name all project members clearly
Take you time to name the components and the project members contained inside them. In principle the naming has no effect on the functionality of your application. But it reflects the structure of your project and helps other developers to understand your intentions.