Or maybe the question should be: what’s right about this?
Archive for April, 2010
Why I’ve Been So Quiet Lately
People who’ve been reading this blog for a while now have been asking me why i’ve been so quiet lately. In December and January i averaged about 8 posts a week, which was a pace that i knew i’d never be able to keep up. It just happened to be a productive 2 months i guess. Then in February, i took a week off to visit New York and after that, things have been kinda slow here. After a while, i started getting emails and questions from people asking me if i was having another burn-out. I appreciate the concerns, but no… there’s no burn-out going on ![]()
Once i got back from my trip i sorta took my time in catching up with the insane number of blog posts that i missed and i wasn’t really making a lot of time to write posts or to write code in general. And i do have somewhat of a social life which for various reasons, took up more and more of my time after that trip. That is the first reason why the posts started slowing down.
And then i was presented with a huge opportunity which would involve me relocating to a different country and basically starting my life all over. I gave that some serious thought, and it took me about 3 weeks to realize how great my life actually is. I already have an absolutely great job which i love (even though i bitch a lot at work), and i’ve realized a few other things as well. I’ve got a truly great group of friends that i wouldn’t trade for anything in the world and i’ve got a great family that i wouldn’t want to miss either, even though i don’t spend enough time with them. In a way it’s sad that i didn’t realize that until i had to think about giving that all up (well, not entirely but definitely in a significant manner) but i’m very thankful for finally coming to that conclusion. As you can probably imagine, having to think about something like that isn’t very conducive to blogging or writing code so again, i didn’t really make any time for that.
A couple of weeks ago i made my final decision that i want to stay where i am and i’m pretty sure i’m not gonna regret that. So i figured “alright, now i can get back to actually getting some work done!”. And then something else happened. I met a woman who goes way beyond everything i ever wanted from a woman. She’s basically the coolest, and well, the hottest girl i’ve ever met and so far, things are working out pretty good. Now, i’m the kind of guy who realizes that something like that can end anytime, but until that happens, i’d much rather prefer to spend my time on her than on writing blog posts or writing code. I’m pretty sure you can all understand that ![]()
And last but not least, i no longer feel the pressure or the drive to keep writing good blog posts. I’ve always been very focused on growing the audience of this blog and i’m very proud of what it has become. Sure, it’s not the greatest or biggest .NET blog that you can find, but it is something respectable and that’s something that i’ve worked hard for to achieve. But i no longer really care about it like i did in the past. I’m always going to continue writing blog posts, but it’s only gonna happen when i actually feel like writing something. I’m no longer gonna write posts just for the sake of keeping the stats up. That might mean that there will be weeks of very low activity here. It might also change again in the next couple of weeks or months. I really don’t know and only time will tell i guess. The one thing that i am sure of is that the posts that i am going to write in the future will be good ![]()
So anyways, that’s the story behind the lack of activity on this blog. I’m sure most of you can understand, and well, i can’t really pretend to care about those who don’t ![]()
Clients Shouldn’t Define Your Services
I just got a question about an earlier post of mine, in which i describe how i use NHibernate in my WCF services. Here’s the question that i got:
My architecture at works requires a web app and a windows app to talk to the application server via WCF. The Application server being where all the Data access and Service libraries live. I intend to implement NHibernate into the project. But wanted to get some pointers if your approach above is recommended for Web and Windows clients alike when sending and receiving data via WCF?
The short answer to that question is simply: It sure as hell is!
But you know i always prefer the longer answer
. The type of client always has an impact on the usage patterns of the service(s) that it needs. A web client will often have a different usage pattern than a windows client or a mobile client will. Each client should be able to consume the service in the manner that is most suitable to its requirements and constraints. A web client is (or should be) completely stateless so a service that is meant to be used by a web client is typically geared towards that stateless model. Windows clients or mobile clients are typically not entirely stateless and as such, the way they could use a service in the most optimal way often differs from how a web client would use the service.
One of the most important SOA principles is that there should be no implicit coupling between a service and its client(s) at all. Generally speaking, coarse-grained operations are favored over fine-grained ones due to the cost of the communication overhead. Yet, that easily conflicts with the usage patterns of different clients. Since a web client is stateless, it often needs more coarse grained operations than a windows client which can retain data in its own process memory and thus, might benefit more from calling a fine-grained operation here and there.
Obviously, my solution to that problem is Agatha which makes it possible to implement each operation (or call them actions or commands and queries or whatever else you can think of) in the way that just makes the most sense, no matter what kind of client is going to call them. Each client can consume the service operations in a manner that is optimal to the client, without the typical design impact and overhead that you have with traditional WCF services.
We have a few services that serve multiple types of clients. ASP.NET pages. Silverlight applications. Windows Services. WPF tools. Outlook add-ins. And guess what? Those services don’t have a clue as to who or what is using them and they are all implemented in the same way. And it hasn’t caused a single problem or difficult design decision (as to the service API) yet.