Programming, technology, and CRM – from a Belgian programmer exiled to Missouri
  • rss
  • Home
  • Contact Me
  • Welcome

The big mockery – NMock, Rhino Mocks, etc.

Nicolas Galler | February 26, 2007

Yes it finally happened – I got tired of hand coding mock objects. Amazing how long it can take to prepare a mock when all I want to know is find out how many time it gets called and with what arguments.

I had heard of Rhino Mocks a while ago, of course (I read Ayende’s blog every day – he is a genius). I tried NMock2 as well. Both were fairly easy to get into. NMock2 is a bit more polished as far as the status report etc, but RhinoMocks being compiled rather than using strings makes it a lot easier to use, and the syntax is a bit more concise as well – and when you are cranking out test cases every little speed up helps!

Comments
No Comments »
Categories
Programming
Comments rss Comments rss
Trackback Trackback

Windows Power Shell

Nicolas Galler | February 21, 2007

I toyed with it a bit and read a quick tour of the scripting features here: http://arstechnica.com/guides/other/msh.ars/. Looks awesome. Now I am really pissed they didn’t build that into Vista – looks like I will be stuck with VBScript for another 5 years on machines that are out of my control.

Comments
No Comments »
Categories
Programming
Comments rss Comments rss
Trackback Trackback

Mono

Nicolas Galler | February 18, 2007

Need to look into it

Comments
No Comments »
Categories
Programming
Comments rss Comments rss
Trackback Trackback

Saleslogix web cookie

Nicolas Galler | February 18, 2007

Saleslogix web uses a cookie named slxweb for its session info. This is where the authenticated user id etc are stored. For the customer portal the conid and accid from this cookie are used (there is probably another more “real” session mechanism that uses the DB, I didn’t check). Anyway the data in slxweb is stored in encoded form, you need to use the SLXRWEL library to decode it. The password is simply the user’s host. Code:

String slxweb = Request.Cookies["slxweb"].Value;
SLXRWEL.SLXRWEOBJClass slxRwEl = new SLXRWEL.SLXRWEOBJClass();
try
{
slxweb = slxRwEl.RemoveKey(slxweb, Request.UserHostAddress);
}
finally
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(slxRwEl);
}

Comments
No Comments »
Categories
Programming
Comments rss Comments rss
Trackback Trackback

XSLT br tag with MSXML

Nicolas Galler | February 15, 2007

I used the MSXML transformNodeToObject method to apply a stylesheet to form an HTML document. I had set xsl:output to html. The <br/> tags in the stylesheet did not go through correctly though – apparently MSXML would automatically transform that as <br> then fail because it wasn’t closed properly. Setting the xsl:output method to xml fixed the problem. The XSLT processor object in Firefox did not have that issue, by the way.


<xsl:output method="xml"/>

Comments
No Comments »
Categories
Programming
Comments rss Comments rss
Trackback Trackback

Note to self

Nicolas Galler | February 12, 2007

2007-02-12 14:44:04,827 [TestRunnerThread] ERROR NHibernate.Impl.SessionImpl – could not synchronize database state with session
NHibernate.AdoNet.TooManyRowsAffectedException: Unexpected row count: 3; expected: 1

Caused by an insert trigger on the contact table.

Comments
1 Comment »
Categories
Programming
Comments rss Comments rss
Trackback Trackback

Subsonic Fun

Nicolas Galler | February 12, 2007

So I tried playing with SubSonic this week end. Didn’t have much time, I took maybe 1h total, but it seemed a lot of fun. Kind of a pain to set up – there is this cool “web site starter kit” that is already all set up with ASP.NET memberships and all but for some reason it is not available for the latest version – and when I tried dropping the most recent DLL in it it puked on me. So I just went back to the sample web site included with the current version (1.06) and set it up by hand. Anyway basically you point it at the database and it generates the entity classes and DAL automatically. A lot easier than MyGeneration + NHibernate, especially when I am still toying with the object model. It doesn’t support niceties like lazy loading or cascading and is not quite as flexible (so I don’t think there is a way of coaxing it into reading the SLX database), but it might still be a great tool for RAD and prototyping. I also plan to check ActiveRecord in the very near future.

Comments
No Comments »
Categories
Programming
Comments rss Comments rss
Trackback Trackback

Categories

  • Experiments (4)
  • Interesting (1)
  • MSCRM (1)
  • Programming (60)
  • Rant (3)
  • Saleslogix (34)
  • Tricks (8)
  • Uncategorized (24)

Post History

  • 2010
    • January (3)
    • March (1)
  • 2009
    • March (2)
    • April (1)
    • May (3)
    • June (3)
    • July (1)
    • September (3)
    • October (2)
    • December (5)
  • 2008
    • January (9)
    • February (4)
    • March (9)
    • April (1)
    • May (5)
    • June (8)
    • July (1)
    • August (2)
    • September (1)
    • November (1)
    • December (3)
  • 2007
    • January (3)
    • February (7)
    • March (1)
    • April (3)
    • May (6)
    • June (2)
    • July (1)
    • August (2)
    • September (5)
    • October (3)
    • November (5)
    • December (4)
  • 2006
    • January (2)
    • September (1)
    • November (3)
    • December (4)
  • 2005
    • April (1)

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox