An XML based Framework for Developing Swing Applications
How Parallelism is achieved
In the applications that are developed using this framework, the developers of the panels may focus on how to present the information and need not worry about the flow in the user interface. Once the flow xml is defined, many developers can work in parallel on various panels of the application.
How Loose-coupling is achieved
In our application, if the user logged in is an administrator, we need to provide another user option to visit admin tasks panel from home panel. This can be done by the following additions.
The following should be added to XFSPanels:
<XFSPanel name="AdminTasks" class="library.AdminTasks"> <inputs/> <outputs> <output variable="adminTaskId"/> </outputs> </XFSPanel>
The following should be added to XFSPanelFlow
<step id="s6" from="MemberLogin" to="AdminTasks"> <conditions> <condition variable="controller_isAdmin" value="true"/> </conditions> </step>
This framework works based on the flow xml and when it is modified, the flow automatically gets modified. It can be noticed that, once the flow xml is changed, the developer may focus on developing the admin tasks panel and modifying the home panel but need not worry about the flow of the panels since this is taken care by the controller of the framework.
Requirements of UI applications that often change fit into this framework and this framework helps in getting those changes done easily. Though this is a java based framework, the underlying pattern can be applied to develop a framework under any language/environment. This framework for swing applications is used to explain that pattern behind GUI applications.
About the Authors
R Venkatavaradan has been working as a Technical Consultant in Hewlett Packard. He has a Masters Degree from School of Automation, Indian Institute of Science, Bangalore. He has around 13 years of industry experience. The field of work ranges from signal processing to web services, J2EE, Enterprise Application Integration etc. He has extensively worked on web service technologies like WSDL, SOAP and UDDI and provided technical consultancy to various projects in the field of mobile, telecom and EAI, which have been architected based on web service concepts. He can be reached at firstname.lastname@example.org.
Suresh P R has been working as a Senior Software Engineer in Hewlett Packard. He has a Bachelors Degree from PSG College of Technology, India. He has about 3 years of industry experience in J2EE and web service related technologies such as WSDL, SOAP, UDDI. He can be reached at email@example.com.
Page 2 of 2