Falling in love with Rx (again)
Last week I was involved in preparing some Proof-of-Concept for Comet (http://en.wikipedia.org/wiki/Comet_%28programming%29) implementation using asynchronous controllers in ASP.NET MVC 3. Hopefully this technical opening didn’t scare you off ;) In brief, simple words - we needed a solution that was able to push events (notifications) asynchronously from the server side to the client’s browser in as efficient manner as possible (used threads, opened connections, repeated calls, etc.). You can call it a foundation for a real-time system accessible via the browser. I’ve used Reactive Extensions (Rx) to deal with the server side (pub-sub, filtering, aggregation) and I was once again simply amazed how powerful this framework is: proper usage of Observer design pattern with asynchronous computing enables so many options.
Blow against the trend
* DI is very complementary with TDD and "interface up-front" approach
* Loose coupling and ability to substitute components transparently (including mocking) are priceless (statement based on own experience)
New book about C#
I had an opportunity to check an interesting new book about C# that was published recently - "C# Smorgasbord" by Filip Ekberg (http://www.amazon.com/C-Smorgasbord-ebook/dp/B008X8SIU0). Is there a need for another book about C#? Don’t we have too many already on our shelves? Actually this book is quite interesting. Usually books that describe some particular programming language just go through the syntax, some basic libraries (I/O, threading, connectivity, etc.) - all of that to give you tools to work with. But does this knowledge make you a competent programmer already? Well, not really - these are just the most basic tools and you need learn more about:
- common pitfalls in the language
- typical problems and situations to avoid
- recommended patterns
And "C# Smorgasbord" is a book of such type. It’s a book you should read when you’re done with learning “ifs”, “fors” and “whiles”. It’s not a deep dive yet, but it will show you that it takes much more to be a good programmer than to be able to transform block diagrams into algorithms.