Kuali Coeus (KRCA) Developers Bootcamp Jack Frosch – Kuali Foundation (Lead Developer) Bryan Hutchinson - Cornell (Development Manager)

Slides:



Advertisements
Similar presentations
Kuali Rice Bootcamp: Hands-On Exercises Colorado State University, January , 2008 Aaron Godert - Cornell University Rice Development Manager.
Advertisements

Persistence Jim Briggs 1. 2 Database connectivity: JDBC Java Database Connectivity An API for connecting Java programs (applications, applets and servlets)
Apache Struts Technology
Spring, Hibernate and Web Services 13 th September 2014.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
© 2005, Cornell University. Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson
Pragmatic Application Building: Step by Step Jay Sissom Principal Systems Analyst Indiana University
Apache Struts Technology A MVC Framework for Java Web Applications.
Open source administration software for education research administration Lin-Long Shyu System Analyst Kuali Coeus Technical Team Indiana University
Data Persistence and Object-Relational Mapping Slides by James Brucker, used with his permission 1.
Struts 2.0 an Overview ( )
UNIT-V The MVC architecture and Struts Framework.
Hibernatification! Roadmap for Migrating from Plain Old SQL on JDBC to JPA on Hibernate Duke Banerjee Senior Developer, DrillingInfo.com.
Rice KRAD Data Layer JPA Design Eric Westfall July 2013.
CSE446 S OFTWARE Q UALITY M ANAGEMENT Spring 2014 Yazılım ve Uyguluma Geliştirme Yöneticisi Orhan Başar Evren.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Training - Day 3 OJB. What is OR Mapping? OR Mapping is the mapping of relational database tables to objects (Java Objects in our case) Many OR Mapping.
KRA Application Architecture Terry Durkin, KRA Development Manager (Indiana University) Bryan Hutchinson, KRA Development Manager (Cornell) Andy Slusar,
Architecting and Building KRA using Kuali Rice Terry Durkin, KRA DM/Lead Developer (Indiana University) Bryan Hutchinson, KRA DM/Lead Developer (Cornell)
1 INTRO TO BUSINESS COMPONENTS FOR JAVA (BC4J) Matt Fierst Computer Resource Team OracleWorld Session
Open source administration software for education next generation student system Using the Kuali Student Configurable User Interaction Model & Framework.
Spring Overview, Application demo -Midhila Paineni 09/23/2011 Spring Overview, Application demo9/8/20151.
1 Customizing Kuali: A Technical Perspective Naser Alavi (Michigan State University) Warren Liang (University of California, Irvine)
Open source administration software for education research administration Awards Module Susan Mundt, University of Arizona KCC Award Subcommittee Co-Lead.
Technical Overview for “Functionals” (Kuali-eze…It’s a Foreign Language!) Ailish Byrne, Indiana University Barbara Sutton, Cornell University.
Eric Westfall – Indiana University Jeremy Hanson – Iowa State University Building Applications with the KNS.
Installing, Configuring & Customizing KFS Mike Criswell (Michigan State University) Warren Liang (University of California, Irvine)
Kuali Nervous System Aaron Godert, Cornell University Jonathan Keller, University of California, Davis.
Kuali Enterprise Notification Aaron Godert (Sr. Software Architect, Cornell University) John Fereira (Programmer/Analyst, Cornell University)
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
Kuali Nervous System Aaron Godert, Cornell University Jonathan Keller, University of California, Davis.
Struts J2EE web application framework “ Model 2 ” Model View Controller Controller Servlet Key features XML metadata Struts taglib Simplified form validation.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
Kuali Days / November 2007 Tempe, Arizona. Kuali Research Administration Proposal Budget Module Presented by: Rhonda Dwyer, The University of Arizona.
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 2 Presented by: Jerry Neal – KFS Development Manager Geoff McGregor – KC Lead Developer Brian McGough – KRice Project.
1 Kuali Nervous System (KNS) Part 1 Presented by: Jerry Neal – KFS Development Manager Geoff McGregor – KC Lead Developer Brian McGough – KRice Project.
Kuali Rice A basic overview…. Kuali Rice Mission First and foremost to provide a consistent development framework and common middleware layer for Kuali.
Enhancing Forms with OLE Fields, Hyperlinks, and Subforms – Project 5.
KC Application Architecture Terry Durkin, KC Development Manager (Indiana University) Bryan Hutchinson, KC Development Manager (Cornell) Jack Frosch, KC.
© 2006, The Trustees of Cornell University © 2006, The Trustees of Indiana University Kuali Nervous System Aaron Godert, Kuali Development Manager Brian.
Kuali Nervous System Nate Johnson, Indiana University Jonathan Keller, University of California, Davis.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Running Kuali: A Technical Perspective Ailish Byrne (Indiana University) Jonathan Keller (University of California, Davis)
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool The problem fixed by ORM Advantage Hibernate Hibernate Basic –Hibernate sessionFactory –Hibernate Session.
JAVA BEANS JSP - Standard Tag Library (JSTL) JAVA Enterprise Edition.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
Object storage and object interoperability
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool Used in data layer of applications Implements JPA.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
Apache Struts Technology A MVC Framework for Java Web Applications.
CS520 Web Programming Object-Relational Mapping with Hibernate and JPA (I) Chengyu Sun California State University, Los Angeles.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
Building KFS using KNS Presented by James SmithJustin Beltran University of ArizonaUniversity of California, Irvine.
Kuali Enterprise Notification Tell Me What I Want And Need To Know Aaron Godert (Sr. Software Architect, Cornell University) John Fereira (Programmer/Analyst,
Building Enterprise Applications Using Visual Studio®
Chengyu Sun California State University, Los Angeles
A very brief introduction
Persistence – Iteration 4 Vancouver Bootcamp
Architecting and Building KRA using Kuali Rice
Signet & Privilege Management
Developing and testing enterprise Java applications
CS4961 Software Design Laboratory Understand Aquila Backend
Chengyu Sun California State University, Los Angeles
SDMX IT Tools SDMX Registry
Nate Johnson Ryan Kirkendall Eric Westfall
Presentation transcript:

Kuali Coeus (KRCA) Developers Bootcamp Jack Frosch – Kuali Foundation (Lead Developer) Bryan Hutchinson - Cornell (Development Manager)

Topics About Kuali Coeus Tools Coding Standards Introduction/Lesson Overview Lessons!

About Kuali Coeus (KRCA) Eight partner schools –Cornell, Indiana, Michigan State, MIT, Arizona, CSU, UC Davis, ISU Based on a MITs Coeus –Full Featured Research Admin suite –13+ years of development work –Still going! –Consortium model

More About KRCA First Release - July 2008 –Proposal Development –Budget –Grants.gov S2S Second Release –Awards –IRB/Human Participants –COI Beyond –Functional Parity with Coeus

Project/Development Tools Eclipse (eclipse.org) –Our primary development tool –Leading free and open source IDE –Pluggable architecture offers extensibility Maven (maven.apache.org) –Provides dependency management and lifecycle goals (like Ant tasks) Subversion –Source Code Management and Repository

Project/Development Tools Confluence ( –Wiki used for collaboration FishEye ( –Source code visualization Continuum (continuum.apache.org) –A Continuous Integration server Sakai –Group mailing lists

Project/Development Tools Cobertura (cobertura.sourceforge.net) –Test coverage and reporting –Can be run by developer and part of CI CheckStyle (checkstyle.sourceforge.net) –Code style verification tool –Can be run by developer and part of CI

Coding Standards Coding standards assist readability and maintainability Derived from –Past experience –The Elements of Java Style (“Little Green Book”)

Coding Standards Some Highlights –Favor readability over complexity –Methods should do one thing in < ~30 lines –Struts Actions and Forms should not have business logic –JavaDoc comments required –Tests required for non-trivial public, protected and default visibility methods

Coding Standards –Favor using Java 5 features where applicable –Bos must override equals() and hashCode() Let Eclipse write them for you –Constants must be used instead of literals, except for trivial loop indices, 0, 1, etc. –If in doubt, check out the Little Green Book See Confluence Topic: KCRA Coding Standards - Post Release 1.0

How Bootcamp Works High-level Overview of Concepts Discussion/Demo/Review of Code based on slides Exercises –Sample Application mimicking KRCA functionality Ask questions any time! Be engaged - You will get out what you put in!

Lesson Overview Day 1 –BOs / Maintenance Documents Exercise 1 Exercise 2 Day 2 –Transactional Documents Exercise 3 –Web Components - Struts, KNS custom tags Exercise 4

Lesson Overview Day 3 –Services Exercise 5 –Lists Exercise 6 –Rules Exercise 7 –Document Authorizer Exercise 8

Documents and BOs Kuali is “Document based” Two Types of Documents –Transactional Documents –Maintenance Documents

Transactional Documents Represent a business function –Apply for funds (by creating a proposal) –Manage Human Participants (by creating a protocol, amendment, etc…) Complex rules and approval process Lots of data Potentially long living Focus on Transactional Documents later in the week

Maintenance Documents Manage (create/alter) Reference Data What is “reference data” –In DB terms, it’s a table used by the entire system as a FK from other tables –People, Organizations, Units, Sponsors, etc… –What else would be reference data? Simple documents to perform CRUD operations

Business Objects Business Objects (BOs) are Java Beans –Properties –Getters/Setters Two categories –Reference Data (CRUD via Maint Docs) –Those used in Transactional Documents (Document Composition) Map to a single table in the DB

Spring Bean Data Dictionary (DD) Controls the behavior of BOs Defined in Spring Bean XML –Named like.xml E.g. AwardBeans.xml, BudgetBeans.xml –Inquiries and Lookups –Attributes - Properties of the BO UI Controls - Lookups, Maint Docs, Trans Docs Size & Shape Validation Required-ness

Database - OJB Kuali uses OJB as an ORM tool –OJB - ObJectRelationalBridge –ORM - Object-Relational Mapping Configure Write Java Code (not SQL) Related data elements are stored together Model complex database relationships

Using OJB OJB Repository XML Class Descriptor –Define the Java Class and the Table Name Field Descriptor –Java Property Name –Column Name –JDBC Type –Conversion (boolean to char, custom datatypes, etc…) –Primary Key –Optimistic Locking

OJB - Getting more advanced Model Relationships –Collection Descriptor –Reference Descriptor More on these later...

Demo / Code Review

Exercise 1

OJB - repository.xml Reference Descriptor –Relationships to Reference data –1:1 (Proposal:Sponsor) –Not saved/deleted when the related object is saved Collection Descriptor –Relationships where a parent can have many children –1:M (Proposal:Investigators; Investigator:Unit) –“Reverse Foreign Key” –Save with the Parent

Maintenance Docs How we manage Reference Bos XML based: MaintenanceDocument.xml –BO Class –Maintainable Class - API for customization –Business Rules - API to perform validation –Document Authorizer - Customize AuthZ for a doc –Document Type - Reference to KEW –Maintainable Section(s) and Item(s) - what and how attributes are presented –Attributes, Locking Key, Default Existence Checks…

Values Finders User to present a list of options in the UI –Drop-down –Radio Group Queries the database and returns a list of valid values PersistableBusinessObjectValuesFinder –80% - BO Class, Key/Label Attributes Names Custom Values Finders –20% - Extend KeyValuesBase, Implement KeyValuesFinder XML (DD) and Code (Class file)

Demo / Code Review

Exercise 2

Database - JPA Kuali is migrating to JPA/Hibernate for ORM –JPA: Java Persistence API –ORM: Object-Relational Mapping –Hibernate is the JPA Provider Configured in META-INF/persistence.xml and META-INF/orm.xml Object properties and relationships are modeled in BOs using JPA annotations

Using JPA Persistence.xml defines Persistence Units –Define a datasource; i.e. Oracle, MySQL –Provider properties; i.e. for Hibernate Orm.xml is used to –Declare global sequences –Declare entity mappings (i.e. when not using annotations –Declare lifecycle callback methods … and more

Using JPA JPA annotations on Indicates object is To name the Field(s) forming primary Field for optimistic To name the column, specify length (String data), precision and scale (numeric data), and other column data

Using JPA Id values are auto-generated by JPA Version field is used during updates to determine if record has been update (Optimistic Locking) KRCA uses Pessimistic Locking of its BO documents, so Optimistic Locking exceptions are rare events

JPA - Getting More Advanced Object relationship annotations are used to model relationships between An entity without a Included embedded entity columns in same One-to-one with Most frequent Uses intermediate join table

Transactional Documents Composed of a Document class and multiple BOs –Document Composition BOs have a reference to the Document class/table (FK Relationship) Transactional Document classes are special BOs –Super BOs with additional behavior

Transactional Document Similar to Maint Doc DD files –Add Attributes (since these are BOs) –No lookups (we use KEW for Doc Search) –No Inquiries Similar to other OJB mappings –Lots of relationships defined –Other mappings should not refer back to the Document class

Demo / Code Review

Exercise 3

Web stuff in Kuali/KRCA Struts –Pseudo MVC –Forms, Actions, Mappings Struts in Kuali –Heavily customized –Addresses common Struts anti-patterns –Simplifies development Single Action Mapping

Struts Action Classes Object Hierarchy for KRCA: -KraTransactionalDocument ----KualiTransactionalDocumentBase KualiDocumentActionBase KualiAction DispatchAction

Struts Form Classes Document is placed in the Form POJO Form Base handles type conversion Object Hierarchy for KRCA: -ProposalDevelopmentForm ----KualiTransactionalDocumentFormBase KualiDocumentFormBase KualiForm PojoFormBase ActionForm (Struts base form)

Building the UI JSPs/Custom Tags JSTL and JSP Expression Language –Preferable to Struts tags when possible Kuali Rice Tags –page.tag and documentPage.tag –tab.tag –documentControls.tag –htmlControlAttribute.tag

KRCA Custom Tags Build complex JSPs Maintainability Methodology is approximate, but in general: –1 JSP per page –Generally, 1.tag per panel on the page

HTMLControlAttribute.tag Replaces struts Uses Spring Bean entries to determine: –Type of control (text, drop-down, etc) –Length –Max Length Spring Bean Attributes

Demo / Code Review

Exercise 4

Services and DAOs Services: Implements Business Logic not in BOs –Perform a calculation; Save a Document Services are defined as Interfaces and Implemented as classes Spring manages the resolution of Interface to actual code - Spring Beans XML Accessing Services –Dependency Injection –Service Locator (KraServiceLocator) Data Access Objects - DAOs –Similar to Services, but have knowledge of the data model

Demo / Code Review

Exercise 5

Lists of Data Old stuff –JPA, BOs, Spring Beans, etc New stuff –Document changes Special getter Deletion Aware Lists –Action Form - Methods for add/delete –JSP/tag - Accessing properties of a list

Demo / Code Review

Exercise 6

Rules and Events Events - A way to evaluate a rule when an action occurs –Automatically invoked via frameworks (Save, Route, etc…) –Custom events (add or delete a BO from a list)

Rules Beyond size & shape validation from the DD DocumentRuleBase - Customize save/route/etc… rules Custom Rules - Implemented in Rules classes; Validate pretty much anything about the document; Return true/false

Demo / Code Review

Exercise 7

Error Messages Give context to errors –Display error messages on the appropriate panel –Highlight fields that have errors Generated from DD Generated from Rules classes

Audit Errors Similar to Error Messages Allows users to continue working on their document and defer validation until ready Errors and Warnings Provides a link to where the error is occurring

Document Authorizer Determine the level of access that a user has to the document –Read Only –Full Access –Somewhere in between Document Actions –What actions can a user take on a document –Implemented in JSPs via Who can initiate a document

Demo / Code Review

Exercise 8