Living in the Tech Avalanche Generation

A practitioner’s introspective on technology

Every Class a Class - Not JABOWS.

A while back, thumbs_down Windows Communication Foundation (WCF) uber master Juval Lowy, was doing the rounds and proclaiming that every class we DotNet developers wrote could and should be WCF Services. This was all part of the assertion that WCF is as big as .NET itself and in some respects the next .Net. A very interesting idea but nothing I am about to start doing and certainly something I have yet to see embraced. Jimmy Nilsson wrote of a ‘default architecture’, in reference to the use of DDD, but defaulting to a position of ‘every class a WCF class’, just feels wrong.

Udi pointed out a while back that this approach gave cause for concern with regards to performance. If I make every class a WCF Service I am going to end up with heaps of potentially redundant configuration code and or files and significantly pollute my objects with WCF attributes and for me that does not effectively express my intent. Are we meant to make our domain model classes services too? Surely not.

As far as WCF goes for messaging, it does provide an excellent way to move my message over various transports quite simply and uniformly, however it still encourages an RPC way of working and most development I see with WCF does in fact employ that approach. Now I haven’t seen Juval’s training session or presentation on this idea but it seems to me that if every class is a WCF service then I’m pretty likely to end up with JABOWS and frankly pilling up the the Web Services in my architecture is definitely not something I want to do.

Juval was recently in Sydney training and I couldn’t help but wonder if he is promoting this idea as part of his WCF master class now?

Share/Save/Bookmark

4 Comments so far

  1. Mal July 24th, 2008 9:23 am

    Hi,

    I was at Juvals master class and yes, he is still presenting that line.

    I really think this stuff has been taken out of context. Juval is an experienced architect and speaks to his audience as if they also are experienced professionals. I honestly don’t believe that Juval really expects anyone to go out and attempt to design applications where ‘every class is a service’. Beyond the fact that this is clearly unrealistisc it is also plainly stupid. Juval says as much in his workshop although maybe not explicitly.

    The take home message I got was THINK about making every MAJOR class a service - make it an option in your head and then work from there. Don’t automatically assume that performace will be an issue. Consider the possible benefits that WCF could deliver for that class (instancing, transactional behaviour, diagnostics etc). Also bear in mind that many of these services are hosted in-proc - no configuration, no ‘web services’ etc.

    Quite frankly I think Juval has copped it a bit unfairly on this issue. Juval is a performer - he likes to get peoples attention and try and make them think. I have little doubt that his every class a service line is a little bit deliberately confrontational.

    Finally, I would suggest that if anyone went along to any presentation by any one man, and adopted something so contentious completely holus-bolus then they’re not an architect/software designer, they’re an idiot.

    Thanks for the opportunity to post - I found your response far more measured and less precious than some others on the subject.

    mal

  2. Simon Segal July 24th, 2008 10:21 am

    Mal

    Juval is certainly a very entertaining speaker and yes his architectural knowledge is deep and certainly his domain knowledge on WCF is unparalleled. I myself greatly enjoy listening to Juval speak and reading his written work and his book on WCF is an invaluable resource on the subject.

    I take your point about Juval assuming the nature and background of his audience but I still feel that requires a measure of less subtlety on his part. Juval’s words reach a large audience and I don’t think we can assume that his audience are aware of the undertones or implicit unspoken caveats in his dialogue. Many developers make learning the latest technology and API their sole mission in life and I fear that those people are at risk of misunderstanding the nuance in his message and running with ‘WCF everywhere’ as their fist full of dollars. Sadly I have witnessed this technology crazed approach by developers across various teams and organisations but I wouldn’t jump to characterise them as idiots, most of them tend to be lacking in maturity and experience in their craft.

    thanks for the feedback

    Simon

  3. Mal July 24th, 2008 11:20 am

    Hi Simon,

    Point(s) well taken. I certainly wasn’t intending to disparage anyone and the term ‘idiot’ wasn’t the best choice. I guess I see that part of the role of the architect/senior developer is to be able to consume knowledge, analyse it and form a synthesis of ideas based on the entirety of their experience. It seems that anyone who’s worked on a couple of projects is now happy to put ‘architect’ on their title and I find this a little tiresome. I do really believe that if you’re going to put yourself forward as a senior professional then that sort of critical thinking I described is an essential component. Don’t forget this was meant to be a ‘master class’.

    However, you’re right - there’s no ‘common sense’ check at the door and Juval is quite happy to spruik this line loudly so I certainly understand you’re call for a little restraint.

    I too have seen the ‘technology crazed’ approach you describe. It’s everywhere. And it’s not good for our profession. Unfortunately, I don’t think we’ll see an end to this. Whether it be XP, TDD, DDD or whatever silver bullet comes next there will always be people enthusiastically pushing their views. I believe that as a profession we would be better off encouraging a bit more thought on our parts rather than blaming those in the public light.

    Thanks again - excellent blog.

    mal

  4. juan August 4th, 2009 12:51 pm

    ahhh.. no i think hes closer to literally meaning what he says than u think. I was at PDC where he gave the same talk. Im the beginning of the talk he put up a bullet list of system boundaries… geographic, component, process, transaction, etc…
    he said that WCF provides plumbing to bridge these divides to illustrate the power of WCF… he then went on to talk about every class a service.

    Towards the middle of the talk I asked him if he really meant that everything on the system boundary should be a WCF service.

    He looked at me like he wanted to psychologically wring my neck.

    but the funny thing is that hes probably right.
    reason being is that your class you think is clean is running massive plumbing underneath it just to make your method call take on the abstraction of object orientation in addition for the ability for it to live inside the CLR

    nowadays theres so much other stuff like the frameworks and stuff we build to handle everything we dont want to do in our code and make our systems more extensible.

    as time passes more will be added to that boundary area before your business object gets called.

    and you wont need reams of code… maybe itll be baked into the modeling framework called Oslo
    and maybe ontop of Oslo will be some framework for building models for the energynet.
    and itll be using some pattern, dev enviroment, accellerator, .net framework 6 called MEBA multi enterprise business application

Leave a reply

Creative Commons Attribution-ShareAlike 2.5 Australia
Creative Commons Attribution-ShareAlike 2.5 Australia