First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

May 2008 Blog Posts

How attendees can help deliver a better webcast

Yesterday I delivered the first of the 3 presentations on ASP.NET MVC I'll be delivering in less then a month.

It was also my first webcast ever and I'd like to share my impressions on the presenter experience and what an attendee can do to make life easier for the presenter, thus increasing the overall experience for everybody.

The biggest and probably the most obvious difference between a webcast and a in person presentation is that you (as presenter) don't have a visual feedback, you don't get to see the people that are attending the presentation: you cannot tune the tone of the presentation just by looking at people's faces. I tried to have some pauses between slide and sections of the presentations, but I didn't know if they were long enough, or too long.

The other problem is that, especially when it's not possible to mute the audio of attendees, you hear all the talking that is going on the other side of the wire, and this is distracting both for the presenter and for the other attendees.

I guess my presenter experience and the overall webcast would have been better if the attendees did the following points:

  1. if the audio cannot be muted from the server, mute your phone (most phones can be muted with dialing *6), your mic or, at least, when you have to talk about your own business with a co-worker do it away from the mic
  2. when the presenter asks questions, please answer them: vocal feedback is the only feedback available during a webcast
  3. use the "mood" selector: almost every webcast client has a way to notify the presenter about the attendee's perception. You can say everything is fine, or that you have a question, that the presenter is going too fast and so on

These 3 little things can improve the webcast experience for everybody, so, use them.

For sure, now that I delivered a webcast, I know how to behave when attending one.

Technorati Tag: ,,

ReSharper 4 approaching beta status

No official announcement yet, but the ReSharper 4.0 Nightly Build page is showing the first build marked as stable and with the status "Beta Candidate".

resharper_beta_candidate

The build number is 804.

Off to downloading it: let's hope they fixed all the problems and the huge memory requirements of the latest builds.

UPDATE: JetBrains officially announced ReSharper beta

kick it on DotNetKicks.com

Technorati Tag: ,

IronRuby in Action by Ivan

Yet another friend of mine is writing a book. After Keyvan with his "Professional Visual Studio Extensibility", today Ivan Porto Carrero announced his book IronRuby in Action.

It will be published by Manning and, as always with them, a Early Access Preview is available.

Congratulations Ivan for your first book!!

Running Challenge for .NET developers

Spring arrived, days are getting longer and I started jogging after work again (of course, with my Nike+iPod gear).

I also found out that Vito Arconzo, a .NET developer in Italy, also started running with an iPod, so I decided to set up a running challenge, and see how many .NET developers out there are using this geeky stuff.

The challenge is named "Train for the UGIALT.net meeting", will start tomorrow, May 15th, and the winner will be the one that runs more kilometers in 30 days, before the UGIALT.net conference that will take place on June 14th.

If you want to take part in this challenge, just send me a email with the email address you used in your Nikeplus account, and I'll add you to the challenge. Or subscribe to the challenge yourself going to the Nikeplus site.

Technorati Tag: ,,

How to manage ASP.NET validation from Javascript with jQuery

Validators are a great part of the ASP.NET framework: they provide a standardized and easy way to add validation to form fields. But even if the framework provides different kinds of validators, there are so many different validations patterns that sometimes you have to write custom code to match your specific requirements.

I wrote a post a few months ago about how to write a custom validator for a Checkbox list, but I was dealing with a completely new validation pattern. But what if I only want to enable the validation of certain field based on certain conditions? Or if I want to validate based on an event that is not the OnChange event of the form field? And all of this while keeping the standard validation logic?

If the condition can be determined in the code-behind it's easy:

//Disable server side validation
myRequiredFieldValidator.Enabled = false;
//Disable client side validation
myRequiredFieldValidator.EnableClientScript = false;

But what if I want to enable the validator from javascript? I didn't find anything online about this so I debugged the ASP.NET js validation library to look for the method that enables the validation, and for the one that forces the validation check.

Enable a validator via javascript

The method to enable or disable a validator is:

function ValidatorEnable(val, enable)

where val is the reference to the <span> element that the validator uses to render the error message, and enable is a boolean to tell the method whether to enable or disable the validation.

Force a validation via javascript

In case you want to ask to a validator to do his job:

function ValidatorValidate(val, validationGroup, event)

val is again the reference to the validator <span>, validationGroup is the name of the validation group of the element that is triggering the validation, event is the reference to the event that triggered the validation. But only the first parameter is useful when you want to force the validation, since the others are used only by the standard validation of ASP.NET.

A real life example

Let's see a example from the code I'm writing for one of the new features of Subtext.
Imagine you have this snippet of HTML code:

<asp:DropDownList ID="ddlMimeType" runat="server">
   <asp:ListItem Value="mp3">audio/mpeg</asp:ListItem>
   <asp:ListItem Value="wma">audio/wma</asp:ListItem>
   <asp:ListItem Value="other">Other</asp:ListItem>
</asp:DropDownList>
<asp:TextBox id="txbOtherMimetype" runat="server" />
<asp:RequiredFieldValidator id="valOtherMimetypeRequired" runat="server"
                   ControlToValidate="txbOtherMimetype" ForeColor="#990066"
                   ErrorMessage="You have to specify a custom mimetype." />

And you want to enable the valOtherMimeTypeRequired validator only when the option selected in the drop down is "other".

Using jQuery here is the javascript code to do the job:

<script type="text/javascript">
$(document).ready(function()
{
  $("#<%= ddlMimeType.ClientID %>").change(function() 
  {
    toggleOtherMimeType(this);
  });
}

function toggleOtherMimeType(elem)
{
  if(elem!=undefined) 
  {
    if(elem.value=="other")
    {
      $("#<%= txbEnclosureOtherMimetype.ClientID %>").show();
      ValidatorEnable($("#<%= valEncOtherMimetypeRequired.ClientID %>")[0], true);
    }
    else
    {
      $("#<%= txbEnclosureOtherMimetype.ClientID %>").hide();
      ValidatorEnable($("#<%= valEncOtherMimetypeRequired.ClientID %>")[0], false);
    }
  }
}
</script>

Notice the <%= ddlMimeType.ClientID %> to select a server-side control using the automatically generated client ID and the $("#elemendId")[0] to get the real DOM element and not the jQuery wrapper around it.

And in case I wanted to force the validation I should have written:

ValidatorValidate($("#<%= valEncOtherMimeTypeRequired.ClientID %>")[0]);

It took me a while to find out this method name. I hope this will save you a bit of the time I spent hunting down the names using Firebug.

kick it on DotNetKicks.com

Technorati Tag: ,,

ASP.NET 3.5 + VS2008 SP1 beta

Probably you already read this announcement somewhere else in the net, so I'll not replicate the news here.

What excites me the most are mainly two things:

  • Part of the ASP.NET MVC framework are going to be included into the core ASP.NET framework: System.Web.Routing will be included in ASP.NET with the SP1, so around this summer, probably well before ASP.NET MVC is RTW
  • Intellisense will work for Javascript files, and will have support for jQuery, Prototype and other popular JS library out of the box.

You can read more about the other improvements on ScottGu blog and see what's really changing on ScottHa one.

Now off to downloading it, but going to run it only on a VM.


Problem with Spam? Waegis to the rescue

One of the problem of having a blog with a Google PageRank higher than 3 is that you get flooded by a storm of spam. Be it comment spam or trackback spam it's a waste of server resources and, if not filtered, could fill your blog with tons of sex related links and more.

Last year Subtext included a integration with Akismet, the de-facto only spam blocking service available for free on the net. But last autumn I received more than 1000 spam trackback in one day and more than 30.000 on the same day in my Italian blog and Akismet was not able to block them. So I was forced to disable them, and since then I don't trust Akismet any more.

Today Keyvan announced a project he has been working on in the last months (and thinking about for the last three years): Waegis.

Waegis is a online spam blocking service, but unlike Akismet it's build entirely with .NET, which helps .NET to gain a few points in the general web development community.

Aegis, in Greek mythology, was the shield of Zeus, the King of Greek Gods... let's see if it will defend us from the attach of the trackback spam.

Just a last note: today the Alpha release has been announced, so it will take a few months before it become available for the general public.

The most used Javascript Library is... jQuery

A month ago a popular CSS blog asked: "What is your Javascript library of choice?"

Yesterday, after having received more than 1600 answers, he published the results.

The winner is clearly jQuery, with more than 50% of the preferences (actually 52%).

The second library is MooTools with 15% and third comes Prototype with 12%.

As the author of the survey says, the audience of his website is mainly composed by designers, so the results are a bit biased toward jQuery (which has been designed to port the CSS way of thinking into JavaScript development).

But based on the previous JS library surveys I published on my blog I think that jQuery can be considered an overall winner:

  • in the survey about Ajax development in the .NET space, if we exclude the obvious winner which was ASP.NET Ajax, and the specific .NET frameworks, the first library was jQuery.
  • the generic Ajax development one (which has been answered mainly by PHP and Java developers), Prototype was the winner, but followed closely (only 5% less) by jQuery; and I guess that if that survey has been published now, due to the number of tutorial being published about jQuery, the results would have been reversed.
Technorati Tag: ,,,

Yet another Italian blogger starts blogging in English, on Subtext

Seems like a lot of Italian .NET blogger are making the big step of starting a blog in English: writing in a language that is not the one you use in your everyday life is not easy, but it can be a good way to improve the other language.

After 2 of the founders of UGIALT.net, Marco De Sanctis, a friend and active Italian community member started blogging in English on his brand new Subtext blog: CodeMetropolis.

Why an English blog? Well, honestly because I recently realized that I'm reading more English blogs than Italian ones, and that makes me feel as part of a .NET community that spans worldwide. I got so many visitors from abroad and I thought that the time has come for me to dive into a new challenging experience.

I'm going to talk about Software Design and Programming (which are both my everyday's bread and a great passion): some NHibernate, some WPF, some ASP.NET, some WCF and so on...! Let's see what happens!

You might already know Marco because he is the one that developed Blog Commander, a tool to bulk manage categories and tags of a blog.

So, let's welcome Marco and wish him good luck for this new experience.

Technorati Tag: ,,

The Panic Button

I use FeedDemon as my desktop newsreader and today, while looking around the UI I found a strange menu item: "Hit the Panic Button!".

menu_item

The button doesn't have the "..." that usually marks menu items that open a new dialog before doing something, so it frightened me a bit. But I finally decided to click on it and a dialog appeared:

panic_button

It's a really interesting feature: when you go on vacations and you come back and see 10k unread items, you just hit the Panic Button, and you are back to only one or two days of unread items. Cool, isn't it?

Technorati Tag: ,,

Second Italian ALT.NET conference

After the "small success" of the first UGIALT.net mini conference in February, UGIALT.net is organizing another conference in June.

The second UGIALT.net conference will take place on Saturday June 14th, and will take place at the offices of Avanade Italy, in the center of Milano.

As for the other conference there will not be a fixed agenda, but the event will be a day-long discussion on the topics decided by the participants, probably developing a small app to focus on the various stages of the development.

If you are Italian and want to know more about the event, please read my Italian blog: Seconda UGIALT.net conference - 14 Giugno 2008 - Milano

If someone outside Italy want to take part in the discussion the registrations are open on Facebook: http://www.facebook.com/event.php?eid=13361168300.

kick it on DotNetKicks.com

Technorati Tag: ,,

VMware Fusion 2.0: now with multiple displays

Since I installed Win2008 on my Mac I never really used it: turning on my company's laptop was less painful than the usability problems that both VMware and Parallels have.

VMware was not working very well with more than one display: if you open an application in Unity mode it will be stuck in the display the main Fusion application is running, and in fullscreen mode it is not possible to have more then one display.

Parallels works fine with multiple displays, but I don't like the way the mouse pointer is handled in Coherence mode: there are 2 pointers, with the one inside the Windows application that mimics the movements of the mac one.

But finally VMware Fusion 2.0 has been announced: with support for multiple displays, DirectX 9 3D support and more.

Watch the movie, with an astonishing 8 displays being supported!!

Now I think I can really start thinking of using my mac for everything, including developing on Visual Studio.

Technorati Tag: ,,

iPhone to come to a shop near you... with Vodafone

In Italy everybody was excited to hear that TIM (the mobile company of the once telecommunication monopolist Telecom Italia) would be selling the new 3G iPhone starting from this summer.

But today Vodafone made an unexpected announcement:

Vodafone today announced it has signed an agreement with Apple to sell the iPhone in ten of its markets around the globe. Later this year, Vodafone customers in Australia, the Czech Republic, Egypt, Greece, Italy, India, Portugal, New Zealand, South Africa and Turkey will be able to purchase the iPhone for use on the Vodafone network.

So we will be able to buy an unlocked iPhone in almost all the countries that don't have a official "sim-locked" reseller yet: this includes Italy and New Zealand as well.

This news also marks a important change in Apple sales policy: Italy is the first country where the iPhone is sold without any exclusive agreement with a single carrier.

Technorati Tag: ,,

2 new Italian ALT.NET blogs

Two of the guys that co-founded with me the Italian UGIALT.net usergroup started blogging in English:

For those who read Italian they are still writing on their Italian blogs: BlogEma and Makka.