Professional Documents
Culture Documents
Pentaho CTools
This page intentionally left blank.
Contents
Overview .............................................................................................................................................................. 1
Setting Up CTools Best Practices ................................................................................................................... 1
Use Version Control ....................................................................................................................................... 1
Use CTools That ships with a Pentaho GA release .................................................................................... 1
Use Controlled Desktop Developing ........................................................................................................... 2
Development Processes Best Practices........................................................................................................ 2
Use a Full-Range Implementation Approach.............................................................................................. 2
Create Functional Breakdowns from Mockups.......................................................................................... 3
Avoid Extra Requests ..................................................................................................................................... 3
Use Necessary Components ......................................................................................................................... 3
Avoid Complex Logic in Components.......................................................................................................... 3
Get CTools Development Assessment ........................................................................................................ 4
Use CDE Templates for Multi-Dashboard Development .......................................................................... 4
Avoid CDE Inline Images................................................................................................................................ 4
Add Text with Text Component.................................................................................................................... 4
Use Default Bootstrap Framework .............................................................................................................. 4
Avoid Defining Styling Properties with CDE ................................................................................................ 5
Use a Consistent File Naming Convention.................................................................................................. 5
Avoid Complex Layout Structure ................................................................................................................. 5
Avoid Freeform for Layout and Components ............................................................................................ 5
Use Default Dimensions on Layout Columns ............................................................................................ 5
Encapsulate Your Layout Grid ...................................................................................................................... 6
Tips on CSS/JS Files ........................................................................................................................................ 6
Tips for the Datasources Perspective .......................................................................................................... 6
Options for Dropdown Selectors ................................................................................................................. 6
CCC Documentation and Customizing Charts ........................................................................................... 6
Consider Original Goal of Table Add-ins ..................................................................................................... 7
ETL, Data Modeling, and Queries - Best Practices ......................................................................................... 7
Use the Functional Breakdown to assess Query Necessities................................................................... 7
Optimize the Cache Layers ........................................................................................................................... 7
Use the Same Names for CDE and CDA Variables ..................................................................................... 7
Contents, cont'd
Embedding - Best Practices .............................................................................................................................. 8
Iframe Integration for CTools and Pentaho plugins .................................................................................. 8
RequireJS for Native HTML integration ....................................................................................................... 8
Look for Hidden/Different Visual Content .................................................................................................. 8
Overview
We are providing this collection of best practices and tips to help you implement CTools
Dashboards, so you can achieve solutions with little or no customization, and get to production with
minimal maintenance.
These topics are not presented in any specific order, and provide little detail about how to build a
dashboard. Your training materials and tutorials will have this information.
Software Version
Pentaho 5.4, 6.x, 7.0
Rationale: Although CDE rewrites text-based CTools files whenever they are saved, they are
best managed when we can access the edit history in a multi-developer environment. These
dashboard files need to be synchronized from the VCS file system into the Pentaho BA
Jackrabbit solution repository.
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="http_access." suffix=".log"
pattern="%t|%a|%m|%p|%U|%q|%s|%S|%u|%D|%T|%B|%{User-
agent}i|%{Referer}i|%A|%{Content-Type}o" resolveHosts="false"/>
Rationale: Different versions for different CTools may clash with the API calls among other
resources. Stable releases may include bug fixes at a faster pace than Pentaho BA servers
updates are released. The Trunk version of CTools is not supported nor encouraged for
production environments.
Rationale: Being capable of working locally from a virtual machine will speed up the
development gaps. This also makes sure that non-tracked changes performed by third
parties on the customer server are not carried over to your environment.
Rationale: Functional analysis is needed to assess which pieces of each solution mockup
may require custom development or present other challenges. It is also a crucial piece to
ensure an AGILE development and review of your total effort.
Rationale: Complex dashboards can have many requests with many drilldowns. Focus on
loading the paramount pieces and use compound queries. They are leveraged from the
backend side, to group some KPI or detail boxes that could be fed from one single query.
<category name="org.springframework.security.event.authentication">
<priority value="WARN"/>
</category>
Rationale: Components often depend on requests, and may slow down your memory.
<rollingPolicy
class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
<param name="FileNamePattern"
value="/home/pentaho/pentaho/server/biserver-ee/pentaho.log_%d{yyyy-
MM}.gz"/>
</rollingPolicy>
Rationale: If you follow the natural life cycle of CDF, by using listeners and firechanges to
broadcast parameter changes, you will avoid spaghetti-code, which makes it more difficult
to diagnose unforeseen or wrong states in your dashboard.