Thursday, November 08, 2007

After the party yesterday it was a little bit difficult to come out of my bed, but I managed it and was on time here in the convention hall.  So i went for the breakfast and then attend the sessions of today.

.Net Code protection and licensing deep dive for developers

This was the first session I attended.  The .Net code protection and licensing is a new tool of Microsoft.  the tool offers 2 deliverables :

  • Code protection
  • Licensing & activation

All delivered through an API, which makes it very easy to integrate in your code.  One of the contra's is that there is a little performance issue. The product is a pure .Net solution and runs under 100% managed code.

As we all now, our compiled code isn't protected and using f.e. Lutz roeders Reflector tool, you could decompile to the code.

By using the tool of Microsoft you could select everything or just certain function of which you want to protect your code.  After the protection is added, you will that Lutz Roeder Reflector tool can't give anymore your code.

To add the protection, you need a permutation key, which is unique for each vendor.

So now your code is protected against

  • IP theft through reverse engineering
  • Code tampering

For the licensing and activation, you also select the business methods and then you can set of a user can use it or not.  You can even set for the trial functionality.  Also changing afterwards the licensing for a customer is very simple by just chaning the settigns , resend the customer the licence file and he just have to activate again (or you do it over the internet).

How it works ? The use a kind of software processor to do all the work for you.  This software processor runs in a secure virtual machine engine, and they use a kind of SVM Language compiler during the compile time to create generic MSIL code, which results in a new assembly that is now protected and licensed.

Manual and dynamic mocks with c# and VSTS

when you write your unittests, it could be that you have dependencies with other layers, which aren't finished or even doen't exist at that time.  Maybe because it's another team that writing this layer.  So what can you do then : use Mock, which is a testing dounle replacement from the real layer.

There are 3 ways :

  • specialized manual
  • manual
  • dynamic

I will give the pro's and contra's of each

  1. specialized manual
    1. Pro
      • Lightweight
      • Introduces no new dependencies
    2. Contra
      • Sorry forgot them, but I will update this
  2. Manual
    1. Pro
      • Lightweight
      • General
      • Introduces no new dependencies
    2. Contra :
      • Verbose tests
      • Semantically fragile
  3. Dynamicly : todo this you have to make the use of a tool
    1. Rhino mocks
      • Recording metaphor
      • Type Safe
    2. NMock2
      • String-based
    3. NMock2 Pro
      • Succint tests
      • Very flexible
    4. NMock2 Contra
      • Not Type Safe
      • Introduces extra test dependencies
    5. Rhino pro
      • Type-safe
      • Succint tests
      • Very flexible
    6. Rhino Contra
      • Introduces extra test dependencies
      • New API

Later I will post more about Mocks and VSTS.

Smart Client Software Factory and CAB: Real World Solution Patterns

Cab = Smartclient factory = composite smartclients primarily

We did see several patterns.  I did only write down a bit of the first pattern, but will update later this part as it was a little bit difficult to follow the session and writting down everything.  But now youa lready have the idea which patterns where explained.

Patterns 1 : offline model patters
  • Provides offline experience
  • Enqueue service requests
  • execute them when online

All this is done by an agent, which

  • queue's incomming requests
  • has a request processor
  • Has a service proxy
  • This is not good for retrieving data, for this you could use the reference data cache.
  • Works asynchronuous and the persistent db for keeping all the requests is SQL Server compact.
Pattern 2 : Context sensitive behavior

Example Office document with an actionpane

Pattern 3 : Taskforce using workflow
Pattern 4 : Workitem identity & packaging

In the evening I went with a friend of me who lives in Badalone to a local Tapabar named "La Esquinica".  A very good place where almost no "tourists comes".

11/8/2007 10:10:39 AM (Romance Standard Time, UTC+01:00)  #     |