Monthly Archives: December 2006

TreeMap source code for Flex now available

In hopes of spreading some holiday cheer, I’m happy to announce that the source code for my Flex TreeMap component is now available for download on Google Code. You’ll need to access the code using a Subversion client. I recommend TortoiseSVN, but many others exist.

The code is available under the terms of the GPL, version 2 (Author’s Note: It is now MIT licensed for extra usefulness!) This means that you can use my component for free, but you must release your full source code using the same license. This is a great opportunity for other open source projects looking for advanced visualization solutions.

If you’re unfamiliar with my previous work on this component, have a look at a sample that demonstrates selection:

Preview of Flex 2 TreeMap with selection enabled

Once you’ve got the source code downloaded, and you’re ready to get started, be sure to look at the sample applications in the “examples” directory first. They give you a few tips and tricks for using some of the more advanced functionality the component provides. Additionally, you may access the online documentation generated by ASDoc.

To build the TreeMap SWC, you can run the Ant script “build.xml”. You may need to update the build.properties file with the location where you installed the Flex 2 SDK (it’s free to download and use if you don’t have it already). Once I’m happy with the feature set of the component, and I’ve had more time to search for bugs, I plan to make zipped released with the SWC prebuilt for you. Right now, the code is considered beta quality! I have fixed some bugs recently, and I expect to encounter more. If you happen to find a bug, I encourage you to submit it to the issue tracker, and I’ll take a look.

That’s it for now. Stay tuned for future updates. I plan to write several more examples to include in the repository to get folks started. If you find yourself having trouble using a certain feature, please let me know. Either place suggestions in the comment section below. Once again, happy holidays!

Learn Ruby on Rails with 'Up and Running'

Ruby on Rails has become the poster child for cool in the server development world. Several months ago, hoping to find out what all the excitement is about, I installed Instant Rails, a nice all-in-one web server package and checked it out. As you probably know, I’m a Flash guy so I prefer developing for the front end. Even so, I quickly discovered that people had good reason to love RoR as much as they do. It’s beyond easy to work with and it’s a lot of fun!

Recently, I received a copy of Ruby on Rails: Up and Running a thin little book by Bruce A. Tate and Curt Hibbs. It had been a while since my initial discovery of RoR, and I wanted to learn more. Coming in at a mere 167 pages, I didn’t mind sitting down to read this book. Seriously, it’s a super-thin book, and I think many people might pass it up because it looks useless. However, I found that the authors crammed a ton of knowledge into every page.

A warning: This book assumes that you aren’t a programming newbie. It does not contain any introductions to the Ruby language or Object-Oriented Programming. It covers the basics of the Rails framework–enough to cause some damage–and that’s it. If you think RoR sounds pretty cool, but you don’t know Ruby, I would recommend checking out an online book, Programming Ruby: The Pragmatic Programmer’s Guide, first. It’s free and packed with information. Ruby is a bit different than other languages that you might be used to like C, Java, or Actionscript. That can be disorienting at first, but once you pick it up, you’ll be golden.

The first chapter covers the very basics. You’ll get InstantRails, the “one-click” web server I mentioned earlier, all set up. The authors examine the structure of a Rails project, and they show you how Rails provides all sorts of scripted generators to make file creation fast. You’ll look at the built-in Model-View-Controller (MVC) layout, and work a bit with the Controller and the View.

Over the next couple of chapters, you’ll learn about ActiveRecord, an exciting way to work with and abstract your database from the application. The authors show you some naming conventions that Rails naturally understands for connecting your classes to database tables. Similarly, some built-in functions provide ways for you to create relationships between your classes that match your table relationships.

The third chapter introduces scaffolding. In the early stages of the development cycle, you often need to put together simple interfaces so that you can interact with your application. Generally, these will be scrapped later for the final design. To make up for this lost development time, Rails provides scaffolding to build these temporary pages for you. It’s easy to replace these pages when you’re ready, or you can even ask Rails to give you the code it generated so that you can flesh out and build on top of the scaffold.

Before going into a chapter on unit testing, the authors show how to work a bit more with views. These are the actual displayed webpages. They cover things like templates for things like common headers and footers and functions for including stylesheets, images, and links (to generate properly structured URL for you). After that, you’ll discover an entire chapter on AJAX including built-in techniques for drag-and-drop, data filtering, and content replacement.

The holiday break is a perfect time to cross-train in other languages and work on fun projects for which you don’t normally have time. If Ruby on Rails is part of your to-do list, consider picking up Ruby on Rails: Up and Running. Merry Christmas and happy coding!