Automating Enterprise Application Development Process using BizCode Framework Imesh Gunaratne1, Shane Fernando2, Darshana Hewapathirana3, Yasoda De Silva4, Ruvini Nakandala5 G. Nuwan Kodagoda6 Sri Lanka Institute of Information Technology, Malabe Campus, Sri Lanka
[email protected],
[email protected] Keywords BizCode Framework, Enterprise Application Development, Code Generation
Abstract The Enterprise Application Development Process is a complex course of action. Basically it can be divided into two parts; implementation of the infrastructure and implementation of the functionality. Almost in all the Enterprise Applications the infrastructure will be the same even they have developed using different technologies. Hence implementing the same infrastructure over and over again in different applications will reduce the overall productivity of the software development process by reducing the amount of time and cost that have to be spent on implementing the functionality. BizCode Framework provides an innovative solution to overcome this issue.
the requirements. However the Object Model is essential to design the structure of the system using objects, attibutes, operations and associations.
1. Introduction BizCode Framework is the code name given to a research project which was carried out to develop an innovative Framework to automate the Enterprise Application Development Process. It was proposed in the year 2006 by the project group PWE2006-43 of Sri Lanka Institute of Information Technology as the outcome of their final year project. Enterprise application software are application software that perform business functions such as accounting, production scheduling, customer information tracking and bank account maintenance, etc. They are usually hosted on servers, and are used by multiple employees of the same organization [1].
There are several UML designing tools developed by different vendors in the industry from the early days of software development to design system’s models of software applications. Rational Rose is an example. But most of such UML modeling tools do not include any feature to map the system’s model to a working model of the application. Therefore the developers have to follow a manual process. This is the gap that the BizCode Framework was identified to fill in. The development process of an enterprise application consists of two main phases. The first phase is the implementation of the infrastructue and the second phase is the implementation of the functionality. Almost in all the enterprise applications the infrastructure will be implemented in the same manner. It will include the System Architecture design, Graphical User Interfaces (GUI) design, data communication technologies and standards which can be made unique for all the applications to gain prodictivity. If we could automate the process of implementing the infrastructure we will be able to spend more time and effort on implementing the functinality. In addition it will make the infrastructure source code error free by generating the source code that exactly maps to the system’s model.
Developing such application software will takes a considerable amount of time, cost and effort. First all the functional and non functional requirements of the system should be clearly identified and verified. Thereafter the system should be modeled using one of the software designing methods (Functional modeling, Object Oriented modeling, Agile modeling [2], etc). In the software industry today the most widely used method of designing enterprise application software is Object Oriented modeling using Unified Modeling Language (UML). Firstly, UML defines a set of diagrams that can be used to model the system. A diagram is a partial graphical representation of a system’s model [3]. There are three parts of a system model. They are Functional Model which includes Use Case Diagrams, Object Model which includes Class Diagrams and Dynamic Model which includes Sequence, Activity and State Machine Diagrams [3]. The diagrams required to model the system depend on 1
Builder, C# Business Logic Code Builder, Windows Client Code Builder, COM+ Code Builder, Web Services Code Builder and UML Class Parser. It will go through a series of steps to generate a solution for a given system model. Visual Class Designer does not store class diagram details in the disk. Therefore it generates the diagram on the fly using a class library project. Therefore the Class Design Parser has been implemented to read the class diagram details by reading the class library project. The read data will be stored in a XML file and it will be transferred to an instance of a hierarchical data structure called Class Object Model. The user will be asked to define the Primary Keys for each logical unit on the Class Object Model since the Visual Class Designer does not support that feature at this level. Once the Class Object Model is prepared the Application Builder will map its details to the system design. Associations will be mapped using their referencing Primary Key attributes and those attributes will be marked as Foreign Keys. Thereafter the Class Object Model instance will be used by the other components to generate source code.
2. Methodology BizCode Framework consists of two major components. First one is the Application Builder and the second one is the Framework. Both components are implemented in C#. The Application Builder is the tool that generates source code of Enterprise Software Applications, which correspond to their system models. The Framework is an Application Programming Interface (API) which provides set of functions and objects for data communication between different layers of the solution. Application Builder has been developed as an Add-In to Visual Studio 2005. It supports reading Visual Class Designer Class Diagrams and also importing Rational Rose Class Diagrams into Visual Studio. Application Builder facilitates both Tightly Coupled Solutions and Loosely Coupled Solutions. In addition it facilitates most widely used Database Management Systems (DBMS); SQL Server, Oracle and MySQL. The Framework provides a generic API for accessing all three DBMS from the client application and from the middle tier. BizCode Framework defines a standard for data transmission between different layers. A set of data records will be prepared in an XML document with appropriate tags and it will be passed as a parameter to the data manipulation methods. This process requires XML data processing functions in both Windows Client Application and SQL Business Logic Layer. The Windows Client Application can use Data Set Objects for manipulating XML data but the SQL Business Logic Layer has to implement its own XML processing functions using SQL syntax. Therefore Application Builder uses X-Query language for SQL Server. However there is no X Query support in Oracle and My SQL it is designed to generate a special XML processing function with the data manipulation methods for a given Logical Unit.
The Storage Code Builder will generate a SQL Script for a given system model containing a set of Create Table Statements, Primary Key Constraints and Foreign Key Constraints. The Storage Code Builder will identify the composite and non composite Primary Keys and Foreign Keys based on the properties of the attributes. The syntax and the data types will be different based on the preferred Database Management System (DBMS). The Business Logic Layer will be implemented using different technologies depending on the System Architecture. A Tightly Coupled Solution will implement its Business Logic using SQL and it will be deployed in the same database where its Storage resides. A Loosely Coupled Solution will implement its Business Logic using C# and it will be hosted using a set of COM+ Serviced Components [4] [5] [6]. Therefore the Application Builder will generate two additional layers to support a Loosely Coupled Solution. First one is the COM+ Layer and the second one is the Storage Access Layer on top of the Storage Layer. In addition to the COM+ Layer the Application Builder can generate a Web Services Layer to implement a Services Oriented Architecture in the solution. Basically the Web Services Layer defines all the data retrieving methods but the user can request the Application Builder to generate data manipulation methods and user defined methods to be exposed as Web Methods.
2.1 Application Builder
The SQL Business Logic Layer and the Storage Access Layer will implement four data manipulation methods for all three DBMS and an additional XML processing function for Oracle and MySQL solutions. A public view will be created to provide search functionality in the client application.
Figure 1: Application Builder
- PROCEDURE XMLInsert ( xmlData IN VARCHAR2 );
Application Builder consists of nine components; Class Design Parser, Storage Code Builder, Storage Access Layer Code Builder, SQL Business Logic Code
- PROCEDURE XMLUpdate ( xmlData IN VARCHAR2 ); - PROCEDURE XMLDelete ( xmlData IN VARCHAR2 ); 2
functions. It will select the appropriate DBMS during the runtime according to the database connectivity provider. The Windows Client Code Builder facilitates the generation of both Field View and Grid View Forms. Users can either select both or one of them for a given Logical Unit. All the client forms will be integrated into a MDI Parent Window by using the framework. The MDI Parent Window will have three sub components; Navigator, Data Manager and Login Window. The Navigator is basically a Tree View component which will add links to all the client forms (by default). The users can customize it according to their requirement using framework functions. The Data Manager provides a centralized data management environment for windows client forms. All the data manipulation functions will be invoked through the Data Manager. MDI Parent Window will provide the login window to logon to the system. It will create an instance of the framework Database class using the database configuration data in the application configuration file. The application configuration file will be created by the Application Builder at the completion of the code generation process. The MDI Parent Window makes use of two additional classes to communicate with the child windows and the business logic; MDIChildWindowManager and Connect.
- FUNCTION GetRecordSet RETURN VARCHAR2; - PROCEDURE ExtractXMLElement(tag IN VARCHAR2, xmlData IN OUT VARCHAR2, val OUT VARCHAR2);
2.2 Bizcode Framework
Figure 2: Bizcode Framework BizCode Framework consists of six components; MDI Parent Window, Data Manager, Navigator, Login Window, Database Interface and the COM+ Interface. The Database Interface and the COM+ Interface implement the API which is to be used by the Windows Client Application. .NET Framework ADO component does not support for MySQL database connectivity. Therefore the Database Interface has used MySQL connector for .NET developed by MySQL. It has been designed as a hierarchical structure where all three SqlServer, Oracle and MySql classes were derived from the Database class. The CommandArgument class is used as an argument to the background threads in the MDI Parent Window. DataManagerState and DbCommandType classes have been used by the Data Manager for storing the Data Manager State and for identifying the command type invoked by the MDI Child Windows.
3. Results and Discussion Using the BizCode Framework, the Enterprise Application developers can generate the source code for an entire solution from its system design. The Application Builder facilitates the deployment and testing of the auto generated solution with few clicks without writing any additional code. The BizCode Framework has enabled the windows client applications to connect to all three DBMS without modifying the code. Therefore users will be able to implement distributed systems with different databases while having the same client application. BizCode Framework has implemented its functionalities up to the maximum level. It has taken the full advantage of the Visual Studio IDE with the Visual Class Designer. It provides a well structured auto generated solution where the developers will be able to clearly identify different parts of the solution in different projects. Application Builder has overcome the limitation in Visual Studio for deploying SQL files. It provides a wizard to deploy all the SQL files generated at once into a given database.
4. Conclusion and Future Work The BizCode Framework provides a complete solution for automating the Enterprise Application Development Process. It will generate source code for the Presentation Tier, Business Logic Tier and for the Storage Tier according to the system model. This infrastructure can be used to implement the required functionality that the Enterprise Application is
Figure 3: Classes used The Application Builder will implement the Windows Client Application to support all three DBMS; SQL Server, Oracle and MySQL by using the Framework 3
supposed to provide. Therefore the software developers will be able to save time and effort required for implementing the infrastructure. In addition it will create an error free one-to-one solution for its system model. This will increase the productivity of the software development process and it will be much easier to upgrade the solution with new features.
Figure 4: Sample application developed BizCode Framework will be distributed FREE in the near future. The product and the documentation will be available to download from the web site http://www.bizcodeframework.net.
5. References [1] Wikipedia, The Free Encyclopedia, Enterprise Application, http://en.wikipedia.org/wiki/Enterprise_applicatio n [2] Wikipedia, The Free Encyclopedia, Agile modeling,http://en.wikipedia.org/wiki/Agile_Mode ling [3] Wikipedia, The Free Encyclopedia, Unified Modeling Language, http://en.wikipedia.org/wiki/Unified_Modeling_La nguage [4] Tim Ewald, COM+ Integration: How .NET Enterprise Services Can Help You Build Distributed Applications. [5] Shannon Pahl, Microsoft Corporation, Understanding Enterprise Services (COM+) in .NET. [6] Ted Pattison’ Develop Mentor, COM+ Overview for Microsoft Visual Basic Programmers. [7] Ian Sommerville, Software Engineering, Sixth Edition: Pearson Education 2004. [8] Rajib Mall, Software Engineering. [9] Ramez Elsmary, Shamkant B. Navathe, Fundamentals of Database Systems, Third Edition, Pearson Education 2002. [10] Kemp Brown, Automation and Extendibility Overview. [11] Roy Osherove, Simplify Data Layer Unit Testing using Enterprise Services.
4