FarCry Core Committers Blog

< previous 1 2 next >

Quick Summary of FarCry View Decorators

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.

 

Permalink | Leave a comment  »

Core Milestone 6.0.5 Released

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

Download the ZIP for for the 6.0.5 core milestone here:
https://farcry.jira.com/source/browse/~tarball=zip/FC/tags/milestone-6-0-5/mi...

Or alternatively you can update from Subversion (SVN) at this address:
https://farcry.jira.com/svn/FC/tags/milestone-6-0-5

** Bug

* [FC-1172] - skin:relatedcontent should repsect content status.
* [FC-2317] - skin:bubble adds jsstringformat
* [FC-2320] - getContentObjects does not work properly when "status" is more than one value
* [FC-2321] - Image properties won't self-resizing

** Improvement

* [FC-2315] - download.cfm should give you a 404 if no file is found instead of throwing an error

Enjoy!

Permalink | Leave a comment  »

testMXUnit Selenium Test Tutorial

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!

Permalink | Leave a comment  »

testMXUnit: FarCry Testing Framework Supports Selenium

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!

Permalink | Leave a comment  »

Core Milestone 6.0.4 Released

The complete list of changes for 6.0.4 maintenance release is available here:
https://farcry.jira.com/browse/FC/fixforversion/10350

Download the ZIP for for the 6.0.4 core milestone here:
https://farcry.jira.com/source/browse/~tarball=zip/FC/tags/milestone-6-0-4/mi...

Or alternatively you can update from Subversion (SVN) at this address:
https://farcry.jira.com/svn/FC/tags/milestone-6-0-4

** Bug
* [FC-2314] - ajaxTimeout not in view tax [FC2304]

** Improvement
* [FC-2308] - Flushing host content page when rule is updated
* [FC-2309] - Disable refObjects for system content types
* [FC-2310] - Ability to rebuild a particular page's cache, or the entire website's

Enjoy!

Permalink | Leave a comment  »

FarCry Documentation Plugin

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:
https://farcry.jira.com/wiki/display/DOC/Home

Let us know how we can improve it:
https://farcry.jira.com/browse/DOC
Rock on Daemonites. Bravo Blair!

Permalink | Leave a comment  »

Core Milestone 6.0.3 Released

The complete list of changes for 6.0.3 maintenance release is available here:
https://farcry.jira.com/browse/FC/fixforversion/10341

Download the ZIP for for the 6.0.3 core milestone here:
http://org.farcrycore.s3.amazonaws.com/core/m603.zip

Or alternatively you can update from Subversion (SVN) at this address:
https://farcry.jira.com/svn/FC/tags/milestone-6-0-3

** Bug
* [FC-2006] - No download popup when using download link
* [FC-2076] - No form validation when including editOwn.cfm in project outside of webtop
* [FC-2135] - Core login redirect doesn't allow for full URL redirects
* [FC-2152] - When some (not all) users login they will get the following error message:variable permissiontype is undefined
* [FC-2172] - formtool: category does not respond to ftSelectMultiple="false"
* [FC-2184] - Railo does not like date strings with space delimiter
* [FC-2190] - Webtop overview Breadcrumbs links Case sensitive issue
* [FC-2192] - Confirmation link in registration email errors
* [FC-2197] - dmNavigation Overview throws error in webtop (with fix)
* [FC-2223] - farFU.cfc camelHump issue on delete Nav
* [FC-2239] - jQuery version of webskinAjaxLoader() - showLoadIndicator / indicatorText
* [FC-2257] - Installer gets "stuck on step two of the wizard. No errors are reported.
* [FC-2259] - Category no longer gets validated with required
* [FC-2274] - Install: sql syntax error creating stats tables
* [FC-2284] - Problems with using getLink with strings that need to be urlencoded
* [FC-2289] - getRelatedContent is not thread safe, causes errors
* [FC-2293] - Edit Config - XMLFormat
* [FC-2295] - objectbroker.cfc referencing form scope directly without checking to see if it exists
* [FC-2298] - Canceling the creation of a new content item from a library picker adds an empty item instead
* [FC-2299] - UUID fields don't validate required fields
* [FC-2300] - Library picker does not support extended arrays


** Improvement
* [FC-1805] - Allow developers to generate their own library search filter function
* [FC-1902] - core dmInclude teaser property is "string" should be "longchar" to follow with other teaser properties.
* [FC-2080] - Addition of url.objectid validation in requestscope
* [FC-2156] - Add property "permission" to Category
* [FC-2195] - Trailing dash on freindly URLs
* [FC-2212] - Change webskin ancestors to use In Memory Caching
* [FC-2263] - Need to have image formtool to autogenerate thumbnail if hidden
* [FC-2264] - Teaser on dmInclude needs to be longchar
* [FC-2282] - Add category filtering to getContentObjects
* [FC-2285] - Ability to restrict a particular container to specified rules
* [FC-2287] - Friendly URL redirects are adding 'updateapp' to the query string
* [FC-2290] - Ability to override the webtop header background colour
* [FC-2297] - Bot defence code needs a way to remove items form the list
* [FC-2302] - Optimised FU cache initialisation
* [FC-2303] - Log and report updateapp information
* [FC-2304] - add ajax timeout parameter to fourq.getView()

Enjoy!

Permalink | Leave a comment  »

FarCry Community Bug Database, WIKIs & Fisheye

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!

Permalink | Leave a comment  »

Subversion Repositories for FarCry

Looks like the new SVN repos are bedded down and working just fine -- for committers I may need to tweak your account to get things going.  If you depend on the SVN repo for your deployments, please read carefully -- the new repos are quite different in structure.

Authentication

Anonymous access is available for read-only checkouts across all modules.

HTTPS has been enforced for access to the repo.

Committers with *write* access; you will need to have a user account with Jira Studio in order to write to the repo.  You should be able to use your standard user that was created for access to the old http://bugs.farcrycms.org for everything on the site -- if you don't have one, create one and let me know the account name. Your Jira Studio user account needs to be both in the "Developer" group, and set to an account type of "Developer". If anything seems to not work as expected ping me and I'll double check this is set up properly for your login.

New Repository Structure

The structure of each repo module follows a regular pattern:
/PROJECT-KEY/
 ./trunk
 ./branches
 ./tags

Where /PROJECT-KEY/ is the short key code for the Jira Studio project.

For example...

FarCry Core has a project code of FC:
FarCry CMS plugin has a project code of CMS:
Subversion Checkouts

Essentially its a brand new repo.  Even though the repo history has been preserved, all the revision numbers are different.  This means to relocate existing repos you will more than likely have to delete and re-checkout the repo (as opposed to using the Subversion "relocate" feature).  I highly recommend thinking through the best workflow for getting your established workspaces/deployments onto the new repos.

Old Repo Archive

The old SVN repos hosted at cvsdude.com will be maintained for at least another 6 months, and possibly much longer.  The repos have been set to read-only, so any commits you attempt will be rejected.  However, you can continue to pull milestones from this location for the forseeable future.

That's all for now :)

Permalink | Leave a comment  »

Core Milestone 5.2.8 Released

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:
http://bugs.farcrycms.org/browse/FC/fixforversion/10315

Download the ZIP for for the 5.2.8 core milestone here:
http://org.farcrycore.s3.amazonaws.com/core/m528.zip

You can update from Subversion (SVN) at this address:
http://modius.svn.cvsdude.com/farcry/core/tags/milestone-5-2-8

Bug
[FC-1299] - WDDX parse errors when submitting unicode characters as part of content
[FC-1575] - Move items in site tree makes them disappear off site
[FC-1763] - Missing javascript files from farcry-community-5-1-0.zip release
[FC-1847] - Tree breaks when deleting a html page from the tree
[FC-2026] - processForm problem with caller.onExit in CF9
[FC-2042] - ancestor type webskins not being flushed correctly.
[FC-2044] - SelectUDLogin.cfm expecting stparam
[FC-2046] - Error when adding and editing type permissions
[FC-2048] - Stack overflow through getDefaultFUObject, setMapping, and createURLStruct
[FC-2050] - loadJS & loadCSS don't have required app scope structures
[FC-2051] - checkedLoggedIn does not accept complicated returnURL variables
[FC-2052] - objectAdmin does not allow empty columnList
[FC-2055] - webtop login returnURL not returning to correct location
[FC-2056] - FarCry does not handle certain dates correctly
[FC-2063] - Friendly URL changes not working for some legacy FU's
[FC-2088] - File not found: /webtop/js/tiny_mce/plugins/farcrycontenttemplates/index.cfm when clicking the almighty farcrybutton in texteditor
[FC-2110] - UUID fields in objectadmin filter don't work
[FC-2207] - altexpansion attribute in webtop.xml don't work for other section than site

Improvement
[FC-1420] - Custom Configs for Projects and Plugins
[FC-2043] - add "ajax" to @@viewStack descriptor
[FC-2054] - You have been denied access to this item : why?
[FC-2057] - Creating Navigation and Categorization at the same time
[FC-2077] - pingFU() when behind proxy server
[FC-2090] - onRequestEnd config option similar to _serverSpecificRequestScope.cfm
[FC-2163] - Date 200 years in the future when first unselected
[FC-2176] - Add ftLabel for teaserImage
[FC-2209] - Content overview and content sub section overview are missing permission check

Refactoring
[FC-2049] - viewStack & viewBinding requirements can break backwards compatibility

Enjoy!

PS. Note these patches are already available in the FarCry 6.0 maintenance branch

Permalink | Leave a comment  »

< previous 1 2 next >


Brought to you by the Daemonites

Brought to you by the Daemonites

Support the FarCry community by contributing code or purchasing a commercial license. Please consider investing in instructor lead training, mentoring and development support for your next FarCry project.