- ホーム
- > 洋書
- > 英文書
- > Computer / General
Full Description
IBM's Best-Selling Guide to XPages Development-Now Updated and Expanded for Lotus Notes/Domino 9.0.1XPages instantly revolutionized Notes/Domino application development, and the newest versions deliver unprecedented performance and flexibility. Now, the popular insider's guide to XPages development has been updated and expanded to reflect all these improvements, through IBM Notes/Domino 9.0.1 and beyond.Three key members of the IBM XPages team have brought together comprehensive knowledge for delivering outstanding solutions. They have added several hundred pages of new content, including four new chapters. Drawing on their unsurpassed experience, they present new tips, samples, and best practices reflecting the platform's growing maturity. Writing for both XPages newcomers and experts, they cover the entire project lifecycle, including problem debugging, performance optimization, and application scalability.This second edition of Mastering XPages fully addresses enhancements to the XPages data sources for Domino views and documents; the latest XPages mobile library; the new Domino Designer Server-Side JavaScript debugger; and improvements to integrated technologies such as Dojo and CKEditor.Nearly every chapter contains at least one downloadable sample application, offering extensive hands-on practice. This guide concludes with complete references to XSP tags, relevant Java/JavaScript classes, and XSP style classes.Coverage includes* Understanding XPages' development paradigm, tooling, runtime framework, and application architecture* Configuring Domino Designer and integrating XPages Extension Library* Constructing application logic and using data binding controls* Reading/writing Notes documents: from use cases to design properties* Using Views, including examples of accessing calendars via REST* Making the most of Notes/Domino 9.0's new DataView control* Coding: from the basics to fully customized behavior* Advanced scripting: AJAX, Dojo, @Functions, managed beans, and more* Extending the Rich Text Editor's functionality* Building and consuming new controls with Extensibility APIs* Taking web applications offline in the Notes client* Building mobile apps: controls, design patterns, and best practices* Debugging Server-Side JavaScript with Domino Designer 9.0* Creating apps that look and work great-for local and global audiences* Systematically optimizing performance and scalability* Protecting data and users: leveraging Domino and Notes security models
Contents
Foreword xxiiiPreface xxviiPART I: GETTING STARTED WITH XPAGESChapter 1 An Introduction to XPages 3XPages Fundamentals 3Onward and Upward: A Path of Continuous Improvement 4The XPages Development Paradigm 8The More Things Change, the More Things Stay the Same 10New Horizons 11Conclusion 12Chapter 2 Getting Everything You Need 13Downloads, Versions, and Locations 13Installing Domino Designer 14Installing Client Fix Packs 14Client Configuration 15Quick Tour of Domino Designer 16Domino Designer Home Page 17Domino Designer Perspective 17Creating a New Application 19Creating an XPage 20Previewing in the Notes Client 21Previewing in a Web Browser 22 Adding a Control to an XPage 24Working with the XPages Extension Library 26Some Quick Notes on Extension Library Structure 30Conclusion 32Chapter 3 Building Your First XPages Application 33Laying the Foundations 34Forms and Views 36Building an XPages View 41Completing the CRUD 47Conclusion 53PART II: XPAGES DEVELOPMENT: FIRST PRINCIPLESChapter 4 Anatomy of an XPage 57What Exactly Is an XPage? 58Understanding XSP Tag Markup 59Getting Started with XML 59XPages XML Syntax 62Simple Properties 63Complex Properties 64Complex Values 66Computed Properties 67Data Binding 72XPages Tags 72Data Sources 73Domino Document 73Domino View 74Data Context 75Controls 76Editing Controls 77Command Controls 82Selection Controls 85Display Controls 94File-Handling Controls 95Containers 98Panel 98Table 101View 102Data Table 105Repeat 106Include Page 109Tabbed Panel 110Section 111XPage Resources 111JavaScript Library 112Style Sheet 114Resource Bundle 115Dojo Module and Dojo Module Path 116Generic Head Resource 116Metadata Resource 117Converters 118Validators 121Simple Actions 128Client-Side Scripting 134HTML Tags 136Extension Library 137Dynamic Content 138Change Dynamic Content Action 142In Place Form 143Dialog, Dialog Context, and Dialog Button Bar 147Tooltip Dialog 150JSON RPC Service (Remote Service) 154Conclusion 156Chapter 5 XPages and JavaServer Faces 157What Is JavaServer Faces? 158JSF Primer 159How Does XPages Extend JSF? 166XML-Based Presentation Tier 169Request Processing Lifecycle 169User Interface Component Model 170Standard User-Interface Components 176Value Binding and Method Binding Expression Evaluation 179XPages Default Variables 182Conclusion 186Chapter 6 Building XPages Application Logic 187Adding Application Logic 187Using the xp:eventHandler Tag 190Simple Actions 198Change Document Mode 198Confirm Action 199Create Response Document 200Delete Document 201Delete Selected Documents 202Execute Client Script 203Execute Script 204Modify Field 205Open Page 205Publish Component Property 207Publish View Column 208Save Data Sources 209Save Document 211Set Component Mode 213Set Value 214Action Group 215Send Mail 217Change Dynamic Content 219Move to Application Page 220Using JavaScript with XPages 220Server-Side JavaScript 221Client JavaScript 240Conclusion 250PART III: DATA BINDINGChapter 7 Working with Domino Documents 253Domino Document Data Source 254Creating and Editing Documents 257Controlling URL Parameter Usage 258Creating Response Documents 258Executing Form Logic 263Managing Concurrent Document Updates 266Multiple Document Data Sources 272Document Data Source Events 274webQuerySaveAgent 278Common Data Source Properties 282Miscellaneous Data Source Properties 282Working with Domino Documents-Programmatically! 283Simple Actions 283JavaScript 284Rich Documents 286Conclusion 291Chapter 8 Working with Domino Views 293databaseName Property 295View Data Source Filters 296categoryFilter Property 297Full Text Search Properties 299parentId Property 304ignoreRequestParams Property 305keys, keysExactMatch Properties 306Other View Content Modifiers 309startKeys Property 310expandLevel Property 310A Page with Two Views 312requestParamPrefix Property 313When Is a View Not a View? 314Go Fetch! Or Maybe Not 315loaded, scope Properties 316postOpenView, queryOpenView Properties 316Caching View Data 318Sorting Columns 323Combining Searching and Sorting 323Accessing Calendar Data 326The XPages Calendar REST Service 327The iNotes Calendar Control 330Conclusion 336Chapter 9 Beyond the View Basics 337Pick a View Control, Any View Control 337The View Control: Up Close and Personal 340Column Data Like You've Never Seen Before 341Simple View Panel Make Over 343Working with Categories 357View Properties and View Panel Properties 366Data Table 370Building a Mini Embedded Profile View Using a Data Table 376Repeat Control 381A Repeat Control Design Pattern 383Nested Repeats 384The Rich Get Richer 386Data View 387Configuring a Basic Data View Control 389Using More Advanced Data View Control Features 392Some Fun with the Pager 395Conclusion 398PART IV: PROGRAMMABILITYChapter 10 Custom Controls 401Divide and Conquer 402Getting Started with Custom Controls 403Using Property Definitions 411Property Tab 415Validation Tab 417Visible Tab 419Property Definitions Summary 420Using the compositeData Object 421Send and You Shall Receive 427Multiple Instances and Property Groups 430Custom Control Design Patterns 432Aggregate Container Pattern 432Layout Container Pattern 433Conclusion 441Chapter 11 Advanced Scripting 443Application Frameworks 443AJAX and Partial Refresh 444Partial Refresh: Out-of-the-Box Style! 445Partial Refresh: Doing-It-My-Way Style! 453Event Parameters 460Dojo Integration 463dojoTheme and dojoParseOnLoad Properties 463dojoModule Resource 464dojoType and dojoAttributes Properties 466Integrating Dojo Widgets and Extending the Dojo Class Path 466Working with Traditional Notes/Domino Building Blocks 478Working with @Functions, @Commands, and Formula Language 479Working with Agents, In-Memory Documents, and Profile Documents 482Managed Beans 490Fulfilling a Customer Requirement: A Practical Field Study 496Comparing Apples with Apples! 497Who, What, Where, and (More Important) How? 503Conclusion 536Chapter 12 XPages Extensibility 537How to Create a New User Interface Control 538Example Component 539Let's Get Started 540Create the Initial Application 540Add Package Explorer to the Domino Designer Perspective 541Add a Java Source Code Folder 543Building a Component 544Create a UI Component Extension Class 545Create Tag Specification (.xsp-config) for the UI Component Extension 547Create a Renderer and Register It in the Application Configuration(faces-config.xml) 551Quick Test Application to Verify Everything Is OK So Far 554Working with Component Properties 555Component Properties and Attributes 555Adding a Property to a Component 556State Holder: Saving State Between Requests 556Specifying Simple Properties 557Inheriting xsp-config Properties 558Create the Initial xsp-config Definitions 562Create base.xsp-config 562Create an Interface to Match the Group Property Definition in base.xsp-config 565Revisit the Component Properties in Domino Designer 568Specifying Complex Properties 568Complete the xsp-config for the UISpinner Component 579Complete the UI Component Extension, UISpinner 588Complete the Renderer UISpinnerRenderer 591Create a Sample Application Using the UISpinner Component 597Take Your New UI Component Extension for a Test Drive 597Create a Backing Bean 597Register the Backing Bean 600Create the Final Test Application 600Nice Look and Feel 604Test to Ensure That It All Works! 604Where to Go from Here 605XPages Extensibility API Developers Guide 605XPages Extension Library 606IBM developerWorks 606Conclusion 606Chapter 13 XPages in the Notes Client 607Think Inside the Box 608Getting Started with XPages in the Notes Client 6103, 2, 1...Lift Off 612Bookmarks 614Working Offline 616One of These Things Is Not Like the Other 619Other Subtle Differences 621Extended Client-Side JavaScript Commands 624XPages: A Good Notes Citizen 632Introducing enableModifiedFlag and disableModifiedFlag 634Keeping Tabs on Your Client Apps 637Notes Links Versus Domino Links 641Some XPiNC Debugging Tips 645Optimizing XPages for Notes 649Single Copy XPages Design Meets Preload 652XPages RunOnServer 657XPages and Composite Applications 664Making a Component of an XPages Application 664Is Anyone Out There? Creating a Component that Listens to Your XPages Component 666Assembling a Composite Application: Aggregating the XPages Discussion Component and Notes Google Widget 668Hey, This Is a Two-Way Street. A Component May Receive and Publish Events 672Further Adventures with Composite Applications 675Chapter 14 XPages Mobile Application Development 677Getting Started with Mobile Application Development 678Safari Browser 680Chrome Browser 681Firefox Browser 682User Agent Device Detection 682Device Bean 683Single Page Application Design Pattern 685Mobile XPage Properties 686Single Page Application Control (xe:singlePageApp) 687Mobile Application Navigation 688Navigator 690Hierarchical Navigation 692Context-Sensitive Navigation 694Interacting with a Mobile Application 697Orientation-Based Interaction 697Touch-Based Interaction 701Multitouch-Based Interaction 702Mobile Themes 703Data View 704Outline 706Form Table 706Styling XPages Controls for Mobile Applications 707Debugging Mobile XPages 710Debugging XPages on iOS 711Debugging XPages with Web Inspector Remote (aka weinre) 713XPages Mobile Extensions 716Infinite Scrolling 717Single Page Application Wizard 718Summary 724Chapter 15 XPages Unplugged and Debugged 725Debugging XPages Apps on the Server Side 726Printing, Dumping, and Logging 726try / catch / finally 729Introducing the SSJS Debugger 735Using the Java Debugger 748Enabling XPages Java Logging 755Debugging XPages Apps on the Client Side 759CSJS Debuggers 760Debugging Dojo 762Conclusion 765PART V: APPLICATION USER EXPERIENCEChapter 16 XPages Theming 769It Used to Be Like That...But Not Anymore 769Styling with Style 771Setting the Style Property Manually 776Understanding How the Style Property Is Used 777Computing the Style Property 778Styling with Class 779Getting Something for Nothing 779Understanding How the styleClass Property Is Used 785Computing the styleClass Property 788Working with Extended styleClass and style Properties 790Theming on Steroids! 794What Is a Theme? 794What Can You Do with a Theme? 795Understanding Theme Architecture and Inheritance 796Working with a Theme 804Theme Resources 814Resource Paths 824Theme Properties, themeId, Control Definitions, and Control Properties 832Conclusion 848Chapter 17 Application Layout 849Divide and Conquer 849Application Layout: One Easy Way 850Application Layout: Customizing the Content Area 865Conclusion 870Chapter 18 Internationalization 871Using Localization Options 872Localization with Resource Bundle Files 873Setting Localization Options 874Testing a Localized Application 877Working with Translators 878Merging XPage Changes 881Gotchas! 883Localizing Computed Expressions and JavaScript 885Adding a Resource Bundle 887Localizing Computed Expressions 889Localizing Client-Side JavaScript 889Localizing Script Libraries 890Server-Side Script Libraries 890Client-Side Script Libraries 891International Enablement 893Locales in XPages 894Deprecated Locale Codes 898Localizing Computed Fields 900Conclusion 901PART VI: PERFORMANCE, SCALABILITY, AND SECURITYChapter 19 A First Look at Performance and Scalability 905Golden Rules 906Understanding the XPages Request Processing Lifecycle 908GET-Based Requests and the XPages Request Processing Lifecycle 909POST-Based Requests and the XPages Request Processing Lifecycle 910Reducing CPU Utilization 912GET-Based Versus POST-Based Requests 912Partial Refresh 917Partial Execution Mode 919Reducing Memory Utilization 923HTTPJVMMaxHeapSize and HTTPJVMMaxHeapSizeSet Parameters 924xsp.persistence.* Properties 925dataCache Property 926Conclusion 928Chapter 20 Advanced Performance Topics 931Making Efficient XPages Requests 931Profiling XPages Applications 932Introspecting XPages Requests Using a PhaseListener 949The Myths and Realities of the Rendered and Loaded Properties 964Using Partial Refresh, Partial Execution, and Dynamic Content 981Making Scalable XPages Requests 1004Understanding the XPages Memory Model 1005Analyzing XPages Memory Usage 1008Establishing the Optimal Scalability Configuration 1020Conclusion 1034Chapter 21 Security 1035Notes/Domino Security and XPages 1035Server Layer of Security 1036Application Layer of Security 1037Design Element Layer of Security 1039Document Layer of Security 1046Workstation ECL Layer of Security 1048Useful Resources 1049Now Get Started 1049Creating the Initial Application 1049Implementing ACLs 1051Sign the XPages with Your Signature 1052Programmability Restrictions 1053Sign or Run Unrestricted Methods and Operations 1054Sign Agents to Run on Behalf of Someone Else 1055Sign Agents or XPages to Run on Behalf of the Invoker 1055Sign Script Libraries to Run on Behalf of Someone Else 1055Restricted Operation 1056XPages Security Checking 1057NSF ClassLoader Bridge 1058XPages Security in the Notes Client 1058Execution Control List (ECL) 1059Active Content Filtering1062Public Access 1065Setting Public Access for XPages 1065Checking for Public Access in XPages 1066SessionAsSigner 1067Enabling Extended Java Code with the java.policy File 1069Conclusion 1071PART VII: APPENDIXESAppendix A XSP Programming Reference 1075XSP Tag Reference 1075XSP Java Classes 1076Notes/Domino Java API Classes 1078XSP JavaScript Pseudo Classes 1078Appendix B XSP Style Class Reference 1081XSP CSS Files 1081XSP Style Classes 1082IBM OneUI Themes and Documentation 1086Appendix C Useful XPages Sites on the Net 1087Index 1089