04
Aug 10

Bottle: A Refreshing Web Framework

I’ve been toying with some ideas lately for a neat startup.  I know I should probably come out and give more details about it, but I want to keep my lips sealed until I have something more concrete to show for it!  Anyway… I’ve been looking at doing this entire project with Ruby, but part of this project requires me to work with a remote service that uses ZeroC Ice.  I’ve come to find out very quickly, that the Ruby support in ZeroC Ice is pretty lacking, and despite my best efforts, I can’t get them to play nice with each other (if any ZeroC developers would like to share my pain, just drop me a line).

After 2 days fighting with Ruby and Ice, I decided “What the hell, let’s give Python a spin!”  To ZeroC’s credit, their Python support is working much, much better for me.  I’ve never really written anything more than a silly FizzBuzz program in Python, but I always enjoy trial by fire, so I started digging around for a nice, thin web framework to use.  After poking around for a while, I came across a little diamond in the rough called Bottle.  Working with Bottle has been a shear joy, and I couldn’t be happier with the result.  Here’s the basic idea:

Continue reading →


27
May 10

EF4: Bug in StoreGeneratedPattern SSDL

Recently at work, I’ve had the pleasure of working on a new project written in ASP.NET MVC2 under .NET 4.0.  Our team has decided to use Entity Framework 4 for data access, and for the most part, we’ve been very pleased with this decision.  One of the things I tend to make use of pretty regularly is default values for columns in SQL server.  In doing this, I’ve encountered a pretty nasty bug in EF4.  Here’s the deal:

I have several tables in my application where I add some basic auditing columns, such as CreateDate, CreatedBy, LastUpdatedDate, and LastUpdatedBy.  These columns are pretty self explanatory, and I prefer to use the SQL GETDATE() function as the default value for the date columns.  This way I don’t have to worry about setting these dates when a new row is inserted, because SQL will handle it for me.

The first thing you have to do is tell EF4 that these columns are computed by SQL server.  The way you do this is by opening the Entity Data Model (EDM) and finding the matching columns in each entity.  Once you select a column, check out the Properties pane for the column.  You should see something like this:

Continue reading →


13
Apr 10

Visual Studio 2010 Context Menus…WTF?

UPDATE 10/20/2010:  This has been fixed in a hotfix from Microsoft.  Download it here.

So I know it’s been a while since my last post, but I just couldn’t resist this one.  Here at work, we’re upgrading to Visual Studio 2010 since it’s finally been released, and overall I’m very pleased with the latest and greatest from Microsoft.  During the testing phases I installed the Beta 2 and RC versions of VS2010, and aside from horrible performance in the beta (which was later fixed), I’ve always been relatively happy.

Continue reading →


20
Jan 10

Mercurial Web with FastCGI & Nginx

So I’ve finally decided to make the switch to a distributed source control system.  The benefits are well-documented, and I’ve grown weary of Subversion.  After some research, I decided Mercurial would be best for me.  Since I have OCD, and I wanted to push via HTTP to my remote repository, I did some homework and figured out how to get everything running on my VPS.  If you’d like to see how I did it, read on.

Continue reading →


18
Jan 10

Windows + Ruby Native Gems (1.9.1)

A few weeks back I posted about getting the ruby-debug-ide gem installed in Windows under Ruby 1.8.6.  In that post I outlined how hacking a header file and using the Visual C++ 2008 compiler could be leveraged to get the gem built and installed properly.  Well, after a helpful comment from a reader and watching a few screencasts over on TekPub, I actually found a way to do this with Ruby 1.9.1 from RubyInstaller.org.

As you know, I swapped my Windows development environment for Mac OSX, and so far learning Rails has been a great pleasure thanks to Agile Web Development with Rails (Third Edition) from The Pragmatic Programmers.  When I found this alternate method for installing ruby-debug-ide I decided to fire up my Windows 7 VM and give it a go.  Here are the gems I have currently installed on my VM:

Continue reading →