Wednesday, October 26, 2011

My ideal Bootstrapper...

[Update 29-Apr-12] I've revisited Bootstrapper for a new project and it does register the StartupTasks in the IoC container and resolve them from there too (if you have your IoC extension before your StartupTasks) - this means any dependencies your StartupTask should be resolved. I don't know whether BootStrapper always did this or I was just too lazy to find it out - however with this feature you can pretty much disregard the following post!

[Original Post]
I like the Bootstrapper codeplex project - it's a nice clean approach to setting up your application....however...

I have a specific requirement to satisfy as part of my bootstrap process and I'm not sure if Bootstrapper can solve it. I'll be honest I thought it easier to write this post as I wanted to talk about my ideal Bootstrapper as well as someone hopefully telling me if Bootstrapper can do this or not!.

Lets say I have an IoC container that needs configuring - easily done with Bootstrapper.
I also have some components that need running once to perform some one-time registration. These components require some configuration values from the config file (app/web.config). Bootstrapper provides the IStartupTask interface to allow components to perform this - sweet.

I can just make a call to ConfigurationManager in my IStartupTask component(s) to pick up the relevant appSettings right?

Wrong - this sucks....appSettings suck period as they are insidious dependencies that will break your code left right and centre if you don't know what they are. They have a place in the top level application but in "components" that could be used anywhere in the software stack? No, big no. The only way to understand where they are used is to search the code for ".AppSetting" - but what if they are in an assembly you don't have the code at hand to - well you keep trying to run it until you have smoked out all the settings! Bonkers!

What I want is for the IStartupTask components to take a configuration object in the contructor - this makes it explicit and breaks the horrid appSettings dependency.....but....these constructor parameters will only be injected if the IStartupTasks are resolved through my IoC container (giving it a chance to do the injection).

So my ideal Bootstrapper sequence is this....

Initialise the IoC container
     Perform automatic programmatic registration (find all container registry/setup components and execute them).
     Process Xml config files  (this is where we would register our configuration components).
Scan for all IStartupTask implementations and load them into the Container
ResolveAll components from the container and execute them - this would ensure any ctor dependencies would be injected thus providing our configuration values.

I think I can write an extension method to the Bootstrapper to do this but it would be locked to the IoC container (there is no generic reference to get hold of ANY container used?) - not terrible though.


The key would be to introduce a "common service locator" wrapper over your IoC container in order for Bootstrapper to by able to add all IStartupTasks to the container and then perform a "ResolveAll"

...hmmmm, that's a lot of work just to eradicate appSetting references! Are they so bad if they are used just in the IStartupTask components? - These startup components are unlikely to be used anywhere else in the code/stack....

Your thoughts?

Friday, October 14, 2011

Deployment - the final (.Net) frontier


[Update 19th Apr 2012] - mission complete!...v2.4.0 of Wolfpack has been released and this includes a new set of plugins that can automatically download a NuGet package then execute a deployment tool (eg: DropkicK, MSBuild.exe) - it can even run NUnit tests (via the console runner).



[Original Post]
Another day, another project and deployment raises its head...

Thinking that this problem must have been cracked by now I had a look around the .Net landscape and found two interesting solutions.
  • Octopus Deploy - a .Net convention based deployment system using NuGet packages, loosely based on AppHarbour's approach.
  • DropkicK (aka DK) - another awesome initiative from Dru Sellers et al.
I like the simplicity of Octopus but also like DK's  fluent code based deployment.

Hmmm, this has got me thinking - Wolfpack could easily be adapted to be used as a deployment agent.

Wolfpack can already monitor a NuGet feed for new package releases and currently sends an alert if a new version of a package is detected; a small modification would enable it to instead pull down and install the package. The package format would be NuGet and it would use DK to do the "install" (included in the package itself, Tools folder with some convention to find the DK deployment implementation dlls).

You would create a NuGet feed per environment you need to deploy to. Each target machine would be running Wolfpack (akin to an Octopus "Tentacle") which would be configured to monitor the associated (correct environment) NuGet feed. "Deployment" would simply consist of publishing the package to the feed, from this point on it would be automated by Wolfpack, detect, download, deploy -> after which Wolfpack would publish an alert to let you know what the outcome was (success/fail) plus some stats.

Would I ever build this Wolfpack feature? I dunno, lets see...it's not a lot of code and it would give me an excuse to really play with DropkicK!

Anyone interested in a deployment mashup with Wolfpack + NuGet + DropkicK?


Friday, September 02, 2011

Wolfpack vNext = vExcited

I'm getting excited about the next release of Wolfpack (v2.3). It's going to be the first application  that uses Sidewinder (unless someone beats me to it with my own framework!).

I'd been discussing updates and NuGet with a few people and wondered how it could be applied to Wolfpack - its plugin architecture makes it a perfect candidate for being able to download or upgrade plugins plus I also wanted to explore a better way of upgrading the entire install - make this as painless as possible.

Taking inspiration from the NuGet.exe commandline app that self updates I had a look at the code and took the plunge and created Sidewinder. I'll let you investigate Sidewinder yourself (if it sounds interesting) but wanted to share what this will mean when it lands in the next version of Wolfpack and how I plan to use it.

Wolfpack is a pluggable, modular system - a number of contrib projects have sprung up and a few dedicated individuals have invested time and effort into adding to the HealthCheck and Publisher plugins available (Thanks guys!). Sidewinder, harnessing NuGet will bring application update to your Wolfpack installation but also provides it with the ability to pull down new plugins and deploy them into your Wolfpack installation folder (including any configuration files required).

Updating your Wolfpack install will be as simple as running...

Wolfpack.Agent.exe /update


That's it - the entire installation will be updated if a new version has been published. Your configuration files will not be updated, only new configuration files will be installed - existing ones will remain unchanged and will need manual update if changed (I'm working on a mechanism to allow the update to make changes as part of the install).

Wolfpack vNext is also taking the first steps towards a more modular system. Feedback has highlighted that the system contains lots of functionality, AppStats, BuildAnalytics, NServiceBus, WCF, Growl, Geckoboard and it would be good to split these away from a "Core" system - making these optional sub-systems that you use if required/suitable for you. I've fragmented the configuration files and started to look at turning these areas of Wolkpack into separate packages to be delivered via Sidewinder. I am also refactoring the Wolfpack.Contrib components into new NuGet packages that can be delivered with Sidewinder...they will be the first plugin test pilot packages for Wolfpack/Sidewinder!

Finally Wolfpack vNext has got some other improvements including...

  • Logging improvements to it's startup code it make it easier to debug/understand/fix configuration issues.
  • New HealthCheck - Host (ICMP) Ping
  • Ability to load HealthCheck components directly into the IoC container (this makes DI into the check possible now) 
A really cool new feature developed by Phil Bolduc is a Powershell HealthCheck - this health check can execute a powershell script to perform any tests/checks you need - this is in beta and will be delivered after vNext as an optional package like this.


Wolfpack vNext will be appearing in a NuGet gallery near your very soon!

Tuesday, June 28, 2011

Wolfpack v2.1 (Build Analytics)

Hurrah! Version 2.1 of Wolfpack (formally MonitorWang) is released!

This release is all about "Build Analytics" - a new set of plugins allow you to monitor the state of a TeamCity build configuration and then once this is complete it can extract stats from any* build tool run as part of it.

* When I say any I mean it supports NCover, SpecFlow, StoryQ reports but as usual with Wolfpack it is easy to create your own parsers to extract from any tool you might use, eg: NDepends, FxCop. It is also simple to extend it to cover other build systems like TFS, CruiseControl.

The final piece of the puzzle of to visualise this information and the Wolfpack Geckoboard Data Service does a great job of this - it allows you to display these stats directly in your Geckoboard.


Friday, May 20, 2011

Developers have Friday "playtime"?

I've observed an interesting trend from my download statistics on my main open source project, MonitorWang...that downloads often increase on a Friday.

What can we infer from this?

Developers have some down time to look at "other" stuff on Friday? Interesting to know how official this is or just people getting bored with the humdrum stuff and looking for something interesting to do at the end of the week?

MonitorWang's official birthday is 8th August when I first uploaded it to codeplex however it was in conception & development way before that so it's almost a year old. It's racked up over 1000 downloads and I've got some big plans for it to be revealed shortly. More importantly I'm starting to get feedback and success stories of it in use which is the icing on the cake - 1000 downloads means nothing if it's not of value to someone!

Thanks to everyone that has helped shape & contribute to it, in particular Rob Gibbens and David Strickland. I've hopefully got some case studies of it being put to use to illustrate further how it can form a valuable piece of your software/ops process.

Wednesday, May 11, 2011

MonitorWang v1.0.8 released

It's taken a while to get this one out - mainly due to a combination of sunny weather and a series of Bank Holidays (and the odd beer festival!).

MonitorWang v1.0.8 is released!

This is a big release - several bug fixes and rebuilds against the latest 3rd party libraries, Magnum, TopShelf and NServiceBus plus a major new feature - AppStats (all the details here including the Etsy inspiration behind it).

Comments and feedback welcome (via the codeplex discussions page)

Monday, April 18, 2011

Rich and mad?

...then you need a FlyNano in your toy garage (to compliment your Seabreacher X)

Wednesday, March 30, 2011

Spring Roundup

Podio - currently being wowed by this web application. It's a highly customisable collaborative "space" for your team to manage there activities. Essentially you create a "space" then populate it with the apps (widgets) that have the greatest affinity with what your "space" is about. So if you were collaborating on a new website then you will use apps from the software development pack (suite of apps) but you can mix and match apps from any category to provide a completely customised environment to manage your work & team with. This concept is excellent as I've used many "management" type sites, must notably (and well known) being Basecamp and found it good but not great - its suitability & popularity varied between project/client - with Podio you can tune the environment to ensure that you only have the features you need and even better you can create your own apps if there is nothing suitable available; I've not tried this feature yet but think it's the ultimate feature! Great user support from the guys there too - very responsive and from the fairly small amount of time I've spent with it so far (I'm running a new project from it) it's been a robust and good quality application but performance can be a little slow, something I think the team there are working on though.

Summary: Highly recommend this if you aren't 100% happy with your current project management tools, well worth a testdrive! (free plan/signup)


Source Meet (via - Greg's Cool [Insert Clever Name] of the Day) - this looks great! I'm interested in this as I've started to get contributors on my OSS project MonitorWang and this tool looks just the job for some remote pair programming and idea shaping. 

"Source Meet enables software developers to directly and quickly view and edit source code together, wherever they are and in the development environment they are familiar with. Not only all of the modifications to the document, but also conditions such as highlighting or position changes are synchronized in real-time with all participants. The additional combination with Instant Messaging, virtual team grouping and context-sensitive collaboration significantly enhances the efficiency in cooperation for development teams".


NuGet - the .Net package management system. This is something I've been following but not actively used, however a contributor to MonitorWang, Rob Gibbens packaged the assemblies required to create your own custom MonitorWang plugins and I have to say it's impressive stuff, a really slick way to get people connected to your code/components. Thanks Rob for introducing this!

The packages below give you the required MonitorWang assemblies to allow you to develop custom MonitorWang plugins...just choose your flavour!


Thursday, February 17, 2011

Google Infographic Tool + Geckoboard?

So just saw this (via @hugorodgerbrown)

You can upload your data and visualise it - if you use Geckoboard for your business dashboard then how about a mashup - want to map your biggest customers? Order hotspots? you name it - it would now appear possible...just need to work out how to get the Google output into Geckoboard....anyone?

Tuesday, January 25, 2011

Roundup

Another roundup post to cover a few things of interest I've discovered lately....

(via Automated Home) comes the HDMI hacker box from Kwikwai - it allows you to bridge home automation systems into AV equipment, eg: send a text string to your TV OSD! CEC is an optional command channel built into HDMI that allows commands to be sent from one device to another - eg: when you turn your TV off it sends a turn off command back down to your DVD player connected to it. This box allows you to sit in between devices and fake commands or just discover (sniff them).

(via HRB/JasonFried/Twitter) Great post on un-managing your team to unlock potential from a guy at 37signals (basecamp). Superb post - a must read! 37signals are rewritting the development team book!

Friday, January 14, 2011

NServiceBus and BizSpark

Just seen a post by Udi Dahan about NServiceBus (NSB) licensing and companies that participate in Microsofts BizSpark program (which I/mine does :-).

Essentially...
"So, if you're company is in  BizSpark, in addition to all the software you're getting for free from Microsoft, I'm happy to offer you a free NServiceBus Foundation license or $1500 off a Standard license. That includes support".

The new NSB licensing model is pretty well thought out but still restrictive in terms of physical layout of applications - the community license (and even other licenses) only allow it to run a single machine - if you want to use it across machines then it's big bucks (as far as I understand it).

Anyway - if you are in BizSpark, check the link out to benefit from Udi's/NSB Limited generosity.

Thursday, January 13, 2011

These are the 'droid's you're looking for!

I recently posted about Brands and API's and in it I mentioned the rise of Android and this new article on mashable confirms things....

Some great stats in the article if you are interested in the smartphone market. Ok, - it is from a single company but I think it shows the general trend - Android is big and getting bigger, fast....now, how's that app coming on? ;-)

Thursday, January 06, 2011

MonitorWang v1.0.6 released

Just a quick note to say that I've released v1.0.6 of MonitorWang - all the details are here.

The main focus of this release is to add some more HealthChecks...
  • Windows Service State and Startup type Checks - monitors that services are in the expected state (eg: running) and have the correct startup type (eg: automatic).
  • Url Ping - pings your urls checking for http failures and slow performance (response threshold configurable)

PS: I'd love to hear from anyone using MonitorWang - what sort of checks are you running, any problems or suggestions you have would be great!

J

Wednesday, January 05, 2011

Why a Brand needs an Open API

This is a great article by Adam Kleinberg on how a brand and enabling third parties to write exciting applications and mashups targeting new channels via your Api is so important.

The resources required to produce a website and accompanying iPhone app can be significant - what if you invested in your business/eCommerce API and a referral/developer programme instead?

The world becomes your development partner and ANYONE can start creating applications backed by YOUR business.

Take Android as an example - it's gaining market share at such a rapid pace that you will need an Android App soon to stay in the game as it's not a sector you can afford to ignore. Pouring all your money into a specific vendor channel (say iPhone) could mean you are left out in the cold when other technologies/forms/channels become viable. With an API in place it would be a simple, cheaper exercise in creating an Android application on top of the API calls - and the API gives you options in how you go about this; give the API docs to an off-shore resource, in-house team or let some bright spark come to you with their app or idea.

Sure you will always need YOUR website but an API "powers the possible" - who knows what killer mashup someone out there could dream up tomorrow - and your business could benefit from it with thousands of new sales. You have the infrastructure to process sales and transactions - let the other 6,891,463,699-ish people (world population as of today) figure out how to make money out of it for you.

2011 - year of the API! (Oh and Geckoboard, 2011 is all about the dashboard)

Happy New Year Everyone!

Wednesday, December 29, 2010

MonitorWang v1.0.5 released

Just a quick note to say that I've released v1.0.5 of MonitorWang - all the details are here.

The main feature is "Growl Notification Finalisers" - these allow you to modify the Growl notification based on the result or result count plus you can easily write your own Finaliser to adjust the Growl Notification priority or message text based on your custom logic.

There is also a major bugfix to the Castle Interceptor logic that affects the Publisher Filters.

Enjoy - please report any problems via the "discussions" tab on the codeplex site.

Saturday, December 25, 2010

Pass it down the line...

Just read this on the BBC News website and thought it a lovely heart warming story - just remember...."pass it down the line".

Merry Christmas!

Wednesday, December 08, 2010

MonitorWang v1.0.4 released

Big release this....

  • Added support for SQLite databases
  • Added a check that captures energy usage data from an Owl Energy Monitor
  • Added Publisher Filters to allow you to hook custom logic into the publication process
  • Added support for swapping between data sources for you Geckoboard Data Service Activity
  • Plus a refactor of the internal HealthCheck/Publisher mechanism (now uses the cool Magnum Pipeline components)
More details on the v1.0.4 codeplex release page.

Tuesday, November 16, 2010

FreeAgent Geckoboard widgets....its a trust thing

So I've been looking at how simple it would be to get Geckoboard widgets up and running to visualise your FreeAgent data....and the answer is, pretty easy really. The idea I had was for a text widget to display your due invoices. The FA api is pretty comprehensive and this data is available via REST as XML - authentication is http basic using your FA username and password.

I created a new FA widget user for my account and assigned it permissions up to the Invoicing Level - this protects my more sensitive data. Wrap all this up in a Google-AppEngine (GAE) app and there you have it - your FA pending invoices....

In glorious public view....oh dear

Ok, no problem - we use the Geckoboard ApiKey to secure it so that only requests with the correct ApiKey (that we set in the widget configuration) will be allowed access to the feed. Or rather I use my Apikey - it works in my GAE app as I can hard code the apikey check into it...this app instance cannot be used to provide FA data for your account as it means sharing your ApiKey with me...hhmmm - as trustworthy as I am and with a lock down FA user it's still too unsecure for my GAE widget to provide your FA data. I could generate and share a unique ApiKey for your widget but that's not what I want - I don't want to have to administer this in any form!

Furthermore - my GAE app would also need your FA widget user credentials to be able to make the FA api call to grab the data - you don't want to provide this on the url as querystring params and it can't be POSTed from your Geckoboard widget. Ideally you would tell me them - I would store them and use them when your widget called for the data - not something I want to do/offer from my what was once simple FA widget data feed!

So this problem makes something like GeckoboardApps make a hell of a lot of sense. They already have the ApiKey problem licked with a random key and feed url and I suspect storing any credentials securely is also part of the package! Nice...

Monday, November 15, 2010

Kinect does Minority Report...

via Gizmodo...

FreeAgent - accounting made simple!

About 6 months ago I swapped accountants - I had a pretty good, fully online accountant but was introduced to FreeAgent - did the free 30 day trial and was hooked - it did everything my accountants system did but better, much better....oh and soooo much cheaper, £100 a month cheaper! It handles Payroll, Salary, VAT, NIC, Invoicing, Expenses, Bank Account...the lot (my personal fav is the Out-of-Pocket iPhone app that lets you submit expense claims direct to your FreeAgent account!)

Of course I immediately used this saving to justify an iPad purchase, but that aside and six months on I can totally recommend FreeAgent. I still have an accountant, a new one, KPF Accountants - these guys are FreeAgent experts - and are really just there to get your Company Year End accounts in order...which they have just done...which makes me happy!

So to celebrate and spread the FreeAgent & KPF love for a great cost effective accounting solution (& referral discounts all round!) I thought I'd let you know about it. A FreeAgent account is about £25/month, £45/month through KPF (which includes your company year end processing PLUS the FreeAgent account)....and the excellent FreeAgent referral program offers 10% discount to both you and me if you use the "I heart FreeAgent" badge (or this link) on the right sidebar of this blog.