Everyday's Software DesignScribbles on Software Engineeringhttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/atom.aspxCommunity Server2010-12-14T07:35:00ZLiving with asynchttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2012/06/05/living-with-async.aspx2012-06-05T21:16:00Z2012-06-05T21:16:00ZI was watching once again The zen of async: Best practices for best performance talk of Stephen Toub ’s on //Build and I decided I should blog about how easy is to end up with a deadlock while writing asynchronous code with new C# 5.0 language features (AKA async/await). Here is the quick background first which I was aware of before I watch this talk. The talk that Toub has given was mostly about how you create better reusable libraries with asynchronous language features but there are lots of great...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2012/06/05/living-with-async.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=70535" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxWCF or ASP .NET 4.5 Web APIhttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2012/03/21/wcf-or-asp-net-4-5-web-api.aspx2012-03-22T05:32:00Z2012-03-22T05:32:00ZA couple of weeks ago (around Feb. 16) the WCF WebAPIs - a framework for building RESTful/Hypermedia/HTTP services, which was in development over the past 1.5 years as a side-project on CodePlex , has been formally integrated into ASP.NET and its name changed to the ASP.NET Web API. These past two weeks, there has been a lot of questions among WCF developers: What does it mean that the Web APIs are no longer a part of WCF – is WCF dead? Has SOAP gone bankrupted? is HTTP the new way to go for interoperability?...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2012/03/21/wcf-or-asp-net-4-5-web-api.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=69738" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxSmall Introduction to NuGethttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2012/02/01/small-introduction-to-nuget.aspx2012-02-01T19:30:00Z2012-02-01T19:30:00ZNot too long ago, Microsoft released, NuGet , an automated packagemanager for Visual Studio. NuGet makes it easy to download and installassemblies, and their references, into a Visual Studio project. Theseassemblies, which I loosely refer to as packages, are often open source, andinclude projects such as Nhibernate .In this post, I'll explain how to get started in using NuGet with your projectsto include: installng NuGet, installing/uninstalling Nhibernate via consolecommand, and installing/uninstalling...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2012/02/01/small-introduction-to-nuget.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=69094" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxA wonderful weekendhttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/12/05/a-wonderful-weekend.aspx2011-12-06T05:18:00Z2011-12-06T05:18:00ZBelieve in the community Last weekend I had a great time. That's thanks to ITPro|Dev Connections conference that took place in Glifada, Greece. It was my first Greek dev conferece as I have only a year and a half that I am back in my country. I never had the chance so far to take a closer look at the community and have a taste of the level and the experience of the developers. I have to admit that I was quite skeptical before going to the event. That's because of my disappointment from the interviews...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/12/05/a-wonderful-weekend.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=68523" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxBook Read: Clean Coderhttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/10/12/book-read-clean-coder.aspx2011-10-13T06:17:00Z2011-10-13T06:17:00ZBeing professional coder is harder than you think... I have again three books that I am hoping to finish this month, I will start here with one I just finished. It's the Clean Coder from the famous Uncle Bob . I add it on the Software Engineering Books and in my Highly Recommended l ist. It is a brilliant read. It is not the technical book one might be looking for. For a more technical approach on how to write clean code please read Clean Code (Robert C. Martin) for which I also have a review. This...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/10/12/book-read-clean-coder.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=67752" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxInstall Windows 8 Preview in Virtual Machinehttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/09/16/install-windows-8-preview-in-virtual-machine.aspx2011-09-16T07:27:00Z2011-09-16T07:27:00ZInstall Windows 8 in VirtualBox Requirement: Oracle VM VirtualBox Windows 8 Developer Preview ISO file (32-bit or 64-bit) Windows Live ID* (for best testing experience, sign up here if you doesn’t have one) Internet Connection* * Nice to have, for best experience Besides that, also make sure that your computer have the Virtualization Technology (VT-x/AMD-V) activated in the BIOS. Proceed to the installation if you are ready with everything. Steps: 1. Get the Oracle VM VirtualBox installed in your...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/09/16/install-windows-8-preview-in-virtual-machine.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=67328" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxNew Page, Recommended Books!https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/09/12/new-page-recommended-books.aspx2011-09-12T17:44:00Z2011-09-12T17:44:00ZAfter getting some proper rest during my summer holidays and reading quite a few books (once again) I decided that I should publish my list of all time favorite books which I will continuously update from now on. I am a big fan of physical books and I try to buy my favorite books in physical form so that I can have them all in my room's shelves. The last years though I try to also read e-books as they are cheaper and easier to have with me. I am a big fan of apple books and kindle on iPhone although...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/09/12/new-page-recommended-books.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=67216" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxIt' all about Azurehttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/08/30/it-all-about-azure.aspx2011-08-30T18:13:00Z2011-08-30T18:13:00ZI have recently discovered two great sites which apart from their rich content they represent a great example of how to build rich Metro-like UI with Silverlight... Here they are: 1) http://azuredesignpatterns.com/ 2) http://azurehandbook.com/ They surely worth a read!...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/08/30/it-all-about-azure.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=66980" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxAzure traininghttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/06/15/azure-training.aspx2011-06-15T14:56:00Z2011-06-15T14:56:00ZCloud => Azure => The future... Just a week ago I discovered Windows Azure AppFabric Learning Series ! In this learning series you will find short videos that are episodic for easy consumption. These videos are available via Silverlight streaming and available in full-screen and can be easily embedded in blogs, social media outlets, audience marketing campaigns, and upcoming enhancements to AppFabric . Episodes include technical samples, such as database scripts and code, and have all the technical...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/06/15/azure-training.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=66301" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxMoving from WPF to Silverlight (part 2)https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/05/23/moving-from-wpf-to-silverlight-part-2.aspx2011-05-23T15:32:00Z2011-05-23T15:32:00ZTrouble appears when it's least expected. Continuing from part 1 let’s go into the things that not only will require more coding effort but will also change the whole design of your app. And if you are managing a team then it’s two times more difficult because you have to stand all their whimpering. Let the party begin: No default button! Long gone the simple WPF property on the Button class that was making it the default one for the page/form. What is even stranger though is that even in the web,...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/05/23/moving-from-wpf-to-silverlight-part-2.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=65920" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxMoving from WPF to Silverlight (part 1)https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/05/16/moving-from-wpf-to-silverlight-part-1.aspx2011-05-16T16:00:00Z2011-05-16T16:00:00ZNever believe it is as easy as they say... I used to have a colleague in the team I manage that was sure that moving back and forth from WPF to Silverlight was easy!!! I will dedicate these series to him as reality proves us most of the times wrong. (Research is the only path to knowledge). So I am the architect of a quite big project and it was originally coded in WPF. But since we wanted to move to a unified architecture where both our users and the clients will have the same user-experience, we...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/05/16/moving-from-wpf-to-silverlight-part-1.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=65779" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxMVVM frameworkshttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/03/10/mvvm-frameworks.aspx2011-03-10T16:23:00Z2011-03-10T16:23:00ZI have found a very interesting site the other days that would compare various MVVM frameworks from codeplex in terms of popularity, documentation and features. I think it's quite interesting so I decided to share it with people. http://www.japf.fr/silverlight/mvvm/index.html P.S. I really like Google bookmarks, I believe it's one of the most useful tools Google has ever given to us!...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/03/10/mvvm-frameworks.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=64086" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxReflector is dead. Long live Reflector! (or reflector alternatives)https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/03/02/reflector-is-dead-long-live-reflector-or-reflector-alternatives.aspx2011-03-02T16:43:00Z2011-03-02T16:43:00ZIt's sad when great ideas get lost in the name of money and progress It's sad but it was recently announced that one of the most well known tools for .Net development will cease to be offered for free. I am talking of course for .Net Reflector .Unfortunately in the Greek community I haven't seen to much about it which makes me even more sad about the software development in my country (at least there has been a short discussion here ). Anyway, just for the record, the official announcement of the...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/03/02/reflector-is-dead-long-live-reflector-or-reflector-alternatives.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=63909" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxAgatha rrsl, WCF and Collection data typeshttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/02/14/agatha-rrsl-wcf-and-collection-data-types.aspx2011-02-14T19:24:00Z2011-02-14T19:24:00ZThe devil is in the details. Read the documentation of every library you use. Reason about your code. I have been recently refactoring and reviewing code of a project in order to move it from WPF to Silverlight. (I will make a series of posts on the trouble and horror that I met during this exercise) In this production LoB system we have chosen to work with Agatha , a request-response service layer sitting on top of WCF that simplifies communication with the back-end, greatly improves modularity...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/02/14/agatha-rrsl-wcf-and-collection-data-types.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=63248" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxLINQ Quiz...https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/01/22/linq-quiz.aspx2011-01-22T20:04:00Z2011-01-22T20:04:00ZCan you guess the output of the following code? var values = new List < int >() { 100, 110, 120 }; var funcs = new List < Func < int >>(); foreach ( var v in values) funcs.Add(() => v); foreach ( var f in funcs) Console .WriteLine(f()); If it's not "solved" I will post the answer in the next post......(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/01/22/linq-quiz.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=62606" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxHTML5 Labshttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/01/06/html5-labs.aspx2011-01-06T17:47:00Z2011-01-06T17:47:00ZHTML5 Labs provides research projects from Microsoft that will come to our browsers in the recent future. There are a few interesting things in there... Stay in touch. It's been a great year 2010 and I am quite excited for the things that are about to come in 2011. One of these things are the new HTML5 labs that Microsoft has recently (21st of December) announced in their interoperability website. In there there are two new research projects: 1) Indexed DB 2) WebSockets Since there is no source code...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2011/01/06/html5-labs.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=62408" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxCorrectly Implementing Equals() in C#https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/27/correctly-implementing-equals-in-c.aspx2010-12-27T22:02:00Z2010-12-27T22:02:00ZIt's said that "the devil is in the details". Well I saw some code the other day that reminded me exactly that quote. It is quite common for developers to forget about semantics. In my current project we tend to play a lot with Nhibernate and DDD and we seriously take care of our model. We take it to the extreme where we use every possible aspect defined in DDD, with Components being on of them. It is quite crucial to be careful when dealing with Components especially if ones uses them in a Set....(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/27/correctly-implementing-equals-in-c.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=62409" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxWPF Metro Windowhttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/22/wpf-metro-window.aspx2010-12-22T16:43:00Z2010-12-22T16:43:00Z"Metro is an internal code name for a typography -based design language created by Microsoft . It was created as a product of Microsoft's user interface design work on some of their media products like Zune and Windows Media Center , for major utilization in their mobile operating system, Windows Phone 7 ", wikipedia.org Continuing with Metro UI I will try to give here a bunch of information that seems to be quite scattered around the web and I will show how easy it is to build a sample window (no...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/22/wpf-metro-window.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=62410" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxWindows Events going with Metro UIhttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/15/windows-events-going-with-metro-ui.aspx2010-12-16T07:21:00Z2010-12-16T07:21:00ZThis trend with Metro UI is getting quite hot nowadays and I am really interested in it. I find it extremely good looking, clear and IMHO it follows quite well with the rules of simplicity . I will save the details for another post. At this point I was interested in some problems that a colleague ( N.Baxevanis ) of mine had when trying to build a Metro UI window for WPF. As you will see in his relative post he was somehow under the impression that the LocationChanged event wasn't triggered. After...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/15/windows-events-going-with-metro-ui.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=62411" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxCouch DBhttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/15/couch-db.aspx2010-12-15T23:28:00Z2010-12-15T23:28:00ZCassandra, MongoDB, CouchDB etc... It's on my to-do list to take a deeper look onto that NoSQL trend but after seeing the following video I think I will change it's priority... (special thanks to N.Baxevanis ) CouchDB looks cool!...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/15/couch-db.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=62412" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxC# 5, Async Exceptions Mysterieshttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/15/c-5-async-exceptions-mysteries.aspx2010-12-15T15:59:00Z2010-12-15T15:59:00ZStudying the CTP of C# 5 I discovered that an asynchronous method will throw away anything other than the first exception in an AggregateException thrown by one of the tasks it's waiting for. Reading the TAP documentation, it seems this is partly expected behaviour and partly not. TAP claims (in a section about how "await" is achieved by the compiler): It is possible for a Task to fault due to multiple exceptions, in which case only one of these exceptions will be propagated; however, the Task’s...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/15/c-5-async-exceptions-mysteries.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=62413" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspxSoftware Design Patterns and Processeshttps://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/14/software-design-patterns-and-processes.aspx2010-12-14T15:35:00Z2010-12-14T15:35:00ZIt is strange how much an architect can understand going through the design process of a system. I have tried a few approaches and I have studied a few more, all in all I am inclined to believe that DDD gets the best out of a software developer. I won't get into the details of DDD as the reader can get enough info around the web . It hard to get a grip of it though and I would recommend even the average developer to get some books. Thus, I strongly believe that whoever is serious about DDD should...(<a href="https://www.dotnetzone.gr:443https://www.dotnetzone.gr:443/cs/blogs/softwarebytes/archive/2010/12/14/software-design-patterns-and-processes.aspx">read more</a>)<img src="https://www.dotnetzone.gr:443/cs/aggbug.aspx?PostID=62414" width="1" height="1">gnikolaropouloshttps://www.dotnetzone.gr:443/cs/members/gnikolaropoulos.aspx