Saturday, June 09, 2007
As I stated a couple days ago, I was planning on learning MonoRail for a very small project that I'm working on.  Due to various circumstances, I'm not going to be using MonoRail, and will instead be learning a little more Ruby on Rails.  The primary issue is that I've been having a lot of problems as well as frustrations with Parallels lately.  The  biggest frustration is that I can't seem to get going within VS.NET due to OS X having all my common keyboard shortcuts mapped to other things.  I know I could remap them, but when I'm in OS X I want them to be mapped to the things they're supposed to.  The other issue is that VS.NET is repeatedly hanging, left and right.  I'm not sure if its a Parallels issue, or a problem with having both Orcas and VS 2005 installed or something else.  What I do know is that it makes trying to get anything done very difficult.  The final issue, which may be much more my own fault than anyone elses, is that getting going with Castle proved to take longer than I anticipated.  My primary issue was in trying to get everything built from the trunk with the VS.NET wizards and such setup.  I'm still getting a compile error that's related to AL.exe which may be related to having Orcas installed side by side with 2005.

Anyway, I've decided to go with Ruby on Rails instead.  Below are some things that I think are going to be of value:
By the time this project is over I should have a pretty good overall feel for Rails, and will be posting my thoughts on it in comparison to my primary development platform (.NET/C#). I'm going to continue to look into getting everything going with Castle and MonoRail as well, since my initial reactions to it after going through some of the getting started material and documentation was very positive.

Regarding the Parallels issue, I think I'm going to clean things up in my virtual machine, copy them over to someplace safe on the network and go back to using BootCamp.  While Coherence and such is nice, I simply can't be productive when running the applications that are important to me (VS.NET) within Parallels.  Since Parallels supports BootCamp, perhaps I'll still use Parallels from time to time to quickly switch between XP and OS X, but for the most part I think I'll be ditching Parallels.  Heck, maybe I'll just give up Windows all together, and become a Rails developer. :)

 |  | 
Sunday, June 10, 2007 12:57:39 AM (Eastern Daylight Time, UTC-04:00)  #    Disclaimer  |  Comments [9]  |  Trackback
 Thursday, June 07, 2007
Tonight I found out the hard way that prior to version 5, MySQL don't support using an aggregate in an ORDER BY clause.  Unfortunetly my web host is currently on 4.1.21-standard of MySQL while my development machine is running 5.0.27-standard.  The end result is that some pages within the Rails app that I'm working on are not working so well on my staging box at Site5 :(

I tried to find details online about when ordering by aggregates was added, however, I didn't have any luck so all I know is that it works in the version on my dev machine, but not on the version that my web host is running.

Update: For those interested the work around is to include the aggregate in the select list with an alias, and then order by the alias.  So instead of including the aggregate in the order by like so:

SELECT Column1, Column2, etc FROM MyTable LEFT OUTER JOIN MyJoinedTable on MyTable.Id = MyJoinedTable.OtherId ORDER BY COUNT(*)

You instead need to do something along the lines of:

SELECT Column1, Column2, etc, COUNT(*) Cnt FROM MyTable LEFT OUTER JOIN MyJoinedTable on MyTable.Id = MyJoinedTable.OtherId ORDER BY Cnt

And yes, I know the SQL here is completely contrived and might not be showing why the order by count is needed but that's not the point.  And for those wondering, as far as I can tell Rails doesn't exactly make it easy for  me to do what I need to do.  I can write all the SQL myself, but I was using find along with an :include to pull in an association, which means the necessary SQL isn't something I want to write if I don't have to.



 |  |  | 
Friday, June 08, 2007 1:59:56 AM (Eastern Daylight Time, UTC-04:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, June 04, 2007
Although I'm not finished the application that I'm building with Ruby on Rails, I've decided that next up on my plate for new'ish technology is MonoRail.  Afterall, all the cool kids who aren't quite cool enough to be doing Rails seem to be going crazy for MonoRail.  As a former web guy I've done a lot of WebForms development, so its time that I see what all the hype is surrounding MonoRail.  I was originally going to build the business/data layer with LINQ to SQL, but I think I'm instead going to go all Castle and use ActiveRecord along with Ayende's NHibernate Query Generator

Unfortunately, I'm not smart enough to be able to figure out how the heck to get the MonoRail project templates to show up in VS.NET.  I'm guessing they're not necessary, but for a MonoRail newbie they seem like they'd be useful.  I'm planning on building things from the trunk, as such I tried following these instructions on Using the Trunk.  Can anyone offer any advice on how I might get the project templates working?  Should I give up and just go with the very old MSI that's available?

UPDATE: It helps if you actually read the documentation.  Running the RC2 installer and then following the necessary steps in Using the Trunk worked perfectly.

 |  | 
Tuesday, June 05, 2007 2:59:02 AM (Eastern Daylight Time, UTC-04:00)  #    Disclaimer  |  Comments [4]  |  Trackback
 Friday, June 01, 2007
Matt Warren, who has been one of the lead developers on many aspects of LINQ, recently posted two very interesting stories describing The Origins of LINQ to SQL, and IQueryable's Deep Dark Secret.  In his first post on the Origins of LINQ to SQL, Matt talks about some of the previous dead projects, such as ObjectSpaces and WinFS, that influenced LINQ to SQL.  I found it interesting to hear about how LINQ to SQL came to be, and some of the internal politics that had to be overcome to make it a reality.  In his second post, IQueryable's Deep Dark Secret, Matt talks about how a call from Don Box eventually led to what is now at the core of LINQ, IQueryable.

Saturday, June 02, 2007 12:38:52 AM (Eastern Daylight Time, UTC-04:00)  #    Disclaimer  |  Comments [0]  |  Trackback
I've thought several times about trying to learn the basics required to build an OS X application.  In the past, this meant either going with Java or Objective-C, neither of which I have much experience with.  I've heard a couple people mention RubyCocoa in the last couple of months, but I never looked into it to see what it was all about.  Thanks to Peter Cooper, of Ruby Insider, I've been enlightened and now know that RubyCocoa's goal is to allow OS X applications to be built with Ruby, which in hindsight shouldn't have been very hard to figure out. Although I don't have the time at the moment, I'm certainly going to add a "checkout RubyCocoa" task to my "stack". 

Peter offers the following links:

Friday, June 01, 2007 10:21:19 PM (Eastern Daylight Time, UTC-04:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, May 30, 2007
As I've mentioned serveral times lately I'm currently working on a Rails application.  Overall, I've really enjoyed the experience and I'm glad that I took the plunge into unknown territory.  For the most part I've been creating everything within my Rails application as resources.  For those who don't know, using resources within Rails is how cool people build Rails apps these days.  Creating a Rails app as a set of resources makes it so your app automagically has a set of RESTful services that can be consumed by the likes of ActiveResource. Up until know I've had things setup pretty simply, and as such have only had standalone resources.  Tonight I needed to add a nested resources and found this post on the topic very helpful

 | 
Thursday, May 31, 2007 3:13:44 AM (Eastern Daylight Time, UTC-04:00)  #    Disclaimer  |  Comments [0]  |  Trackback
One of the things that I've missed about using FeedDemon as my RSS Newsreader is the ability to sync my unread items locally and read them while offline.  Since my current RSS Reader is a web app, Google Reader, I had accepted the fact that syncing unread items to read on the train ride home or elsewhere was something I would have to live without.  Apparently, I'm not very forward thinking because with Google Gears I can now sync locally and use Google Reader while offline!  In fact, with Google Gears, any web app can now add offline support and thus open a whole new world of possibilities.  Gears provides a client side relational database that can be accessed via Javascript.  Under the covers Gears uses SQLite.

What's even more interesting is the thought of how Microsoft might respond, or perhaps how they've already responded.  Imagine being able to write Silverlight applications in managed code, ruby, or whatever language tickles your fancy and persist data to a local SQL Server Compact edition using the common ADO.NET programming paradigms that we're all used to.  Next imagine ADO.NET Synchronization Services thrown into the mix so that local data in the SQL Server compact edition database can be synced back to the server. 

While the advancements made by Google Gears excites me, I'm not real big on being limited to programming against it with javascript.  The idea of building web apps that can now work offline, and use local databases that can sync back with the data center using Sync Services, all within the nice managed environment provided by Silverlight would be a sweet deal.  Heck, even if that doesn't happen we should be able to write a managed wrapper on top of Google Gears so that our managed code within Silverlight can take advantage of it.

 |  | 
Thursday, May 31, 2007 12:48:32 AM (Eastern Daylight Time, UTC-04:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, May 29, 2007
Over the weekend there was quit a flurry of heated discussion about the Composite UI Application Block (CAB) that was developed by the Patterns and Practices group at Microsoft.  It started with Ayende's " Why I don't like Patterns & Practices efforts " post, and continued with Sam On CAB and P&P and More on CAB and PAG .  Things continued with Ayende's Sam Gentile is mad at me , and On the CAB Again, and Be Silent they are Agile.  Not wanting to leave all the fun to Sam and Ayende, Hammet (of Castle fame) responded with The CAB way, and signs of community immaturity , Chris Holmes jumped in with his Ayende Bashes P&P and finally Adi offers a caution with his Caution: This blog contains personal opinions post.

From my perspective, there is a bit of complexity with CAB.  However, as some others have pointed out in the comments to the posts mentioned above, thats more due to the fact that CAB encompasses a couple different components that utilize patterns that not everyone who is starting out with CAB is comfortable with.  When you get past the initial hurdles, CAB can be broken down pretty simply.  It provides dependency injection so that the various components within your application can be loosely coupled and injected at runtime (similar to Windsor, Spring, etc).  It provides an eventing infrastructure that allows for the events and event handlers within your application to be loosely coupled (you might be able to think of it as a message bus for your UI), and it provides a number of infrastructure services that allow for your application to be broken up into a modules that can be used to create an application that can be dynamically composed (think MasterPages with a little bit of a plugin type architecture for building the UI at runtime).  For those starting out it requires familiarity with dependency injection, model view presenter or model view controller, loosely coupled events/commands, as well as an understanding of some of the requirements for a dynamically composed UI.  While it's not something I would use for every application I develop, I think it's a good fit for certain applications. For anything web related I'd steer clear of something architected in a similar fashion and go with MonoRail or if you can swing it Ruby on Rails. :)

Unfortunately, as I'm sure many in the chain of blog posts above would attest, blog posts aren't always the most effective way to carry out a discussion.  It doesn't help when those involved are a group of deeply passionate people who have strong feelings and opinions.  I think the primary points of each person's blog posts are important, relevant, and worth a continued discussion.  As Ayende points out, there are many things within Microsoft, as well as within the deliverables provided by P&P that seem to be more complex then they need to be.  As Sam states, we shouldn't lose sight of the fact that that P&P group is one of the few openly Agile groups within Microsoft.  I really believe they're trying to do the right things for customers, they're trying to do as many things as possible to make sure they're not developing in a vacuum, and that they're working on the things that their customers really need.  Are they perfect, absolutely not.  Are they trying, I think so.  Are the deliverables they offer for everyone, no.  Are their deliverables appropriate for some, yes.

I think Hammet brings up another important point for us all to think about regarding our community.  We have a lot to learn, and a lot of areas in which we can grow.  Insulting one another, isn't the way to go.  Letting our emotions get the best of us is something we should try and avoid.  However, at the same time we don't want to lose our passion and fire for what we believe in.  Let us remember that we're all part of the same community, and ultimately I think we're all after the same things.  When our emotions run high and we either say things that we wish we hadn't said, or state things that aren't exactly true, we need to take a step back and realize that sometimes our emotions do get the best of us.  But as far as I'm concerned, that's part of the process.  We're all human.

Over the last couple of days I've spoken with Sam a few times about what's unfolded.  For those of you who don't know, I have a unique perspective on the situation since I work with Sam.  He's a deeply passionate individual who loves technology.  He has an unquenchable thirst for new information as our printers at work can attest to.  He genuinely wants to help the .NET community, and one of the ways that he's done that is in pointing out some inaccuracies in Ayende's post on CAB and P&P.  Based on conversations Sam and I have had in the past, I think besides some of the inaccuracies on how CAB was developed, Sam agrees with most (or maybe just some) of what Ayende has said. As Jeremy pointed out, bringing up things that were said years ago isn't the way to address any problems you might have with Sam on how he voiced his concerns.  Sam is a perfectionist, and will welcome any positive and constructive feedback you can provide him.  My constructive feedback is to not let your emotions lead you to say things you'll regret the next day.  But I'd also suggest you keep your passion, and keep doing the things that make you you.  At the end of the day the most important things for all of us is to be happy.  Don't let what's happened in the past get you down.  We live and we learn.  All we can hope for is that we better ourselves over time.  Let's leave the personal attacks to the Java community (just kidding any of you Java peeps out there), and hope we can make the .NET developer community a better place for those of us who care about producing great software.

Wednesday, May 30, 2007 3:01:56 AM (Eastern Daylight Time, UTC-04:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, May 23, 2007
I spent some time today digging into the Persistence and Tracking services available within Windows Workflow.  During my escapades I came across the following set of articles that provided some useful information for building a basic understanding of these two key services within Workflow.  Depending on how some things unfold, we may need to write a tracking and persistence service that works against an Oracle database.  Since we support both SQL Server and Oracle, and since WF doesn't provide base classes and/or interfaces for some key infrastructure classes (SqlTrackingQuery, SqlTrackingQueryOptions, SqlTrackingWorkflowInstance, etc.), we may need to write wrapper classes that allow us to work against a configurable persistence and tracking service. 

Persistence Service


Tracking Service

Wednesday, May 23, 2007 10:18:08 PM (Eastern Daylight Time, UTC-04:00)  #    Disclaimer  |  Comments [0]  |  Trackback