40 likes | 51 Views
Learn how to design user interfaces and write code for each screen using good software engineering principles. Each unique screen must have its own class, and navigation control should be placed in a separate controller class.
E N D
Design to Code – Part 1Designing User Interfaces IMPORTANT NOTE: All the classes created will be extensively reviewed for proper design.
User Interface Code As part of good software engineering principles, we need a class for each of the user interface (screens). We may have multiple screens for each use case. ScrMember nameTestfield addressTextPanel phoneNumberTextfield creditCard#Textfield emailAddressTextfield userNameTextfield passwordTextfield aMember EVERY SINGLE unique screen MUST have its own class.
User Interface Code In the User Interface Screen code MAKE SURE…… There is no navigation control in these classes. There is no other code other than display for the components. There are gets and sets for each GUI component except containers and labels. ScrMember nameTestfield addressTextPanel phoneNumberTextfield creditCard#Textfield emailAddressTextfield userNameTextfield passwordTextfield aMember NOTE: By convention, name your screens ScrXxxxxx.
User Interface Code Build another class called CtrlScrXxxxx. That class will act as a driver (controller) for the screen. It will make an instance of the user interface screen. Execute the driver (controller) class to visually test the screens. All navigational control is placed in this controller class. CtrScrMember ScrMember ScrMember nameTestfield addressTextPanel phoneNumberTextfield creditCard#Textfield emailAddressTextfield userNameTextfield passwordTextfield aMember Note the relationship between the CtrScrMember is one of mandatory association. So the CtrScrMember class makes an instance of the ScrMember.