Download presentation
Presentation is loading. Please wait.
Published byCornelius Ball Modified over 8 years ago
1
Representing Tabular Data in Alfresco Share “Smooth Like Butter” Gary Cox Blue Fish Development Group
2
Introduction “Smooth Like Butter” A real world solution for displaying tabular data in Share Discuss challenges of representing tabular data within Alfresco Share Making it easy to enter, view, and retrieve tabular metadata Minimizing the customizations required to Alfresco Review an Alfresco 3.4 deployment where we helped a client solve their data modeling challenge Review not only the solution we chose, but the potential solutions that we didn’t choose
3
Agenda Objectives of this Presentation Overview of the challenges our client faced for modeling, entering, viewing and reporting their data Show some examples of their actual forms Discuss the different architectures that we investigated – and why we rejected them Demo Screenshots of the actual deployed solution Running examples of a both nested and non-nested tabular data Review the architecture of the customization so you can make use of this on your own (code samples provided, too)
4
Who is Blue Fish? Alfresco Platinum Partner Focused on ECM for 13 years Document Management and Collaboration Custom Application Development Content Migrations Client Base Global 2000 Growing Mid-Market Companies Strategic ECM Partnerships Alfresco Contego Ephesoft
5
Background The Client Digitizes oil and gas industry information from a variety of oil field forms Provides data-driven tools and analysis for their clients to make exploration and investment decisions Creating a database of form information, by state, that can be searched by their customers
6
Background Their Requirements Data Management Department 30+ employees Varying experience levels 20-100+ forms per person per day Quality Control Percent reviewed based on data entry experience Added focus on ‘most popular’ items Complex Forms Much of the data is tabular Forms vary by state (with many revisions) Needed to be easy to enter and review Must be easy to extract and process from their external applications
7
An Example Form
11
How Many Ways to Accomplish This? Possible Ways of Modeling this Data “Brute Force” Approach – Create individual properties for every possible field in the table Correlated Repeating Attributes – Use Alfresco’s support for multiple values on properties and correlate them by index position. Hierarchical data – parent-child relationships Completely custom Alfresco Share solution (or even a custom solution outside of Share) Custom data structure using JSON or XML, using jqGrid and jQuery in Share for generating the tabular control
12
Brute Force Approach An Example – Unique Property per Field:
13
Brute Force Approach Pros Easy to create simple properties in a model XML file. No deep customizations to Share required Works well with standard view and edit logic Could use custom FTLs to make fields look more ‘tabular’ Increase number of columns Narrow field sizes Cons Could require a huge number of properties to model Adding additional ‘rows’ would require model changes Can’t really remove ‘rows’ later on during QC Difficulty dealing with subgrids Advanced Searching within this data could be difficult
14
Correlated Repeating Attributes An Example – Each Column is a Property:
15
Correlated Repeating Attributes Pros Easier to model The row for a field is determined by position Can handle inconsistent number of rows per form Cons Empty or null values are a big problem (may have to use some sort of token) By default, data entry would be ‘non-tabular’ in nature – would need to customize share Nested grids could not be modeled
16
Hierarchical Data An Example – Rows are Objects:
17
Hierarchical Data Pros Would use content objects for form elements Easy to deal with for future Alfresco upgrades Cons Would introduce complexities of transaction and node association management Would have to develop custom view/edit functionality in Share to deal with multiple objects Date entry would potentially require a guided wizard approach Note: The possibility of component relations was considered for Swift, so this type of architecture could become feasible in a future release
18
Custom Java Solution Highlights Bypass Alfresco Share for data entry Form fields custom Custom back end code leveraging Alfresco API
19
Custom Java Solution Pros Flexibility to present fields however required Could possibly be displayed outside of Share Cons Potentially lose some benefits of Share Potentially difficult to upgrade Expensive Potentially long development cycle
20
Model with JSON or XML An Example – Simple and “Extended” Properties: Attribute NameData TypeValue NDICNumberLong19355 WellNameTextSikes State WellNumberText43-16H CasingTubulars*Text{"casingTubulars" : [{"Well Bore" : "Lateral1", "Type" : "Surface", "Size" : "9 5/8"}, {"Well Bore" : "Lateral1", "Type" : "Production", "Size" : "7"}, {"Well Bore" : "Lateral1", "Type" : "Liner", "Size" : "4 1/2"}]} WellStimulations*Text{"wellStimulations" : [{"Date Stimulated" : "9/1/2011", "Stimulated Formation" : "Bakken", "Top" : "9950", "Volume" : "30045"}, {"Date Stimulated" : "8/1/2010", "Stimulated Formation" : "Rocky", "Top" : "8300", "Volume" : "12003"}, {"Date Stimulated" : "7/1/2009", "Stimulated Formation" : "Bakken", "Top" : "2400", "Volume" : "9230"}]} * Represents “extended” attributes
21
Model with JSON or XML Pros “Extending” existing datatypes Greatly reduces server side customizations Removes issues of managing transactions for hierarchical objects Can leverage the out of the box features of Alfresco content objects Lifecycle Node Operations Cons Custom API required for extracting data Some limitations to search functionality Does require custom Share form controls
22
What did we decide? And the winner is… Based on this review, we chose to go with the following architecture: Use combination of Regular and “Extended” attributes Data stored as JSON Create custom control in Alfresco Share to display data Custom FTL control Custom JavaScript JavaScript utilizes jqGrid and jQuery Create web scripts for retrieving metadata from Alfresco Retrieved data formatted as JSON
23
Demonstration A Demonstration of the Customizations Screen shots of some of the actual forms from the Alfresco 3.4.x installation A live demonstration on Alfresco 4.1.1 of two straightforward examples Non-nested tabular data Nested tabular data A demonstration of the web scripts that retrieve the data
24
DEMO
30
Architecture
31
Logical Architecture
32
Custom Components Schema Definition File Each extended field has its own schema FreeMarker template (FTL) control points to its schema using a parameter XML file Defines several parts of the tabular grid Column definitions with data type Validators Pop-up entry form
33
Custom Components Override Form Head FTL Additional CSS files JavaScript includes for required jqGrid libraries and custom JavaScript controller
34
Custom Components Tabular Grid Control FTL Custom Share Form control Overrides the default control for the data type Parameter references the appropriate schema as well as grid size
35
Custom Components Custom JavaScript Controller that is responsible for building the grid Also adds validators Controls display of the fields (valid, invalid, etc.) Overrides the default control for the data type Parameter references the appropriate schema as well as grid size
36
Custom Components Custom Web Scripts Package metadata into JSON output The examples here are simple (pull all nodes from a given site), but for our client we use date range queries.
37
Yes… You Can Try this at Home… Build this and Try it Out Basic code example provided that includes all of the structure Should work in 3.4.x, 4.0.x, or 4.1.x Includes both Alfresco Repository models and Share Customizations A simple, standalone grid example has also been provided to demonstrate jqGrid A good intro to jqGrid is provided here: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jqgrid docshttp://www.trirand.com/jqgridwiki/doku.php?id=wiki:jqgrid docs
38
Questions
39
Thank you! For more information about this client deployment, check out our webinar: http://tinyurl.com/bp7xwu4
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.