MashZone NextGen 10.2 | Appendix | Legacy Presto components | Mashables and Mashups | Mashups in EMML | Writing Mashups in EMML | Declaring Data Sources
 
Declaring Data Sources
 
Named Datasources versus the Default Datasource
Explicitly Defining the Connection
Dynamic Connections
Working Samples
<datasource>
If your mashup script invokes SQL queries or statements directly, you typically refer to named datasources that have already been configured in the MashZone NextGen Server called implicit datasources. If needed, you can explicitly declare a <datasource> with connection information for a database directly in the mashup script. You can use several named datasources in a mashup script as well as a single, explicitly declared, default datasource.
The advantages, disadvantages and configuration requirements for implicit and explicit datasources include:
Datasource
Advantages
Disadvantages
Configuration
Implicit
Configured in the MashZone NextGen Server by MashZone NextGen administrators.
Tip: It is a best practice to use implicit datasources.
*Single, consistent configuration.
*Easily managed in clustered environments.
*Credentials for database access are secure (encrypted in the MashZone NextGen Repository).
*Supports 'hot' updates to drivers without restarting the MashZone NextGen Server.
*Does not support dynamic connection information.
Connection and credential information is static in the MashZone NextGen Repository.
Explicit
Declared in the mashup script using the <datasource> element.
*Can support dynamic connection information or credentials using MashZone NextGen attributes or input parameters to the mashup script.
*Credentials and connection information is less secure, as clear text within the mashup script or defined as input parameters or MashZone NextGen attributes.
*Configuration is in individual mashup scripts, and thus harder to manage and maintain consistency.
*If datasources are named, connection information must be consistent across all mashup scripts in the MashZone NextGen Repository.
You must add and configure drivers in the MashZone NextGen Server for explicit datasources. See Configuring Datasource Drivers for instructions.
Using implicit named datasources in EMML is a best practice. See also Named Datasources versus the Default Datasource for more information.
See Explicitly Defining the Connection and Dynamic Connections for instructions on declaring datasources explicitly. See Working Samples for information on mashup samples for datasources.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release