Large Datasets in Flex

Category: Entertainment

Presentation Description

No description available.


Presentation Transcript

Working with Large Datasets in Flex and ColdFusion: 

Working with Large Datasets in Flex and ColdFusion Allen Manning Technical Director Prismix Ltd

About the Presenter: 

About the Presenter Technical Director of Usable Business Solutions Building Intranets right now in Flex and ColdFusion Allaire/Macromedia Alpha Tested ColdFusion 1.0 Hardened Web Application developer.

Web Applications are Changing: 

Web Applications are Changing The Technology is Changing The Terminology is Changing The Metaphor is Changing Different Angles based upon your history and involvement in the industry.


“Internet as a transformative force in business… we see a dynamic, mutually reinforcing convergence.” “Rich client technology can transform the quality and boost the usefulness of Internet applications.” “…a post-browser approach to Internet applications and content.” “…A collection of disruptive trends are combining to create a new platform of opportunity surrounding the new Internet - one that dramatically surpasses the capabilities of the 1.0 Internet, but which at the same time fulfils many of its original promises.” Jeremey Allaire, “Internet Convergence 2.0” Angle 1 : “Convergence”


“Take a 49¢ cup of coffee and serve it at Starbucks and customers will pay anywhere from $2 to $4 per cup! Why, because the customer is engaged in an experience - a series of memorable events that engage the consumer in a very personal way.” “Forrester Research found that investments in the user experience can deliver as much as 250% Return On Investment (ROI) in online commerce applications and significantly lower the cost of deploying enterprise-packed applications.” Al Ramadan VP of Marketing, Macromedia. Angle 2 : “Experience Matters”


“Good User Interfaces are Invisible” - Alan Cooper “About Face” Good User Interfaces are about what you are working on. The Data is central and there are tools, palettes, and widgets to manipulate it. Conceptual Model of Desktop Applications has evolved to focus on Views around Data. Angle 3 : Web Apps are Becoming Data-Centric


Web applications are being replaced by Next Generation Desktop Applications. Desktop Applications are better for business productivity than Web Applications. Angle 4 : Desktop Applications are replacing Web Applications


No Pages Event driven programming Data Binding Business logic in client, some moving from server. This is essentially Flash Application Development. Web Developers know how to develop Enterprise Internet Applications, they now have better tools. Web Developers need to re-tool


Let’s get real… Matt Chotin’s Blog on Large Datasets Software Engineer on Flex Team Problem : How do you give your customers a way of working with large amounts of data which makes sense to them? A Concrete Example


Enterprise Applications Customers, Invoices, Purchase Orders, Press Releases, Software Releases, Bugs, Issues, Support Tickets, News Items, Version of News Items 10,000 + items is the standard <cfoutput query=“#qCompanyInvoices#”> </cfoutput> GOOD LUCK Traditional Web Applications Just Don’t Cut it… Large Amounts of Data


Explicit vs. Implicit Paging Web vs. Desktop Explicit Paging - Web Page Implicit Paging - View Port Google vs. Explorer


Google – Explicit Paging


Explorer - Implicit Paging


No paging Let’s break the datagrid! 1000 Rows = 4 Seconds 5000 Rows = Bye Bye Flash… Example 1- No Paging


System Architecture Presentation Tier - Flex Business Tier - Flash Remoting Calls Integration Tier - ColdFusion / J2EE Wrapper Architectural Analysis


Value Object (Transfer Object) “An object whose conceptual identity is based on a combination of values of its properties. “ Data Object Used to transfer data between tiers Pattern Analysis : Census Entry VO


ValueListHandler (Core J2EE Pattern) Stateless Version (Non-Iterator) Implemented in a CFC : CensusService Pattern Analysis : ValueListService


Conceptual model : “I want to see pieces of data.” (Google) Page Selector Custom Component Select page links to retrieve data The selector does most of the work Code Review Example 2 – Explicit Paging


Visible Area of Conceptual Space Perform operations which maintain conceptual model Navigation Selection Sorting View Port


Conceptual model : “I want to see all of my data.” (Explorer) Datagrid wired to Custom Data Provider Census Data Service Locator Ad-hoc server calls in the background. Example 3 – Basic Implicit Paging


The data provider API <mx:DataGrid id="dg" widthFlex="1" heightFlex="1" vScrollPolicy="on" dataProvider="{dp}"> </mx:DataGrid> public function getItemAt(index : Number) { var item = data[index]; if (item == null) { item = miss(index); } return item; } Public function miss()… //if the page is not loaded call for it //var call = dataService.getElements(page * pageSize, pageSize, this); var call = dataService.getSortedElements(page * pageSize, pageSize, sortField, sortAscending, this); The SimplePagingDataProvider The data provider API is a set of methods and properties that a class must implement so that a Flex component recognizes it as a data provider.


Conceptual model : “I want to manage all of my data.” Sorting - Capture Column Reordering Events Selection - Query Server and reselect after sort Code Review Example 4 – Full Implicit Paging


Sorted Value List Handler Pattern (Stateless) Add sorting : getSortedElements Add selection : getSortedElementPosition Refactoring : Sorting and Selection


Example 4 Cont


Internal Architecture

Q & A: 

Q & A Pub not far away…

authorStream Live Help