Saturday 1 October 2011

Last months interesting stuff

Well, it's being a long while since the last of my posts summarizing interesting items that I came across lately, so time for one of those.

As I've been doing tons of JavaScript lately, I found these 2 posts pretty useful. I was aware of most of what is stated there, but anyway it's good to get you assumptions confirmed

jQuery performance rules

JavaScript and Ajax performance

That said, even when I'm pretty interested in any sort of performace trick (in whatever language I'm using) mainly because those things help you understand how things work internally (I've ever been a rather curious person), I tend to favor semantics and clear code over performance (I guess that's the right decision for the kind of applications that I develop, that are far from having any kind of high peformance requirements). Some weeks ago I had one discussion with one colleage and couldn't help throwing this classic sentence: premature optimization is the root of all evil

Thought the most commonly used JSON serializer in the .Net ecosystem (JavaScriptSerializer, the one used by default by Asp.Net MVC) leaves much to be desired, JSON has turned into my preferred serialization format, thought having to declare C# classes for the JavaScript objects that you want to deserialize seems like boring and time consuming, so, with all the dynamic magic in C# 4, couldn't we just deserialize to a dynamic object? Good reading here (JSON to ExpandoObject)

I'm really longing to have some time play a bit with some NoSql stuff (ok, you can call me "fashion victim") mainly CouchDB, so this thing seems pretty promising
UnQL query Language for Document Databases

Even when you think you're rather fluent in one technology, there are always things that you miss, mainly due to some initial decisions that turn into habits. In my case, I've always used classic castings and type comparisons, so I hardly remembered that C# provides the as and is operators
x is T returns true, if the variable x of base class type stores an object of derived class type T, or, if x is of type T. Else returns false.

x as T returns (T)x (x cast to T), if the variable x of base class type stores an object of derived class type T, or, if x is of type T. Else returns null. Equivalent to x is T ? (T)x : null


This excellent article about Asp.Net MVC extensibility, makes me look forward to the next installments in the series.

This good article about a new .Net collection (the Exposing a limited read-only window of a list seems rather useful), took me to this interesting research project made in Danmark, a new set of advanced .Net collections. The events on collection changes thing seems pretty interesting.

No comments:

Post a Comment