- ホーム
- > 洋書
- > 英文書
- > Internet / General
Full Description
The first complete, practical guide to XPages development - direct from members of the XPages development team at IBM Lotus Martin Donnelly, Mark Wallace, and Tony McGuckin have written the definitive programmer's guide to utilizing this breakthrough technology. Packed with tips, tricks, and best practices from IBM's own XPages developers, Mastering XPages brings together all the information developers need to become experts - whether you're experienced with Notes/Domino development or not. The authors start from the very beginning, helping developers steadily build your expertise through practical code examples and clear, complete explanations. Readers will work through scores of real-world XPages examples, learning cutting-edge XPages and XSP language skills and gaining deep insight into the entire development process. Drawing on their own experience working directly with XPages users and customers, the authors illuminate both the technology and how it can be applied to solving real business problems. Martin Donnelly previously led a software startup that developed and distributed small business accounting software. Donnelly holds a Commerce degree from University College Cork and an M.S. in Computer Science from Boston University. Mark Wallace has worked at IBM for 15 years on many projects as a technical architect and application developer. Tony McGuckin participates in the Lotus OneUI Web Application and iWidget Adoption Workgroup. He holds a bachelor's degree in Software Engineering from the University of Ulster.
Contents
Foreword by Philippe Riand xxPreface xxivPart IXPages 1Chapter 1 An Introduction to XPages 3XPages Fundamentals 3Brand New Technology? 4A Different Development Paradigm 5The More Things Change, the More Things Stay the Same 7New Horizons 7Conclusion 8Chapter 2 Getting Everything You Need 9Downloads, Versions, and Locations 9Installing Domino Designer 10Installing Client Fix Packs 11Client Configuration 11Quick Tour of Domino Designer 12Domino Designer Welcome Screen 13Domino Designer Perspective 14Creating a New Application 15Creating an XPage 16Previewing in the Notes Client 18Previewing in a Web Browser 18Adding a Control to an XPage 21Conclusion 22Chapter 3 Building Your First XPages Application 23Laying the Foundations 24Forms and Views 26Building an XPages View 31Completing the CRUD 36Conclusion 42Part II: XPages Development: First Principles 43Chapter 4 Anatomy of an XPage 45What Exactly Is an XPage? 46Understanding XSP Tag Markup 47Getting Started with XML 47XPages XML Syntax 50Simple Properties 52Complex Properties 54Complex Values 54Computed Properties 55Data Binding 59XPages Tags 60Data Sources 61Domino Document 61Domino View 62Data Context 63Controls 64Editing Controls 64Command Controls 70Selection Controls 74Display Controls 82File-Handling Controls 84Containers 87Panel 87Table 90View 91Data Table 94Repeat 95Include Page 99Tabbed Panel 99Section 100XPage Resources 101Script Library 101Style Sheet 103Resource Bundle 104Dojo Module 105Generic Head Resource 106Metadata Resource 106Converters 107Validators 110Simple Actions 118Client-Side Scripting 125HTML Tags 127Conclusion 128Chapter 5 XPages and JavaServer Faces 129What Is JavaServer Faces? 130JSF Primer 131How Does XPages Extend JSF? 138XML-Based Presentation Tier 141Request Processing Lifecycle 142User Interface Component Model 143Standard User-Interface Components 148Value Binding and Method Binding Expression Evaluation 152XPages Default Variables 154Conclusion 156Chapter 6 Building XPages Business Logic 157Adding Business Logic 157Using the xp:eventHandler Tag 160Simple Actions 167Change Document Mode 168Confirm Action 169Create Response Document 170Delete Document 171Delete Selected Documents 172Execute Client Script 173Execute Script 173Modify Field 174Open Page 175Publish Component Property 176Publish View Column 177Save Data Sources 179Save Document 180Set Component Mode 182Set Value 183Action Group 184Using JavaScript with XPages 186Server-Side JavaScript 186Client JavaScript 206Conclusion 211Part III: Data Binding 213Chapter 7 Working with Domino Documents 215Domino Document Data Source 216Creating and Editing Documents 219Controlling URL Parameter Usage 220Creating Response Documents 220Executing Form Logic 224Managing Concurrent Document Updates 227Multiple Document Data Sources 228Document Data Source Events 231Common Data Source Properties 233Miscellaneous Data Source Properties 234Working with Domino Documents-Programmatically! 235Simple Actions 235JavaScript 236Rich Documents 238Conclusion 242Chapter 8 Working with Domino Views 243databaseName Property 245View Data Source Filters 246categoryFilter Property 246search, searchMaxDocs Properties 249parentId Property 251ignoreRequestParams Property 252keys, keysExactMatch Properties 253Other View Content Modifiers 256startKeys Property 256expandLevel Property 257A Page with Two Views 259requestParamPrefix Property 260When Is a View Not a View? 261Go Fetch! Or Maybe Not... 262loaded, scope Properties 263postOpenView, queryOpenView Properties 263Caching View Data 265Sorting Columns 270Conclusion 271Chapter 9 Beyond the View Basics 273Pick a View Control, Any View Control 273The View Control: Up Close and Personal 276Column Data Like You've Never Seen Before 277Simple View Panel Make Over 279Working with Categories 293View Properties and View Panel Properties 301Data Table 305Building a Mini Embedded Profile View using a Data Table 311Repeat Control 316A Repeat Control Design Pattern 317Nested Repeats 318The Rich Get Richer 320Some Fun with the Pager 321Conclusion 324Part IV: Programmability 325Chapter 10 Custom Controls 327Divide and Conquer 328Getting Started with Custom Controls 329Using Property Definitions 337Property Tab 340Validation Tab 343Visible Tab 345Property Definitions Summary 346Using the compositeData Object 346Send and You Shall Receive 352Multiple Instances and Property Groups 355Custom Control Design Patterns 357Aggregate Container Pattern 357Layout Container Pattern 358Conclusion 365Chapter 11 Advanced Scripting 367Application Frameworks 367AJAX and Partial Refresh 369Partial Refresh: Out-of-the-Box Style! 369Partial Refresh: Doing-It-My-Way Style! 376Event Parameters 384Dojo Integration 386dojoTheme and dojoParseOnLoad Properties 387dojoModule Resource 388dojoType and dojoAttributes Properties 389Integrating Dojo Widgets and Extending the Dojo Class Path 390Working with Traditional Notes/Domino Building Blocks 401Working with @Functions, @Commands, and Formula Language 402Working with Agents, In-Memory Documents, and Profile Documents 405Managed Beans 412Conclusion 419Chapter 12 XPages Extensibility 421How to Create a New User Interface Control 422Example Component 423Let's Get Started 424Create the Initial Application 424Add Package Explorer to the Domino Designer Perspective 424Add a Java Source Code Folder 426Building a Component 428Create a UI Component Extension Class 428Create Tag Specificaton (.xsp-config) for the UI Component Extension 431Create a Renderer and Register It in the Application Configuration (faces-config.xml) 434Quick Test Application to Verify Everything Is OK So Far 437Working with Component Properties 438Component Properties and Attributes 438Adding a Property to a Component 439State Holder: Saving State Between Requests 440Specifying Simple Properties 440Inheriting xsp-config Properties 441Create the Initial xsp-config Definitions 446Create base.xsp-config 446Create an Interface to Match the Group Property Definition in base.xsp-config 450Revisit the Component Properties in Domino Designer 452Specifying Complex Properties 453Complete the xsp-config for the UISpinner Component 464Complete the UI Component Extension, UISpinner 473Complete the Renderer UISpinnerRenderer 477Create a Sample Application Using the UISpinner Component 483Take Your New UI Component Extension for a Test Drive 483Create a Backing Bean 483Register the Backing Bean 486Create the Final Test Application 486Nice Look and Feel 491Test to Ensure That It All Works! 491Where to Go From Here 491XPages Extensibility API Developers Guide 492XPages Extension Library 492IBM developerWorks 492Conclusion 493Chapter 13 XPages in the Notes Client 495Think Inside the Box 496Getting Started with XPages in the Notes Client 4983, 2, 1...Lift Off 499Bookmarks 501Working Offline 503One of These Things Is Not Like the Other 507Other Subtle Differences 508XPages: A Good Notes Citizen 511Introducing enableModifiedFlag and disableModifiedFlag 513Keeping Tabs on Your Client Apps 516Notes Links Versus Domino Links 520Some Debugging Tips 525XPages and Composite Applications 528Making a Component of an XPages Application 529Is Anyone Out There? Creating a Component that Listens to Your XPages Component 531Assembling a Composite Application: Aggregating the XPages Discussion Component and Notes Google Widget 533Hey, This Is a Two-Way Street! A Component May Receive and Publish Events! 536Further Adventures with Composite Applications 540Part V: Application User Experience 541Chapter 14 XPages Theming 543It Used to Be Like That...But Not Anymore! 543Styling with Style! 545Setting the Style Property Manually 550Understanding How the Style Property Is Used 551Computing the Style Property 552Styling with Class! 552Getting Something for Nothing! 553Understanding How the styleClass Property Is Used 559Computing the styleClass Property 561Working with Extended styleClass and style Properties 563Theming on Steroids! 567What Is a Theme? 567What Can You Do with a Theme? 568Understanding Theme Architecture and Inheritance 569Working with a Theme 576Theme Resources 587Resource Paths 597Theme Properties, themeId, Control Definitions, and Control Properties 606Conclusion 620Chapter 15 Internationalization 621Using Localization Options 622Localization with Resource Bundle Files 623Setting Localization Options 624Testing a Localized Application 626Working with Translators 628Merging XPage Changes 631Gotchas! 633Localizing Computed Expressions and JavaScript 636Adding a Resource Bundle 637Localizing Computed Expressions 638Localizing Client-Side JavaScript 639Localizing Script Libraries 640Server-Side Script Libraries 640Client-Side Script Libraries 641International Enablement 643Locales in XPages 644Deprecated Locale Codes 648Conclusion 650Part VI: Performance, Scalability, and Security 651Chapter 16 Application Performance and Scalability 653Golden Rules 654Understanding the Request Processing Lifecycle 655GET-Based Requests and the JSF Lifecycle 656POST-Based Requests and the JSF Lifecycle 656Reducing CPU Utilization 658GET- Versus POST-Based Requests 658Partial Refresh 663Partial Execution Mode 665Reducing Memory Utilization 668HTTPJVMMaxHeapSize and HTTPJVMMaxHeapSizeSet Parameters 669xsp.persistence.* Properties 669dataCache Property 670Conclusion 672Chapter 17 Security 673Notes/Domino Security and XPages 673Server Layer of Security 674Application Layer of Security 675Design Element Layer of Security 677Document Layer of Security 684Workstation ECL Layer of Security 686Useful Resources 687Let's Get Started 687Creating the Initial Application 687Implementing ACLs 689Sign the XPages with Your Signature 690Programmability Restrictions 691Sign or Run Unrestricted Methods and Operations 692Sign Agents to Run on Behalf of Someone Else 692Sign Agents or XPages to Run on Behalf of the Invoker 693Sign Script Libraries to Run on Behalf of Someone Else 693Restricted Operation 693XPages Security Checking 695NSF ClassLoader Bridge 695XPages Security in the Notes Client 696Execution Control List (ECL) 697Active Content Filtering 699Public Access 702Setting Public Access for XPages 703Checking for Public Access in XPages 703SessionAsSigner 704Troubleshooting XPages Java Security Exceptions 706Conclusion 707Part VII: Appendixes 709Appendix A XSP Programming Reference 711XSP Tag Reference 711XSP Java Classes 712Notes/Domino Java API Classes 714XSP JavaScript Pseudo Classes 715Appendix B XSP Style Class Reference 719XSP CSS Files 719XSP Style Classes 720Appendix C Useful XPages Sites on the Net 727Index 729