Wednesday, March 18, 2009

Duathlon. Part 2

I did my event at the weekend... I was pleased that I'd got through it, but a couple of things niggled me:
1. The warden misdirected me (and about half the field!) so I didn't run over the electronic sensors at the first interchange, and didn't get a split time for my first run or bike... I just know that those first 2 legs took 1:09. I think the 4k run was about 24 mins, which means the 13k cycle must have been about 45. I do know the last 2k run took me just over 14mins which means someone walking briskly could've kept pace with me!! (But at least I achieved my pre-race goal of not stopping to walk, and not getting off the bike to push). However...
2. I had woefully under-prepared for the cycle leg. I'd convinced myself that the course would be flat and that I could rest on the bike if I was tired from running... nope! there were a couple of challenging hills to climb, and at one point (I kid you not) I was going so slowly at the top of a hill just levelling out onto the flat, that a young girl with a pretty basket on the front of her bike came zooming past me!!! (Well she had just pushed her bike up the hill, you see)
3. I didn't win a spot-prize.

All up, though, it was a good experience, and having taken Monday off to rest, yesterday I started training for the next one; about 8 weeks away in Mission Bay, there's an event. I think the short-course is 20k cycle + 5k run, so I need to train hard. Well at least that one *will* be flat... 

Wednesday, February 25, 2009

Duathlon.

Without ever consciously deciding to set New Year's Resolutions, a couple of months ago, I found myself just a little bit too large around the middle, and for the first time I actually cared.
With some gentle prods from home (The Wife) and work (Gareth, The super-fit Project Manager who just did a half-iron man!) I joined a gym and at around the same time, I caught up with my mate Jules who told me he was training for a duathlon in March.
Buoyed with a new-found lust for life (and a couple of Steinlager Pure's) I heard myself saying 'ooh I'll do that - it'll be a larf'.

So now I'm a couple of weeks away from actually competing and starting to wonder what I've let myself in for... The 'open' age group is 17-39 and I was tempted to enter the 'vets' and pass myself off as 40...

The event itself is a 'short course'. My perspective on short distances with regards to running/cycling is rapidly changing, but 4km run + 12km cycle + 2km run doesn't SEEM short to me...
Incidentally, I'm not doing the 400m swim on account of how I do not wish to drown.

Training is going OK-ish (although I have no frame of reference...) although I feel I should be doing more *real* running/cycling. I keep finding good excuses for staying in the gym: I can set the pace on the treadmill; I can stay out the sun (pasty-white-Englishman-Syndrome); it's too hilly round where I live... but with only a couple of weeks to go, I guess I'm going to have to harden up and put a couple of training runs in before the real event creeps up on me!
Maybe I'll slap some sunny on tomorrow and see if Gareth wants a gentle trot round Takapuna lake...

Friday, January 23, 2009

Salesforce Development Lesson Of The Day

I'm doing some Salesforce.com dev at a large NZ insurance company. Development as a Service can be monumentally frustrating, especially when sitting behind flaky (it's a euphemism) proxy servers, but I'm learning heaps about Client-Server development, about html, javascript and also the less transferable skills of VisualForce and Apex...


Today's lesson was a good 'un. We use wizards a lot to gently guide the users through their data-entry, and we have a 'PopupWizard' component that we use to load up the pages. Actually what happens is that the pages get rendered within a parent page as a div, and the PopupWizard component controls the page-navigation (nice...)


Now, Apex provides a couple of 'table' controls to present sets of data, including the PageBlockTable control which looks a bit like this:



One would then need to write a method on the server-side controller, called getMyAccounts() which should return a collection of objects. In this example it would probably return Account[]. The table then contains some number of columns, and we tell the page which data (from the Account object) lives in which column via the 'item' which is defined in the attribute 'var'.


Awesomely simple, eh?



What I learned today (eventually) was this: When you have two DataTables in the same wizard, even if they are in completely separate pages, you cannot call the 'var' attribute by the same name!!!


So now you know...

Sunday, December 28, 2008

Dynamics is better than Salesforce because...

This post definitely expresses my opinions on this matter, not those of my employer, or any of their associates, or their tennis partners or any of their tennis partner's live-in lovers' mates.
Hope that's legally binding; Right...


I've been doing some SFDC development since mid October, and thought I'd scribble down a few thoughts on why I prefer the MS offering.
In no particular order, these are the main reasons why MS is a better product.

- Workflow.
~ Out the box. MS allows you to compile a list of rules (event-based or time-based) and associate actions as you wish. SFDC allows you to evaluate criteria, and associate a single action if they resolve to True.
~ Child Workflows. You just can't run workflows from workflows in salesforce. I've tried. And unless I'm missing something, you just can't get one to go at all unless a user changes something via the UI, which means you can't set Triggers or field updates to start workflows either. In MS it's easy, you just mark a WF as 'child', then in some other WF you create an action 'run child workflow'
~ Complexity. SFDC has a limited number of actions: You can update a field, send an email or create a task, etc... but MS is built on WF, so if you need to do something a bit more, like invoke The Wine Company's web service to place an order for your top 10 customers at Christmas, no problems! If you can write it in .NET, CRM can handle it and integrate it within the platform.

- UX. The 'look and feel' of Dynamics CRM is much nicer. Again, this is completely a personal opinion, and I understand that the Salesforce GUI is due an overhaul in the near future. MS has some nice touches, like the 'form assistant', and the auto-complete when you exit a lookup field.

- Flexibility of hosting. Sure you can run CRM with a SaaS model. Alternately you can host it on your own server(s) as a local or Intenet Facing Deployment. Salesforce is SaaS only, and I for one find that a little prohibitive, especially if the internet is down (most likely because the client's proxy servers are having a little rest, again).


Having said all that, here's where Salesforce is nicer than MS:

- Record Types. Multiple layouts (forms) per object (entity), with individualised validation rules, e.g. an address for a lead. If lead-type is 'US' then 'State' is required, otherwise the 'State' field is removed from the form. This is achievable in MS using status flags and javascript, but is easier and cleaner in SFDC with record types.

- Apex. Yes, the coding experience is hateful, having come from an IDE like Visual Studio; Yes, the language is still very immature compared to Java or .NET, but it does give you more than (and it's not *quite* as hateful as) just using javascript in CRM. You can also use javascript in Apex pages, too of course.
 

Overall, I'm enjoying my placement because the people are nice and the work is well-paced (not trying to hit unrealistic deadlines... yet) but I'm looking forward to returning to an MS-based environment at some point in 2009...

Tuesday, November 25, 2008

MCPD needs WinForms but no WPF ???

Hmmm... am becoming vaguely interested in getting MS certified, and am currently investigating an MCPD on Visual Studio 2008 (.net 3.5). It looks like you need 3 exams, but I can't for the life of me get my head round why they have retained the winForms component and not replaced it with WPF (70-502).

This from the MS certification website:

CertificationPre-requisitesRequired exams

MCPD: Windows Developer 3.5

MCTS: .NET Framework 3.5, Windows Forms Applications (Exam 70-536 and Exam 70-505)

Exam 70-563: PRO: Designing and Developing Windows Applications Using Microsoft .NET Framework 3.5

MCPD: ASP.NET Developer 3.5

MCTS: .NET Framework 3.5, ASP.NET Applications (Exam 70-536 and Exam 70-562)

Exam 70-564: PRO: Designing and Developing ASP.NET Applications Using Microsoft .NET Framework 3.5

MCPD: Enterprise Application Developer 3.5

MCTS: .NET Framework 3.5, Windows Forms Applications (Exam 70-536 and Exam 70-505)

MCTS: .NET Framework 3.5, ASP.NET Applications (Exam 70-536 and Exam 70-562)

MCTS: .NET Framework 3.5, ADO.NET Applications (Exam 70-536 and Exam 70-561)

MCTS: .NET Framework 3.5, Windows Communication Foundation Applications (Exam 70-536 and Exam 70-503)

Exam 70-565: PRO: Designing and Developing Enterprise Applications Using Microsoft .NET Framework 3.5 (available soon)

Thursday, September 4, 2008

Dynamics CRM and Great Plains integration

**
Update Oct '08 
thanks to Jivtesh who pointed out that this has been resolved in the GP 10 installer 
**


I've been trying to provide some basic integration between CRM and GP for a demonstration, and since we have a VPC with Windows Server 2003, Windows AD, MS SQL Server 2005, IIS and CRM 4.0 already installed, it made sense to quickly install GP on the VPC; slap on the Web Services and away we go!

The plan was to create a custom aspx page that loads the Sales Order History for a debtor, and display it on a data grid; then to load that page from within an iFrame, passing the GP debtor ID as a parameter within the URL. We can store the GP debtor ID in the 'Account Number' field on the CRM Account entity.

So, first attempt: I couldn't load GP from the installer, because .NET 2.0 was not installed. Hmm. Yes it was, in fact I had .NET SP1 and .NET 3.0 SP1 installed. But the GP installer didn't recognise .Net 2.0 SP1 as a valid install of .Net 2.0. So I hunted and saw KB947538, available on PartnerSource, giving instructions on how to crack the msi, skipping the .Net check.
Seems simple enough.

Except it just didn't work. I was told that 'Microsoft Application Error Reporting' was not installed (which actually has something to do with Dr Watson), except it was... So I spent quite a bit of time trying to get Dr Watson installed, and get through to the installer. A bit of jiggery pokery later, I had the core GP product installed, and optimistically moved onto the Web Services installation...

I wasted an hour or so by getting myself confused between the Domain for the VPC AD (LITWAREINC) and the machine name (MOSS - Incidentally, why is the CRM VPC called MOSS?) - but that was my mistake, and when I put the right credentials in, I installed the Web Services straight away. Browse to them... there they are. Hurray!

So now for the application code. Firstly, go to the SDK documentation; and it really is very good. There's sample code for each and every web method, and I quickly put together a function to connect to GP, and get all Sales Orders for a debtor, filtered by debtorId.
But it didn't work.
I connected to the Web Service, but when I invoked the relevant method (GetSalesOrderList) it simply threw an unhandled exception. Bah :(

I wish I could tell you exactly what the problem was; I wish I knew more about the minutiae of Microsoft technologies; I wish I had a gold-plated Cadillac...

So anyway, I took a vanilla CRM VPC, and followed the advice of the many developers on the forums who told me (about 3 days ago!!) to simply uninstall .net before the GP install, then re-install it after...


Basically:
- uninstall .Net 3.0 SP1   (you have to uninstall the later framework, otherwise the .net 2 uninstall fails)
- uninstall .Net 2.0 SP1
- Install GP, which will install .Net 2.0
- Install GP Web Services
- Reinstall .Net 3.0
- Reconfigure IIS to set the Dynamics CRM web folder to use Asp.net v2.0.50727; since the uninstall of .Net 2.0 reverted the site to use v1.1.4322, which breaks CRM.
- Let Windows update patch the 2 frameworks up to SP1...

Bob's your uncle; the methods seem to work now, and we can (finally) start on the aspx page.

Hope this helps anybody attempting to 'quickly' put a demo together of these two integrated technologies.

Saturday, October 6, 2007

Well swipe me down, a Northern Hemisphere semi final...

Now as much as I would have loved to see the AB's deservedly take home the biggest prize for being the best team in global rugby, I have to say I wasn't overly keen to come up against them in the semis; I hadn't actually given it too much thought on the basis that I figured we wouldn't get past Ozzy... The English media have over-hyped the abilities of the English pack for far too long, and only today have we seen them live up to their reputation... Well played Andrew Shiridan, Nick Easter et al... Now for the Frenchies!!!

I still long to see a world-class set of backs line up behind them of course, but at least we can be proud of the achievement and give 100% next week...

Whatever happens, English rugby can now look to the next 4-year cycle with a foundation on which they can build...