A view decorator is a little bit of metadata that you can stick at the top of your view in FarCry to change its behaviour and the way its documented. FarCry Core framework is pretty clever and can work out a default in most cases depending on the file naming convention you have used. However, its good practice to be explicit about your decorators so be sure to put them in.
Adding them to your view couldn't be easier. Just add each decorator on its own line, in a ColdFusion comment, at the top of your view.
<!--- @@Displayname: Full Page Display --->
<!--- @@Description: Complete view of the case study. --->
<!--- @@Viewstack: page --->
<!--- @@Viewbinding: object --->
<!--- @@Cachestatus: 1 --->
<!--- @@Cachetimeout: 60 --->
<!--- @@Fualias: page --->
What follows is a little cheat sheet of the most common decorators and how they work.
@@cachestatus: 0, 1, -1
Cache status determines whether or not a view should participate in the dynamic caching layer of FarCry. 0 is the default and simply means, "no directive given". 1 says "turn on caching". -1 prohibits the view from being cached under any circumstances, even if a parent view has been instructed to be cached.
@@Cachetimeout: minutes (default 24hrs)
Cache time out is the number of minutes the view should remain in the cache. This defaults to an entire day. It's not unusual to have long time outs for FarCry caches. Unlike other CMSs, the FarCry caching service is clever and will automatically flush caches where content has been updated rather than waiting for the full time out.
@@Cachetypewatch: list of typenames
Cache type watch setting looks for changes in the nominated content types. If you add a new content item to the system, a view with a "type watch" will automatically get flushed. This is great for listing views that show stuff like the latest news items or whatever.
@@Cachebyvars: list of scoped variable names
Sometimes you want the view to have a different cache for different values of a variable. This is easily achieved by nominating the list of variables that make up that difference. For example, an archive page which uses a url parameter like &year=2010 would ideally have a different cache for each value for year.
@@Viewstack: page, body, fragment, ajax, any
View stack is a little quirky. It's basically an instruction to the friendly url service to help it identify what type of view your output should be, ie. "where in the stack". Normally this is determined by convention. If you name your view with a prefix of displayPage, then it will be assigned a value of "page", displayBody and its "body", and just about everything else is "fragment", for example displayTeaserStandard.cfm
@@Viewbinding: type, object, any
View binding determines what part of the model should be bound to your view. Use "type" when its a type view, that is a view on a group of objects pertaining to a content type. And use "object" if you are rendering a specific content instance or record.
@@Fualias: friendly URL alias for the view
Friendly URL alias is great. You can rename your view, as it appears on the URL, to just about anything you like. So for a view with a file name of displayRSSFeed.cfm you get a default URL containing "displayRSSFeed". Using fualias you could change this to simply "rss".
@@Displayname: name of the template
@@Description: overview of template usage
Displayname and Description are used by the framework and documentation plugin to provide a friendly name and additional information about the view when its relevant. It's highly recommended you fill these in so your users get friendly and intuitive labels.
The complete list of changes for 6.0.5 maintenance release is available here under "Filters > All":
https://farcry.jira.com/browse/FC/fixforversion/10352
Due to popular demand (well at least the folks who have been badgering me for an update), I've convinced Blair to put together a quick tutorial on setting up Selenium tests with the testMXUnit framework. The tutorial builds a simple Selenium script for checking a Google search result, shows how the ColdFusion test components are constructed and how simple it is to run the test suite in the FarCry webtop.
https://farcry.jira.com/wiki/display/TEST/Selenium+Tests The cool thing about the test suite is that you can use it to build Selenium test suites that run tests against any sort of web application -- just so long as your FarCry installation can reach the application via HTTP.
You can do just about anything you would normally in Selenium, and run it through the framework. If you have any questions about how to get your Selenium test going let us know :) Enjoy!
testMXUnit is a FarCry plugin based on the great MXUnit testing framework for ColdFusion. It's got a few pretty cool enhancements, hooking it up with the FarCry framework and providing a great UI for running test suites. But the super-cool news is something we've been sitting on for a little while, and that's Selenium support.
testMXUnit allows you to record Selenium testing scripts with the standard Selenium IDE, then with a simple conversion to CFSCRIPT and the tests run beautifully and unassisted within the FarCry framework. Here's a little screenshot as a teaser -- details on how to create Selenium tests to follow soon.
Download: https://farcry.jira.com/source/browse/TEST Awesome work Blair!
The complete list of changes for 6.0.4 maintenance release is available here:
https://farcry.jira.com/browse/FC/fixforversion/10350
The FarCry Documentation plugin (farcrydoc) provides extensive documentation on framework, plugin and project based components. Another awesome utility for FarCry developers that dynamically introspects your installation to extract oodles of information.
FarCryDoc is part of barrage of ongoing efforts to build living a living document from the FarCry codebase itself. Everything is extracted from component metadata, and comments added to the code base in a distinct style. You can also use the plugin to extract a code hinting dictionary for both CFEclipse and CFBuilder IDEs. Find out where to get it and how to install it on the farcrydoc wiki:
Rock on Daemonites. Bravo Blair!
The complete list of changes for 6.0.3 maintenance release is available here:
https://farcry.jira.com/browse/FC/fixforversion/10341
We have recently migrated all of our FarCry Community infrastructure to the Jira Studio platform -- many thanks to the wonderful crew at Atlassian (http://www.atlassian.com/) for their support. Just thought I'd highlight how this might change things and a couple of nice features from the move.
Jira Studio for FarCry
Everything is located under one central application located at:
http://farcry.jira.com/
(There are redirects in place for all the old URLs. If you find a wonky redirect please let me know!)
Username
Many of you will have had a different username for both Jira and Confluence under the old system. Both of these have been merged into the new system. Please pick one and stick to it. If you want to get rid of the other one, let me know what it is and I'll arrange its demise.
Bug Tracking
This is essentially as it was before, only we've leap frogged to the latest version of JIRA. Note there are lots of nice dashboard features in this version -- take some time to set up your environment, watches and so on; it's worth it.
Also every FarCry plugin that is hosted on Jira Studio now has its own bug database, and WIKI. You'll start to see plugin specific documentation and roadmaps migrate towards these areas in due course. If you have a plugin that you would like to have hosted here please let me know -- if its useful and actively developed we'd be happy to host it.
Fisheye: Source Code Reporting
Fisheye is awesome -- use it. Its the best way to track repo changes and visualise diffs from a browser.
There is also a complete code review solution -- Crucible -- tucked away in there. I'd like to start collaborating through this in the future. More on this another time.
Wikis
All the old WIKIs have been moved. The default Wiki is still the FarCry 5.0 documentation wiki.
Default Wiki
http://farcry.jira.com/wiki
All Wikis
http://farcry.jira.com/wiki/dashboard.action
You should notice a lot of *new* wikis.
Under the new platform, all projects automatically have their own wiki. As a consequence we'll be moving plugin information to the relevant project wiki. If you are working on a public plugin, please feel free to help out and update its wiki :)
The FarCry Core project wiki will be a portal to the existing documentation areas including the existing Core wiki and http://docs.farcrycore.org
Lastly, contribute where you can! This is a great piece of kit and will hopefully give us the tools we need to really manage the FarCry community well.
Enjoy!
For those still running on the earlier 5.2 maintenance branch, we've released the latest maintenance milestone. Please be aware that development on the 5.2 branch (p520) is minimal -- you should be considering upgrading to FarCry 6.0.
The complete list of changes for 5.2.8 maintenance release is available here: