Monthly Archives: July 2007

Webby 3.0 – The Best Mobile Web Browser on the Planet

Standard

 

WebbyProLogoA few people have asked me what the plans are for the new version of Webby.  This post documents a few thoughts for those who are interested.

My original intent with Webby was to create a mobile Web Browser that was:

  • easy to use
  • fast (native microbrowser support)
  • powerful (tabs, gesture recognition, extensions etc)

In each version, many new features were added, which I think people appreciated.

After reading “The Design of Everyday Things”, I think future developments should now be dedicated to the former category. 

In the past I think I have equated “easy to use” with copying the paradigms used in similar products.   In the case of Webby, copying the user experience of Pocket IE and desktop browsers.  (It’s so similar to Pocket IE that some people still think it’s some sort of Pocket Internet Explorer Addin) 

Perhaps I should be considering whether the user experience of those existing “standard” products is as “easy to use” as they need to be.

Additionally I believe the main reason people use webby it’s ability to have multiple “views” of a page using Microbrowser technology. 

The next version of Webby will provide a more intuitive experience, with even easier access to it’s most popular features (such as multiple page layouts).  A new feature will be to “remember” your preferred “layout” (renamed “view”)  of a site.

Advertisements

Rhino Mocks Constraints In VB.Net

Standard

Over the past few months I’ve been getting into the Rhino Mocks mocking framework. 

A timesaver for me has been the call “LastCall.IgnoreArguments”.  This has been handy because many of the parameters in my calls are objects that I can’t really verify.

For Example:

loTransLog.RecordUpdate(Nothing,Nothing)
LastCall.IgnoreArguments()

Although this is good in that I can keep working, I have found this a little annoying as sometimes a couple of the arguments to my function are verifiable, yet I’m calling “IgnoreArguments”.  In the case above, the first parameter is a string which is checkable.

Ayende has come to the rescue for people who use IgnoreArguments with the concept of “Constraints”.    Constraints allow you to verify arguments individually.

In the example cited, I can verify the first parameter like this:

loTransLog.RecordUpdate(Nothing,Nothing)
LastCall.IgnoreArguments().Constraints(Constraints.Is.Equal("foo"), Constraints.Is.Anything)

There are lots of checks you can do besides equality.   I can even improve the above example by ensuring the second parameter (an object) is of an expected type: 

loTransLog.RecordUpdate(Nothing,Nothing)
LastCall.IgnoreArguments().Constraints(Constraints.Is.Equal("foo"), Constraints.Is.TypeOf(GetType(TheTypeIWantThisToBe)))

Read about all the other constraints available here:

Rhino Mocks Constraints – Ayende @ Wiki

The Mystery of the Disappearing Tests in Microsoft Test

Standard

image

I have finally solved the mystery.   A couple of days ago I wrote a four tests in a test class.  All seemed well.  Here there are:

image

Then “it” happened.  All of a sudden, one or more of the tests in the “Test View” would vanish without explanation.  I would rename one of them and it would return, only to vanish later.

I renamed the test methods, googled the problem, deleted code, duplicated code, when generally crazy without any luck. 

Do you believe that the position of certain declarations in your class makes any difference?  I didn’t believe so.  Until now.  In the past I liberally scattered private declarations and member variables throughout my class where I felt necessary, unshackled by the VB6esque standard of declaring everything at the top.    As it turns out, the old standard wouldn’t have saved me either…

The Problem

It turns out the “poison” which prevents Microsoft Test from finding tests is a delegate declaration.  Declare any delegate in your code and all test methods declared after that delegate will be invisible to test view.

Here’s a VB.Net example:

Private Delegate Sub ThisStopsTheFollowingBeingDetected()
    <TestMethod()> Public Sub TheInvisibleTestMethod()

    End Sub

The Solution

The only way of solving the problem is to move your delegate declarations to  the bottom of your class file:

    <TestMethod()> Public Sub TheInvisibleTestMethod()

    End Sub

    Private Delegate Sub ThisIsDelcaredAtTheBottom()

End Class

 Strange but true. 

This problem with detected in Visual Studio 2005 Team Edition for Developers.

The issue is tracked at https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=288973