jeffcoughlin.com

New Extended Arrays in FarCry 4.0

An array property in FarCry allows you to have relational tables for your content types and have it easily configurable and managed from within FarCry.

Real World Scenario

Lets say I have a CFC (object) called products.cfc where I store my company's product info. To keep this example simple we'll say my fieldnames are productName, description, and price.

Now my company tells me they want to have sale prices this month (in this case just price decreases) for different products. Okay, so I create a new object called sale.cfc. To assign the products to a sale object in FarCry I can do it in one line of code in the sale.cfc file like so...

view plain print about
1<cfproperty name="aProducts" type="array" hint="Products in this sale" />
(Note: add the attribute ftJoin="sale" (where "sale" matches the name of the CFC file w/o extension) to take advantage of one of the new FormTools in FarCry 4.0 (more on that in a future blog post))

This feature has always been possible with FarCry (at least since I started using it in version 2.1) and will create a table called sale_aProducts.

But wait a second... I just realized that I need to have custom prices for each product in the sale (meaning for each item in the array table, I need a column called price to override the default product price). Before FarCry 3.0 this was not possible without managing your own table (something FarCry has always tried to eliminate the need for). However, in FarCry 3.0 a new attribute came along called arrayProps. So I could use it by adding the attribute like so...

view plain print about
1arrayProps="price:numeric" (add more by separating them with commas)

So now if I use that attribute I'll end up the following columns in my array table parentid, data, seq, typename, and price (my new column).

This worked great and allowed me to add my new column(s) with ease. Unfortunately trying to manage the data in the new column price requires custom code/logic.

Introducing Extended Arrays

In FarCry 4.0 we set aside the "arrayProps" attribute and instead create a CFC named after the array table.

File: <project_folder>/packages/types/Sale_aProducts.cfc

view plain print about
1<cfcomponent extends="farcry.core.packages.types.arrayTable" displayname="Sale Products" hint="Listing of products belonging to a sale">
2    <cfproperty name="price" type="numeric" hint="Sale price for product item" required="true" />
3</cfcomponent>

Now the data can be accessed as a native FarCry object and not just some SQL table we had to write manual queries and logic for in order to manage the data. We can even add more fields... heck, we can even add another array table to this array and the code will not get messy.

This is a great new feature to FarCry 4.0 that I plan to take full advantage of and hope you find it useful as well.


FarCry CMS vs. Drupal CMS

Someone recently posted on the [FarCry-User] mailing list asking questions about comparing the open source CMS Drupal (which runs in PHP) to the open source CMS product FarCry (which runs on ColdFusion). Of course there are differences in platform support and price when it comes to comparing PHP and ColdFusion, but that was not his question.

Cenk writes:

I am just trying to create a website for one of our customer with FarCry for latest 2 weeks. But today one of our developers used Drupal and created same site within some hours with lots of extra features. Now I need some tips to explain situation to our boss here. What would you suggest to me as argue tips? :)

Although I haven’t used Drupal I have heard great things about it. So I just took a quick peek at their features page to do a quick comparison. At first glance it does have a couple more features built-in. I see a polling tool, blog, threaded comments, and module plugin capabilities.

Drupal Features FarCry is Missing

I'll try to break these down. If I missed something its not because I am dismissing them on purpose, rather it would be my unfamiliarity with the Drupal CMS system (note to self: I should check it out someday. It really does look like a nice product).

Polling

There was a tutorial put out by Daemon on plugging in a flash-based polling tool into FarCry a few years ago. I'm not sure what happened to it. Needless to say, it should be easy enough to build one from scratch. But alas, Drupal has one up on FarCry here.

Blog

FarCry does not come with a built-in blog. It has been a request in the past by a few people, but please keep in mind that FarCry is aimed at the Enterprise market (which generally doesn't care for blogging on their corporate website). As for building one (a blog) it should be fairly simple. Drupal says that it can syndicate content from its blog module. FarCry has one up there in that it can syndicate any content object built in the FarCry framework (which should make it fairly easy to build a blog library in FarCry). Still, being that the blog is built into Drupal they have a leg up.

Threaded comments

Not sure what to say. I mean, with FarCry a tool like that should take about 5 minutes to build. I've never seen it requested before, but could see it being useful on the right website.

Module Plugin Capabilities

Although this has always been a feature in FarCry (called "custom types") FarCry 4.0 makes it even easier now. FarCry 4.0 (when released) will have a new feature called shared libraries. It's essentially an easy way to share and deploy custom types among FarCry projects (much like modules).

FarCry Features Drupal is Missing

Now let's point out some things that FarCry "might" have some advantages over Drupal (I say "might" because I am not familiar enough with Drupal and may be making assumptions).

Database Support:

Drupal says it supports MySQL and PostgreSQL. FarCry supports both of those plus 2 more (MSSQL and Oracle) covering more of the Enterprise market.

Searching:

Because FarCry runs on ColdFusion (and takes advantage of Verity) it has tools built right into FarCry that allow you to start searching your new custom type within seconds. Drupal's feature page isn't clear what it uses. It says that it is "indexed and searchable" which could mean many different things (like indexing DB columns and then doing simple LIKE searches in SQL). I'm hoping its something decent like Lucene (or better).

Module/Custom Type Build Times:

One of the great Features of FarCry (especially in FarCry 4.0) is how quickly you can make custom types (or modules). With the introduction of new wizards, formtools, and even scafolding in FarCry 4.0 we can now build custom types (modules) in a matter of minutes. You want to deploy a new custom type (module) on a page quickly? Try FarCry's built-in rules and containers in design mode. I have no idea how long it would take to design a module in Drupal (a lack of reading their docs on my part).

Module/Custom Type Deploy Times

Again, I have no idea how long it takes to deploy a module in Drupal (I'm assuming they have some neat tool to do it quickly). FarCry has a feature under the COAPI management tools to deploy a custom type (module) in one click (not too shabby).

The List Goes On

There are many more features built into FarCry that are not listed on the Drupal feature page (like XML export of any content type, or built in image manipulation like thumbnails, a media library, and more). But like the current FarCry site the features page is possibly out of date, so I would hate to make assumptions.

In all reality it looks like the FarCry CMS website needs some content updating :) (especially an updated feature list page). And once FarCry 4.0 is released Geoff promises to open up a shared library resource section on the FarCry CMS website where people can share libraries (modules/plugins) like drupal, Typo3, and other successful CMS systems have done in the past (and hopefully have a social rating system where people can vote on libraries and post comments... one can only hope :)).

Drupal looks like a promising product. If you're locked into use PHP I'd definitely consider it as a possible choice for a CMS. But if ColdFusion is still on the table, don't dismiss it as a contender just because it's missing a polling tool and a built-in blog (unless if that’s what you're specifically in the market for). Those features are great markets for non-corporate environments, but alas it may be something we need to consider releasing as a pre-packaged library in FarCry to appease the masses.

Please Comment

As always feel free to post comments, but please keep the flame wars to another website. This blog post wasn't meant to say one product is better than the other. Both products are great open source CMS products that fill different (and similar) needs. I'll apologize ahead of time and say that if I said anything that sounded offensive to the Drupal CMS product it was unintentional and I still believe it is a good product worth looking into.


New Object Broker in FarCry 4.0

FarCry 4.0 (currently still in Beta) has a new feature called an Object Broker. It's essentially a caching tool for object types.

When used you set a numerical limit on it (for server memory reasons) where when the limit is reached it acts as "newest in, oldest out".

At the moment activating and using the object broker is undocumented. So for the moment consider this a good starting point :).

To Enable Object Broker

Edit any custom type CFC and add the following two attributes

view plain print about
1bObjectBroker="true"
and
view plain print about
1objectBrokerMaxObjects="1000"
(where 1000 is the numerical limit you want cached).

To Test Object Broker

  1. Disable the object broker and turn on CF debugging to see all of the queries
  2. Enable the object broker to see how few queries are required.
  3. Try dumping application.objectbroker to get a look at what's being cached.

Thanks to Mat Bryant (Daemon Internet Consultants) for helping me wrap my brain around some of these features.


FarCry 4.0 Beta Released

FarCry 4.0 Beta (code-named Gonzales) has been released to the public for Beta testing (currently from SVN).

So what's changed? This release was aimed at developer improvements (although the user hasn't been forgotten). Here are a few off the top of my head:

  • New Installer (you asked... you begged... so hear it is in all its glory :)
  • New Custom Type Features for Developers
    • New object broker
    • Form Tools
    • Form Wizards
    • Other cool stuff
  • New Client Features
    • AJAX features for seamless user interaction
    • New UI features like drag & drop and other cool web 2.0(ish) gadgets

Other things to keep in mind:

  • The current plan is to have the minimum CF version support be CF7. This may or may not change by the final release, however it is something you should consider if planning using FarCry 4.0.
  • Because this is a Beta there will likely be bugs.
  • Currently there is little-to-no documentation for Gonzales.
  • Please refer any Beta questions (related to bugs or features) to the FarCry Beta Mailing list.


New FarCry Video Tutorial: FarCry 3.0 - An Overview (Part 5 of 5)

The final part to this 5-part video series titled FarCry 3.0 — An Overview (based on a presentation I gave at the CF.Objective() 2006 conference) is finally complete.

Part 5 completes the series by wrapping up the dynamic content portion of the presentation. I give examples of Verity search integration, RSS/XML content syndication, SES Friendly URLs, and wrap up with reporting features built into FarCry (Website statistics and user auditing). I also give examples of where you can find more resources to continue your thirst for knowledge in the world of FarCry CMS.

If interested, I have also provided the slides from my presentation (slightly updated). You can download them in either PowerPoint (PPT) or PDF format. You can find a copy of the presentation files in the downloads section of my website.


New FarCry Video Tutorial: FarCry 3.0 - An Overview (Part 4)

This is part 4 of my video presentation on FarCry 3.0 An Overview (based on a presentation I gave at the CF.Objective() 2006 conference).

Part 4 was turning out to be too large and a couple BETA testers suggested I trim it down more (I already cut out 15 minutes worth of footage) or split the video into two parts. So I chose the latter :). I'm halfway through editing part 5 as we speak, however I'm going away on holiday for a few days. Needless to say it will be done soon.

Part 4 dives into dynamic content examples. I cover a little bit on containers and custom types (my personal favorite feature). Since this video was recorded five months earlier I had to make a few updated notes during the video (tooltip popups).

One note in particular I'd like to point out is the way we as developers currently work with custom types. Although I only touch on custom types briefly in my presentation there are actually quite a few steps involved if/when you want to start working with PLPs. However, FarCry version 4.0.0 will drastically change this with the introduction of new wizards and form tools. Albeit still months away from a release, version 4 of FarCry looks to be very promising. Expect to see some exciting things on that soon.

If interested, I have also provided the slides from my presentation (slightly updated). You can download them in either PowerPoint (PPT) or PDF format. You can find a copy of the presentation files in the downloads section of my website.


New FarCry Video Tutorial: FarCry 3.0 - An Overview (Part 3)

This is part 3 of my video presentation on FarCry 3.0 An Overview (based on a presentation I gave at the CF.Objective() 2006 conference).

I feel guilty that I've taken this long to complete these videos (since I recorded them back in March 2006) so I stayed up late Monday night (and part of Sunday) editing part 3. Now that I only have part 4 to finish editing I don't have much of an excuse for an further delays :). I will, however, be at CFUnited this week and then I'm away on a family trip most of next week. So all I can promise is that it will be sometime soon.

Part 3 covers more detailed content editing examples and introduces content relationship within the FarCry framework using features right out of the box. It's important to note that up to this point we have not had to touch any code.

Part 4 will bring everything together and show some of FarCry's stronger points of data relationship and dynamic data extraction. It touches a little bit on editing code, but only for a brief moment.

I have also provided the slides from my presentation (slightly updated). You can download them in either PowerPoint (PPT) or PDF format. You can find a copy of the presentation files in the downloads section of my website.


New FarCry Video Tutorial: FarCry 3.0 - An Overview (Part 2)

This is part 2 of my video presentation on FarCry 3.0 An Overview (based on a presentation I gave at the CF.Objective() 2006 conference).

I know I said I would get this out earlier and I only have myself to blame :). It's been three months since I recorded all 4 parts. However I'm very novice when it comes to video editing, thus it took me one full day (yesterday and part of this morning) to edit part 2 (I got the video down from 25 minutes to around 14 minutes).

I have yet to edit parts 3 and 4 (and I'm considering making a follow-up part 5), but for now please watch part 2 and feel free to send me comments.

Part 2 covers basic FarCry configuration and intro to content management within the FarCry administration system.

I have also provided the slides from my presentation. You can download them in either PowerPoint (PPT) or PDF format. You can find a copy of the presentation files in the downloads section of my website.


FarCry Nightly Builds Now from SVN

A week ago Daemon (pronounced "Dee-mon") converted their CVS repositories for the FarCry CMS applicaiton to Subversion (SVN). So for a full week my website was not grabbing the latest modifications from the version hosting server. Needless to say the download scripts on my backend server have been updated and you can safely resume your nightly build download "fix" ;).

A few changes were also made on the download page. The notes at the bottom were updated to hopefully better explain what files you're seeing in the downloadable list.

Also instead of having all the files bunched together, I've sorted them into three categories:

  • Current Release: Current release builds and maintenance branches. This is what most people want
  • Bleeding Edge: When you want to test new features in development (not suggested for production environments).
  • Deprecated: No longer officially supported but still used by some users.

Go check them out.


FarCry CMS 3.0.1 Released

The next version of FarCry CMS 3.0.1 has been released.

There are a few important things that Geoff Bowers points out (and one that I think is important) that you should be aware of:

  • Oracle support for the FarCry 3.x framework has been pushed to version 3.0.2
  • The installer from 3.0 to 3.0.1 has not been updated yet. So if you use the installer that comes with 3.0.1 make sure to run the updater for b300 and b301
  • Some bug fixes didn't make it into this release (but many bug fixes since 3.0 are included in this release making it a "must have")
  • Many of the localized translation files have have not been updated to FarCry 3.0. (note: I have submitted an updated version of the the en_US transaltion files for FarCry 3.0 a couple weeks ago that weren't able to make it into this release. You are welcome to download them now, however please keep in mind that they are likely still under review)
  • Included in this download is a sneak-peek at the mollio webskin for FarCry (I will definitely be playing with this very soon)
Update: Well, within 10 minutes I was able to get the new mollio webskin up and running. The only steps I had to do was to edit the config file (config/_serverSpecificVars.cfm), application.cfm (application name) and copy over any files or images that FarCry was maintaining. Then I had to edit my pages in FarCry to use the new webskin names (you can edit the DB and/or do this with a script to make it faster).

My first impression was that it's much smoother than the pliant webskin (and less css bugs). I liked the fact that it takes advantage of reflections out of the box. The only downfall I saw so far was that I wasn't able to use a teaser in the rightbar (or leftbar) to show recent news items (granted, I only played with it for a few minutes, so there's a chance that its in there and I'm just not giving it a chance). The fact that I was able to implement it into an existing FarCry website in a matter of minutes just goes to prove some of the flexibility FarCry allows your site to have.


Previous Entries / More Entries




BlogCFC 5.9.8.007 by Raymond Camden | RSS | Contact Blog Owner