Swing Data Validation. Karsten Lentzsch www.jgoodies.com



Similar documents
Swing Data Binding. Karsten Lentzsch

Karsten Lentzsch JGoodies SWING WITH STYLE

The Oracle Fusion Development Platform

Swing. A Quick Tutorial on Programming Swing Applications

Oracle Application Development Framework Overview

ArcGIS Viewer for Silverlight An Introduction

<Insert Picture Here> Betting Big on JavaServer Faces: Components, Tools, and Tricks

<Insert Picture Here> Oracle Mobile Enterprise Application Platform Overview

Tutorial on Building a web Application with Jdeveloper using EJB, JPA and Java Server Faces By Phaninder Surapaneni

Extending Desktop Applications to the Web

<Insert Picture Here> Oracle Application Express 4.0

Mapping to the Windows Presentation Framework

HOW TO CONFIGURE PASS-THRU PROXY FOR ORACLE APPLICATIONS

Getting Started Guide for Developing tibbr Apps

MarkLogic Server. Reference Application Architecture Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

When a business user interacts with an integrated workbook, there are various elements involved in the picture. Each of these elements has its own

Introduction to Search in SharePoint Hands-On Lab. Lab Manual

Android Mobile App Building Tutorial

<Insert Picture Here> Building a Complex Web Application Using ADF and Siebel

Ingres Global Partner Summit OpenROAD Meets Open Source: Are YOU Ready? March 2008


Enable Your Automated Web App Testing by WebDriver. Yugang Fan Intel

Developing Rich Web Applications with Oracle ADF and Oracle WebCenter Portal

Compiere Technical Architecture Modern, configurable, extendible

PEOPLESOFT MOBILE INVENTORY MANAGEMENT FOR THE HEALTHCARE INDUSTRY

System Architecture V3.2. Last Update: August 2015

Web Application Development and Frameworks

ASP.NET Overview. Ken Casada Developer Evangelist Developer & Platform Evangelism Microsoft Switzerland

HP OO 10.X - SiteScope Monitoring Templates

@ - Internal # - Online TH PR OR TW TOTAL HOURS # @ 175

ADF. Joe Huang Joe Huang Senior Principal Product Manager, Mobile Development Platform, Oracle Application Development Tools

SRM User Interface Add-On 1.0 Overview. Michael Jud March 2013

How To Develop A Mobile Application On An Android Device

Accelerated Java EE Open Source Development with Eclipse CON1905

Oracle Business Intelligence Discoverer Viewer

5.17 GUI. Xiaoyi Jiang Informatik I Grundlagen der Programmierung

Google Web Toolkit. Introduction to GWT Development. Ilkka Rinne & Sampo Savolainen / Spatineo Oy

Developer Tutorial Version 1. 0 February 2015

GUIs with Swing. Principles of Software Construction: Objects, Design, and Concurrency. Jonathan Aldrich and Charlie Garrod Fall 2012

Lecture 17: Mobile Computing Platforms: Android. Mythili Vutukuru CS 653 Spring 2014 March 24, Monday

Take full advantage of IBM s IDEs for end- to- end mobile development

Our Experiences With Online Selling Using 11i EBS and istore

Trial version of GADD Dashboards Builder

Design. in NetBeans 6.0

This course provides students with the knowledge and skills to develop ASP.NET MVC 4 web applications.

ni.com Remote Connectivity with LabVIEW

Glassbox: Open Source and Automated Application Troubleshooting. Ron Bodkin Glassbox Project Leader

What s New in JReport 13.1

ANDROID INTRODUCTION TO ANDROID

DEVELOPMENT OF AN ANALYSIS AND REPORTING TOOL FOR ORACLE FORMS SOURCE CODES

Build a Mobile App in 60 Minutes with MAF

Web4thejob. About Web4thejob. ZK x Web4thejob

Spring 2011 Conference Sandanski, May 13th 15th 2011 Oracle SOA Suite 11g Rapid service integration and process automation with a no-coding approach

Summer Internship 2013

Software Development Kit

ORACLE ADF MOBILE DATA SHEET

EMC E EMC Content Management Foundation Exam(CMF)

EQUIPMENT OVERVIEW... 4 SETTING UP CALL MANAGER...5

Cloud Computing Technology

ORACLE WEBCENTER PORTAL

Developing a highly dynamic web application for a large bank using rules-based technology

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Effective Big Data Visualization

Oracle Communications WebRTC Session Controller: Basic Admin. Student Guide

Don t get it right, just get it written.

Oracle Technology Network Virtual Developer Day. Developing RIA Web Applications with Oracle ADF

Mobile App Design and Development

Using NetBeans IDE for Desktop Development. Geertjan Wielenga

IBM Digital Experience. Using Modern Web Development Tools and Technology with IBM Digital Experience

Building an Agile PLM Web Application with JDeveloper and Agile 93 Web Services

What is ArcGIS Comprised Of?

MicroStrategy Course Catalog

Oracle BI 10g: Analytics Overview

Managing Application Performance with JBoss Operations Network and OC Systems RTI

This walk-through was created using Windows XP as a guide, however alternate versions of the Windows OS will be very similar in procedure as well.

Applications. Oracle WebCenter 11 g Handbook: Build Rich, Customizable Enterprise 2.0. Oracle Press ORACLE. Philipp Weckerle.

Netbeans 6.0. José Maria Silveira Neto. Sun Campus Ambassador

JIDE Common Layer Developer Guide (Open Source Project)

Petroleum Web Applications to Support your Business. David Jacob & Vanessa Ramirez Esri Natural Resources Team

Nexawebホワイトペーパー. Developing with Nexaweb ~ Nexaweb to Improve Development Productivity and Maintainability

Embedded BI made easy

Cloud Data Management Interface (CDMI) The Cloud Storage Standard. Mark Carlson, SNIA TC and Oracle Chair, SNIA Cloud Storage TWG

Essentials of Developing Windows Store Apps Using C# MOC 20484

ArcGIS Pro. James Tedrick, Esri

Real-Time Reconciliation of Invoice and Goods Receipts powered by SAP HANA. Stefan Karl, Finance Solutions, SAP ASUG Presentation, May 2013

Rich Internet Applications

Beginner s Android Development Tutorial!

<Insert Picture Here> Web 2.0 Data Visualization with JSF. Juan Camilo Ruiz Senior Product Manager Oracle Development Tools

Reducing Outages and Degradations. With Proactive Application Performance Monitoring. Ted Wilson VP Business Development SL Corporation

Zend Server 4.0 Beta 2 Release Announcement What s new in Zend Server 4.0 Beta 2 Updates and Improvements Resolved Issues Installation Issues

The Abstract Windowing Toolkit. Java Foundation Classes. Swing. In April 1997, JavaSoft announced the Java Foundation Classes (JFC).

6 th Annual EclipseCon Introduction to BIRT Report Development. John Ward

Transcription:

Swing Data Validation Karsten Lentzsch www.jgoodies.com

Presentation Goals Learn how to validate data in a Swing application

Speaker Qualifications Karsten builds elegant Swing apps works with Objects since 1990 helps others with UI and architectures provides libraries that complement Swing provides examples for Swing architectures writes about Java desktop issues

Agenda Introduction A Validation Framework Who can validate? When and how to validate? How to display validation results? Findings

I - Introduction

Swing Building Blocks Application 1 Application 2 Applications Panels Utils Help Printing Helper Code/Libs Components, Application Management, etc. Application Frame Appearance Layout Binding Validation Basic Libraries JRE / Swing Foundation

Swing Building Blocks Application 1 Application 2 Applications Panels Utils Help Printing Helper Code/Libs Components, Application Management, etc. Application Frame Appearance Layout Binding Validation Basic Libraries JRE / Swing Foundation

Questions Who can and who shall validate? When shall I validate and present results? How can I specify validation rules? Where do I display validation results? How can I mark invalid data? How can I assist in typing valid data?

II Validation Basics A general purpose validation framework

Structure Someone validates Validator He returns a result ValidationResult That consists of ValidationMessages These have a Severity ValidationResultModel reports changes ValidationComponentUtils marks componets ValidationResultViewFactory vends views

Validation Framework View Validator observes creates ValidationResultModel holds ValidationResult consists of ValidationMessage Severity has

Design Goals Works with standard Swing components Works with custom Swing components Requires no special components Requires no special panels Integrates well with binding Works with different validation styles Is extensible

What offers JGoodies Validation? Implements the approach mentioned before Is a general purpose solution, highly flexible Does not require any other library Can be used as-is Can be used as foundation for higher-level validation frameworks

III Who? Who validates what?

Client and Server Presentation code State modifications Client State Server

3-Tier Client Architecture JList JButton JTextField Presentation PresentationModel ListModel Action ValueModel Model Layer Domain Object DO DO Domain Layer

Domain Object Validates JTextField JButton JTable Presentation ValueModel BookModel Action ListModel Model layer abook Validation code implements Validator Domain layer

Validator for Domain Object JTextField JButton JTable Presentation ValueModel BookModel Action ListModel Model layer abook BookValidator implements Validator This is my favorite approach

PresentationModel Validates JTextField JButton JTable Presentation ValueModel BookModel Action ListModel implements Validation code Validator abook Domain layer

Validator for PresentationModel JTextField JButton JTable Presentation ValueModel BookModel Action ListModel BookModel- Validator abook implements Validator

Presentation Validates BookPanel JTextField JButton JTable Validation code implements Validator ValueModel BookModel Action ListModel Model layer abook Domain layer

View Filters Invalid Data JFormattedTextField JTable Presentation Formatter ValueModel BookModel Action ListModel Model layer abook Domain layer

IV When? When to validate? What initiates validation?

Validation Times/Events Key typed Focus lost Form committed (OK/Apply) Save/print/send data Find examples in the Validation Demo

Example Application: JGoodies Validation Demo Tasks and Approaches for Data Validation www.jgoodies.com/freeware/validationdemo

Validation cons overlay Swing components

V How to display? How to present validation results and how to mark invalid input?

Validation Result Views Single label with validation text and -icon Text area for multiple validation result texts JList/JTable for multiple results Overlayes, translucent text Find examples in the Validation Demo

Validation Markers Text field background Component border Icon overlays component Translucent text overlays component Find examples in the Validation Demo

VI - Findings How does the Validation work in projects?

General Use Jakarta Commons Favor validating unbuffered values Favor validators over self-validating objects Favor domain validators over model validators Avoid presentation validation, but use view filters (JFormattedTextField)

Where does Validation stand? Architecture is stable since December 2003. No known bugs or problems. Comes with a tutorial and demo. Only a few predefined validation rules

End Summary and References

Summary We've seen a general validation architecture We've learned who can validate data We've learned when to validate data We've seen approaches to mark invalid data

JGoodies Swing Suite Example 1 Example 2 Example n Applications Convenience Sources Helper Code User Interface Framework (UIF) Framework Looks Forms Binding Validation Basic Libraries JRE / Swing Foundation

References I JGoodies Validation validation.dev.java.net JGoodies Articles www.jgoodies.com/articles/ JGoodies Demos www.jgoodies.com/freeware/ JGoodies Binding binding.dev.java.net

References II Oracle's JClient and ADF otn.oracle.com/, search for 'JClient' Spring Rich Client Project www.springframework.org/spring-rcp.html JDNC (Java Desktop Network Components) jdnc.dev.java.net

Questions and Answers

End Good Luck! Karsten Lentzsch