I've been contemplating the move towards a self-hosted Subversion
repository for quite a while. My earlier attempts worked but left me
with a lot of inconvenient and sometimes quirky side effects. These
experiences always led me back to hosting Subversion on Linux, which is
really where it works most naturally. Recently, however, I decided to
retry my luck with Subversion hosting on Windows and I made the call to
go with a "package" instead of doing the Apache / Subversion
integration myself.  The tool that I went with, VisualSVN, is a
Windows version of Subversion that targets primarily Microsoft
developers using VisualStudio as their development platform. Matter of
fact, the Subversion server package is freely distributed and the
actual product that is sold is the Visual Studio plugin that allows you
to tap into Subversion from Visual Studio. With a 30 day trial period
and $49 price tag, I decided that it couldn't hurt to try it out. My
findings are below: - VisualSVN Server - The
VisualSVN server, as mentioned earlier is a freely distributed product.
You can get this piece of software whether or not you ultimately decide
to buy and use the Subversion Visual Studio plugin. The server runs
exclusively over HTTP / HTTPS (using OpenSSL) and does not support
Subversion's binary protocol or running Subversion over SSH. Obviously,
this means that Apache is in play. A version of Apache is included in
the distribution. Initial configuration of the server is very easy, the
setup instructions describe the extent of it. As I blogged about
previously, this changes a bit if you try to get Apache and IIS to run
side-by-side. In this case, you need to be very explicit and tell the
very greedy IIS to stop listening on other IP addresses so that port 80
can be shared by IIS and Apache. I included links to the Microsoft
article in my earlier post. In this case, you'll want to use httpcfg delete iplisten -i xxx.xxx.xxx.xxx to stop IIS from listening on the port Apache is running on.
The
folks who designed VisualSVN added some cool management functionality
that shields the administrator from lower level Subversion commands.
Implemented as a Windows MMC snap-in, Subversion repository
administration be performed right alongside other server management
tasks. The MMC enables one step creation of repositories (with or
without the standard Subversion folder structure), creation of users
and groups, and assignment of user privileges to repository actions.
- VisualSVN Visual Studio Plugin - As
useful as the server is, the real product is the VisualStudio plugin.
The most recent version of this plugin works on VisualStudio 2008 so I
thought I'd install it and give it a whirl. Installation is fairly
easy. Both TortoiseSVN and the VisualSVN plugin must be installed. I
don't know exactly how VisualSVN communicates with Tortoise but it seems to
make sense to leverage an existing Windows Subversion library rather
than building everything from scratch. Using both the plugin and
Tortoise gives you two ways to work with Subversion. In my experience
with other Java IDE plugins (Netbeans and Elcipse), this is sometimes
necessary to get around the shortcomings of the browser plugin.
Adding a project to VisualSVN using the
plugin is, as it well should be, a relatively easy task. VisualSVN has
some intelligence built in above and beyond the basicTortoiseSVN
libraries. In my case, the plugin didn't add my Visual Studio settings,
binaries, or a bunch of MP3 and JPEG photos that represent content and
really didn't belong under source control. Other than that, a lot of
the processing is just handed over to TortoiseSVN. The SVN UI presented
by the plugin should all be pretty familiar to you if you've ever used
TortoiseSVN before.
This looks to be my keeper for Subversion hosting. Now I need to port over my existing repositories into the VisualSVN server.
I've been busy since returning from vacation on getting my new iMac up
and running. Aside from the machine being a physical work of art, it's
also been performing very well and runs so silent that I'm hearing all
kinds of new noises in my house that I wasn't aware of before. This
doesn't mean that I've completely forsaken Windows. In fact, the move
to the Mac has allowed me to finally move to Vista on my home machine
and install Visual Studio 2008, which is killing my work laptop. For
those of you remotely familiar with the Mac, running Windows
side-by-side with OS X has been possible since the release of the
Intel-based Macs. This started with Boot Camp and gained serious traction with the release of Parallels. Most recently, VMware jumped into this space with their Fusion
product for the Mac. I went with Fusion due to reviews on both Apple's
site and Amazon.com that seemed to indicate that Fusion was more stable
and that there were far more converts from Parallels to Fusion than in
the opposite direction. I'm running 3 operating systems now on
this machine, 2 of them under Fusion 1.1. Mac OS X Leopard came
pre-installed with the machine and Vista and Ubuntu Linux are running
under Fusion. Despite the 64-bit Intel architecture on the new Macs,
both the Vista and Ubuntu installs are 32-bit. I didn't hear enough
good news about the 64 bit releases to convince me that they were worth
pursuing. All of this is running on 4GB of memory. Only 1 GB was stock
and you'd be crazy to pay Apple's prices for memory. Other World Computing (OWC)
will get you to the 4GB maximum for less than $100. The memory install
took all of about 10 minutes and OWC's service and delivery were
nothing short of outstanding. As far as the individual operating
systems, they are all running fine. That said, everyone puts different
kinds of stresses on their machines. Mine is software development and I
require each of my operating systems to run at least oneIDE. That's actually the reason for the existence of these VMs in the first place. Although my initial research prepared me for the worst, I've had no issues with running IDEs
concurrently on all 3 operating systems. I've encountered some small
quirks, which I've documented below for anyone who might find this sort
of thing useful: - Mac OS X Leopard - I'm running NetBeans
6.0 with the Ruby-only configuration. Much to the chagrin of many Mac
developers, Leopard did not ship with Java 6 even though it was
included in some of thepre-releases. This proved to be a non-issue for the installation of the latest version of NetBeans. Obviously, running NetBeans in Ruby-only mode means that I'm not exercising the JDK and thus avoiding what could potentially be a lot of issues.
- Windows Vista - Although I've had issues getting used to the Vista operating system from the Windows 2003 Server / Windows XP
I've become so familiar with, I've had few issues actually running
Vista. I'm running Vista with the 1 GB RAM that Fusion recommended and
have had no issues thus far. The only issue I encountered was trying to
install Vista in Fusion Easy Install mode with multipleCDs , as opposed
to a DVD. This is a documented issue with Fusion that I didn't become
aware of until I ran into it head-on. Simply switching to a normal
install solved all of my issues. On top of Vista, I'm running Visual
Studio 2008. This runs pretty quick - even on 1 GB and builds of
moderately sized solutions are pretty fast. TheIDE is really responsive and you really only notice that your running in a virtualized environment if you try to resize the entire Vista window to get more real estate for the IDE.
- Ubuntu 7.10 - Despite the size of the operating system, this installation took longer than Vista. I chose not to use one of VMware's canned virtual
appliances and go with a fresh install. I would probably re-examine
this decision if I had the chance to do it all over again. Ubuntu is
running NetBeans 6.0 with the full Java EE stack. The install of
NetBeans downloaded directly from netbeans.com went really well once
the proper Sun JDKs were installed. Both the Java 5 and Java 6 JDKs
were available directly from Ubuntu's installation utility. I installed
Java 5 first and, after realizing that it was a vanilla 1.5.0 release
that didn't meet the requirements for NetBeans 6.0, I installed Java 6.
Things have been just dandy since then.
After a long hiatus, I just got done working my way through a 6 month
photo backlog, arranging and backing up photos and picking the best
ones out for uploading to Flickr. You can find the new photos in the
photo section of my blog. I was working my way through videos as well
and preparing to convert some of these to Flash for uploading. If you
look at the videos section of my blog, you'll notice that there are no
new videos. So what happened? Although I'm really happy with On2
Technologies Flash encoding software, the process of importing and
transcoding video is time consuming and CPU intensive. Then there's the
entire upload and markup creation process, which is a royal pain that I
should have long since automated away - but I haven't. What I'd really
like is a process similar to the one that I have with Flickr: I upload
photos using a OS-specific program (uploadr) and they just appear on my
blog. I've known that this process needs to be replaced for a while,
I've just been hesitant to pull the trigger. Enter Smugmug... Smugmug,
the family owned photo service that leans heavily on Amazon's S3
service for file storage, announced last week a significant upgrade to
their video hosting capabilities by supporting the H.264 video format.
Right now, Apple's QuickTime plugin provides the best support for H.264
but Adobe's newest version of Flash will also be supporting H.264. If
Microsoft wants to remain competitive with Silverlight, they'll be
following suit as well. So what does this mean? This means that Smugmug
will automatically transcode your uploaded video. Depending upon your
membership level, video can be encoded at DVD resolution (960x540, for
power users) or HD (1280x720, for pro users). You upload it and Smugmug
transcodes and hosts it, providing unlimited bandwidth and storage
space. Since seeing is believing, click on the image below to see a sample SmugMug Thanksgiving video and tell me you wouldn't like to have online video of this quality. 
If you're going video, you've got to go big and at
$150/year, Smugmug carries with it a fairly large price tag. However,
when I factor in that I can cancel my Flickr subscription, stop
upgrading my Flash encoder, decrease my bandwidth utilization on my
hosting service, and have a hassle free upload and transcode
experience... in HD, I'm sold. As an added bonus, Smugmug has just
added an adaptive imaging sizing capability they call "SmugMungous"
that automatically selects the right size picture for your screen. To
get the full effect, this needs to be tried on a fairly large monitor.
And by the way, you can point to your smugmug gallery using a custom
domain or sub-domain and you can share video updates as an iTunes
Podcast that friends and family can subscribe to. SmugMug is
just one more piece in my grand attempt to upgrade my life to HD. We
went with HD TV almost 3 years ago now and it's hard looking at a
normal signal now, especially on a large 16:9 screen. I'm strongly
considering Smugmug for its HD capabilities but this is going to cause
me to reexamine two other areas of my life that need HD upgrading: my
HD recording capability and HD playback capability. I'm waiting for
Santa Claus to drop an HD TiVo down the chimney. The $1000 dollar price
tag for the original Series3 TiVo was a pill I couldn't bring
myself to swallow, no matter how much I love TiVo. AT $300 and almost
all of the features of the Series3, the HD TiVo got my
attention. I'm also looking at an HD camcorder, an essential item if
I'm serious about the Smugmug thing.
That's a lot of upgrading to do. Still, there are several areas that
I'm not upgrading. I'm waiting for the Blu-ray / HD DVD war to show
some signs of abating but this is definitely a medium worth revisiting in 2008. HD Radio - now I just don't get this one!
Another in the installment of Rails on Windows “gotchas”,
there are some things to be wary of when working with the Simple_Captcha plugin
in the Windows environment. In terms of basic background, the Simple_Captcha
plugin facilitates the integration of CAPTCHA (Computer Automated Public Turing
test to tell Computers and Humans Apart) image recognition tests, like the example below, into a Rails
application. Facilitates is perhaps not a strong enough term. The plugin makes CAPTCHA
integration dirt simple.
 The Simple_Captcha plugin uses RMagick for generation of the
CAPTCHA recognition images, allowing for various image styles and distortion
levels. The CAPTCHA can be integrated via the controller (this one is dirt
simple) or via the model (this one is just silly simple). You can find out more
about these and various other integration options on the plugin’s page.
If you’re doing Rails development on the Windows platform
and are not feeling especially masochistic, the rmagick-win32 gem, which is
bundled with a copy of the ImageMagick Windows installer, is really the only
way to use RMagick. For a long while, the 1.13.0 rmagick-win32 gem was the
standard. However, this gem is likely to cause you issues and you should really
upgrade your gem to the 1.14.1 gem or greater. These gems are fixed to work
with RubyGems 0.9.4, which is the most recent version of this gem as of this
blog post. If you don’t perform this update, you’re likely to see ImageMagick
issues bubble up at runtime.
On Windows, these runtime errors frequently manifest
themselves as ‘cur_image’ issues. Several of these issues have been reported on
the plugin’s page. My post on 10/6 covered fixing these issues by upgrading
your RMagick gem. Please don’t downgrade other gems, as suggested in some other
posts; this will only make your life more miserable in the future.
All-in-all, the RMagick Windows gem is an excellent way to
make powerful image processing capabilities available to all, including those
unfortunate enough to be stuck on a Rails on Windows development platform. The
plugins built on top of RMagick such as Simple_Captcha and Attachment_Fu are
incredibly powerful and remain very simple by leveraging RMagick’s
capabilities. Just beware if you’re developing on Windows, a little bit of tweaking
and debugging may be necessary to get these plugins to work as advertised.
I’ve posted about how impressed I was with NetBeans as a Java IDE and the incredible progress this product has made in the last couple of years. I knew for a while that Ruby on Rails and JRuby support was coming for the next major Netbeans release (v 6.0), but I hesitated moving from RadRails to NetBeans until the feature set had stabilized. Last week, the Netbeans 6.0 beta was released and, with RadRails stagnating somewhat under the Aptana brand, I caved in and made the switch.
George Cook does an excellent Job of running through the new features with lots of nice pretty screenshots. If you’re looking at moving to Netbeans as a Rails IDE, it’s the first place I suggest that you go. Some of my favorite features of Netbeans (with screens shamelessly stolen from George’s site) include code completion

…and debugging

There are several features from RadRails that I miss and that I hope the NetBeans team will consider integrating over time. These include the ability to import a project directly from Subversion and the test window that allows you to visually check the status of your tests and select particular tests to run. Those features aside, I don’t plan on going back to RadRails. NetBeans has made so much progress so quickly, I can only imagine that it’s going to put significant distance between itself and RadRails in the near future.
You can get Netbeans 6.0 here, available as a skinnied-down Ruby only version if you want. Finally, since Netbeans uses JRuby as the default interpreter and expects the Derby Java database, this article on wiring NetBeans for InstantRails should get you up and moving with the standard Ruby interpreter and MySQL database configuration, regardless of whether you’re using InstantRails or not.
Final note if you're brand new to Ruby on Rails and reading this post. Skip right to Rails 2.0, which is now in preview mode, to avoid dealing with Rails 1.2.x deprecations and to benefit from some of the new defaults. Enjoy!
During a discussion the other day, I found myself repeatedly asking the question of how many organizations could make the leap from an organization dabbling in services (SOA believers) to an organization living SOA and benefiting from services (SOA achievers). I kept referring to the SOA chasm, this nearly insurmountable gap that needs to be crossed to move from an SOA believer to an SOA achiever. The image below is my visualization of this gap.

Why is it so hard to make it from one side to the other? It’s because this leap requires an organization to rethink everything; fundamentally changing the way they fund, govern, build, and host their applications. If you’re wondering what an SOA achiever looks like, check out this article on the Amazon.com architecture. Note the stat near the top of the page – between 100 and 150 services are accessed to build a page. These guys have made the leap.
I’ve heard a lot of contentions that the move to an SOA represents an evolution, not a revolution. I think this is true for only so long. An organization can incrementally improve their capabilities as an SOA believer but once they reach the end of the SOA believer cliff, it’s an all-or-nothing proposition. When an organization has completed the construction of their utility services and the time comes to tackle the core business entities, functions, and processes, it’s the SOA moment of truth. That quote from the Matrix before Neo tries to jump the chasm between two buildings rings in my head, “You have to let it all go, Neo; fear, doubt, disbelief. Free your mind!"
Tad Anderson
posted about the release of an SOA-related e-book from Microsoft concerning
Service Oriented Architecture (SOA). This is one area in which Microsoft has
remained notably quiet compared with competing enterprise software vendors such
as IBM and Sun. As Tad points out in his post, Microsoft has made some forays
into SOA publications and they have been pretty readable.
Their most recent publication, SOA in the Real World (mirrored here), is one of the better pieces of SOA writing that I’ve encountered,
vendor-specific or otherwise. It uses Microsoft technologies to illustrate
certain principles but it manages to maintain a largely implementation-agnostic
viewpoint. The e-book has multiple authors but it was edited together in a very
seamless way, which is not always the easiest thing to pull off.
The e-book appears to have been pulled together by
Microsoft’s Architectural Resource Center (ARC). No authors are listed
specifically and the ARC branding is new, somewhat resembling the branding used
for Microsoft’s Architecture Journal. The publication includes a pretty sound
enterprise SOA approach, detailed explanations of how some of the major pieces
of a SOA come together and a description of how Microsoft’s technologies fit in
the mix. Whether one architect’s opinion or the Microsoft party line, there are
some insightful and succinct explanations provided, such as the differences
between Workflow Foundation and BizTalk when it comes to implementing workflow.
This book is a great read for anyone looking for a solid
introduction to SOA and could well be the definitive
read for anyone dealing with SOA and Microsoft technologies.
I was performing functional tests on my models that employed Attachment_Fu this morning and thought it would be worthwhile to share the code since it was a bit of a hassle pulling it together. Kudos to Mike Subelsky for his introduction to functional testing Attachment_Fu. It got me going in the right direction. What proved difficult once again was the multi-model controller. Once I got over that hump, I was on my way. As you can see from all the detail in the HTTP POST below, that was not an entirely easy task. class ProductsControllerTest < Test::Unit::TestCase ... def test_create_with_user num_products = Product.count imgdata = fixture_file_upload( '/files/image.png', 'image/png') audiodata = fixture_file_upload( '/files/sound.mp3', 'audio/mpeg') post :create, { :product => { :name => "Widget", :description => "A small tool-like item", :weight => "3", :price => "19.99", :language_id => "1" }, :image => { :uploaded_data => imgdata}, :audio => { :uploaded_data => audiodata} , :html => { :multipart => true } }, { :user_id => users( :valid_active_user).id} assert_response :redirect assert_redirected_to :action => 'show' assert_equal num_products + 1, Product.count end ... end
|