LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,

Slides:



Advertisements
Similar presentations
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Advertisements

1.NET Web Forms DataGrid © 2002 by Jerry Post. 2 Data Grid Has Many Uses  The grid uses HTML tables to display multiple rows of data. It is flexible.
The Librarian Web Page Carol Wolf CS396X. Create new controller  To create a new controller that can manage more than just books, type ruby script/generate.
Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Chapter 12: Using ADO.NET 2.0 Programming with Microsoft Visual Basic 2005, Third Edition.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
1 Pertemuan 09 Database Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS 512.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Figure 1. Hit analysis in 2002 of database-driven web applications Hits by Category in 2002 N = 73,873 Results Reporting 27% GME 26% Research 20% Bed Availability.
Database Updates Made Easy In WebFocus Using SQL And HTML Painter Sept 2011 Lender Processing Services 1.
07/19/04 NorCal OAUG Training Day, Paper 2.4 John Peters, JRPJR, Inc.1 Oracle Workflow Notifications John Peters JRPJR, Inc.
Access Tutorial 10 Automating Tasks with Macros
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
JavaScript & jQuery the missing manual Chapter 11
Unit J: Creating a Database Microsoft Office Illustrated Fundamentals.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Exploring Real-time apps with ColdFusion and Blaze DS / Live Cycle Data Services ES Dan Blackman
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Creating a Web Site to Gather Data and Conduct Research.
Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.
CONTENTdm for Beginners September 25, 2012 by Kourtney Blackburn.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
PHP meets MySQL.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Twelve Access Databases and LINQ.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 30 – Bookstore Application: Client Tier Examining.
ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems
Flex Data Communications Nick Kwiatkowski, Michigan State University.
System Initialization 1)User starts application. 2)Client loads settings. 3)Client loads contact address book. 4)Client displays contact list. 5)Client.
GEMVC. The Setup Folders Views Value Objects (VOs) Custom Events Service CFCs Controller Model Application Main MXML.
Caching Chapter 12. Caching For high-performance apps Caching: storing frequently-used items in memory –Accessed more quickly Cached Web Form bypasses:
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
Chapter Thirteen Working with Access Databases and LINQ Programming with Microsoft Visual Basic th Edition.
What's New in Kinetic Calendar 2.0 Jack Boespflug Kinetic Data.
1 MIS309 Database Systems Introduction to Microsoft Access.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Bookstore Application: Middle Tier Introducing Code-Behind Files, Session State.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 25 I’m Suffering from Information Overload.
Chapter 24 I’m Suffering from Information Overload (Access Databases) Clearly Visual Basic: Programming with Visual Basic nd Edition.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
Creating New Forms Projects can appear more professional when using different windows for different types of information. Select Add Windows Form from.
Navigation Framework using CF Architecture for a Client-Server Application using the open standards of the Web presented by Kedar Desai Differential Technologies,
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
CF Eclipse Nick Kwiatkowski Michigan State University, Physical Plant 8/8/2006.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
SharePoint 101 – An Overview of SharePoint 2010, 2013 and Office 365
ASP.NET Programming with C# and SQL Server First Edition
Microsoft Visual Basic 2010: Reloaded Fourth Edition
Working in the Forms Developer Environment
Using Procedures and Exception Handling
Tom Link CTO, Universal Mind
Introduction to ADO.Net and Visual Studio Database Tools.
Presentation transcript:

LiveCycle Data Services Introduction Part 2

Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation, it can be found at: – mhttp:// m Last time, we covered what LDS is, and some on LDS Messaging

Data Management Data Management is the component of the LiveCycle Data Services suite of services that allows for LDS to help you communicate and control the data to your end user Allows for Data Synchronization, Data Caching, Data Pagination, and Conflict Resolution.

Data Management How it works: Data is packaged up into ‘Value Objects’, or packages of data. –This usually consists of a “row” of data from a database Each VO is tracked separately as to who is viewing, editing, etc.

Data Management Users then Subscribe to a set of data. –LDS will then keep track of the state of that data, and send it from the Application Server to the Flex Application. LDS will ‘listen’ to any changes made to the data in the Flex Client.

Data Management If the Collection that holds the data is changed in the client, LDS will take that change, change the Value Object in memory, send the change to the App server, and update all clients in real-time.

Data Management When an update is sent to the other clients, it will check its local copy, to make sure that record has not changed. If it has, it will issue a “Conflict” event, and allow the Client to choose what to do.

Data Management On the Client, 95% of your work is handled by any of the Collection classes, such as the ArrayCollection Handles updating LDS with Changes, and notifying other visual components of changes.

Data Management When a DataGrid, or InputBox broadcast the Change event, the ArrayCollection hears it, and updates its own data, and passes the change to other components that subscribe to its change event.

Building an Application We will be building a quick “CMS” application utilizing a simple DataGrid and some buttons… –Backend will be ColdFusion and Microsoft Access –LiveCycle 2.5 will be used –Flex SDK will be used inside Flex Builder 3 beta 2.

Building an App First, we will want to create a new database file in Access. We will be using the “Contacts” template to create the file. –Normally, we would create a custom database file for this purpose. –If using Access 2007, make sure to save the file as an Access 2003 or Access 2000 file. Database (Access) Application Server (ColdFusion) LiveCycle Client Connectivity Display Components

Building an App Next, we will want to add the new Database as a ‘Datasource’ in ColdFusion –Named “ug_contacts”, using the Access Unicode Driver Load up Flex Builder, and create a new Flex Project –Web Application, ColdFusion App Server, LiveCycle Data Services Database (Access) Application Server (ColdFusion) LiveCycle Client Connectivity Display Components

Building an App Create a new folder on the server for the ‘Value Objects’, \bin\cfcs\ Create a new AS Class folder : \src\ascript Open the RDS view, and find the Contacts table Right-Click on Table, ColdFusion Wizards, Create CFC Database (Access) Application Server (ColdFusion) LiveCycle Client Connectivity Display Components

Building an App CFC Folder: –/contact_cms/bin/cfcs CFC Package Name: –contact_cms-debug.cfcs CFC Type: –LiveCycle DS Assembler Create AS-VO –AS Folder: \src\ascript Database (Access) Application Server (ColdFusion) LiveCycle Client Connectivity Display Components

Building an App Next, we need to modify the LDS configuration files to tell LDS about the components we just created. –File is in the wwwroot\WEB-INF\Flex\ directory, named data-management- config.xml Add a new entry (Destination) to represent the component we just created. Database (Access) Application Server (ColdFusion) LiveCycle Client Connectivity Display Components

Building an App Database (Access) Application Server (ColdFusion) LiveCycle Client Connectivity Display Components Destination.properties.component –Component dot path on the CF server Destination.properties.scope –Application or request Destination.properties.metadata.identity –Set this to the key field in your table Destination.properties.metadata.query-row- type –This is the path to the ActionScript Value Object we created.

Building an App Restart LiveCycle Data Services, and make sure there are no errors –If using the bundled LDS with ColdFusion, restart the CF Application Service Now, we just need to create the client, and we are done! Database (Access) Application Server (ColdFusion) LiveCycle Client Connectivity Display Components

Building an App Open your MXML document, and add a tag –Give it an ID, and the Destination that we used in the last step Add a new ArrayCollection variable (to hold your data) Add a new function to execute the DataService.fill(arrayCollection); Database (Access) Application Server (ColdFusion) LiveCycle Client Connectivity Display Components

Building an App Next, add a DataGrid and at the very least, a button to trigger the fill() command. Bind this DataGrid to your ArrayCollection, and set the editable property to true. Also, open up the Contacts.as file, and notice the [Managed] metadata. This code tells the AS to broadcast its changes to outside components. Database (Access) Application Server (ColdFusion) LiveCycle Client Connectivity Display Components

RUNNING THE APPLICATION Connect to

Running the Application If you update the data in one application, the data becomes updated in any other instances of the Flex Client, in real time! What if you wanted to queue the changes, or allow the user to back out of the changes before they occur?

Turning off AutoCommit In order to allow the clients to queue changes, and control when they commit the changes, we need to turn off the AutoCommit feature of the DataService Add the autoCommit=“false” declaration to the DataService component. We will now need to add two buttons to allow the user to commit their changes.

Turning off AutoCommit Add two additional buttons: –Name one Apply, with a click event of : dataService.commit(); –Name the second Cancel, with a click event of : dataService.revertChanges();

AUTO-COMMIT DEMO

Adding and Removing Items Adding and removing items to the database is as trivial as adding a new item to the ArrayCollection. –Remember when adding an item, you may need to turn off the AutoCommit feature, as your database may not allow null values. ArrayCollection.addItem(new className()); DataService.deleteItem(dgContacts.select edItem);

Conflicts Another nice thing about Data Management is the ability to have Conflict Resolution built right into your application. LDS can trigger an event when another user updates a record you are currently updating Add the “conflict” event handler to the DataService to create your own conflict handler.

Conflict When handling a conflict, you have the option to update with your version, take the server’s version, or to let the user choose what version to keep. Lets show how to detect a conflict in data sets, notify the end user, overwrite the client’s data with the server’s version.

CONFLICT RESOLUTION

Fill Queries Using the ‘out of the box’ data management is great if you want to return full sets of data –But what happens if you want to return only a portion of your full table; for example a search result? You can customize your fill parameters by modifying your assembler’s Fill() function and passing the fill as the second parameter of the call.

Fill Queries For example: –DataService.fill(ArrayCollection,SearchString: string); Translates to: – –

Paging What happens if you have too much data returned from a query to send down to the clients? –For example, do you really want to send 50,000 records down the pipe? LDS has a built in Paging mechanism!

Paging To configure it, edit your data- management-config.xml file. –Destination.properties.network That is all you have to do!

PAGING & QUERIES

Questions?