Super Tuesday!

One of my coworkers recommend combining some posts together than one a bunch of ‘one offs’ of links or news of interest.

I’ve accumulated a set of links, thoughts, experiences, etc… over the last few days (I’ve been busy). 

New Sharp Architecture Release

Basically Sharp Architecture is about as close as you can currently get to a Spring/Hibernate MVC architecture in .NET.  My last project used several pieces of Billy’s previous ‘NHibernate Best Practices’ that I retrofit for mvc.  Then, Billy helped put together Sharp Architecture!

A snippet of what Sharp Architecture is at the wiki:

Pronounced "Sharp Architecture," this is a solid architectural foundation for rapidly building maintainable web applications leveraging the ASP.NET MVC framework with NHibernate. The primary advantage to be sought in using any architectural framework is to decrease the code one has to write while increasing the quality of the end product. A framework should enable developers to spend little time on infrastructure details while allowing them to focus their attentions on the domain and user experience. Accordingly, S#arp Architecture adheres to the following key principles:

  • Focused on Domain Driven Design
  • Loosely coupled
  • Preconfigured Infrastructure
  • Open Ended Presentation


SpringSource updated to 2.2.1 includes new GSP Editor

I updated my SpringSource (STS) – (see more below about STS + Grails)
The update to 2.2.1 is here:

Grooy and Grails Random Thought

As a very well done project for building web applications…what is it’s popularity out in the world?  Are companies afraid of it?  Take NHibernate in the .NET world, in spite of it’s best of breed position, companies would rather use less to not use open source (the ‘it’s not from MS position’).  Is Groovy and Grails popular out there ?  If you do Grails/Groovy development – ping me please – let me know where your at, how you like it, etc… I’d like to see if it’s made much of a dent out there!

What I’m reading: ‘Grails in Action’ : Some Thoughts While Reading

Shout out to Manning for this e-book, love their setup, easy to purchase, prices are fair, many up and coming books on topics you don’t see in the mainstream yet!

Chapter 1 – good start.  Steps through the creation of a sample grails app.  Covers the basic commands.  Only issue I had was using the ‘file db’ – so I setup Grails to run on MySQL, which was a good exercise.  Tests still run in memory, which is good.  Final part was using prototype with taglibs to do some simple ajax.  I like how it starts by not bogging down into details, but getting something up and running.    


  • convention over configuration
  • removal of much of the xml configuration
  • testing built in.
  • Domain focus, code generated is clean and ‘pojo’.
  • Built in common functionality ie. prototype.
  • Good helper support with tablibs.

Chapter 3

…Chapter 2 was a nice overview of Groovy.  I’m now moving on to ‘Modeling the domain’:
This chapter covers
â–  What GORM is and how it works
â–  Defining domain model classes
â–  How domain classes are saved and updated
â–  Techniques for validating and constraining fields
â–  Domain class relationships (1:1, 1:m, m:n)

STS and Grails
Nice setup I’m using, shows how to create or import an existing Grails project into the workspace

I like the way that Grails provides integration tests as part of the framework that automatically handle transactional rollbacks.

I like the integration that STS does provide for Grails.  But I do think doing the work from the command line is faster and more efficient.  After adding new items, just refresh the Eclipse project and it’s there.  This is especially good for quickly running tests.


One thing I see in other frameworks (ie. mvc) is the concentration on views and controllers.  Whereas in Grails, I think the pattern all starts with the domain model.  Generate the model which has what I would call ‘built in DAO support’.  GROM makes life easier  🙂


Grails validation is very well done, it’s built on a ‘constraints’ model with a built in validation DSL.  From Grails in Action:

static constraints = {
        userId(size:3..20, unique:true)
        homepage(url:true, nullable:true)

This says ‘userid must be unique (in db) and be between 3 to 20 characters long’  – nice eh?


Software Craftmanship Manifesto

Did some pair programming last couple of days.. it was fun to say ‘whoa, this needs a new class here!’, refactor, make it more readable, etc… Must have been the next day I was shown this manifesto.  The only part that is still missing is the testing part, although some of the code is using legacy code that doesn’t lend itself well to testing… nevertheless, there is a real sense of accomplishment and success in writing code when there is craftsmanship put into it… so this manifesto is spot on!


How to start agile development in your team:

Thanks to Roy Osherove, as my current client was recently asking it’s team ‘are we agile’… From the link above:

    1. start doing daily stand up meeting
    2. start doing automated builds
    3. start working in pairs on relatively complicated problems
    4. start doing code reviews
    5. start showing visible progress
    6. start trying to show demos every two or three weeks
    7. start learning unit testing
    8. learn how to code better, design better
    9. start doing TDD

As a company, there are maybe 2 items here, as a team, more like 50% ?  I will say this: more and more it’s about the culture.  Happens everywhere, even on ESPN radio there was talk about the ‘culture’ on a team in the NFL, take a so-so quarterback, joins a new team, with a different culture, and he does well…(Denver Broncos) take a star on one team, move him into another culture… and he struggles…(Chicago Bears). 

More work needs to be done to promote a new culture in companies.  How to ‘sell’ to upper management who doesn’t seem to care ‘how’ you do it, as long as you go it… vs.  technical people in a company that totally reject anything new.   Where I’m at now, every new idea is really rejected, the company is fine with it’s ‘it was made here’ approach, but it is already showing it’s age and it’s big, bulky and hard to move it forward.  Some work was done to add some domain driven design concepts, add some tests, etc…  In the end… culture… If you haven’t watched ‘Pimp My Architecture’– watch it! 

Here is a related article from InfoQ:

Tips to Select a Pilot Project for Agile Adoption (InfoQ) :

One of the most important factors which influences the success of Agile adoption is the set of learnings derived by applying Agile to a pilot project. These learnings significantly influence the organization to go ahead with Agile or fall back to their usual process. This places a lot of emphasis on the selection of the pilot project. A wrong type of pilot could end up aborting, which would be a poor advertisement for the new process.


An engaged business sponsor can help the team if it needs to push against entrenched business processes, departments, or individuals. The time and energy of a business sponsor are critical to the success of the project…all these factors become meaningful with a strong team. Hence, choosing the right team is a precursor to all the above factors.

It takes a “strong/right” team with a mindset to embrace the agile methodology.  They later become the flag bearers for other projects within the organization.  

NServiceBus – Web Asynchronous Publishing

nservicebus includes an async pages sample.  Publishing a message asynchronous to a queue and it returned back to the page.  Get 2.0 beta – and learn how nservicebus works.  This brings to mind a lunch conversation today..SOA isn’t just ‘web services’ – there is much more to it.  NServiceBus helps provide a message based architecture.   

ie. Command Query Pattern

The command service publishes messages about changes to data, to which the query service subscribes. When the query service receives such notifications, it saves the data in its own data store which may well have a different schema (optimized for queries like a star schema). The query service may also keep all data in memory if the data is small enough.

Learn More

TCP Sockets, Chat Program

Don’t ask about this one.  I am working on some port listener code for a flying sim hobby I enjoy.

Good start …

Building a Chat Server

Building a Chat Client

… by the way… Groovy does it better  🙂

s = new Socket("localhost", 8283)
s << "Groovy Rocks"

(reference : and Groovy Sockets:

.csharpcode, .csharpcode pre
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
background-color: #f4f4f4;
width: 100%;
margin: 0em;
.csharpcode .lnum { color: #606060; } mvc 2 beta released at PDC

Here are some highlights of what’s new in ASP.NET MVC 2.

    * RenderAction (and Action)

    * AsyncController

    * Expression Based Helpers (TextBoxFor, TextAreaFor, etc.)

    * Client Validation Improvements (validation summary)

    * Add Area Dialog

    * Empty Project Template

I hope to see some ‘grails like’ command line scaffolding and richer domain class support in upcoming versions.   In my post there, Phil says ‘Version 3’… so.. stay tuned!

I’m really glad to see Microsoft continuing this project, it’s a breath of fresh air – I have a 1-1/2 year project that is using it and I never grow tired of the technology part of it.   

LifeCycle Data Services (LDS)


Huh?  :)  This is one a bit out of my normal range, but I was curious about an InfoQ article talking about Flex/Flash/AIR, etc… and one of the tools they are making is LDS.   LDS is about domain modeling.

And so the way it works is that, we have a model that becomes the centre of the universe, if you want, of the server-side developer and you create a model that represents your data. You can create it from scratch or you can introspect the database as a starting point


There is a new plugin that you add on top of Flash Builder: that is the Model Designer. The process that I just described here is actually done within Flash Builder in a kind of a visual way; so we have a visual model editor. In that model, it’s more than what you typically do in a pure data model – you can add constraint and validation rules, you can specify things that typically you would have to specify again and again in view components


Once you create your model, you deploy the model and basically you don’t have to write server side code because, based on the model, we have enough to really provide a persistence layer

Nothing new here right..? Well, what caught my eye was that they are using Hibernate (my bff) !!!  So, even Adobe is hopping into the mix here 🙂

Behind the scenes, this is implemented using Hibernate – the persistence layer is provided by Hibernate – and then we also do some code generation on the client side, again the value objects and the service proxies. The key point is that the foundation for that is still the data management service

There you have it.  Now if we can just get Microsoft to embrace NHibernate and see the light…  🙂

And last…. but not least… I saved the best for last:

Slashdot post: ‘Less than Free’


On the day that Google announced its new service, the stock in the two companies that had controlled the market for map data, Garmin and TomTom, dropped by 16% and 21%, respectively. (Those companies had bought Google’s erstwhile map-data suppliers, Tele Atlas and NavTeq, in 2007.)

Read more about ‘the strategy behind Google’s releasing turn-by-turn mapping for free…’ .  Wow.


One thought on “Super Tuesday!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s