Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.
-
Upload
dale-wiggins -
Category
Documents
-
view
217 -
download
2
Transcript of Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.
![Page 1: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/1.jpg)
Spectra Tips and TricksSpectra Tips and Tricks
Tips for Spectra First ContactTips for Spectra First Contact
Coding TipsCoding Tips
Q&AQ&A
![Page 2: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/2.jpg)
Spectra Pre-RequisitesSpectra Pre-Requisites
Structures: Everything’s a structureStructures: Everything’s a structure Custom TagsCustom Tags
• Passing data in/outPassing data in/out• Modular codeModular code
Conceptual understanding of WDDXConceptual understanding of WDDX Request Scope (thread safe)Request Scope (thread safe)
![Page 3: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/3.jpg)
Request ScopeRequest Scope
![Page 4: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/4.jpg)
What is Spectra?What is Spectra?
Content Object Database (CODB): Content Object Database (CODB): An object-based data storage built in An object-based data storage built in relational tables.relational tables.
Tags to interact with CODBTags to interact with CODB• 200+ Tags in about 20 groupings200+ Tags in about 20 groupings
Webtop: A fancy Spectra applicationWebtop: A fancy Spectra application• Admin interfaceAdmin interface• User interfaceUser interface
![Page 5: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/5.jpg)
Three Parts of SpectraThree Parts of Spectra
![Page 6: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/6.jpg)
ContentObject DatabaseContentObject Database
![Page 7: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/7.jpg)
Spectra: the same but Spectra: the same but differentdifferent
DB Design and Spectra Object Design DB Design and Spectra Object Design are similar enough to be familiar but are similar enough to be familiar but different enough to be potentially different enough to be potentially confusingconfusing
GainsGains• Fast for getting complete objectsFast for getting complete objects• Linking data with methodsLinking data with methods
LossesLosses• Flexible relational accessFlexible relational access
![Page 8: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/8.jpg)
Spectra vs ColdFusionSpectra vs ColdFusion
Spectra IS ColdFusionSpectra IS ColdFusion ALL of ColdFusion functionality is ALL of ColdFusion functionality is
available within Spectra available within Spectra applicationsapplications• CF TagsCF Tags• FunctionsFunctions• Database connectionsDatabase connections
![Page 9: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/9.jpg)
Spectra: All or Nothing?Spectra: All or Nothing?
Spectra is not right for all applicationsSpectra is not right for all applications• Highly relational data should not be Highly relational data should not be
moved into Spectra Content Object moved into Spectra Content Object databasedatabase
Spectra is not right for all parts of an Spectra is not right for all parts of an application.application.
Spectra and ColdFusion togetherSpectra and ColdFusion together• HR.com Resource CenterHR.com Resource Center
![Page 10: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/10.jpg)
Spectra: More PlanningSpectra: More Planning
Spectra apps require more up front Spectra apps require more up front planning than straight CF apps planning than straight CF apps because:because:• Spectra apps are (usually) biggerSpectra apps are (usually) bigger• Spectra apps live in an existing set of Spectra apps live in an existing set of
servicesservices
![Page 11: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/11.jpg)
Chicken and the EggChicken and the Egg
To competently plan a Spectra app, To competently plan a Spectra app, you need to have built a Spectra appyou need to have built a Spectra app
Two solutions:Two solutions:• Find someone who has been through it Find someone who has been through it
to help get up to speedto help get up to speed• Iterate over the design and Iterate over the design and
construction of your first Spectra construction of your first Spectra applicationapplication
![Page 12: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/12.jpg)
Security is a problem Security is a problem
Allow time to configure and test Allow time to configure and test (2 - 3 weeks)(2 - 3 weeks)• Don’t turn on security caching in Don’t turn on security caching in
developmentdevelopment Use a workaround insteadUse a workaround instead Spectra 2 will likely address this Spectra 2 will likely address this
issueissue
![Page 13: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/13.jpg)
Minimize CFLocking (CF Minimize CFLocking (CF Tip)Tip)
Server, application and session Server, application and session scope variables need to be locked scope variables need to be locked (read and write)(read and write)
Use the new duplicate() functionUse the new duplicate() function <cflock name="AppName" type=”readonly"><cflock name="AppName" type=”readonly"> <cfset request.app = <cfset request.app =
duplicate(application)>duplicate(application)> </cflock></cflock>
![Page 14: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/14.jpg)
Use the Application ScopeUse the Application Scope
Put needed items in Application Put needed items in Application Scope (and transfer to Request Scope (and transfer to Request scope) such as:scope) such as:• Lookup valuesLookup values• User-defined TypeIDsUser-defined TypeIDs• Property namesProperty names• Application-specific translation dataApplication-specific translation data
– HR.com HRID and nodeIDsHR.com HRID and nodeIDs
![Page 15: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/15.jpg)
Plan MetaData CarefullyPlan MetaData Carefully
Spectra 1.01 provides minimal Spectra 1.01 provides minimal tools for changing Metadata once tools for changing Metadata once usedused
Use possible alternatives to Use possible alternatives to Metadata carefully as Metadata Metadata carefully as Metadata will be important for future will be important for future Personalization upgradesPersonalization upgrades
![Page 16: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/16.jpg)
SQL Searching StrategiesSQL Searching Strategies
cfa_contentObjectFind is slow for cfa_contentObjectFind is slow for SQL lookups with medium size SQL lookups with medium size datasetsdatasets
Uniquely name all SQL searchable Uniquely name all SQL searchable propertiesproperties
Use a Custom Tag to directly search Use a Custom Tag to directly search Properties tableProperties table
Spectra 2 MAY address thisSpectra 2 MAY address this
![Page 17: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/17.jpg)
SearchingSearching
![Page 18: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/18.jpg)
Spectra Debug TagSpectra Debug Tag
<cfset request.cfa.mode.debug = true>
<cfif request.cfa.mode.debug> <cfa_tagDebugBegin></cfif><cfif request.cfa.mode.debug><cfif request.cfa.mode.debug> <cfa_tagDebugEnd> <cfa_tagDebugEnd></cfif></cfif>
<cfa_tagDebugOutput><cfa_tagDebugOutput>
![Page 19: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/19.jpg)
Debug OutputDebug Output
Number of iterations:cfa_contentobject: 2cfa_contentobjectget: 2 cfa_contentobjectgetmultiple: 1 cfa_contentobjectinvokemethod: 2 cfa_objecttypeget: 2
Tag tree:
cfa_contentobject / time: 250 ms / vars: labels='Blackman, Samuel G.'; oids='3E8004F7-5DA0-11D4-94FE00D0B7752E0A';
cfa_contentobjectinvokemethod / time: 234 ms
cfa_contentobjectget / time: 15 ms
cfa_objecttypeget / time: 15 ms
cfa_contentobjectgetmultiple / time: 47 ms
![Page 20: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/20.jpg)
Wrap UpWrap Up
Spectra is a ColdFusion Application Spectra is a ColdFusion Application that is great for Content that is great for Content Management and related servicesManagement and related services
Use it as one of several available Use it as one of several available toolstools
Plan for the time to get through Plan for the time to get through the initial learning curvethe initial learning curve
![Page 21: Spectra Tips and Tricks b Tips for Spectra First Contact b Coding Tips b Q&A.](https://reader036.fdocuments.in/reader036/viewer/2022062516/56649e625503460f94b5dfce/html5/thumbnails/21.jpg)
FREE . . . . . FREE . . . . . FREE . . . . . FREE . . . . . FREEFREE
Spectra Spectra ConsultationConsultation- By phone- By phone- In your office- In your office
www.wwstudios.comwww.wwstudios.com