"Plug-ins" give Logi developers the ability to programmatically extend the functionality of their Logi applications.
The following topics discuss the creation and use of Logi plug-ins:
- Plug-in Elements and Triggering Events
- Using a Plug-in to Modify a Report Definition
- Using a Plug-in to Modify Data
- Creating the Plug-in
Developers can dynamically change the behavior of their Logi applications at runtime through the use of plug-ins. Some of the things that can be done with plug-ins include:
- Modifying report definitions
- Grooming retrieved data by removing extraneous character sets
- Customizing the look and functionality of super-elements, like the Analysis Grid
- Accessing HTTP Request and Session variables
- Accessing resources such as the web server file system and OS services
- Altering the generated HTML output before it's returned to the browser
Writing a plug-in is accomplished with a development tool like Visual Studio or Eclipse and requires competence with an appropriate object-oriented language, such as C#, VB.Net, or Java. Developers who are well-acquainted with
these languages often appreciate an opportunity to leverage their non-Logi skill sets.
A plug-in is included in a Logi application as a .dll (.NET) or .jar (Java) file. The plug-in is loaded as a library along with the application and runs under the application's process on the web server. While a plug-in doesn't necessarily provide any specific performance advantage, it may do so, depending on the circumstances.
Specific elements are used in Logi definitions to call the methods in a plug-in, depending on the actions the plug-in is to carry out, and the calls are triggered by specific events. The elements and triggering events are discussed later.
Generally, information is passed to the special Logi Analytics object used in plug-ins as a string or an XML document. XML document objects and XPath can then be used to manipulate the information.
Examples on DevNet
Examples of plug-in source code are included in the documents referenced at the end of this topic.
In addition, DevNet includes two sample applications, one for .NET and one for Java, that demonstrate how plug-ins are called.
Alternatives to Plug-ins
But first, a reality check: developers considering using plug-ins may want to ask themselves if there is a simpler way to achieve the same results. Logi products offer a variety of ways to customize reports and data that do not require the use of external languages such as Java or C#. They include:
- Elements that can manipulate the data in datalayers after it's been retrieved, see Datalayers. These includes elements that can add datalayer columns with data based on calculations, columns that specifically manipulate date/time data, columns that format the data, columns containing statistical derivations, repeating elements, and more.
- Template and Definition Modifier File technology, which allows developers to dynamically alter super-element interfaces and report definitions. For more information, see Template Modifier Files and Definition Modifier Files.
- Themes, the technology often used to apply an appearance to an application, uses a Template Modifier File and can also be used to apply dynamic changes to definitions, such as setting default attribute values for globalization, language translation, etc. For more information, see Themes.
- The ability to integrate external libraries, such as jQueryand the Bootstrap Framework, to provide extended functionality.
If you're reluctant to tackle a Java or .NET coding project to create a plug-in, you may want to explore these alternatives.