KRAD Data Layer A Data Access and Persistence Architecture for KRAD Eric Westfall February 2013.

Slides:



Advertisements
Similar presentations
HL7 V2 Conformance Testing Robert Snelick NIST January 20 th, 2004
Advertisements

Brief History of OA Framework How did OA Framework Evolve Why did OA Framework Evolve Why is it still evolving Changes in Fusion.
JTX Overview Overview of Job Tracking for ArcGIS (JTX)
Apache Struts Technology
Composition CMSC 202. Code Reuse Effective software development relies on reusing existing code. Code reuse must be more than just copying code and changing.
Machine Independent Assembler Features
Spring, Hibernate and Web Services 13 th September 2014.
Edoclite and Managing Client Engagements What is Edoclite? How is it used at IU? Development Process?
.NET Database Technologies: Open-Source Frameworks.
Web Applications Development Using Coldbox Platform Eddie Johnston.
Adding scalability to legacy PHP web applications Overview Mario A. Valdez-Ramirez.
Kuali Rice at Indiana University Important Workflow Concepts Leveraged in Production Environments July 29-30, 2008 Eric Westfall.
Pragmatic Application Building: Step by Step Jay Sissom Principal Systems Analyst Indiana University
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
RandoNode Frame Work and API OPEN Development Conference September 17-19, 2008 Ravi Rajaram IT Development Manager.
Creating Web Page Forms
What Is a Factory Pattern?.  Factories are classes that create or construct something.  In the case of object-oriented code languages, factories construct.
UNIT-V The MVC architecture and Struts Framework.
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
Open source administration software for education software development simplified KRAD Kuali Application Development Framework.
Presented by Brian Griffin On behalf of Manu Goel Mohit Goel Nov 12 th, 2014 Building a dynamic GUI, configurable at runtime by backend tool.
Rice KRAD Data Layer JPA Design Eric Westfall July 2013.
JDBC Session 5 Tonight: Data Access Patterns 1.J2EE Architecture & Design Patterns 2.The Data Access Tier 3.Data Access Patterns –DataAccessObject (DAO)
Database Design for DNN Developers Sebastian Leupold.
LINQ Boot Camp ADO.Net Entity Framework Presenter : Date : Mahesh Moily Nov 26, 2009.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
©Silberschatz, Korth and Sudarshan5.1Database System Concepts Chapter 5: Other Relational Languages Query-by-Example (QBE) Datalog.
Eric Westfall – Indiana University Jeremy Hanson – Iowa State University Building Applications with the KNS.
Internationalization and the Java Stack Matt Wheeler.
Enticy GROUP THE A Framework for Web and WinForms (Client-Server) Applications “Enterprise Software Architecture”
Object persistence with Hibernate in Decision Deck 1.1 Gilles Dodinet 2 nd Decision Deck Workshop 2008, February.
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
ICONICS ActiveX ToolWorX V 6.1.
KRAD Data Layer A Data Access and Persistence Architecture for KRAD Eric Westfall February 2013.
Presentation. Recap A multi layer architecture powered by Spring Framework, ExtJS, Spring Security and Hibernate. Taken advantage of Spring’s multi layer.
Virtual File Systems in Samba 3.0 Alexander Bokovoy Samba Team, Optifacio Software Services CIFS 2003 conference, San Jose, August.
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
Building Applications with the KNS. The History of the KNS KFS spent a large amount of development time up front, using the best talent from each of the.
1 Kuali Nervous System (KNS) Part 1 Presented by: Jerry Neal – KFS Development Manager Geoff McGregor – KC Lead Developer Brian McGough – KRice Project.
Domain and Persistence Patterns. Fundamental Pattern Types Design Patterns Business Logic Patterns.
A Presentation By V AIBHAV S AHARAN Web-enHanced Information Management COMS E6125.
RandoNode Frame Work and API OPEN Development Conference September 19, 2008 Ravi Rajaram IT Development Manager.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
.  A multi layer architecture powered by Spring Framework, ExtJS, Spring Security and Hibernate.  Taken advantage of Spring’s multi layer injection.
JPA / HIBERNATE CSCI 6370 Nilayan Bhattacharya Sanket Sable.
© 2006, The Trustees of Cornell University © 2006, The Trustees of Indiana University Kuali Nervous System Aaron Godert, Kuali Development Manager Brian.
Class Builder Tutorial Presented By- Amit Singh & Sylendra Prasad.
OPeNDAP Hyrax Harnessing the power of the BES OPeNDAP Hyrax Back-End Server Patrick West
Presentation.
Overview of C/C++ DB APIs Dirk Düllmann, IT-ADC Database Workshop for LHC developers 27 January, 2005.
Fundamentals of MyBATIS
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Google Code Libraries Dima Ionut Daniel. Contents What is Google Code? LDAPBeans Object-ldap-mapping Ldap-ODM Bug4j jOOR Rapa jongo Conclusion Bibliography.
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
Customizing Share Document Previews Will Abson Senior Integrations Engineer and Share Extras Project Lead
XML 2002 Annotation Management in an XML CMS A Case Study.
Building KFS using KNS Presented by James SmithJustin Beltran University of ArizonaUniversity of California, Irvine.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Part VI: Mapping URLs.
Play Framework: Introduction
Using JDeveloper.
Outline Chapter 2 (cont) OS Design OS structure
Machine Independent Assembler Features
Developing and testing enterprise Java applications
CS4961 Software Design Laboratory Understand Aquila Backend
Machine Independent Assembler Features
Product Training Program
Plug-In Architecture Pattern
Nate Johnson Ryan Kirkendall Eric Westfall
Presentation transcript:

KRAD Data Layer A Data Access and Persistence Architecture for KRAD Eric Westfall February 2013

Introducing the krad-data module ( Encapsulate ) and and Simplify Simplify

What we have today KRAD still using KNS data and persistence architecture Originally written for OJB Overly complex!

YES! That’s more than 10 services that all support our current data and persistence layer in KRAD.

The current abstraction is leaky

Take all those services and throw them in the trash! Because we can do it with just one!

DataObjectService Focus on what the KRAD framework needs to get it’s job done. Basic CRUD Metadata Data Validation

Keep It Simple! An attempt to create the ultimate general-purpose abstraction on top of any ORM or persistence technology would be doomed to failure.

Instead, we need to push the complexity down. Instead, we need to push the complexity down. Application code can still use ORM-specific APIs if need arises.

Hold On! What is all this nonsense? I thought we were just adding JPA support? JPA Roolz!

Yes, but first we need to fix our foundation!

Otherwise…

…and it wouldn’t hurt to plan for the future a bit.

But let’s be honest…

However… There are already use cases within our community for non-traditional data stores Example: OLE Document Store The future is now

Data from Anywhere By keeping things simple, we open up the possibility to interface with nearly any backend data store or persistence technology OJBJPAJDBCSpring-DataNoSQL Web Services

Architecture

DataObjectService Design find find findMatching findMatching save save delete delete validate validate getDataDictionary getDataDictionary

Flexible Data Types

DataObjectType<T> public class DataObjectType { public static DataObjectType create( Class dataObjectClass, String discriminator) {... } public static DataObjectType forClass( Class dataObjectClass) {... } // discriminator is null... } public interface DataObjectService { T find(DataObjectType type, Object id); T find(Class type, Object id); // for convenience... }

Example of a Static Data Type DataObjectService dos =...; DataObjectType accountType = DataObjectType.forClass(Account.class); Account acct = dos.find(accountType, “123”); System.out.println(acct.getNbr()); // prints “123”

Example of a Dynamic Data Type DataObjectService dos =...; DataObjectType jsonAccountType = DataObjectType.create(Json.class, “account”); Json accountJson = new Json(jsonAccountType, “{ ‘nbr’ : ‘123’,... }”); dos.save(accountJson); // assume we have implemented save Json json = dos.find(jsonAccountType, “123”); json.getType().equals(jsonAccountType); // true System.out.println(json.getJson()); // { ‘nbr’ : ‘123’,... }

Working with Dynamic Types Allows for a flexible design that could facilitate tasks on the roadmap such as rewriting eDocLite to use KRAD Metadata would need to be available for these dynamic types as well Properties could also be accessed in a syntax similar to Java (dot-notation) with pluggable property accessors for dynamic types.

Provider Framework An SPI will be used to allow for custom data providers Can be registered with a ProviderRegistry or loaded via a ModuleConfiguration Three different types of providers: PersistenceProviderMetadataProviderValidationProvider

PersistenceProvider Implements basic CRUD operations Can be responsible for one or more data object types For a given data object type, there should be only one valid PersistenceProvider OJB and JPA implementations will be provided out-of-the box with the krad-data module

MetadataProvider Loads metadata into the data dictionary for a set of data object types Metadata for a given data object type can be combined from multiple providers into one Reasonable defaults should be applied when possible! LabelsValidationEtc.

The Metadata Pipeline

Splitting the DataDictionary The DataDictionary becomes the authoritative source for all metadata in KRAD What is currently called the “Data Dictionary” is split into: Data Dictionary – data object metadata View Dictionary – KRAD UIF view configuration Document Dictionary – document framework configuration The “new” DataDictionary becomes part of krad-data module

ValidationProvider Allows for simple data object validation Data validation executed automatically upon save Can be disabled by passing a flag to save method Meant for simple, data-focussed validation Required-ness Max/min length Proper format Default provider will be applied in most cases which will leverage constraints defined in Data Dictionary

Externalizable Business Objects EBO’s were tacked-on to the KNS Implementation is a mess and very brittle Through the use of custom PersistenceProviders, the goal is the render the current incarnation of EBOs obsolete …and deprecate the ExternalizableBusinessObject marker interface

Transaction Management Transaction management will still occur above the data layer Not all data stores support transactions It will be up to the provider implementation to be written in a “transaction aware” fashion if transactions are supported JPA and OJB providers will both be transaction-aware In KRAD, will work to discontinue the practice of course- grained transactions automatically initiated on entry into any controller Instead, controller methods which should be transactional, will initiate transactions when appropriate/necessary

Impact Goal is to leave legacy KNS untouched as much as possible Existing KRAD applications will have impact if they are currently using BusinessObjectService and it’s friends

The Old-School Way Create database table(s) Create java object, implements PersistableBusinessObject Map Java object to Database using ORM Create Data Dictionary XML file for business object Configure all attributes in Data Dictionary file Inject data dictionary files in module configuration Use BusinessObjectService to load and persist object

The New-And-Improved Way Create database table(s) Create POJO Map Java object to Database using ORM Inject ORM provider into module configuration Use DataObjectService to load and persist data object Mapping the data object in an XML Data Dictionary file is optional! Intelligent defaults will be applied and all metadata sources will be leveraged wherever possible.

Advantages Metadata pipeline will derive dictionary info when possible Natural language derivation for labels (for example: accountNumber -> “Account Number”) Max Length derived from database metadata Required-ness derived from database metadata Intelligent convention-based defaults whenever possible DataDictionary XML can be used to refine metadata, but is ultimately optional Data Validation is built into the data layer and sourced from metadata in Data Dictionary Data Dictionary is simplified to just data object metadata

The Development Plan Data and Provider Layer implementation OJB Persistence and Metadata Providers DataDictionary refactoring Isolation of legacy KNS Refactoring of KRAD to utilize new service(s) JPA Persistence and Metadata Providers JPA Implementation Support Classes Conversion/Migration Scripts

Still Working On… How best to handle linking and refreshing Detailed design on EBO Work through issues on how to handle data dictionary split and modularity. Is proposed definition of DataObjectService enough? Method to create a new instance of a data object? Helpers for property accessors/modifiers? How, exactly, to do all of this without breaking legacy KNS?

Next Time Design of OJB implementation Design of JPA implementation JPA-specific considerations and challenges