Moving into the .NET world

Brian LeGros | June 15th, 2008 | programming  

With my latest employer, I have taken the big dive into the .NET world. I’ve spent most of my career working with ColdFusion, Java, PHP, Flex and dabbled a little bit in the Ruby/Rails and Groovy/Grails world in addition to the obvious set of web technologies and standards that span all of these application languages. My limited experience with .NET was through some undergraduate and graduate work I did with C# as well as helping (if you can call it that) with an ASP.NET a long time ago with a colleague of mine. I am a application developer; even though I dabble in lots of different areas, the bulk of my knowledge is building applications in a corporate IT environment. I focus on implementing business requirements and managing technical concerns as it relates to the software development process. I’ve had jobs in the past associated with business and management roles but at the core I am a plain and simple application developer. As I’ve been getting my hands dirty in .NET over the last few months I figured I’d share some of my initial impressions. Please keep in mind, I may be looking at a lot of things in a very naive light, so read what I have as my opinion, ignorant or not.

With context out of the way, I have to say that so far working with .NET hasn’t been a negative experience. There is the whole you’re stuck with Windows thing, but since I’m in fully entrenched in the MS world now, I’ve been able to get past it. There have definitely been some nuances to get used to, but nothing extremely difficult to overcome. Here are a few comments on some of the things I’ve run into thus far:

  • Namespaces in C# aren’t constrained by the file system with respect to partitioning your code. Initially this seemed like a nice decoupling, but I’ve found myself forming more of a dependency on tools to navigate my classes hierarchy rather than just looking into a folder.
  • There is no notion of a shared class path as there is in Java. If you want to get a hold of an assembly to use in your application you’ve got to find it and pull it in. I think there is a configuration option on an assembly that you can use to help, but I haven’t had any experience using it.
  • Assemblies are pretty nice build artifacts. Versioning is addressed out of the box and integrated with the .NET framework. I’m not sure how they stack up against something like OSGI, but I’m enjoying having them around.
  • Everyone says the implementation for generics is better in C# than Java, but as an application developer I don’t notice a difference except that I’ve been told I can use reflection on them in C#. C# also seems to have made a much larger use of them in their core over Java. It seems like stronger typing is a very important practice in the C# world than in my experience with the Java world, but that is probably biased based on how I’ve used Java.
  • There appears to be a very balanced view on uses for metadata (attributes) in .NET. Annotations in the Java world were a great addition to the language, but sometimes their use comes off as abuse; look at a JUnit 4 test suite class for a great example.
  • There are lots of accepted libraries available that are direct ports from the Java community such as NUnit, NAnt, Spring.NET, CruiseControl.NET, NDocs, log4net, etc. Getting comfortable with these libraries was pretty easy since I’d had experience with the Java equivalents.
  • The help systems in .NET leave much to be desired and make me long for Javadocs, Livedocs, RDoc, or anything else. I find myself clicking through a class definitions on MSDN and after two or three links I can finally get to a list of “members” that belong to a class, only to click another link to load another page to see more about the details of that “member”. I have yet to find any easily usable API documentation.
  • .NET has a solid component model available out of the box. WCF is a really simple and tight implementation of a component architecture. Service-orientation is a focus with an emphasis on abstracting away protocols, execution environments, and exposing metadata for a more contractual usage. It has the feel of being an API built around WSDL 2 and many of the WS-* standards, but it goes by many of the concepts, although not by name, identified in Patterns of Enterprise Integration. It’s compatible with synchronous and asynchronous operations and did I mention simple to use? I hope to do some posting about it later.
  • Getting used to assimilating applications into the bowels of the OS seems to be core to the .NET mentality. This is probably just a matter of perspective for the developer, but based on the examples I’ve seen thus far, the user folder, the registry, and Windows\system32 folder are popular hang outs for lots of applications. I’ve been met by quite a looks of confusion when I mention deploying applications without the use of some type of installer. There is a lot of power that you get from this tight coupling with the OS I’ve been told. Unlike my previous shops, writing cross-platform applications doesn’t seem to be a priority for .NET developers, so tight coupling it is.
  • It took me listening to the episode of SER with Anders Hejlsberg to understand better it, but it appears to be that developing in .NET is meant to be an IDE integrated experience via Visual Studio. Regardless of the aspect of development I’ve worked with in .NET thus far, the development experience has been fairly consistent. There is always some visual representation of the code available (where applicable) and a debugger is always around and working no matter the context (desktop, web, etc.). At first it was so simple that I felt like I was missing something, but from what I have read and heard, as much work goes into VS as does the .NET framework, if not more. If anyone has used Netbeans for Java web development, it’s a very similar experience in terms of its integration with the environment.
  • I’ve always seen code insight as a supplemental thing, relying on documentation for the majority of my work, but wow, code insight (intellisense) seems to be the major crutch on which a lot of .NET developers place themselves within VS. What’s weird is that I don’t notice anything different than what you’ll experience when working with Eclipse and Java, in fact, the code insight seems to be limited to code only. I have yet to run into a situation where the IDE makes a suggestion on how something could be written or changed as IntelliJ does for Java. I will admit though, maybe I’m missing something.
  • The visual editors in VS seemed to get abused by .NET developers. I say abuse because quite a few .NET developers I’ve encountered can’t talk to me about their code in any other context but how they dragged-and-dropped controls onto a screen and edited properties. Since I don’t know the in’s and out’s of the tools quite yet, having a conversation is tough. I try to communicate in terms of language agnostic principles and patterns but most of the time all I get are blank stares and judgmental comments about how I am over complicating things.
  • MS alternatives exist in terms of the IDE and runtime, but they don’t seem to be popular at all. I really like SharpDevelop as an alternative to Visual Studio. It’s clean, easy to use, and integrates with a lot of OSS packages out of the box. Mono is available as a Linux-based .NET runtime that has a lot of .NET developers excited because of its potential to allow them to code for the Mac. I don’t know any Mac owners that have Mono installed however, so I don’t know if it’s really a viable cross-platform solution.
  • I have some thoughts on ASP.NET web forms that I want to share, but I’ll save that for my next post.
  • The developer community has always been important to me and I feel it’s always important to remain active in the community in some capacity. As I’ve begun attending the local .NET user group meetings, I don’t see a lot of topics that are not MS centric. There is no question that MS drives the releases of the .NET framework, but there have been lots of innovations coming out of the community that deserve attention. It feels like there are only a small minority of developers that actually utilize these contributions locally. I have yet to see any presentations on the various unit testing tools, build tools, ORM, IoC, etc. that have come out of this space. I do envy the direct support that MS has for its user groups, but I wonder if my expectations are too high.

In any case, so far the learning curve with .NET hasn’t been very steep and when I do get to code I feel fairly productive. I should be posting in the next few days on my thoughts about ASP.NET web forms so I’m sure that will get me flamed, but it’s a major part of the puzzle I’m having to work with that I feel needs some attention. Until next time.

Thanks to the Acadiana Adobe User Group

Brian LeGros | March 12th, 2008 | news  

Yesterday I stopped by the Acadiana Adobe User Group in Lafayette, LA for Ray’s presentation on Adobe AIR. He showed off a time allocation app using Flex and then HTML/JS. He was able to show us a few quirks with SqlLite’s DATETIME datatype that Adobe added as well as some gotcha’s with respect to using HTML/JS with Spry. It was cool to see another user group in action. The Acadiana group has been meeting on and off for many years and they all seem to get along very well. Thanks to everyone in attendance for warm welcome and best of luck with the group.

acts_as_conference 2008 : It begins …

Brian LeGros | February 9th, 2008 | conferences  

I finally brought myself to attend a Ruby/Rails conference. I was motivated to do so by my most recent venture into JRuby and Rails at the office. acts_as_conference 2008 is put on by RailsForAll, an active participant in the Orlando Ruby community, as a single track, 2-day event being held out by Universal Studios. I just listened to an interview of Neal Ford on aboutGroovy.com and really enjoyed it. As luck would have it, I just found out that he is speaking at this conference. I’m really interested to see what constitutes advanced topics for Ruby DSLs (hopefully some patterns), especially with my latest venture into a library for using mock objects within ColdFusion (more on this later). Since I’m using JRuby, I expect the highlight of this conference for me to be the Headius. In reading his blog it sounds like we’ll get to see some of the really cool stuff that makes JRuby tick. Dan Benjamin and Obie Fernandez will be closing out each day, respectively, with a keynote that should be interesting since they seem to be recognized Ruby/Rails community members.

I’m enjoying what I’ve done thus far with JRuby/Rails and am grateful to the community for putting this even on in the Orlando area. Continuing with habits from previous conferences, I’ll try to post a summary of each session I attend as well as my pretty useless commentary. Here’s to being misunderstood and taken out of context by an entirely new community.

:)

Proof of Concept : Learning Groovy, Grails, JRuby, and Rails

Brian LeGros | January 20th, 2008 | programming  

A couple months ago a few of us at work thought it would be worth looking into some of the newer programming languages and frameworks that have been receiving a lot of buzz. We were particularly interested in some of the productivity boosts that have been preached as a result of using these solutions. We decided to focus on the creation of a proof-of-concept (PoC) for one of our major web sites (sort of a stripped down CMS solution). The PoC consisted of two implementations, one using Groovy and Grails, and one using Ruby on Rails. On the Ruby side of things, we decided to look into JRuby, rather than the MRI or Rubinus implementations, since the majority of our development efforts rely on the JVM. Based on the success of this process, we are even open to considering these technologies as a possible replacement for ColdFusion and its assortment of frameworks that we currently use in our web tier.

I decided to move forward with Groovy and Grails in the first implementation. Its syntax seemed to be the most like Java which is what I am most comfortable with. I spent about 4 weeks learning the basics needed for Groovy and the Grails framework. From the little I’ve used it, I really like Groovy as a language. Learning Groovy was a cinch. The availability of closures, the use of builders to simplify configuration, and the emulation of formal properties using Groovy Beans are all great features. After seeing the amount of work being put into Groovy Swing integration, I can’t think why anyone would want to write a Swing UI in straight Java again; the syntax was just as simple as MXML without the markup. I am curious if any classpath conflicts would occur between dependencies in Groovy and our own projects, but I didn’t look into this any.

As far as Grails goes, I am really impressed at the work put into combining the technology stack on which the framework is based. The biggest and most notable feature I like is its tight integration with GORM. The use of GORM as the relational mapper truly makes working with the database effortless. Integration with legacy databases is fairly simple if you want to re-use your Hibernate mapping files, or if you want to do the configuration yourself in your domain classes. Because of GORM, you can approach pretty much any web application focusing solely on your object model; our shop follows this practice already as do most Java shops, so this is a big plus. On the templating side of things, I am pleased to see the work put into GSP. One of the main reasons we went with ColdFusion was because of the simplicity it provided over JSP, so GSP is a welcome attempt at change. Another feature I really like about Grails is the ability to create service classes to hook into, and expose, JEE endpoints with the utmost of ease. I didn’t get a chance to play with these, but from what I’ve seen in the plug-in section, it looks like working with JMS, SOAP, JTA, and a few other standards is ridiculously simple. Yet another feature I really enjoyed was the integration with Spring Web Flow. The scoping in Grails seems so natural; flows are very simple to construct and alleviate a lot of the hacking most developers have to put up with in the session scope. Finally, bundling an application into a WAR is provided out of the box so creating a Grails app and dropping it on your favorite JEE server is fairly effortless. From the little I got to work with the Grails framework, you can tell the team’s focus is clearly to improve Java in the web tier and they are on the right track. I know offering Spring integration is definitely a big draw for me since we use it so heavily in most of our initiatives.

Keeping in mind I worked with Grails 1.0 RC1, I did run into some difficulties with the framework. The first and biggest frustration I encountered was when working with domain classes. When I changed a domain class, while the built-in Jetty server was running, the server would attempt to reload the Spring context but just hang. As a result, I would have to take about 30s or so ever time I changed a domain class to bounce the built-in Jetty server. I’m not sure if this has been fixed since I played with it, but this really deterred me from working with Grails. One thing that I got frustrated with was what seems like a limitation in GSP. I wanted to create a view to edit a domain class which had a one-to-many relationship with another class. A pre-selected multi-select list box seemed like the perfect HTML widget to use. I was unable to find a way to automatically have GSP generate this for me. I searched the user forums, but I only found a post that said an implementation wasn’t available at that time. I didn’t search for a JSP library that may help, but maybe this could have been a viable alternative short of writing the code to render the HTML myself.

So after the Groovy and Grails experience, I dove into JRuby and Rails. Being that I scare easily at the sight of anything new, a colleague recommended Dave Thomas’ Rails book to get started; I also had other colleagues as resources to help in times of need. Since I’ve become more familiar with the Ruby syntax I must say there are some language aspects I do like. Mixins available at the language level are a lot handier than I would have thought, especially in the context of Rails. Properties and module level methods were nice to work with as well. I can definitely see where the “enough rope to hang yourself” analogy comes from however; I encountered a lot of variations on how to syntactically accomplish the same task. From a configuration standpoint, I also had to do some work to setup my environment. In the end, I had to pull down JRuby (1.03) and install the rails (1.2.6), activerecord-jdbc-adapter, and warbler gems as well as update my JDBC driver. Since JRuby is just an implementation of the Ruby language, however, I was able to use any Ruby reference, tutorial, or example I could find and had no issues.

As far as Rails goes, I was pleasantly surprised by how easy it was to get started. One of the biggest things I like about the framework is the inclusion of data migrations. You are required to interact with the database at a certain granularity but those interactions are abstracted by writing Ruby code. I’m not necessarily a fan of this granularity, but from a maintenance perspective, this is one of the best solutions I’ve encountered for managing an application’s database. I am also glad to see to see the FormOptionsHelper class. When data binding isn’t sufficient, the FormOptionsHelper class provides a lot of convenience methods to help work with select boxes. Tasks such as pre-populating a multi-select list box were extremely simple using options_from_collection_for_select. Lastly, I really liked the work done to integrate the use of REST into the framework. Working with ActiveResource seems fairly straightforward and doesn’t require as much configuration as I expected; that being said I haven’t worked much with this feature yet.

Based on my limited experience with JRuby and Rails, there were a few things of which I am wary. I haven’t looked into this much, but having two language cores available in JRuby freaks me out a bit. Without guidance or standards, I can definitely see a junior developer using Java implementations when Ruby ones are available forming a strange mixture of code. Another point to watch is the current maturity of the tools to migrate a Rails application to the JEE platform. ActiveRecord JDBC and Warbler are still under active development (although close to 1.0 releases) and it did take quite a bit of investigation to get my PoC working with our existing environment. Additionally, I don’t like ERB as a templating language. This is a personal preference, but it reminds me of PHP which I dislike for its heavy use of scriptlets; I really prefer using tag-based markup for templating. Finally, and probably the biggest thing I don’t like, is Rails’ implementation of ActiveRecord. ActiveRecord is cripplingly associated with the relational model rather than your application’s object model. A simple relationship such as belongs_to doesn’t relate to a composition relationship between a parent and child object, it relates to which tables contains the foreign key in your relational model. I designed my PoC with an object model in mind and had quite a bit of frustration, semantically speaking, trying to migrate that model into the mold for ActiveRecord. I felt like my focus was on the database for the most part and that seemed contrary to the goal of the framework.

Ok, so enough for my probably useless feedback, let me tell you what we decided to do. My personal preference lies with Groovy and Grails. The side of me that needs a solution in the immediate however, led to my choose JRuby on Rails. Let me explain. When I worked with Groovy and Grails, my learning curve wasn’t with the language, but with the framework. I found myself having lots of difficulty accomplishing tasks that I had expected to be fairly effortless. I associate a lot of these difficulties with the current state of the Grails framework. This is not meant to come off with a negative connotation, but with the perspective that Grails is the “new kid on the block” and still needs polish. When I worked with JRuby on Rails, the learning curve was with the language, not the framework. Rails met my expectations regarding the work needed to accomplish my goals (short of the ActiveRecord hoopla). Rails has the current advantage over Grails since it’s had the opportunity to be exposed to its community for 2 major iterations now. Getting an environment configured and working is a one time cost; I don’t count this again JRuby on Rails although it was easier to manage with Groovy and Grails. Additionally, running on JRuby provides us with the minimal level of Java integration that we need to re-use our existing architecture. JRuby 1.1’s focus on performance and very eminent release as well as Eclipse tooling support via RADRails are also an added plus.

So that’s the verdict from my PoC, but its not the end of my opinion. Anyone who has read this far and thinks I’m full of shit, ignore this next paragraph unless you want to flame me. I ultimately believe that Groovy and Grails will win out for the majority of users utilizing Java in the web tier. All of the arguments I have made for JRuby on Rails are based around the availability and maturity of its resources. These are arenas in which Groovy and Grails have just recently entered into competition. Groovy is quickly becoming the alternative for those in the Java community who are looking for a syntax with which they are more comfortable that brings a dynamic flare. Although it may have helped, Grails doesn’t seem to have the influence yet to cause the recent spike in popularity that Groovy has received as compared to what Rails did for Ruby. I think Java interop will also become more of an issue as people begin using languages running on the JVM. From the little I’ve seen, I really like Groovy’s approach, it feels familiar. I also think developers, like myself, are looking for re-use from the Java libraries and frameworks that we’ve relied on and with which we have experience. Grails’ tight integration with Spring, Hibernate, and other JEE standards (defacto or not) will make these approaches even simpler. It seems like since Grails explicitly chose to support the enterprise and Rails is choosing to stay out of it. I think Grails over time will have more to offer than Rails for those looking for new solutions on web that are currently using Java. Please keep in mind I’m not saying that Groovy/Grails isn’t currently ready for the enterprise (despite the FUD going around). As I understand it, many have been successful by using these technologies; I’m just saying I’m going to wait a while and see how others have been successful and learn from their examples.

In the end, I definitely think these new languages and frameworks provide a huge amount of productivity compared to how we are currently building applications for the web at the office. Tooling definitely needs some work on the Eclipse side of things, but Netbeans and IntelliJ are providing some great alternatives in the interim. I’m really looking forward to using JRuby and Rails to create our stripped down CMS application, which has recently received the green light. I’m even more excited about continuing to work with Groovy and Grails as their communities grow (and even pushing for its use in the office). Thank you to LaForge, Rocher, Nutter, Bini, and everyone else who has contributed their time and hard work into making Java on the web productive (and fun). I really see potential in the languages being built for the JVM and can’t wait to see what the future holds.


NOTE: Sorry to Jython, Django, Scala, and Lift for not including you in this PoC. For now I’ve spread my wings enough to be dangerous, and by dangerous I mean screw up enough software to retain job security. ;) I hope to find the time later this year to do some more exploring.

December Adogo Meeting Tomorrow Night

Brian LeGros | December 4th, 2007 | news  

If anyone is in the Orlando area tomorrow night, stop on by the Adogo meeting! We will be raffling off a license for ColdFusion 8 as well as giving away great Adobe stuff to anyone in attendance. Luis Majano will be giving a presentation on the latest version of ColdBox as well as an overview of the framework. Also, I will be leading a BoF on the multitude of ColdFusion frameworks that we have access to as a community. Hopefully I can encourage a good amount of discussion like Max did for our RIA BoF back in August.

Hope you stop by tomorrow, 12/04, at our usual time (7:00 PM) at Devry in Millennia. Highwinds Network Group will be sponsoring the meeting and bringing food along, so worse case you get fed and enjoy some casual CF conversation.

The CMS Saga Continues

Brian LeGros | October 20th, 2007 | programming  

Over the last two weeks I’ve been researching CMS solutions in the ColdFusion space. We have a pretty large site with a lot of content so a CMS solution seems like the right fit. I tried out FarCry, one of the popular OSS ColdFusion CMS solutions, and didn’t have too much luck. I spent another week looking at commercial ColdFusion CMS solutions and came up on products in two categories: products with very expensive licensing but fully capable and products with reasonable licensing but limited capability. On top of that the price points were over $25K for 2 server licenses and 5 users, on average. We currently have our app load-balanced across 12 virtualized servers, so licensing for most of these apps would be ridiculous.

I ended up looking at the Savvy CMS from BeSavvy and my initial impressions were that I really liked what I saw. The UI was incredibly simple and easy to use. The constructs of approvals, a built-in authorization system, and templating were available and very easy to prep for a PoC. Installation was so easy, it was sick. Unfortunately, we ran into a large wall when we had to address separating content from its presentation. For example, we wanted to store information about all our Resorts, but we may want to show it on a page as a list of resort names or on a page highlighting a single resort’s details. In the Savvy product, there was no way, short of extending the application itself (which required different licensing or consulting fees for BeSavvy to do the work) to incorporate our content types (i.e. - Resort, Amenity, Destination) and gain the benefits of all the built-in features in the CMS. We did have the ability to make hooks into Savvy that could manage content reuse if we programmed it ourselves. However, I saw this as busting out of the CMS to manage content when that is the CMS’ job to manage content. Why should I have to provide these features? On a side note, licensing for the Savvy CMS was extremely reasonable compared to the other solutions I looked into (licensing per URL, not server, and 5 users was $1350 [see their website for latest pricing]).

So being disappointed that Savvy didn’t have the capabilities we wanted, I went back to Farcry and gave it another shot. I had a few replies on my previous blog post that helped me move a little further with the PoC. I was able to get rid of the unusable library tool from my forms (had to patch the core using fixes from JIRA); with some thought, I also found a compromise between using the site tree and the custom content scaffolding. Unfortunately, we really needed Oracle to be the database for our FarCry installation and my every attempt to do so with the the 4.x beta has failed. I spent quite a bit of time on the google-groups applying patches and fixes as people had found them, but I still had issues (e.g. - adding content types via the COAPI after the installation). Additionally, finding documentation on how to use Rules in FarCry was another struggle I kept running into. The developers wiki for 4.x didn’t have anything I could reference and the 4.x developer’s guide I downloaded covered a very small example of using a rule, but not describe how rules work and the options available for working with rules. As a side note, anyone working with FarCry developer documentation is going to run into a lot of Hungarian Notation; it’s actually part of their suggested coding standards. This was a huge detractor in terms of readability for me, but that’s just my opinion. In any case, I eventually got a rule working, but the process of doing so was pretty tedious. Overall, I felt like I was jumping through quite a few hoops to get the PoC up and running (e.g. - using fixes from JIRA, running edge builds of the software, etc).

To end this story, yesterday I went to lunch with my managers and talked about the last two weeks of effort I had put into exploring CMS products and my work with FarCry and Savvy. In the end, we agreed that the quirky nature of developing in FarCry and the price points of similarly capable, and more usable, commercial CMS solutions warranted more investigation than we could allot in this PoC process. Consequently, we are going to try and kill two birds with one stone. We are evaluating other web-tier languages and frameworks as possible replacements for ColdFusion (I will go into this in another post). Because of the heavy usage of Java in our environment and the great job we’ve done separating our presentation and application tiers, we are considering JRuby/Rails and Groovy/Grails as possible options. We have a PoC going on for JRuby/Rails currently, but none for Groovy/Grails. Our hopes are to use this project as the Groovy/Grails PoC. Even though its a custom solution, we want to see if the new frameworks available “now-a-days” (Grails in this case) will provide enough productivity such that a custom solution is more easily maintainable until we can devote the time to doing a much better evaluation of CMS solutions. Additionally, if we find that this PoC works out well, we may not choose to go down the CMS path, who knows. In the worse case scenario, this custom solution can benefit from the work done in past development efforts and we devote more time to CMS product analysis when we’re ready.

I’ve got mixed feelings about building a custom solution, it really feels like a CMS is a good fit here, but for the sake of being productive and getting this stop-gap done, I think we made a good decision. I’m actually a little excited about finally getting to build a Grails app for the office. My Groovy/Grails skills are pretty lacking, so this will definitely help me get some great exposure. Here’s to diving in.

October IECFUG Presentation Complete

Brian LeGros | October 12th, 2007 | news  

Well after 1:45 I was able to complete my Connect presentation for the IECFUG on “Common Revision Control Practices using SVN”. You can get to the presentation using this link. If you would like to view the presentation file, you can find the link here. I think it ran way too long, and by the time I came out of PowerPoint, I had lost like 4 of the 6 in the chat. I was however able to finish everything but 3 slides of my presentation and all of my examples, so I guess that is good for me (just not the attendees).

Thanks again to the IECFUG for putting up with me as their presenter for October. I’m always available for long, drawn out presentations when you need me.

:)

Presenting at the IECFUG October Meeting

Brian LeGros | October 7th, 2007 | news  

Luis Majano has asked me to do my “Common Revision Control Practices with Subversion” presentation at the October meeting of the IECFUG. If anyone is interested in seeing the original presentation, you can find the recording on the Adogo “Meetings” page under September. I’m looking forward to giving the presentation again in an attempt to give examples, instead of just talking too long and saying I have these really cool examples that I can’t show you.

Thanks for the opportunity Luis. I hope to disappoint ;)

PoC with the Farcry CMS

Brian LeGros | September 30th, 2007 | programming  

So recently at work we have been trying to rewrite an application that is pretty content heavy with some sparse functionality and place it into a CMS. Our motivation in going with a CMS over a custom solution was the hope that we could get the most of content reuse and benefit from the experience of domain experts creating CMS software. Ultimately, I wanted to find a solution that we could hand over to our customers, so changes to the content of the application would not longer require developer/designer resources. I think this is the goal of a majority of people who seek out a CMS as a solution.

Since we’re still a ColdFusion shop in the web-tier, I naturally thought to check out Farcry CMS. From what I read about Farcry on blogs, the tutorial videos, the developer guide, and the product documentation, I was extremely motivated to do a PoC with it to show management the potential in using a CMS. We decided to try out the Farcry 4.0.8 beta (which it appears will be what goes out as some type of release candidate eventually) with SQL Server 2005 Express Edition since I had issues getting Farcry running with Oracle (even after consulting the Google Groups).

On paper Farcry offered a lot of the features that I felt would make it a good candidate for the PoC. A few of the ones I found vital were:

  • Developer extensibility in the form of custom content types (in our case identifying business entities such as Resorts).
  • Flexible layouts using templates, containers, and rules.
  • Structured draft and approval system for content changes.
  • Built in role-based authorization system
  • Built-in friendly URL’s and RSS feed support

In fact, the biggest draw to Farcry for me was the notion of custom content types; these seemed like a great solution for content re-use in the context I wanted.

I spent about 1 week working on the PoC in Farcry and I think I may have set my expectations too high for the product. That being said, let me preface my comments by saying, Farcry is a solution which could have met my initial goals for this PoC, but I chose not to go forward with it due to the struggle I felt I’d encounter by implementing the entire site. The main struggle I saw was due to usability as the framework is extended. Let me first give a description of the content and relationships I needed:

I wanted the ability to group content into three specific areas: Resorts, Destinations, and Amenities. A Resort has a name, address, city, state, zip, country, phone, fax, image info, etc. A Destination is a custom grouping of Resorts (eg - Central Florida) which had a name, description and some image info. An Amenity has a name, description and image info as well, but was associated with potentially many Resorts; a Resort also has multiple Amenities. The prototype of the application had different layouts we needed to create per instance of Resort, Destination, and Amenity (based on the Resort to which it belonged).

On the development side of things, the biggest usability quirk was documentation and the options left to me as a developer when I couldn’t find any. As with any OSS project, sometimes documentation is lacking, I can accept that. Farcry does have a bit more documentation than I expected, but it’s usually with respect to the same use cases. In building the relationship between Resort and Destination, I had to undergo trial and error to realize how to create the correct form component. For example, I needed to select the Destination to associate with a Resort from a predefined list, rather than typing it out (”ftType” and “type” set to UUID ending up working). Another difficulty came when learning to create custom content types. Custom content types are created by extending the Types or Versions class in your own CFC and adding <cfproperty> tags to the component as metadata which can be introspected by Farcry. The <cfproperty> tag had a set of custom attributes that I couldn’t find documentation on, so I tried to explore the parent classes from which I was extending for more information. I hoped to find code that I could use to programmatically configure my custom content type. Unfortunately, the parent types are intended for use within the context of the CMS framework extension, so the custom attributes were the only means of configuring a content type. If documentation isn’t going to be readily available, it would have been nice to have alternatives for configuration so that I could use tools like code insight in my IDE to create the classes I need. Additionally, I know the product is still in beta, but it didn’t seem like too much changed on the developer side from version 3 to 4 based on the docs in the wiki. The Google Group (farcry-beta) also wasn’t terribly active and majority of the threads were on installation and release notes rather than extending the framework, so I didn’t find much help here either.

Another developer usability quirk I ran into was the creation of a Rule; this one is probably me just being picky. Rules are used to query the content you’ve entered into the application and associate a means by which to display the result of that query with what eventually becomes a portion of your site’s layout. Farcry touts its ability to create scaffolded tools for your custom content types to avoid the developer having to get into the DB. From what I could tell though, when creating a Rule you have to dig back into the database to make the query to retrieve the data you need from your content types. Recently we’ve begun to use a lot of ORM solutions at work and one of the prerequisites for the solutions, that take SQL completely out of the picture, is a way to query using the ORM w/o using SQL. The way Farcry stored the content types in the DB wasn’t terribly difficult, but if we ever moved the application DB from SQL Server to Oracle (which is a very real possibility), the potential exists for me to have to re-write some of my custom Rules. This seemed like a feature that would have been a good finish to FourQ, the ORM that Farcry uses.

On the end-user side of things, the Farcry Admin left me quite confused when it came to working with my custom content types. Here are a couple items that caused discouragement:

  • One-to-many mapping tools - Once I had my Resort content type created (I set it up to use a 3-step wizard) I tried to associate multiple Amenities with my Resort. From how I had setup my Resort class, the wizard showed a tool with 4 buttons: Open Library, Select All, De-select All, and Remove Selected. Initially these buttons, except for Open Library, do nothing. So I clicked “Open Library” and a new window opened with two columns; the left was empty, the right had all of the amenities I created listed. First thing was there was no way to select multiple Amenities, each list item was text. You have to grab the text in the right spot and drag it into the left column to add the Amenity to the Resort. Once its dragged over, however, you have to wait for the Amenity to appear in the empty list in the parent window (the window containing the wizard being filled out) before its “saved” to your draft. I had 21 Amenities to add to my Resort; it took me quite a few minutes to add them all, one at a time. I’m not sure why a basic list box in the wizard itself wasn’t an option. I wasn’t able to find a way to change this. On a side note, I was able to add duplicate Amenities to the Resort that would generate CF errors on the parent window and then disappear; this was probably a bug, but I didn’t look to see if it was reported already for the beta.
  • One-to-one mapping tools - The same tool mentioned above had to be used when selecting a single Destination for the Resort. Again, why wasn’t a drop-down box feasible to use? And again, maybe this is something I missed.
  • Content Re-use Between Site Map and Scaffolded Tools - I liked the fact that I could create a page in the site tree which was a single instance of one of my custom content types; this was particularly useful due to the layout requirements of the prototype. From a usability standpoint what threw me through a curve, was that I can only add the content type via the site tree, I could not use the scaffolded tools. I can definitely see an end-user getting confused in this scenario. I’m possibly the worst end user there is, so I know. I worked to import all of my content into custom types into Farcry using the scaffolded tools. When I went to add the pages to the site tree using the data I had entered, I ended up creating duplicates of the information. I was unable to find a way to import the data I had added under the “Custom Content” tab into the site tree. To solve this issue, I deleted all of data I had previously entered and re-entered it via the site map. Reentering the data sucked, but what frustrated me the most was the fact that I lost my tools to do things in bulk. Now I didn’t have much luck getting the bulk tools to work, but I’m willing to hack that up to the product still being beta.

Although this review may come off as negative, please understand that I did a PoC to meet a particular deadline. Others may not run into the same issues I’ve had, have more time than I had, or find better solutions than I have found. Many may even say that I’m being too hard on a product for being a beta. I’m definitely open to any feedback the community has on my perspective and options which could allow me to consider Farcry more seriously. I admire the dedication and drive it takes to put together OSS, so I applaud these guys for getting as far as they have in their domain and wish them nothing but luck. For now, however, I’ve begun looking into commercial ColdFusion CMS solutions to see if any of them can meet my expectations; it is possible that I’m setting my standards too high and I might end up coming back to Farcry.

Stayed tuned to see my failure … :’(

Adogo ColdFusion 8 Launch Party Tomorrow

Brian LeGros | August 20th, 2007 | news  

Don’t forget, the Adogo ColdFusion 8 Launch Party is tomorrow, August 21, 2007 at 7:00 PM @ Devry at Millenia. We will have giveaways and free food, so come out and show your support for the Adogo.

NOTE : The topics for the September 4th meeting have also been posted.