Sunday 28 October 2012

Windows 8 - Halloween on a desktop

I am an apple fanboy, or at least the guys at work say I am, I own 2 ipads, a 27 inch mac, a macbook pro, apple T.V. and the accompanying duvet and pillow set.

What they don't know is that I also wanted the new Windows 8 to succeed and it is for the reason that I think Apple are too damn cocky with their "new" IPad mini (its like an IPad but smaller), IOS6 with its "cloud based" mapping (that's right, all you can see is clouds) which is rubbish and some of their software which just annoys the hell out of me with its "Leatherbound retro" look and don't get me started on ITunes which i'm sure will be responsible for the inception of skynet.

I thought Microsoft were making a really bold move with Windows 8 and its metro design which I love, it looks simple and beautiful and goes back to how things should be.  And whilst I'm making good bets that windows 8 looks great and works well on a touch device, I am looking at it as a developer on a laptop device to see how cool its is, sadly, it ain't.

Why? Consistency is key we are told at work and its right, I want a system that's the same throughout, predictable, easy to use ;its anything but,  its just a mess.

For starters, we have windows 7 with an invisible start menu and its bloody awkward to get too situated in the bottom left and I often find myself clicking on or hovering on other items on the menu bar at the bottom of the screen.


If you get the crappy little icon visible, you can expect more crappy icons coming down from the top left which feature other areas you can access, good luck in recognising any of em.

Answers on a postcard to WTF is this, P.O.Box 23, redmond, USA.

Then we have the charm bar on the right (aptly named as you are charmed if you can get it to work), which appears if you manage to point to the 2x2 pixel grid in the top right hand side of the screen to make it appear.

So once we have got to the start bar, then the fun really happens as it really is just a start bar, it shows a bunch of apps to start with


that's not all your apps of course, you can right click and get all your apps :


Then I get this (an implementation of the launch pad found on IMac and just as bad I might add - hated it on mac and I do on this) Its a scrollable menu of a thousand icons which makes my eyes bleed.


So what if I want to see the reduced set of app's again? I right click of course and click... erm... All apps again???


yep, familiar territory here.  You may be asking where shu tdown is?  oh yeah its under the charm bar which you can't get too under settings... self explanatory really.

So lets go to the store, Microsoft's app store and this has a distinctly XBox feel about it except half finished. Scroll left and right and get categories of apps to buy which is nice and does actually work ok (again would work really well on a touch device) so I select the Games category :


Once i'm in there, I can use another way of selecting stuff by right clicking in the top.... sigh....


Most of the time you'll be working in the desktop that looks exactly like windows 7 so it's not all bad.

To conclude, if you have windows 7, I wouldn't bother if you are only using this on a desktop unless you really want to like I did.  Touch devices I think would be quite nice, I stand to be corrected on all of this.

A






  






Friday 19 October 2012

Overriding an importer class for a part Remember the id attribute !

So we are overriding the importer in orchard in our driver and its not getting called.  Remember the id attribute in your xml.  We have organisations and our xml looked like :


<Orchard>
  <Data>
    <Organisation>
      <OrganisationPart Code="XXX" Name="YYY" ProviderId="1" Enabled="1" />
    </Organisation>
  </Data>
</Orchard>

So add the id attribute in the organisation wrapper like so :


<Orchard>
  <Data>
    <Organisation Id="">
      <OrganisationPart Code="XXX" Name="YYY" ProviderId="1" Enabled="1" />
    </Organisation>
  </Data>
</Orchard>

and the driver.importing gets called and i'm happy !

Wednesday 17 October 2012

Comma seperated values for sql in statement with notepad ++

We've all done it,

we need a select statement of strings from a select in a sql table.  I recently did this wanting a list of codes so a quick select statement gave us this :

code1
code2
....
code2000

and i needed an in statement in sql so needed to have it :

'code1','code2',...'code2000'

quick tip, open notepad ++


Notice i selected extended, and do a replace for \r\n replace with ',' and shazam ! we have a comma seperated list, just add the first quote and the last one.

great quick tip.