Thursday, October 18, 2012

Drag and Drop Simplified in WPF (and hopefully MEF!)

I've been dealing with a lot of Drag and Drop situations in MEF and a few other tools I'm working on.  The challenge has been the # of ways it can be implemented and many things can give unexpected results.  This tool/library looks to help that out.

http://code.google.com/p/gong-wpf-dragdrop/

Custom TFS Work Item Controls

http://www.codeproject.com/Articles/114592/Expression-Control-for-TFS-Work-Items

RazorPDF - An different approach to creading PDF files

Saw this on morning brew, the separation on presentation logic here and ability to create PDF's in a straightforward manner is something we have been lacking for a long time.

http://www.nyveldt.com/blog/post/Introducing-RazorPDF

Wednesday, October 17, 2012

Article on Function Point Analysis

Interesting article on doing requirements tracing by model driven development (MDD).  Seeing if anyway this can releate to the CodePlex project I've been developing.

http://www.webml.org/webml/upload/ent5/1/FP06.pdf

Wednesday, September 26, 2012

HP ALM Synchronizer and TFS Issue not finding adapter

I've been working on connecting HP's ALM Synchronizer with Team Foundation Server at work (we still are on 2008 but moving to 2012 one of these days).  I kept getting an issue saying it couldn't find the TFS Adapter even after I had done the following

Installed HP ALM Sync Server/Client
Team Explorer 2008 and 2010
Ran the Install TFS Adapter executable.

And still kept getting the failure. 


TFS. Error: com.hp.qc.synchronizer.adapters.exceptions.Adapter​ConnectionException: Failed to connect. Reason: Unhandled exception in Connect method during creation TfsConnection object. It is possible that the TFS-Adapter.dll is not registered on the Synchronizer server machine. Error message: AutomationException: Class not registered..     After some searching I found the following article that shows that when running in x64 version of windows, you have to run a second command to register the DLL properly in the registry. 

This article lays it out, but here is the command.

%WinDir%\SysWoW64\reg.exe import TFS-Adapter.reg



http://h30499.www3.hp.com/t5/Quality-Center-Support-and-News/Unable-to-connect-to-TFS-as-an-endpoint-in-Hp-Quality-Center/td-p/5287593

Tuesday, July 24, 2012

Back in the day (which was a Tuesday) I used to run a BBS.  For the youngsters that have no idea what I'm talking about, it was somewhat 'pre-internet' days where you had several boards in the area, it was all dial-up and usually only 1-2 lines.  (Mine had 2). 

There were a lot of good packages out there, my preference was PCBoard and Wildcat (though I liked PCBoard Programming Language [PPL].  Also, unless you were using RIP , there was no mouse control, everything was done through the keyboard.

One of the neat things about PPL was you could 'stuff' the keyboard buffer.  That meant that after a certain amount of code had executed, the program would exit, but then simulate key presses throughout the app to get to a file, screen, game, etc. 

Reading an article from Scott Hanselman today about a simliar issue with Lync brought back memories.  So, check this modern day keyboard and mouse stuffer

Tuesday, June 19, 2012

Using WPFToolkit.Extended in a MEF component

I'm developing a MEF component that utilizes WPFToolkit.Extended when I kept getting the following error:

{"Could not load file or assembly 'WPFToolkit.Extended, PublicKeyToken=3e4669d2f30244f4' or one of its dependencies. The system cannot find the file specified."}.


I'm looking in the Extensions folder and seeing it.  Ok, maybe Prism (one dependency) is missing.  Now to the fusion log. 
 
It lists the all the locations it looks for the DLL (probing paths), I notice that the extension path is not in there.  And thus lies the problem. 
 
You can place it in any of the probing paths from what I've seen (depending on order) but I personally chose to put it in /PrivateAssemblies for the time being. 
 
I'll fix when I deploy my VSIX for public consumption, but for the time being had to manually copy. 

Monday, June 18, 2012

MS SQL 2008 to MySQL 5.x Using Migration Toolkit

I have just been through hell.  A few facts

1.  I have no experience with MySQL except for once 10 years ago. 
2.  It's been a long time since I've used Java.
3.  Drupal doesn't play very well with MSSQL 2008 on upgrades. http://drupal.org/node/1567380

#3 was the killer.  My friends website (http://culturestab.com) was attempting to be upgraded and I could not get it to work correctly.  It looks like few have.  So, I decided to move to the more native platform MySQL.  I figured this should be somewhat easy.  It has not.  This is my tale.

My goal was simple.  Move from MSSQL -> MySQL and retain data.  Should be a tool right?  There are a couple. 

1.  Pay ones, they work, but a bit pricey.
2.  MySQL Migration Toolkit.  Retired.  But still "works".  Except with MSSQL 2008.  Given retired status, you can't find help.  When I would try to do a migration, I had problems that just kept showing up.  Hopefully this helps you get past it.

----

1.  The tool looks for a specific version of JDK/JRE.  A known bug, but the work around is to download the JRE (v7 is fine) and manually set it via the command line.  When said and done, your execution should look like this.

...\MySQL\MySQL Tools for 5.0>mysqlmigrationtool -verbose -jvm "c:\program files (x86)\Java\jre7\bin\client\jvm.dll

That covers our first issue.  Now we can actually start it.  Next.  JDBC hell.

First you need the latest JDBC drivers provided my Microsoft.  Download them here
http://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx

Next, you need to configure the migration tool to use this driver.  Here's where it becomes a huge pain in the ass. 

1.  copy from the install directory the file sqljdbc4.jar to the lib directory under MySQL Tools (../java/lib)
2.  Edit the lua file for mssql (../lua/RdbmsInfoMssql.lua)
3.  Find the method function getDriverMssqlJdbc(owner)
4.  Comment out the line
  --  grtV.insert(driver.files, "jtds-1.2.jar")
5.  Add the line
     grtV.insert(driver.files, "sqljdbc4.jar")
5.  Replace
     driver.className= "net.sourceforge.jtds.jdbc.Driver"
with
      driver.className = "com.microsoft.sqlserver.jdbc.SQLServerDriver"

Finally:  Modify the connection string template to the following. 

driver.connectionStringTemplate= "jdbc:sqlserver://%host%\%instanceName%:%port%;database=%database%;user=%username%;password=%password%" ..
    ";charset=utf-8;domain=%domain%"



After this, I was able to connect and migrate fomr SQL 2008 -> MySQL.  Hopefully this saves someone else some time and a hell of a lot of money. 

Go baby go!