-
NServiceBus Templates posted on 12 May 2011
For anyone whose interested, the Visual Studio Gallery has some templates for NServiceBus.
http://visualstudiogallery.msdn.microsoft.com/9546d382-7ffa-4fb8-8c0f-b7825d5fd085
NServiceBus Templates includes project and item templates for those building solutions upon NServiceBus.
Project Templates
- Client Endpoint - defines a project that performs as a client
- Server Endpoint - defines a project that performs as a server
- Publisher Endpoint - defines a project that performs as a publisher
Item Templates
- Message Handler - default implementation of the IHandleMessages
interface - EndpointConfig - default implementation of developer endpoint configuration
-
Finding the correct Process Id for a website for DotTrace posted on 28 Apr 2011
Finding which process belonged to which application pool was simple in IIS6, it was a simple case of running up a Command Prompt and typing in
iisapp.vbs
.Unfortunately the script wasn't bought across to IIS7. So when it came to profiling a site I was baffled as to why the DotTrace results were showing information for threads completely unrelated to the website I was looking at.
Turns out I was looking at the wrong Process Id...
So I needed to figure out which Process Id belonged to which site.
-
jQuery Templating - Nested Collections posted on 23 Apr 2011
Was asked me a couple of weeks ago if it was possible to have nested collections in a jQuery template. Well you can! The sample code kind of buries the ability since it tries to demonstrate too many things at once. But it's rather simple.
{{"{{each *array*"}}}} *stuff* {{"{{/each"}}}}
So assuming we have a simple json object like...
var people = [ { firstName: "James", favouriteColours: [ { colorName: "green" }, { colorName: "red" } ] }, { firstName: "Jack", favouriteColours: [ { colorName: "blue" }, { colorName: "red" } ] }, { firstName: "Jim", favouriteColours: [ { colorName: "blue" }, { colorName: "black" }, { colorName: "white" } ] } ];
We can iterate over the people and then their favourite colours by using
each
in the template like so: -
NHibernate - Querying relationships at depth! posted on 13 Apr 2011
The title may be a bit leading, this isn't about querying one-to-many-to-many, that is simply not possible. Well it may be possible, but it's not practical by any means.
It's not practical because when querying for one-to-many you end up with a cartesian product. With a one-to-many it's easy to transform the data knowing the root is a single result while the relationship is a collection of all the results.
If you have a many-to-many it works too since it's the distinct root and the relating collection of all results for a single root item.
But to select a one-to-many-to-many it's far too complicated to work out what the hell is going on. Well in my opinion it's far too complicated.
-
Installing MongoDB Service with logs posted on 12 Apr 2011
Just tried to install MongoDB as a service on Windows 7, but came up with issues trying to specify where to store the logs...
http://www.mongodb.org/display/DOCS/Windows+Service
The example on the website shows a directory path, but when you look at the help in the command windows it says:
all output going to: c:mongodblogs logpath [c:mongodblogs] should be a file name not a directory
I'm not sure why, maybe the documentation isn't up to date, but specifying a physical file, like 'log.txt' the service installs fine.
-
Career Starting Salary posted on 28 Mar 2011
Every now-n-then I read threads on forums to do with pay & salary in the IT industry, and it always frustrates me when I come across posts where people are whinging about junior / no experience jobs being offered for 'low pay'.
The latest thread can be seen here: http://forums.whirlpool.net.au/forum-replies.cfm?t=1657193
In the thread the original poster was complaining about a job ad being advertised at 35-40k, for a grad position. It seems that a lot of people agree with him. Some of the comments are:
35k is shockingly low. You could walk out and get an office job with no training and no stress for that amount. As a grad you will have to be learning things in your spare time etc.
-
WP7 Nights at the Round Table - Feb 28 posted on 19 Feb 2011
http://www.nickharris.net/2011/02/wp7-nights-at-the-round-table-feb-28/
*Event: *
WP7 Nights at the Round Table - Feb 28th Sydney*Purpose: *
Let's get together for some drinks to trade WP7 Dev stories, demos or seek free advice from other devs to help get your app off the ground and into Marketplace. This event will be informal, around bar tables, so bring along your device or laptop if you wish to show people what you have been up to.*Let us know your coming: *
If your on LinkedIn please indicate your attendance here - http://events.linkedin.com/WP7-Nights-Round-Table-Feb-28th/pub/571016 or in the comments section below.*Date, Time, Location: *
6-8pm
Tues 28th Feb 2010
City Hotel,
Corner of King and Kent St, Sydney CBD. -
Not.LazyLoad - Eager Loading with NHibernate 3.0 posted on 30 Jan 2011
A friend asked me about fetching relationships with NHibernate when something couldn't be lazy-loaded.
The reason it couldn't be lazy-loaded was because he uses Session-Per-Call, my preference is Session-Per-Request. (this is web based, I've never actually used NHibernate in a non-web scenario, yet)
The solution he's currently using is to turn off lazy-loading at the mapping. This is all kinds of bad.
I think it's best to demonstrate why turning off lazy-loading at the mapping is bad. I've come up with a, well what I consider pretty standard Blog.
Nothing special but needed something that has a few relationship"s. (I think you can click that image to make it bigger)
-
Let Keyword in ORMs posted on 29 Jan 2011
A while ago MindScape posted a new feature called Ninja Properties for their ORM, LightSpeed. Their post happened to be a scenario I used to solve with LINQ 2 SQL using the 'let' keyword to create a composite type to query against.
This would allow you to do something along the lines of:
var poo = from s in ctx.Members let fullname = s.FirstName + " " + s.LastName where fullname == "Robert Williams" select s;
This nifty query would generate SQL like so:
SELECT [t1].[Id], [t1].[FirstName], [t1].[LastName] FROM ( SELECT [t0].[Id], [t0].[FirstName], [t0].[LastName], ([t0].[FirstName] + ' ') + [t0].[LastName] AS [value] FROM [Member] AS [t0] ) AS [t1] WHERE [t1].[value] = 'Robert Williams'
After commenting in their blog post about it they implemented it and put it into the nightly build. So after some months I finally got around to testing it, for a couple of reasons. Back when NHibernate 3.0 was in Alpha, this technique didn't work! So I thought I would test it out and see if it does, as well as checkout the SQL that's generated.
-
Mindscape NHibernate Designer Discount posted on 21 Jan 2011
Mindscape have a 60% discount on their NHibernate Designer.
http://www.mindscapehq.com/blog/index.php/2011/01/20/60-off-nhibernate-designer-act-fast/
How to obtain this special When making your purchase please enter the following discount code: NHSPECIAL You should immediately see the price drop to $99, saving you $150 USD!
Great tool for anyone who hates writing XML or loves GUI's.