Connections customization best practices
Overview
Most of the changes made to product files are stored in the customization directory, defined by the WAS variable...
CONNECTIONS_CUSTOMIZATION_PATH
IBM recommends making customization changes within the customization directory only. Changes that cannot be made using the customization directory are known as product modifications.
Types of changes we can make using the customization directory include:
- Changes to static files, such as images, CSS, HTML, and text files.
- Changes to real files, that is, files that are not generated at runtime and which get served directly to the browser.
- Changes to JSP files using a standard include request, for example...
<jsp:include page="myjspfragment.jspf" .../> and <c:import url= myjspfragment.jspf/>
The following types of change cannot be made using the customization directory:
- Changes to JSP files using the JSP include directive. For example:
<%@ include file="myjspfragment.jspf"%>
- Changes to files within a *.jar file.
For example, adding custom strings to the ui.properties file in the lc.profiles.web.app-3.0.jar archive to customize error messages for field validation.
- Changes to Java classes (Java class files).
- Changes to TAG files. These files are used in the Communities and Forums applications.
- Changes to TLD files.
- Changes to most XML configuration files in the WEB-INF directory. This includes web.xml.
Customization guidelines
- Keep the customization directory under source control to allow you to maintain it and track the changes over time.
- Copy only the resources files to modify to your customization directory. This makes it easier for you to track which files you changed and when.
- Always add comments to the customized files to describe where and why changes were made.
- Use a web inspector to help to locate the CSS rules to change. For example, Firebug on Mozilla Firefox, Webkit Inspector on Google Chrome or Apple Safari, or Weinre for Mobile.
- Use documented, public APIs where possible.
- Do not modify JSP files inside web modules or JAR files. Instead, use supported extension points where available, for example, for login pages or error pages, and so on.
- Back up the customization directory before a product upgrade:
- Rename the customization directory to a temporary name.
- Apply the Connections interim fix or fix pack.
- Verify the functionality.
- Compare the updated files to the customized copy and then merge the changes.
- Change the name of the customization directory back to the original name.
- Test the customizations.
Parent topic:
Customizing
Related:
Related: