building org charts using cascade server
DESCRIPTION
#CSUC14TRANSCRIPT
CREATING ORG CHARTS USING CASCADE SERVER
Josh LaMar
• Web developer at Indiana University• Using cascade server for 4 years• Attended CSUC 2013• Rock climber/Runner/Beer Enthusiast
Presentation structure
• Problem• Design• Technical Implementation• Additional Features• End Results
At IU org charts are done in PDF or exported as
an image and embedded on a webpage and
this is a common practice on the web
But they take a lot of TIME to create by hand
So we asked… “Why not dynamically create and publish the charts using Cascade?”
So we did and it’s fantastic!
Design
• Tree org chart didn’t work for web version
• We designed a new kind of org chart
• Used the foundation framework to leverage grids
• Currently displaying 4 levels (associate vice president, director, manager, and staff)
PDF Version
Web version
Data Definition & Hierarchy
• There are 4 content types for each level:
• division • unit,• team• staff
• Division, unit and team have page choosers
• Using a top-down approach (a division has 1 or more units, a unit has 1 or more teams and a team has 1 or more staff)
PHP and WebservicesCascade Webservices API is used to update, create and move staff pages and add/remove staff from teams.
PHP is used to access the API and is also used to send email notifications when a person is added and removed from a team.
AJAX & JSON
On team pages I’ve added the ability to add and remove staff while previewing pages
When button is pressed, AJAX call is made to get JSON callback function. Works with cross-domain requests.
HR Database
Staff information is updated nightly from an external HR database• Name• Email• Phone• Campus/address• Current employee?• Role/title
Velocity
• Personally prefer velocity because conceptually I like to define variables up-front
• For-each loops are clean and easy to read
• Made use of locator tool to get parent level (for linking)
• It’s easy to distinguish velocity from markup
• Easy to define/use functions (macros)
• Can even sort data
Managing accessAccess to folders pages is done by group.
Setup application to manage group membership.
PHP and Webservices are used to update groups in Cascade
Publishing to MySQL
We setup a Transport to publish to a MySQL database
All pages are published to the database so we can generate the XML for a staff listing page (that already existed outside of WCMS) and expected a specific XML format.
Generate Lists for ListservEach staff page has checkboxes for the lists they belong to
Then lists are published nightly so HR can update the listserv with the new lists.
Contributor FeedbackFeedback from contributors has helped us make improvements such as add/remove controls from the preview page (rather than going into the edit screen).
The system is used by roughly HR, administrators of each division and campus, as well as directors and managers of teams
End Results (Web Sites)
• it.iu.edu/structure
• uits.iu.edu/staff_list