Web Development with TIBCO General Interface Building AJAX Clients for Enterprise SOA Anil Gurnani /TAddison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Cape Town Sydney Tokyo Singapore Mexico City
Table of Foreword by Michael Peachey Foreword by Luke Birdeau Introduction 1 xiii xiv 1 What Is TIBCO General Interface? Tools and Utilities 11 12 Web Application Model 14 TIBCO General Interface Application 16 General Interface's Performance Edge Compiler in the Browser 17 Rapid Prototyping Tool 2 17 18 Understanding General Interface Architecture Model View Controller Architecture 19 General Interface Application Life Cycle Application Object Model Common Data Format 23 25 26 Commonly Used Classes 27 Application Controller 27 Cache 20 23 JavaScript Framework JavaScript API 19 28 Custom Classes in JavaScript for General Interface XSL Style Sheets Value Templates 29 30 XML Transformers 3 30 Quick Start TIBCO General Interface 33 Building and Packaging Standalone Prototypes Installing TIBCO General Interface Launching Gl Builder 34 36 Internet Explorer 7 on Windows Mozilla Firefox on Windows Mozilla Firefox on Macintosh Gl Workspace 39 Building the Application 41 37 37 39 33 28
viii Deploying General Interface Applications 45 Deploying the Application as a Standalone Prototype Deploying the Application Under IIS Deploying the Application Under Apache Web Server Deploying the Application Under Tomcat Working with XML and XSL XML Transformers 63 XML Mapping Utility 5 65 Component Gallery 73 Component Categories 73 System Components Block 74 75 Containers 77 Form Elements Matrix 84 90 Menus and Toolbars Miscellaneous 107 109 Component Properties 6 57 59 XML/XSL Merge Tool 112 Sharing Assets Across Multiple Applications Advantages of Sharing Components 125 Shared Components in General Interface 126 Building Shared Components with Gl Builder Sample Applications 128 Building the Announcements Panel 128 Building the Customer Service Panel Building the Ad Banner 130 132 Building the Custom Tabbed Pane Editing Component XML Files 133 135 Building the Banking Application Building the Investing Application 136 137 47 48 Deploying the Application as a WAR File Under Tomcat 4 45 47 127 125 49
Object-Oriented JavaScript Extending General Interface Widgets 141 Prototype Inheritance 142 Defining Classes in General Interface 144 Defining Interfaces in General Interface 145 Defining Packages in General Interface 146 General Interface Event Model Best Practices 146 148 Directory Structure JavaScript Files 148 148 Dynamic Class Loading Application-Level Events Sample Code MultiSelectMenu Building a Sample Using MultiSelectMenu Advanced Features of Matrix Rendering Tabular Data 153 157 157 Rendering a Tree Structure Using XML Transformers 159 160 Using Value Templates 162 Using Format Handlers 165 Displaying Controls in Columns 167 Available Controls in Matrix Columns Manipulating Data Dynamically 168 172 Commonly Used Methods of the Matrix Class Sample Applications 174 Integrating with Web Services 177 Web Services Related Standards 177 General Interface and Web Services Building a Web Service Using Java 178 Using.NET 189 Deploying a Web Service 196 Deploying Under Axis2 in Tomcat Deploying Under IIS 178 178 197 196 173 ix
x Developing a Web Service Client Using General Interface 200 Building GUI Screens for the Sample General Interface Client 200 Mapping the Response to CDF Document Mapping Input Fields to Request Messages 10 Integrating with Portals Anatomy of a Portal 203 205 209 210 Portal Value Proposition 211 Aggregation of Content from Various Applications and Sources 211 Federated Search Across All Data Sources Entitlements Private Labeling and Branding Personalization Common Infrastructure Global Reach High Availability Support, Operations, and Monitoring Architectural Considerations Use of General Interface Framework Gl Cache Utilization Namespaces Entering and Leaving the Page Versions of General Interface Using <iframe> Tags Using <div> and <span> Tags 215 216 Installing JBoss Portal 216 Deploying Gl Portlets to JBoss Portal 11 Minimizing Asynchronous Calls Using JSR 168 Integrating with Databases Building the Client 221 Setting Up the Database 226 Integrating Using.NET 227 Integrating Using J2EE 230 221 217
Building a Master/Detail Sample Application Building a Paginated Grid Example 12 237 Integrating with IVIessaging Systems Architectural Considerations Browser Resources 247 247 247 Number of Pending Requests Push Versus Pull 233 Server-Side Thread Server-Side State Message Transformation Message Filtering AJAX-Based Solution Using TIBCO General Interface Installing ActiveMQ Rolling Grid Example 250 Building the Client 252 Building the Complete Application Using Eclipse Publish Subscribe Example 13 268 Integrating with SOA and ESBs Overview of ESB 275 OASIS and OSOA 278 JBI and SCA 275 278 SCA-Based Solutions JBI-Based Solutions TIBCO Active Matrix 279 279 280 Instaling TIBCO Active Matrix Active Matrix Environment 280 281 Active Matrix Service Example 284 Consuming the Response from an AMX Service in General Interface 291 14 Creating Charts in General Interface Charting Components in General Interface Building the StockPrice Example Building the Web Application 298 305 295 295 256 xi
15 Using TIBCO PageBus 311 What Is PageBus? 311 Obtaining PageBus 312 Publishing Messages 312 Subscribing to Messages 313 Using the Store/Query Interface 314 Building the Sample Application 16 Optimizing Performance Measuring Performance 314 323 323 Using the Debug Version 324 Enabling Logging in General Interface Viewing Benchmark Logs 324 324 Identifying and Eliminating Redundant Calls to Render Using Asynchronous Loading Using Dynamic Class Loading Using the Merge Tool Index 328 330 331 Preferring XSLT over JavaScript 331 Using Paging Models in Matrix 331 333 326