ASP.Net MVC Online Conference on MSDN

Spanish Version

On Tuesday (May 11, 2008) Matias Woloski and I, gave a webcast about the ASP.Net MVC framework for the Spanish community.

I want to thank you for attend this talk and I hope we continue giving more talks about latest technologies with Microsoft.

As I promised you, in this post you will find the some source code different versions for the sample application we showed during the demo:

  • Translator Demo [MVC Preview 2 (original)] : Download
  • Translator Demo [MVC Preview 2 + TDD (using MoQ) + WCF Services] : Download
  • Translator Demo [MVC Preview 3 + TDD (using MoQ) + WCF Services] : Download

I hope you find these samples useful and I you have any question, please let me know by posting a comment right here.

If you want to know more about the changes on the Preview 3, I recommend you to take a look at this ScottGu's post http://weblogs.asp.net/scottgu/archive/2008/04/16/asp-net-mvc-source-refresh-preview.aspx

How to get the testId generated by Visual Studio in a .loadtest file

Spanish Version

During these days I have been working on a tool that automates the execution of a load test.

Our objective was to parse a .loadtest template file, based on a template, which has been configured for a specific scenario with a set of counters. Once we have parsed the template we are ready to add the TestMix node and a TestProfile node for each test that we want to execute from those defined on test assembly.

The Obstacle

When I was creating the TestProfile node, I realized that each unit test has an specific Id (represented by a unique identifier a.k.a Guid). What I didn’t noticed until we’ve run the load test is that this identifier was generated dynamically by Visual Studio.

We tried going under the hood , unluckily, using reflector to analyze some of Visual Studio assemblies in order to find how these identifiers were generated.

The suggested workaround

Searching on the web I found a post with a method which generates the Guid we’re looking for:

private static Guid GetGuidFromString(string value)
{
    SHA1CryptoServiceProvider provider = new SHA1CryptoServiceProvider();
    byte[] buffer1 = provider.ComputeHash(Encoding.Unicode.GetBytes(value));
    byte[] buffer2 = new byte[0x10];
    Array.Copy(buffer1, buffer2, 0×10);
    return new Guid(buffer2);
}

Using the recently created function we’re able to retrieve the Guid for a given assembly as I’m showing below

private static IList<TestEntry> GetUnitTests()
{
    IList<TestEntry> unitTests = new List<TestEntry>();
    Assembly assembly = Assembly.LoadFrom(“Tests\\PerformanceTests.dll“);
    Type[] assemblyTypes = assembly.GetTypes(); 
 
    foreach (Type type in assemblyTypes)
    {
        if (type.IsClass && 
            type.GetCustomAttributes(typeof(TestClassAttribute), false).Length > 0)
        {
            MethodInfo[] info = type.GetMethods(); 
 
            foreach (MethodInfo m in info)
            {
                if (m.GetCustomAttributes(typeof(TestMethodAttribute), false).Length > 0)
                {
                    Guid testGuid = GetGUIDFromString(type.FullName + “.“ + m.Name);
                    unitTests.Add(new TestEntry(testGuid, m.Name));
                }
            }
        }
    } 
 
    return unitTests;
}

Hope you find it useful!

The three quarrymen

Spanish Version

I would like to share with you a story that I’ve read in a Spanish book called “Companies’ Failure’s causes” (how to learn from other people’s experience) by Enrique Zamorano. So, this extract says…

There are three quarrymen at the foot of a cathedral doing the same job: sculpting stones.

A stranger gets closer to one of them and asks: “What are you doing?

The quarryman answers: “I’m sculpting stones” and, with his bad-tempered look, he adds: “Can’t you see it?

The second one replies saying: “I’m earning my living” and his gesture seems to say: “It’s too hard, you know?

When the third man hears the question, he brings up his head, glances up, and with his eyes shining, he says: “I’m building a cathedral

Conclusion

The same action could have different meanings. The third quarryman is, indeed, who does his job with excellence: he takes his work as a challenge and does it with passion.

WSDL Viewer

Spanish Version

A few days ago, I discovered a useful tool on the official NetFramework 3 website. It helps us to visualize and understand, in a more friendly way, the metadata (WSDL) exposed by a service.

You can download it here.

WSDLViewer

Hope you enjoy it!

From Spain to Argentina…

spain_flag I think telling you something about myself is a good way to inaugurate my BLOG at Southworks, before telling you about more specefic Tags.

When I was in Spain, where I spent five years of my life, one of those opportunities that only happen to you a few times in life, appeared on my way.

So I took the chance of going back to my beloved country to take advantage of it.

HERE IS A BRIEF STORY ABOUT ME

argentina_flag Two years ago, when I was still living in Spain, I went on vacation to Argentina. There I had an Interview with Alejandro Jack who I had met before when I was working in my last job in Argentina.

We talked about many things by that time, but the development of the company was, in fact, the most interesting topic.

By that time, I had a Computer company in Seville, so I had to find the best way possible to have all set up for my return. It was not easy to close down my business, because it is not something that can be done in a couple of days. That is why I decided to stay there for a while to do everything the right way.

Alex had added me to a Southworks developers distribution list. So I started to receive e-mails detailing the company’s progress and the experience of new Southies who would join it.

Alex and the Southies became idols for me. Being able to see how they had been growing as a company, and acquiring the position Southworks has nowadays at a world-wide level in only a couple of years, was great.

I also started to know about the people who were part of the company. Good examples are Ariel Schapiro, Matías Woloski, Johnny Halife, Lito Damiani, Alberto Ortega, etc.

So, once my business in Spain was closed down, and after I had analyzed the pros and cons of going back to Argentina, on January 10th 2007 I contacted Alex to have a formal talk about my incorporation to Southworks.

Now I’m here, posting this, surrounded by the ones I admire :)

« Previous Page