J2EE Based Web-Interface Development Framework for Clinical Imaging Databases

Total Page:16

File Type:pdf, Size:1020Kb

J2EE Based Web-Interface Development Framework for Clinical Imaging Databases J2EE based Web-Interface Development Framework for Clinical Imaging Databases I. Burak Ozyurt November 20, 2003 Contents 1 Overall Architecture 3 2 Presentation Layer 5 2.1 Struts Overview . 5 2.2 Struts Controller and Form Validation Interactions . 5 2.3 Struts Application Initialization . 6 3 Session Facade Layer 9 3.1 Data Maintenance Example - Subject/Visit Management . 9 4 Data Access Layer 14 4.1 Object-to-Relational Mapping . 14 4.1.1 Data Access Objects . 14 4.2 Code Generation . 15 5 Assessment Query Builder 16 6 SRB-Database interaction 18 A Getting and Building J2EE based web interface for local clinical imaging databases 23 A.1 Prerequisites . 23 A.2 Getting the code . 23 A.3 Preparation for build . 23 A.4 Build and Deploy . 24 A.5 Running web user interface . 24 B Struts configuration file 25 C Simple O/R Mapping Tool Help 30 C.1 Main Screen . 30 C.2 Schema Extraction . 30 C.3 Custom Code in Generated Java Code and Code Regeneration . 33 D Database Security 34 D.1 Virtual Private Database . 34 D.2 Oracle Label Security . 34 1 List of Figures 1.1 High level architecture of UCSD Human Imaging Database User Interface . 3 1.2 High level class diagram for server side service framework . 4 2.1 User-Struts-Application Interactions for web-tier side form validation and action pro- cessing............................................ 6 2.2 Struts actions for UCSD web interface . 7 2.3 Servlet container-Struts initialization sequence diagram . 8 3.1 Class Diagram for Session Facade Layer interfaces and their implementations . 10 3.2 Selecting a score Struts action sequence diagram . 11 3.3 Get matching subjects sequence diagram . 12 3.4 Adding a visit for a subject sequence diagram . 13 5.1 High level sequence diagram for assessment query building use case . 17 6.1 SRB-JARGON based image data retrieval and on-the-fly image conversion sequence diagram . 19 6.2 SRB Scommand based image series download and AFNI conversion sequence diagram 19 6.3 Clinical Assessment Selection Screen . 20 6.4 Assessment score Selection Screen . 20 6.5 Assessment Query Criteria selection . 21 6.6 Assessment score Selection Screen . 21 6.7 Subject Visit Info Screen . 22 C.1 Database connection parameters dialog . 31 C.2 Database connection parameters dialog . 31 C.3 Code Generator user interface look after code generation . 32 2 Chapter 1 Overall Architecture The UCSD morphometric human imaging database user interface is a three tier J2EE (Java 2 Platform Enterprise Edition) application. The overall architecture is shown in Figure 1.1. It has a (thin) client tier, a middle tier (servlet/JSP based) using Jakarta Struts web framework [Cav02] and an enterprise information source (EIS) tier. The client tier consists of a web browser. The EIS tier is the Oracle database instance and the collection of stored procedures/functions and packages for low level data access functions and optimizing hot spot queries. The middle tier currently consists of a web tier tier only. For large applications a server com- ponent framework like enterprise Java Beans (EJB) provides scalability, however foreseeable scope does not justify an EJB container. The underlying web application framework used for user interface is Jakarta Struts [Cav02] which is a Model 2 architecture based on model-view-controller (MVC) design pattern [GHJV94]. Struts uses a controller servlet (see front controller design pattern [ACM01] and command design pattern [GHJV94]) to intercept a web request and determine what to display next. It also provides tag libraries for JSPs, validation, internationalization and error handling support. Figure 1.1: High level architecture of UCSD Human Imaging Database User Interface. The MVC design pattern allows decoupling of presentation logic from the business logic. Here, the business logic is defined as the code manipulating business data (e.g. clinical assessments) relevant to the application. The presentation logic is the code preparing the data provided by 3 the business logic for display to the user of the application. The decoupling provides flexibility in presentation layer selection and development responsibility separation. In the UCSD human imaging database, the business logic is further decoupled by the use of code-generated data access objects (DAO) [ACM01]. The DAOs can be seen as an object-relational mapping, since they map database tables to objects. They provide a data access layer, which is not directly accessed by the presentation layer to reduce inter-layer dependency. The DAOs provide CRUD (create, read update and delete) operations on database table level and are fine grained. The presentation layer communicates with the data access layer through session facades [ACM01], which coordinate operations between multiple DAOs in a workflow and provide a coarse grained simpler interface hiding the internals of the business logic from the presentation layer. The data transfer between presentation and data access layer is via coarse grained transfer objects (value objects) [ACM01]. The business logic layer also serves data import/export and conditioning clients which map subject data to the Oracle tables by doing necessary data cleaning, combining and transformation, which are not part of web user interface. Currently clinical assessment and visit data upload is supported. Besides the business logic, application level authentication, authorization and database connec- tion pooling services are needed. In order to be able to easily replace these services with different mechanisms, the abstract factory design pattern [GHJV94] is used. In Figure 1.2, the high level class diagram for the server side service framework for UCSD human imaging database in unified modeling language (UML) format [BRJ97] is shown. Here the ServiceFactory class creates the classes implementing the security and database connection pooling interfaces. However it returns only the interface to the service requesting client. The interfaces are the only means by which the layers communicate with each other. Even when the implementation of the interfaces change drastically over time, if the interfaces remain same, the layers can talk with each other. To support label security, a non-traditional connection pool is developed allowing named user support. Figure 1.2: High level class diagram for server side service framework. 4 Chapter 2 Presentation Layer 2.1 Struts Overview Struts is a presentation framework for building web application using Java Servlets and JSPs. Struts uses the JSP Model 2 architecture which is based upon Model-View-Controller (MVC) design pattern (also known as Observer) [GHJV94]. In the model 2 architecture, the client request is first intercepted by a controller servlet which handles the initial processing of the request and determines which JSP page to display next. 2.2 Struts Controller and Form Validation Interactions In Struts there is one controller servlet ActionServlet, which acts like a command dispatcher. ActionServlet delegates the request processing to the corresponding command, an Action class which is extendended from org.apache.struts.action.Action which has an execute() method that needs to be implemented to process the user request and depending on the outcome of the user request processing, needs to determine the next action. The ActionServlet determines which action to pick, by reading it from a XML-based configuration file ( struts-config.xml ). The Struts config file used for UCSD Morph BIRN web interface is shown in Appendix B). The actions are declared in the <action-mappings> section of the struts-config.xml file. Struts passes the submitted HTML form parameters to the execute() method via an ActionForm which it populates from the received HTTP request. Below is an action declaration from struts-config.xml file. <action path="/selectscores" type="clinical.web.actions.SelectScoresAction" name="asSelectForm" scope="session" input="/pages/SelScore_full.jsp"> <forward name="success" path="/pages/SelectDerived_full.jsp" /> </action> Here path is the name of the action, type is the fully qualified Java class name for the class that extends org.apache.struts.action.Action. The attribute name is the name of the form bean associated with this action. The form beans extend org.apache.struts.action.ActionForm and are declared in the <form-beans> section of the struts-config.xml. The attribute scope is used to identify the scope in which the form bean is placed. It can be request or session. The attribute input is the application-relative path to the input form to which control should be returned if a validation error is encountered. The forward elements are used to declare the possible next pages 5 Figure 2.1: User-Struts-Application Interactions for web-tier side form validation and action pro- cessing. this action will return to the user. Here name is a unique identifier used to reference this forward in the application. In the execute() of the Struts action, this name is used to select and return the ActionForward class. The path attribute is an application relative URI to which the control should be forwarded or redirected. The org.apache.struts.action.ActionForm provides form data validation support using Tem- plate Method Design pattern [GHJV94]. A class extending the ActionForm can provide implemen- tation of validate() method which can check the fields to be set by the user. If any requires data is missing or the user has entered incorrect data, the validate() method returns an ActionErrors class containing validation errors, which results in forwarding back to the same input form with validation errors shown, so that the user can correct them and resubmit the HTML form. Only after all validation errors are corrected, the execute() method on the corresponding Action class is called. (See Figure 2.1). The currently available Struts actions for UCSD Morph-BIRN web interface is shown in Fig- ure 2.2. 2.3 Struts Application Initialization Struts allows application plugins for application life cycle management support.
Recommended publications
  • FAKULT¨AT F¨UR INFORMATIK Architectural Design And
    FAKULTAT¨ FUR¨ INFORMATIK DER TECHNISCHEN UNIVERSITAT¨ MUNCHEN¨ Masterarbeit in Informatik Architectural Design and Implementation of a Web Application for Adaptive Data Models Stefan Bleibinhaus FAKULTAT¨ FUR¨ INFORMATIK DER TECHNISCHEN UNIVERSITAT¨ MUNCHEN¨ Masterarbeit in Informatik Architectural Design and Implementation of a Web Application for Adaptive Data Models Architektur Design und Implementierung einer Web Anwendung fur¨ adaptive Datenmodelle Author: Stefan Bleibinhaus Supervisor: Prof. Florian Matthes Advisor: Matheus Hauder Date: April 15, 2013 Ich versichere, dass ich diese Masterarbeit selbstandig¨ verfasst und nur die angegebenen Quellen und Hilfsmittel verwendet habe. I assure the single handed composition of this master thesis only supported by declared resources. Munchen,¨ den 15. April 2013 Stefan Bleibinhaus Acknowledgments I would like to express my very great appreciation to Prof. Florian Matthes for offering me to write my thesis on such a delightful topic and showing so much interest in my work. I am particularly grateful for the assistance given by Matheus Hauder and his will to support me in my research. vii Abstract This thesis discusses the architectural design and implementation of an Enterprise 2.0 collaboration web application. The designed web application uses the concept of hybrid wikis for enabling business users to capture easily content in structured form. A Hybrid wiki is a wiki, which empowers business users to incrementally structure and classify content objects without the struggle of being enforced to use strict information structures. The emergent information structure in a hybrid wiki evolves in daily use by the interaction with its users. Whenever a user wants to extend the content, the system guides them to automatically structure it by using user interface friendly methods like auto-completion and unobtrusive suggestions based on previous similar content.
    [Show full text]
  • Dynamic Data Access Object Design Pattern (CECIIS 2008)
    Dynamic Data Access Object Design Pattern (CECIIS 2008) Zdravko Roško, Mario Konecki Faculty of Organization and Informatics University of Zagreb Pavlinska 2, 42000 Varaždin, Croatia [email protected], [email protected] Abstract . Business logic application layer accessing 1 Introduction data from any data source (databases, web services, legacy systems, flat files, ERPs, EJBs, CORBA This paper presents a pattern that help to desing the services, and so forth) uses the Dynamic Data Access data access layer for any data source (not just Object which implements the Strategy[1] design relational) such as CICS, JMS/MQ, iSeries, SAP, pattern and hides most of the complexity away from Web Services, and so forth. Dynamic Data Access an application programmer by encapsulating its Object (DDAO) is an implementation of the Strategy dynamic behavior in the base data access class. By design pattern [1] which defines a family of using the data source meta data, it automates most of algorithms, encapsulate each one, and make them the functionality it handles within the application. interchangeable through an interface. Application programmer needs only to implement Having many options available (EJB, Object specific „finder“ functions, while other functions such Relational Mapping, POJO, J2EE DAO, etc.) to use as „create, store, remove, find, removeAll, storeAll, while accessing a data source, including persistent createAll, findAll“ are implemented by the Dynamic storage, legacy data and any other data source, the Data Access Object base class for a specific data main question for development is: what to use to source type.. bridge the business logic layer and the data from a Currently there are many Object Relational data source ? Assuming that the data access code is Mapping products such as Hibernate, iBatis, EJB not coded directly into the business logic layer (Entity CMP containers, TopLink, which are used to bridge Bean, Session Bean, Servlet, JSP Helper class, POJO) objects and relational database.
    [Show full text]
  • Ioc Containers in Spring
    301AA - Advanced Programming Lecturer: Andrea Corradini [email protected] http://pages.di.unipi.it/corradini/ AP-2018-11: Frameworks and Inversion of Control Frameworks and Inversion of Control • Recap: JavaBeans as Components • Frameworks, Component Frameworks and their features • Frameworks vs IDEs • Inversion of Control and Containers • Frameworks vs Libraries • Decoupling Components • Dependency Injection • IoC Containers in Spring 2 Components: a recap A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third party. Clemens Szyperski, ECOOP 1996 • Examples: Java Beans, CLR Assemblies • Contractually specified interfaces: events, methods and properties • Explicit context dependencies: serializable, constructor with no argument • Subject to composition: connection to other beans – Using connection oriented programming (event source and listeners/delegates) 3 Towards Component Frameworks • Software Framework: A collection of common code providing generic functionality that can be selectively overridden or specialized by user code providing specific functionality • Application Framework: A software framework used to implement the standard structure of an application for a specific development environment. • Examples: – GUI Frameworks – Web Frameworks – Concurrency Frameworks 4 Examples of Frameworks Web Application Frameworks GUI Toolkits 5 Examples: General Software Frameworks – .NET – Windows platform. Provides language interoperability – Android SDK – Supports development of apps in Java (but does not use a JVM!) – Cocoa – Apple’s native OO API for macOS. Includes C standard library and the Objective-C runtime. – Eclipse – Cross-platform, easily extensible IDE with plugins 6 Examples: GUI Frameworks • Frameworks for Application with GUI – MFC - Microsoft Foundation Class Library.
    [Show full text]
  • Inversion of Control in Spring – Using Annotation
    Inversion of Control in Spring – Using Annotation In this chapter, we will configure Spring beans and the Dependency Injection using annotations. Spring provides support for annotation-based container configuration. We will go through bean management using stereotypical annotations and bean scope using annotations. We will then take a look at an annotation called @Required, which allows us to specify which dependencies are actually required. We will also see annotation-based dependency injections and life cycle annotations. We will use the autowired annotation to wire up dependencies in the same way as we did using XML in the previous chapter. You will then learn how to add dependencies by type and by name. We will also use qualifier to narrow down Dependency Injections. We will also understand how to perform Java-based configuration in Spring. We will then try to listen to and publish events in Spring. We will also see how to reference beans using Spring Expression Language (SpEL), invoke methods using SpEL, and use operators with SpEL. We will then discuss regular expressions using SpEL. Spring provides text message and internationalization, which we will learn to implement in our application. Here's a list of the topics covered in this chapter: • Container configuration using annotations • Java-based configuration in Spring • Event handling in Spring • Text message and internationalization [ 1 ] Inversion of Control in Spring – Using Annotation Container configuration using annotation Container configuration using Spring XML sometimes raises the possibility of delays in application development and maintenance due to size and complexity. To solve this issue, the Spring Framework supports container configuration using annotations without the need of a separate XML definition.
    [Show full text]
  • Data Loader Guide
    Data Loader Guide Version 53.0, Winter ’22 @salesforcedocs Last updated: August 24, 2021 © Copyright 2000–2021 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc., as are other names and marks. Other marks appearing herein may be trademarks of their respective owners. CONTENTS Chapter 1: Data Loader . 1 Chapter 2: When to Use Data Loader . 2 Chapter 3: Installing Data Loader . 3 Install Data Loader on macOS . 4 Install Data Loader on Windows . 5 Considerations for Installing Data Loader . 6 Chapter 4: Configure Data Loader . 8 Data Loader Behavior with Bulk API Enabled . 12 Configure the Data Loader to Use the Bulk API . 12 Chapter 5: Using Data Loader . 13 Data Types Supported by Data Loader . 14 Export Data . 15 Define Data Loader Field Mappings . 17 Insert, Update, or Delete Data Using Data Loader . 17 Perform Mass Updates . 18 Perform Mass Deletes . 19 Upload Attachments . 19 Upload Content with the Data Loader . 20 Review Data Loader Output Files . 21 Data Import Dates . 21 View the Data Loader Log File . 22 Configure the Data Loader Log File . 22 Chapter 6: Running in Batch Mode (Windows Only) . 23 Installed Directories and Files . 24 Encrypt from the Command Line . 24 Upgrade Your Batch Mode Interface . 25 Run Batch File With Windows Command-Line Interface . 25 Configure Batch Processes . 26 Data Loader Process Configuration Parameters . 27 Data Loader Command-Line Operations . 35 Configure Database Access . 36 Spring Framework . 37 Data Access Objects . 38 SQL Configuration . 38 Map Columns . 40 Contents Run Individual Batch Processes . 42 Chapter 7: Command-Line Quick Start (Windows Only) .
    [Show full text]
  • Javaedge Setup and Installation
    APPENDIX A ■ ■ ■ JavaEdge Setup and Installation Throughout the book, we have used the example application, JavaEdge, to provide a practical demonstration of all the features discussed. In this appendix, we will walk you through setting up the tools and applications required to build and run JavaEdge, as well as take you through the steps needed to get the JavaEdge application running on your platform. Environment Setup Before you can get started with the JavaEdge application, you need to configure your platform to be able to build and run JavaEdge. Specifically, you need to configure Apache Ant in order to build the JavaEdge application and package it up for deployment. In addition, the JavaEdge application is designed to run on a J2EE application server and to use MySQL as the back-end database. You also need to have a current JDK installed; the JavaEdge application relies on JVM version 1.5 or higher, so make sure your JDK is compatible. We haven’t included instruc- tions for this here, since we are certain that you will already have a JDK installed if you are reading this book. However, if you do need to download one, you can find it at http://java. sun.com/j2se/1.5.0/download.jsp. Installing MySQL The JavaEdge application uses MySQL as the data store for all user, story, and comment data. If you don’t already have the MySQL database server, then you need to obtain the version applicable to your platform. You can obtain the latest production binary release of MySQL for your platform at http://www.mysql.com.
    [Show full text]
  • Case Study on Building Data- Centric Microservices
    Case Study on Building Data- Centric Microservices Part I - Getting Started May 26, 2020 | Version 1.0 Copyright © 2020, Oracle and/or its affiliates Public DISCLAIMER This document in any form, software or printed matter, contains proprietary information that is the exclusive property of Oracle. Your access to and use of this confidential material is subject to the terms and conditions of your Oracle software license and service agreement, which has been executed and with which you agree to comply. This document and information contained herein may not be disclosed, copied, reproduced or distributed to anyone outside Oracle without prior written consent of Oracle. This document is not part of your license agreement nor can it be incorporated into any contractual agreement with Oracle or its subsidiaries or affiliates. This document is for informational purposes only and is intended solely to assist you in planning for the implementation and upgrade of the product features described. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described in this document remains at the sole discretion of Oracle. Due to the nature of the product architecture, it may not be possible to safely include all features described in this document without risking significant destabilization of the code. TABLE OF CONTENTS DISCLAIMER INTRODUCTION ARCHITECTURE OVERVIEW Before You Begin Our Canonical Application
    [Show full text]
  • The Spring Framework: an Open Source Java Platform for Developing Robust Java Applications
    International Journal of Innovative Technology and Exploring Engineering (IJITEE) ISSN: 2278-3075, Volume-3 Issue-2, July 2013 The Spring Framework: An Open Source Java Platform for Developing Robust Java Applications Dashrath Mane, Ketaki Chitnis, Namrata Ojha Abstract— The fundamental concepts of Spring Framework is Supported deployment platforms range from standalone presented in this paper.Spring framework is an open source Java applications to Tomcat and Java EE servers such as platform that provides comprehensive infrastructure support for WebSphere. Spring is also a first-class citizen on major developing robust Java applications very easily and very rapidly. cloud platforms with Java support, e.g. on Heroku, Google The Spring Framework is a lightweight solution and a potential App Engine, Amazon Elastic Beanstalk and VMware's one-stop-shop for building your enterprise-ready applications. Cloud Foundry.[1] IndexTerms— Aspect Oriented Programming, Dependency Injection, IoC Container, ORM. II. SPRING FRAMEWORK ARCHITECTURE Spring could potentially be a one-stop shop for all your I. INTRODUCTION enterprise applications; however, Spring is modular, Spring is the most popular application development allowing you to pick and choose which modules are framework for enterprise Java. Millions of developers applicable to you, without having to bring in the rest. around the world use Spring Framework to create high The Spring Framework provides about 20 modules which performing, easily testable, reusable code. Spring can be used based on an application requirement. framework is an open source Java platform and it was initially written by Rod Johnson and was first released under the Apache 2.0 license in June 2003.
    [Show full text]
  • (CGPA) Examination May/June 2017 Programming in C (Revised) [Time: Three Hours] [Max.Marks:80]
    Total No. of Printed Pages:2 SUBJECT CODE NO:- P-11 FACULTY OF ENGINEERING AND TECHNOLOGY First Year MCA (CGPA) Examination May/June 2017 Programming in C (Revised) [Time: Three Hours] [Max.Marks:80] Please check whether you have got the right question paper. N.B i) Q.No.1 from section A and Q.No.8 from section B are compulsory. ii) Attempt any two questions from the remaining questions in each section SECTION A Q.1 Find the output of the following and also specify the reason. 08 a. #include<stdio.h> Void main() { Char C*2+= “A”; Printf(“\n %c”,C[0]); Printf(“\n %s”,C); } b. #include<stdio.h> void main() { Int x=4, y=0, z; While (x>=0) { If(x= =y) break; else Printf(“\n%d%d”,x,y); x- -; y++; } } Q.2 A What is constant & variables? Explain the rules for constructing integer & real point (float) constant 08 B Write a program to calculate overtime pay of 10 employees. Overtime is paid at the rate of rs.12.00 per hour 08 for overtime hour worked above 40 hours. Assume that employee do not work for fractional part of an hour. Q.3 A Explain all loop control statements in detail with proper example 08 B Write a program in C to accept a number & check whether it is Armstrong number or not. 08 Q.4 A What is an algorithm? Explain with example. 08 B Write a program to enter a number from user and calculate the sum of its digit. 08 SECTION B Q.5 A What is an array? Explain with its types.
    [Show full text]
  • WILEY Advantage Dear Valued Customer
    Y L F M A E T Team-Fly® The WILEY advantage Dear Valued Customer, We realize you’re a busy professional with deadlines to hit. Whether your goal is to learn a new technology or solve a critical problem, we want to be there to lend you a hand. Our primary objective is to provide you with the insight and knowledge you need to stay atop the highly competitive and ever- changing technology industry. Wiley Publishing, Inc. offers books on a wide variety of technical categories, including security, data warehousing, software development tools, and networking - everything you need to reach your peak. Regardless of your level of expertise, the Wiley family of books has you covered. • For Dummies – The fun and easy way to learn • The Weekend Crash Course –The fastest way to learn a new tool or technology • Visual – For those who prefer to learn a new topic visually • The Bible – The 100% comprehensive tutorial and reference • The Wiley Professional list – Practical and reliable resources for IT professionals In the book that you now hold in your hands, Darren Broemmer shares best practices and lessons learned for J2EE development. As you design and build a banking application with J2EE and design patterns, you'll also utilize metadata-driven configurable foundation components to help automate much of the development for Web-based business applications. And of course, the tools and technologies used to construct the sample application are not from any one vendor, but best of breed—Jakarta Struts, Servlets, JSP, XML, EJB, UML, WebLogic, WebSphere, and many more.
    [Show full text]
  • 1 Software Architecture
    Some buzzwords and acronyms for today • Software architecture • Design pattern • Separation of concerns • Single responsibility principle • Keep it simple, stupid (KISS) • Don't repeat yourself (DRY) • Don't talk to strangers (Demeter's law) • Inversion of Control (IoC) • Dependency injection (DI) • Data Access Object (DAO) • Model View Controller (MVC) • Hollywood principle • Encapsulation • High cohesion, loose coupling 1 Software Architecture What is a software architecture? The software architecture of a program or computing system is the structure or structures of the system, which comprise software elements, the externally visible properties of those elements, and the relationships among them. Ar- chitecture is concerned with the public side of interfaces; private details of elements|details having to do solely with internal implementation{ are not architectural. • Bass, Clements, and Kazman Software Architecture in Practice (2nd edition) 1 Architecture Component design Changes slowly Rapid change through refactoring Influences the whole system Specific for the component Architectural styles Design patterns Software architecture Architecture describes the overall structure of a software system. Good architecture enables smooth evolution of the system. It must take into account things like • Deployment environment, • Platform and technology specifics, • Expected system scope. Architecture design principles Standard design principles also apply to system-wide architecture, i.e. • Separation of concerns, • Single responsibility principle,
    [Show full text]
  • DAO Dispatcher Pattern: a Robust Design of the Data Access Layer
    PATTERNS 2013 : The FIfth International Conferences on Pervasive Patterns and Applications DAO Dispatcher Pattern: A Robust Design of the Data Access Layer Pavel Micka Zdenek Kouba Faculty of Electrical Engineering Faculty of Electrical Engineering Czech Technical University in Prague Czech Technical University in Prague Technicka 2, Prague, Czech Republic Technicka 2, Prague, Czech Republic [email protected] [email protected] Abstract—Designing modern software has to respect the nec- Such frameworks help to separate the principal concern of essary requirement of easy maintainability of the software in business objects behavior (business logic) from the infrastruc- the future. The structure of the developed software must be tural concern of how business object’s data is retrieved/stored logical and easy to comprehend. This is why software designers from/to the database and make business objects free from this tend to reusing well-established software design patterns. This infrastructural aspect by delegating it to specialized data access paper deals with a novel design pattern aimed at accessing data objects (DAO). Thus, DAOs intermediate information ex- typically stored in a database. Data access is a cornerstone of all modern enterprise computer systems. Hence, it is crucial to change between business objects and the database. To facilitate design it with many aspects in mind – testability, reusability, the replacement of the particular mapping technology and to replaceability and many others. Not respecting these principles encapsulate database queries, data access objects layer pattern may cause defective architecture of the upper layer of the product, was devised. There are many possible implementations that or even make it impossible to deliver the product in time and/or differ mainly in their reusability, testability, architecture/design in required quality.
    [Show full text]