Thursday, June 14, 2012

UI design pattern and UI design elements

Design patterns

1.       Terms
a.       Public interface: public methods, public properties and public events.
b.      Host of the control: the form or the user control where the user control lives.
2.       Patterns employed
a.       Model-View-Presenter(Controllers)
b.      Application Controller
3.       Various classes / objects
a.       User Controls
b.      Forms
c.       Controllers
d.      Process Controllers
e.      ViewModels
f.        Interface for Controls, (IPrerequisiteView)
4.       Relationship
a.       Each Presenter has a form to be its visual representation for human-computer interfacing.
b.      Each form has a controller to be its public interface for  API interfacing
c.       User controls do not have Presenter.
d.      The user control has its own visual representation for human-computer interfacing and public interface for API interfacing
e.      Controllers interact with WCF service to complete its business operations.
f.        Each Process Controller instantiate and communicate with various controllers to complete its functionality.
g.       ViewModel act as entity object model participate in the definition of various public interfaces. (As the type of the public property, as the type of the parameter or return value of the public method, or as the type of the argument of the events.

5.       User Control
a.       User control has a defined public interface. Everything else is private.
b.      User control has no knowledge of its host.
c.       User control communicates with its host via its public events and public properties.
d.      The host manipulates its user controls via the public methods, public properties of the user controls and response to public events of the user controls.
e.      User control instances shall be defined as private members inside its host.
6.       Form
a.       Form has a defined public interface. Everything else is private.
b.      Form has no knowledge of its controller.
c.       Form communicates with its controller via its public events and public properties.
d.      The controller manipulates the form via the public methods, public properties of the form and response to public events of the form.
e.      Form instance shall be defined as private member within the controller.
7.       Controller
a.       Controller has a defined public interface. Everything else is private.
b.      Controller has no knowledge of its any Process Controllers that it is in.
c.       Controller communicates with its Process Controllers via its public events and public properties.
d.      The Process Controller manipulates the Controller via the public interface of the controller.
e.      Controller instance shall be defined as private within Process Controller.
8.       Reusability
a.       The same controller/form combination can be used in different Business process
b.      The same user controls can be hosted in different form and/or different user controls.
9.       Testability
a.       We can inject an implementation of the public interface of the form to test controller.
b.      We can inject an implementation of the public interface of the controller to test Process controller.




UI Design elements
1.       Views: ( forms and user controls)
a.       Some write up on the view, what is the main functionality
b.      Visual representation for the view.
c.       What other views to be used in this view
d.      The public interface (public properties, public methods, public events) and their purpose.
2.       Controllers
a.       Which view it is controlling (maybe through naming standard). Some write up about the functionality.
b.      Public interface of the controller (public properties, public methods, public events) and their purpose.
c.       How it is used…
d.      What kind of service operation it needs from WCF services

No comments:

Post a Comment