Welcome to AspAdvice Sign in | Join | Help

Alessandro Gallo

.NET & Beyond
Got the MVP Award for 2010

Four in a row. Thanks to all of you, your feedback is truly important. Thanks Microsoft!

Enterprise Library 5.0 and containers

With the Microsoft Enterprise Library 5.0, you’ll be able to use a container of your choice to configure the various blocks.

This interesting post discusses the architectural changes that made possible to transition from ObjectBuilder to a container-based approach. To understand the patterns involved, a good book that I’ve read is Dependency Injection by Dhanji R. Prasanna (not yet released, but available through the early access program).

ASP.NET Ajax in Action, 2nd edition

ASP.NET AJAX in Action – my first book, published by Manning in 2007 – has been a successful project. It received great feedback (for example, 19 out of the 25 reviews on Amazon are 5-stars) and it’s been translated into three languages.

Since its publication in 2007, ASP.NET Ajax 3.5 has been released. With the upcoming release of ASP.NET Ajax 4.0, the book needs an update. As a consequence, we felt natural to search for a talented developer who researched, wrote and breathed ASP.NET Ajax during the last two years.

It’s an honor to have Dave Ward - an active blogger and an ASP.NET Ajax and jQuery expert – as part of our team for the second edition of ASP.NET Ajax in Action.

The second edition of the book will target ASP.NET Ajax 4.0 and 3.5, and will hit the market at the end of the year. Please follow us on the book’s homepage at Manning’s website. You can also subscribe and get early access to the manuscript.

If you have any feedback or suggestions, feel free to leave a comment. We are committed to delivering an updated and comprehensive book on ASP.NET Ajax!

Survey: Ajax usage among .NET developers

Simone Chiaretta – MVP and ASPInsider – has created a survey “to understand in which environment .NET developers are using Ajax, in conjunction with which web framework, and which javascript libraries they are using”.

Take the survey!

Two books on Collective Intelligence

I needed an introduction to the topic of collective intelligence.

My hope was to find some books offering a clear overview of the main algorithms and a good amount of examples, using data collected throught the various public APIs available.

The two books I’ve read are Algorithms of the Intelligent Web (published by Manning) and Programming Collective Intelligence (by O’Reilly). The first one uses Java, the second one Python.

Both the books are worth reading. They cover the main areas of collective intelligence (making recommendations, data clustering, searching, filtering, classification, optimization).

Programming Collective intelligence covers some advanced techniques (like Support-Vector Machines and Genetic Programming), though Algorithms of Intelligent Web has a deeper coverage of some algorithms, such as PageRank.

Both the books offer lots of examples that use public APIs to show interesting applications (like spam filtering, recommendation systems, click-tracking networks, financial analysis).

My ratings are 4 and 5 stars out of five, respectively.

ViewState: Handle with care

I’m refactoring an ASP.NET application and I’ve already found several times – too many – code similar to the following:

<asp:DropDownList ID="ddlTimeZone" runat="server" />

<asp:DropDownList ID="ddlCultures" runat="server" />

protected override void OnLoad(EventArgs e)
{
   if(IsPostBack == false)
   {
      ddlTimeZone.DataSource = GetTimeZones();
      ddlTimeZone.DataBind();

      ddlCultures.DataSource = Globalization.GetOrderedCultures();
      ddlCultures.DataBind();  
   }

   base.OnLoad(e);
}

This code is going to serialize several kilobytes of ViewState data in the page ( > 10Kb with both controls declared). There’s almost never a valid reason to increase the page size in this way.

A possible fix:

1. Disable ViewState on the controls by setting EnableViewState=”false”. You avoid serializing bound data to the page.

2. Get rid of the IsPostBack check and move the databinding logic in the Init stage. You bind the controls every time, but you don’t override the posted value (which hasn’t been loaded, yet). SelectedValue still works.

A very good reference for ViewState handling is this post by Dave Reed.

ASP.NET Podcast Show

In the latest ASP.NET Podcast Show, Wally, Paul and David of ASPInsiders talk about the Windows Azure platform.

I’m sure it’s going to be an interesting talk.

Update on ASP.NET AJAX In Action Source Code

On the CodePlex project for ASP.NET AJAX In Action, there are now two releases that target the ASP.NET AJAX 1.0 Extensions and ASP.NET 3.5, respectively.

AAiA_AspNet20 - This release allows to compile the source code with ASP.NET 2.0 and the ASP.NET AJAX 1.0 Extensions.

AAiA_AspNet35 - This release allows to compile the source code with ASP.NET 3.5 in Visual Studio 2008. Please note that the source code is still based on ASP.NET AJAX 1.0, which is the version of the framework targeted in the book. Therefore, features such as history management still rely on the Microsoft.Web.Preview assembly.

Got the MVP Award for 2009

This is my third time. Thanks to all of you who appreciated my articles, forum posts, thoughts, and the code I shared. Your feedback is truly important.

Thanks Microsoft!

Book: The Art of Unit Testing

I had the chance to review this book, which will soon be published by Manning. Roy Osherove did a really good writing job. You'll find in this book all you need to quickly get up and running with unit testing.

I've enjoyed the chapter on test code organization and refactoring; and the one on making your team/company embrace unit testing. Distilled experience.

My rating: 5/5

Book: jQuery In Action

I'm sure you already know about this good move. Since jQuery will ship with Visual Studio, I took the time to read a book on the subject.

jQuery In Action is published by Manning and is a really good book. It goes deep into the library and does a nice job of explaining its clever and powerful API. There are a lot of examples and two interesting chapters about extending jQuery and writing plugins.

My rating: 5/5

Got a BS in Electronic Engineering

I've managed to complete my studies in Electronic Engineering, which I abandoned a few years ago to dive into informatics and programming.

I'm happy because I hate unfinished work. Thanks mom and dad for all the support ;)

And now, back into programming.

Book: Professional ASP.NET 2.0 Security, Membership and Role Management

I've found this book to be a good guide on the subjects of ASP.NET Application Services and WebForms security. It's written by Stefan Shackow, a program manager on the Web Platform and Tools team at Microsoft.

What the book covers:

  1. Security processing for web requests
  2. Trust levels and security configuration for ASP.NET applications
  3. Forms authentication
  4. Session State, ViewState from a security point of view
  5. The Provider model and the ASP.NET Application Services

My rating: 4/5

VS2008 SP1 and .NET 3.5 SP1 Released

You can download them here.

For those of you involved in ASP.NET, be sure to check this page for a list of the new features available in .NET 3.5 SP1.

Notes from my installing experience:

  • I've downloaded the combined package from the first link above. The package takes care of downloading the needed files and installs them.
  • First of all, .NET 3.5 SP1 got installed. Then, I was asked to reboot the PC.
  • After rebooting I had to run the installer again. This time, VS2008 SP1 was installed.
  • SP1 for VS2008 affects only the products installed.
  • During installation of VS2008 SP1, the installer asked for the VS installation disk.
  • Be prepared for a long wait (more than 3 hours in my case).
Gift from Microsoft

Today I've received a little package from Microsoft. Inside it, there was a nice letter:

[...] I wish to thank you for the incredibly valuable feedback that you have provided. The importance of having the community and early adopter feedback as we built Visual Studio 2008 and .NET Framework 3.5 cannot be understated. You made the product better working with us closely through the product development phase by giving us valuable feedback. [...]

Inside the package, I've also found a gift that I am supposed to share with deserving people in the community. Will do!

Thanks Microsoft!

More Posts Next page »