Spectra Tips and Tricks b Tips for Spectra
Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A
Spectra Pre-Requisites b Structures: Everything’s a structure b Custom Tags • Passing data in/out • Modular code b Conceptual understanding of WDDX b Request Scope (thread safe)
Request Scope
What is Spectra? b Content Object Database (CODB): An object-based data storage built in relational tables. b Tags to interact with CODB • 200+ Tags in about 20 groupings b Webtop: A fancy Spectra application • Admin interface • User interface
Three Parts of Spectra
Content. Object Database
Spectra: the same but different b DB Design and Spectra Object Design are similar enough to be familiar but different enough to be potentially confusing b Gains • Fast for getting complete objects • Linking data with methods b Losses • Flexible relational access
Spectra vs Cold. Fusion b Spectra IS Cold. Fusion b ALL of Cold. Fusion functionality is available within Spectra applications • CF Tags • Functions • Database connections
Spectra: All or Nothing? b Spectra is not right for all applications • Highly relational data should not be moved into Spectra Content Object database b Spectra is not right for all parts of an application. b Spectra and Cold. Fusion together • HR. com Resource Center
Spectra: More Planning b Spectra apps require more up front planning than straight CF apps because: • Spectra apps are (usually) bigger • Spectra apps live in an existing set of services
Chicken and the Egg b To competently plan a Spectra app, you need to have built a Spectra app b Two solutions: • Find someone who has been through it to help get up to speed • Iterate over the design and construction of your first Spectra application
Security is a problem b Allow time to configure and test (2 - 3 weeks) • Don’t turn on security caching in development b Use a workaround instead b Spectra 2 will likely address this issue
Minimize CFLocking (CF Tip) b Server, application and session scope variables need to be locked (read and write) b Use the new duplicate() function b b b <cflock name="App. Name" type=”readonly"> <cfset request. app = duplicate(application)> </cflock>
Use the Application Scope b Put needed items in Application Scope (and transfer to Request scope) such as: • Lookup values • User-defined Type. IDs • Property names • Application-specific translation data – HR. com HRID and node. IDs
Plan Meta. Data Carefully b Spectra 1. 01 provides minimal tools for changing Metadata once used b Use possible alternatives to Metadata carefully as Metadata will be important for future Personalization upgrades
SQL Searching Strategies b cfa_content. Object. Find is slow for SQL lookups with medium size datasets b Uniquely name all SQL searchable properties b Use a Custom Tag to directly search Properties table b Spectra 2 MAY address this
Searching
Spectra Debug Tag b <cfset request. cfa. mode. debug = true> <cfif request. cfa. mode. debug> <cfa_tag. Debug. Begin> </cfif> <cfif request. cfa. mode. debug> <cfa_tag. Debug. End> </cfif> b <cfa_tag. Debug. Output>
Debug Output b Number of iterations: cfa_contentobject: 2 cfa_contentobjectgetmultiple: 1 cfa_contentobjectinvokemethod: 2 cfa_objecttypeget: 2 b Tag tree: · cfa_contentobject / time: 250 ms / vars: labels='Blackman, Samuel G. '; oids='3 E 8004 F 7 -5 DA 0 -11 D 4 -94 FE 00 D 0 B 7752 E 0 A'; · cfa_contentobjectinvokemethod / time: 234 ms · cfa_contentobjectget / time: 15 ms · cfa_objecttypeget / time: 15 ms · cfa_contentobjectgetmultiple / time: 47 ms
Wrap Up b Spectra is a Cold. Fusion Application that is great for Content Management and related services b Use it as one of several available tools b Plan for the time to get through the initial learning curve
FREE. . FREE b. Spectra Consultation - By phone - In your office b www. wwstudios. com
- Slides: 21