Ruby Tuesday #15 : Ruby Round Up

23 07 2008

There’s a few things I’ve noticed over the last week in the Rubyverse that I thought it was worth highligting.  In no particular order, here we go.

In my Ruby doodlings, I’ve spent quite a bit of time with REXML.  GIven that I’m focussed on learning Ruby rather than deploying code, there’s no issue.  However, this post from RubyInside shows there are alternatives such as libxml-ruby.

Testing, both TDD and BDD style, are prominent in the Ruby community.  This post examines the reasons to unit test, questions the emphasis placed on unit testing and highlights the importance of remembering why you test.  Well worth reading and relevant regardless of your preferred language.

Finally, I came across a couple of resources that those who, like me, are learning Ruby may find valuable.  The first is the news that there is a new chapter in the Book of Ruby.  The second is a couple of posts about learning Ruby for C#ers.  These posts also mention IronRuby, so well worth reading.





Dynamic Data

3 01 2008

During the latter half of 2006, I spent a little time getting to know Django.  I was impressed - especially by the automatic admin functionality.  The challenges of using Django for real, however, were so substantial - the abandonment of a known, tried and trusted environment being first on that list - that the interest never developed further.

So, when I saw the Dynamic Data feature of the ASP .NET 3.5 Extensions Preview, I felt compelled to give it a go.  After a false start trying to use the latest CTP of SQL Server 2008 - this is only preview software, so I’d expect that SQL Server 2008 will be supported in a future version - I switched to the already installed SQL Server 2005 Express and followed the example in Scott Gu’s blog.  It boils down to three steps:

  1. Create a project
  2. Add LINQ to SQL Classes and drag the tables you want onto the designer.
  3. Modify the web.config file to enable Dynamic Templates.

Then you run it.  And it just works.  Really.  The whole thing took me less than 5 minutes.  And you can customise the look and feel easily.  This will be a great way of rapidly creating data entry screens that can be used for admin functionality or for facilitating data entry while the main application is being built.  Prototyping and creating real functionality that can be used and can evolve over time are other uses of this framework.  And being built on ASP .NET 3.5 and LINQ, it’s built on technology that you (will) know.  My only worry is that it doesn’t have a cool enough name.  (For what it’s worth, I’d suggest Aspen - ASP Extensions.) 





Analyze That

7 12 2007

While tinkering in Visual Studio 2008 today, I saw a context menu item on a project I’d not seen before: Calculate Code Metrics.  And there’s another called Run Code Analysis just above it.  Pleasingly, if unsurprisingly, you get some metrics about your code.  That’s right - feedback on your code from within the IDE.  Ok, so it’s got a little way to go before it can compete with the code metrics tools you’re probably using now,  but this is a very encouraging start.  Somehow, this feature escaped my attention until now.  There’s more info in this post from Somasegar and this post from the Code Analysis Team.  One more reason to use Visual Studio 2008.





Orcas Arrives

20 11 2007

Microsoft released Visual Studio 2008 and version 3.5 of the .NET framework yesterday.  I’ve been using the beta 2 of Orcas for a while now - and it’s very good.  Read more details about the release here on Soma’s blog.  I’d also recommend reading  Scott Guthrie’s post about the release, which includes detail of the new features.





.NET 3.5 source code available

3 10 2007

In case you haven’t noticed the buzz, Microsoft are making the source code for .NET 3.5 available for download.  Full details can be found here on Scott Guthrie’s blog.





The Service Bus

1 10 2007

In any reading or discussion about Service Oriented Architecture, it’s nearly impossible to avoid the concept of the Enterprise Service Bus.  First off, it has a great name - sounds like something Captain Kirk uses to get to work.  Secondly, it seems to be the Answer.  It connects everything together and routes and mediates and adapts and does other stuff like that.  In addition, some of these ESBs have automatic deployment and built-in development tools.

Of course, no-one can quite agree what an Enterprise Service Bus is.  Nicholas Allen, in a post about various definitions, notes:

“When I first read about ESBs in 2003, I didn’t expect to still be trying to understand them more than four years later. In comparison, there have been other technologies that in the same time frame were introduced, developed, matured, and obsolete.”

I’ve even read Enterprise Service Bus - which explains what an ESB could be in a java-centric way - and, yet, there’s this nagging doubt.  The first problem is the lack of consensus on what an ESB is or should be.  The second problem is the sheer scope of the included functionality.  I don’t like TVs that have integrated DVD players so I’m going to need some convincing that bundling the routing, transport, adapting, mediating, deployment and development into one piece of (often proprietary) software is a good idea.

Another problem with the ESB concept is the startling lack of ESBs in the .NET space.  There’s plenty in Javaland, but few, if any, in .NET.  At first, it’s easy to take this apparent gap as Microsoft missing something.  However, I’ve come to think that there may not be one in .NET because you don’t need one.  You do need transport.  You may need routing and mediating.  You might even need all the rest of the functionality of an ESB.  But you can get what you need and plug it together.  Doing so allows you to build as much infrastructure as you need when you need it, which means you can focus on delivering some useful software instead of an expensive infrastructure project.  There’s plenty of technologies you can use to implement this sort of approach (think WCF, MSMQ or JMS, BizTalk.)  There’s even guidance from Microsoft about building an ESB or you could look at Udi Dahan’s NServiceBus project.

This modular approach has a lot to recommend it.  But it doesn’t have a cool name.  Now, if we can sort that out, it might just catch on.





WCF tips

28 09 2007

I’m currently reading Juval Lowy’s Programming WCF Services.  It’s very good on the detail of WCF, but (so far) a little light on tips for using it effectively.  So, when I stumbled across David Pallmann’s blog, I was intrigued to see that he has posted a series of tips about how to use WCF.  Here are the links:

1 - Service Interface Design

2 - Service Class Design

3 - Service Hosting

4 - Configuration

5 - Infrastructure

6 - Instrumentation

7 - Clients

I particularly like the suggestion of using an SOA thinfrastructure (partly because I like the word, of course) - i.e. to use as little SOA infrastructure as you can get away with but no less.  Buying all the bits of an SOA infrastructure that you think you might need before actually building any services is a recipe for pain.





Popfly

23 09 2007

I’ve been experimenting with Popfly this weekend.  Here’s what I have learned:

  • Popfly is an alpha invite only program.  You can request an invite directly and some members have invites they can bestow upon others.
  • Popfly uses Silverlight 1.0.  If you install Silverlight 1.1, it won’t work.
  • Writing in Javascript (and XML) is fun but hard work.
  • You ‘ll want to download the SDK (the block building guide), which contains a really useful PDF that covers the basics.
  • There’s an add-in for Visual Studio 2005 called Popfly Explorer that allows you to create Popfly projects in Visual Studio.  There’s a sample solution in the SDK.
  • You’ll also want to look at some of the blocks that have already been written.
  • Popfly is a baseball term that means a high fly ball that can be easily caught, apparently.

Let’s just remember that this is only in Alpha.  When it’s in full flow - with debugging, intellisense, .NET Support (including the IronLanguage family, I hope), shiny blue LEDS  and so forth - it could very well be incredible.





Transactional Messages

16 09 2007

I’ve posted an article about transactional message processing using ActiveMQ and NMS. You can read it here.





Hurrah!

15 09 2007

It’s taken a while, but I have a working installation of Orcas Beta 2 (Professional Edition.)  I used the snapshot feature in Parallels to revert to an earlier snapshot and the install went through cleanly.  Feeling on a roll, I’ve added Expression Studio, Silverlight Alpha 1.1 tools and SQL Server 2008 CTP (I had to re-run the setup for the workstation components of SQL Server 2008.)