Getting blogging again.

John | IT | Monday, January 19th, 2009

I haven’t blogged in an absolute age, and after a few drinks with an experienced web designer friend I decided I really need to get going again.

So here’s a brief rundown of what I’ve been up to since my last blog.

Castle MonoRail

At the marketing agency I work for we have switched from using standard ASP.Net with webforms to using Castle MonoRail and it’s linked projects.

We initially took the step by moving to the RC3, as we assumed we’d be able to get more examples of documentation for this. We realised this wasn’t actually the case and there was quite a steep learning curve, but the effort was definitely worth it. After a few initial projects using RC3, and lots of reading we moved onto the trunk. We actually took it a stage further and used the trunk of the following projects.

Fortunately there is a Nant build script that simplifies the process of building all 3 projects together.

This combination of projects has really improved the quality of the code produced at the agency. For starters DRYness is a lot less of an issue now.

Separation of Concerns

Since moving to the trunk as a team we have started to go down the TDD route. This has made us consider our code an awful lot more than we did in the past.

After initially moving to MonoRail we ended up with a shocking habit of putting business logic into the controllers. To stop this we put some more practices in place. Separation of Concerns was our saviour and currently we have the following structure in place

  • Views (written in Brail - from the Rhino Tools library)
  • Controllers - These are now a very thin layer that merely communicate with our service layers.
  • Service Layer - The business logic is now done here. Including any calls to our repository.
  • Repository - This communicates to our database
  • Models - These are nothing more than DTOs. No business logic is here.

We could have put the business logic in the models, however this would mean that the Views would then have access to this logic, which is really a big no, no.

Web Standards etc

Due to the speed that .Net and backend coding practices is moving I have not concentrated very much on frontend stuff. To be honest I don’t feel that I’ve missed out on much as the front end stuff seems to change so slowly. I think I could leave it all for a couple of years and still be fairly up to speed.

The future

I’m now planning to put together blog posts during my lunch hour. This seems to be my only free time at the moment. If anyone has any good suggestions as to how I can create more time for blogging or speed up my blog writing, please feel free to offer your suggestions.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress | Theme by Roy Tanck