Subscribe: Jimmy Nilsson's weblog
http://www.jnsk.se/weblog/rss2005.xml
Added By: Feedage Forager Feedage Grade C rated
Language: English
Tags:
bit  blog  code  design  domain model  domain  don  good  interesting  language  might  model  much  new  objects  people  time 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Jimmy Nilsson's weblog

Jimmy Nilsson's weblog





Published: Fri, 10 Mar 2006 14:30 +0100

Copyright: Copyright 2005 by Jimmy Nilsson
 



Predictions for 2006

Fri, 30 Dec 2005 10:30 +0100

As the year draws to a close it is time to make some predictions for the coming year. What will be the most important products next year?

I'll pass on that and predict that long lasting concepts will be winners again... Products come and go, concepts last! A pretty safe bet, eh?
;-)

Happy New Year!




ADDDP, Current TOC

Thu, 29 Dec 2005 08:00 +0100

It's time to finish my latest book project ("Applying Domain-Driven Design and Patterns" [ADDDP]). I and the guest authors are currently going through the manuscript so I can send it for production in a few weeks. I will post some more about how the final work progresses here, but I wanted to give you a sense of what the book is about by publishing the current Table of Contents (TOC) now. (Please note that there will be slight changes to the TOC over the coming few weeks.)

Applying DDD and Patterns - Current TOC

by Jimmy Nilsson, all rights reserved.

Foreword
Preface

Part I Background
Chapter 1 Values to Value
Chapter 2 A Head Start on Patterns
Chapter 3 TDD and Refactoring

Part II Applying DDD
Chapter 4 A New Default Architecture
Chapter 5 Moving Further with DDD
Chapter 6 Preparing for Infrastructure
Chapter 7 Let the Rules Rule

Part III Applying PoEAA (giving infrastructure to DDD)
Chapter 8 Infrastructure for Persistence
Chapter 9 Putting NHibernate into Action

Part IV What's Next?
Chapter 10 Design Techniques to Embrace?
Chapter 11 Some about the UI

Appendices
Appendix A Other DM styles

References




English Common

Wed, 28 Dec 2005 13:20 +0100

If you are wondering about my stealth mode, I just came back from vacation in Thailand. One thing I have been thinking about (for two minutes or so) was the power of a common language. It first occurred to me when both my kids and my wife got different infections and we had to call the doctor. We do speak some English and so did the doctor, but we don't know too many medical terms in English. However, since we knew the Latin name of the throat infection my wife had, it was very easily communicated. The power of a universal language.

Even in the daily tasks such as ordering food and drinks, it occurred to me that having a common language would be good. I know, when you go on vacation it's part of the charm not knowing what you’re getting for dinner, but I couldn't help but think about it. The world is "getting smaller" all the time, but the language barrier is still there. We often assume that English is all you need everywhere, but of course that is just not true.

On the other side of the spectrum, even though I can get by when talking and writing English, I only know a very small subset of the language. OK, I guess I know a tech term or two that isn't known by all non-native English speakers, but other than that I have a command of a pretty small vocabulary. This shows itself when writing a book, for example. I lack lots of the nuances and therefore have a hard time using the semantics like a native speaker would. (Fortunately there are many people involved on the book project who can help with that.)

Anyway, perhaps it's time to come up with a basic vocabulary that we could all use. It doesn't necessarily have to be based on English. It could just as well be Spanish or Chinese, or one based on another language or indeed on a new one. Or how about having three? And then why not have everybody learn all of them in school, again as a base?

Something that lies behind all this is the "English Common" that the space fleet and most of the people on Earth speak in the Ender's Saga books by Orson Scott Card. Although I guess that it's a bit trickier in our reality to define such a subset, since we don't have a similar country-free organization that can do it. The United Nations might be closest to being such an organization, but it's still very much about protecting the interest of different countries rather than about improvements for the Earth in total. Can you imagine the debate on what the common language should be based on? Argh, that argument would take forever and most of the countries would feel bad about the decision, whatever it was. OK, I guess we can't expect Swedish to be the base for the common language so you probably won't hear too many upset voices coming from here.
;-)

I'm sure there has been loads of research about this already. Perhaps it's closer than I think?

Perhaps context is part of the answer (as always)? I mean, perhaps we should strive for domain specific common languages instead of generic common languages?

[Update]
I should have stated that I know about Esperanto. That said, I don't think that many knows Esperanto so I don't think the problem is solved thanks to it.
:-)




New courses

Thu, 08 Dec 2005 23:55 +0100

Ehrm, blush, I think it's time for a shameless plug...

2006 I will redefine my old course into three new courses, independent of one another. The open courses will be held at Soft Center in Ronneby and will be:

Applying Test-Driven Development (TDD)
2006-03-27 -- 28
The basics, but also mocks, database-based testing and dependency injection.

Applying Patterns
2006-04-24 -- 25
A selection of patterns from GoF, POSA and PoEAA.

Applying Domain Driven Design (DDD)
2006-06-12 -- 13
Except for DDD focus of course, also a lot of TDD-focus. NHibernate will be used for persistence.

Interested? Comments? Anything? Please email me!

(The open courses will be held in Swedish.)

Updated 2006-03-07, new dates.




The new PAG

Tue, 06 Dec 2005 21:16 +0100

When Ward Cunningham started working for the Prescriptive Architecture Guidance group (PAG) at Microsoft I joked with him, asking if he was going to become more PAG-ish or if PAG would become more Ward-ish. Now Ward has moved on to another job, but I definitely think PAG is more Ward-ish nowadays.
:-)

Here are a few blogs by PAG-ers:

I really, really like the new PAG!
:-)




Role/snapshots, take two

Tue, 06 Dec 2005 11:22 +0100

Ah, from time to time, this blog thing works so well...! I wrote this blog post called "Role/snapshot objects" the other day and judging from the comments afterwards it is clear that I needed to think some more about it.
:-)

For example Paul Gielens asked me in his blog post called "Context-specific view as Role/snapshot" if I was talking about the Role object pattern by Bäumer, Riehle, Siberski and Wulf. I started reading and one thing lead to the other... after a while it became pretty clear to me that the classic role objects and my snapshot objects have pretty different goals and implementations. So I probably shouldn't talk about them as similar. My snapshot objects are pretty much about timing aspects... and distribution aspects.

The role objects Kim Harding Christensen uses in distributed scenarios are something between my snapshots and the ordinary role objects (and he uses the ordinary role object approach in cases where he doesn't have to consider distribution between the different aggregates.)

So, I'm going to think about whether I have used snapshot objects too much and whether I've used them in scenarios where I should have used role objects instead. If so (which is quite likely), I'm going to experiment with the Role object pattern and with Gamma's Extension Objects.

However, one important thing for me to think about is that this role object thingy should not only be added as a technicality, but when it makes sense from the model's point of view. This is exactly what happens with the snapshots from time to time. Assume an Order reaches a certain state, then the customer information of that order should be static from that point and forward, no matter what happens to the customer. Then the snapshot adds meaning and clarity to the model, which I consider to be extremely important.

Martin Rosén Lidholm came to the same conclusion, that I was mixing two different solutions. While he described it to me, he directed me to this pattern by Martin Fowler called... Yep, you've guessed it: "Snapshot". I thought I had come up with the name myself, but I probably just had it in the back of my mind... So, this time Martin was only six years before me...
;-)

Oh, and while following up on "Extension Objects" I was reading "Pattern Languages of Program Design 3" when I found that an old colleague of mine, Peter Molin, had written up one of the patterns in that book from 97. It's pretty embarrassing that I didn't know about it from before when I worked with Peter at the local university.

This blog post seems to be about owning up so here is more. Not only the "Extension Objects" but also "Role Object" and "Snapshot" are described in the books called "Pattern Languages of Program Design 3" and "Pattern Languages of Program Design 4". Those books have been on my book shelves for years, but I haven't read them... Oh well, better late than never.

And this is probably the place where Rickard Öberg jumps in and tells me how AOP would solve this in a better way. Rickard?
:-)




DI and AOP and .NET

Mon, 05 Dec 2005 10:17 +0100

I've blogged before about Dependency Injection (DI) and Aspect Oriented Programming (AOP), for example "Context again", "IASA inaugural meeting", "Time for Spring.Net" and "Mixins in C# 3?" during 2005. There seems to be a lot of interest in DI and AOP in .NET land right now. For example, Harry Pierson blogs about CAB and its Object Builder here. And to my surprise Patrik Löwendahl pointed me to this article called Aspect-Oriented Programming at MSDN.

Oh, I also mentioned NFactory and NAspect yesterday here. As you probably know, there are also many other options... So much interesting stuff, so little time...
:-)




Puzzle

Sun, 04 Dec 2005 21:45 +0100

Two old friends of mine, Roger Johansson and Mats Helander, are working on a new framework called Puzzle, which is composed of several sub frameworks. One of the sub frameworks is NPersist which is an OR Mapper soon to be released in a new version. Two of the other sub frameworks are NFactory for Dependency Injection (DI) and NAspect for Aspect Oriented Programming (AOP).

I have only had a quick look at NAspect and NFactory, but I really liked what I saw.

You'll find more information in this blog post by Roger:
NAspect AOP engine
And here by Mats:
Get Puzzled!




Manual code review in the build process

Thu, 01 Dec 2005 18:50 +0100

dev112 has recently launched a new service about code reviewing (text in Swedish).

(image)

That triggered an old and somewhat crazy(?) idea of mine about introducing another step in the build process.

Just assume you use a slightly more formal process. How about letting the continuous integration process also pick some code according to rules that govern what code is to be selected for manual code review? (Automatic code review is often so cheap that it can be done for all the code. What I'm talking about here is not instead of the automatic review of course.)

Sure, the request for review will have to be ansynchronous because of course the person taking care of it will be a slow part of the complete build. Its purpose is more for notification and for getting code review naturally into the build process.

Has anyone tried anything like this?




NHibernate 1.0 is a milestone

Wed, 30 Nov 2005 13:10 +0100

Of course a version 1.0 is a milestone, but I've really been reminded about that when it comes to NHibernate. Now large companies send me emails about their plans for trying out NHibernate and have questions about it. I think the alpha/beta versions in those companies were pretty much politically impossible.

With ordinary products I wouldn't be keen to use an alpha/beta in production either, but when it comes to open source, it's a bit different. The transparency makes it more doable.

With the large companies, questions about large scenarios automatically crop up. I think I have been using NHibernate in some fairly large applications, but what is "large"? Compared to what some are asking about now, I have only been using NHibernate in tiny scenarios. I hope to be able to spend some time with some simulations in order to learn a bit.




DDD and aggregate reflections

Tue, 29 Nov 2005 14:30 +0100

Over the last few months I have started to believe that in the past I might have put too much emphasis on aggregates when it comes to reading scenarios. I have been using aggregates as the default load scheme and optimized when I have found the need for it. But that might be "too much". (Some camps are totally shocked at this...)

After all, aggregates are most important for write scenarios, agreed? When seeing it that way, adding a need for something like a GetForWrite() to the protocol before making changes to an aggregate instance might make sense. The GetForWrite() would load everything from the aggregate, possibly with read consistency.

BTW, the same camps I just mentioned are a bit shocked about such distinct boundaries that aggregates represent for writes as well, but...
:-)
If you do have a concept that is spanning many instances and you want to treat it as a unit, then aggregates is the thing and it has implications.

I also think the readonly/writable distinction is often something nice for users, having to actively choose to move into write mode. Another good thing about it is that the user won't start making changes to an already stale object when optimistic concurrency control is used, which means that the risk of collisions becomes smaller. This approach also translates nicely to pessimistic concurrency control schemes.




OreDev followup

Mon, 28 Nov 2005 20:40 +0100

It's always great to catch up with old friends and OreDev provided the perfect opportunity. But I'd like to focus on some other things in this blog post.

I'm not sure why, but I'm often bored by keynotes nowadays. However, the keynote at OreDev was just the opposite. Listen to Eric Evans when he talks about how important the models are and how there is usually so little focus on them,- now that was VERY interesting. I've been trying to practice Domain Driven Design (DDD) for a few years now, but Eric managed to make the discussion very interesting for me. It was like putting gas on a pretty strong fire.
:-)

Naturally it was a pleasure to talk to Eric Evans in the flesh!!! He gave me lots of ideas for my book. He actually used some of his modeling tools, such as distillation, on my manuscript. Very powerful.

At my ORM/NH-workshop one of the attendees said something like: "I didn't know about Hibernate/NHibernate before and this is just superb! Not having to spend all day writing all that stupid code and being able to focus on the interesting stuff instead..." So at least someone was interested enough to give it a real try.
:-)

For some reason, I find over and over again that people who come to workshops etc are often highly experienced in the particular topic and the OreDev workshop was no exception. Several people in the room had worked with NHibernate for many moons. Of course I don't mind a bit. Personally, I think it's very nice to see such a mix of people in the room.




Role/snapshot objects

Sun, 27 Nov 2005 21:25 +0100

I have become quite fond of using role objects at the boundaries of aggregates. For example, assuming an OrderLine has a Product that would most probably be implemented as a ProductOfALineItem role object (value object) in a Domain Model of mine. (Hmmm, but a better name would be needed...)

I think that in many situations this helps isolation, performance and timing issues. I arrived at this solution the hard way (and called those objects snapshots). My friend Kim Harding Christensen uses Roles a lot in his designs, and he was inspired by Modeling in Color. It's fun to see how different routes can lead to similar solutions.
:-)




Award to the nicest customer

Fri, 25 Nov 2005 16:50 +0100

I've often thought how lucky I am to have so many extremely nice customers, and yet the other day, a new record was set. Normally I wouldn't blog about my customers, but it's such a nice little story I thought I just had to share it...

My colleague Dan Byström and I were invited to the annual company party of one of our customers, which in itself exceeds all limits of niceness I think. Who would choose to have a vendor at the annual company bash? And we aren't even any fun. Heck we are just geeks...

But a few hours into the party, the whole management group suddenly got up onto the stage, put on t-shirts with "Dan and Jimmy" printed on the front and started to sing a song they had written about us...! Several days later, I'm still at a loss for words.

This has got to be some kind of record in being a nice customer, right?




Core Security Patterns

Fri, 25 Nov 2005 01:40 +0100

I have been asked a couple of times about a book about security patterns when I have given my patterns course. I'm afraid I really can't say that security is my field at all, but from the little I do know I didn't think that there was such a book. Anyway, the other day "Core Security Patterns" dropped down on my desk. Perhaps it's just the book they were looking for.




MSTDD, ouch and sigh...

Fri, 18 Nov 2005 10:40 +0100

You might remember I said that it seems that very few are still using Test Driven Development (TDD) in this blog post:
TDD still not popular?

Well, it might soon change. Question is if they will really use TDD or something else that is still called TDD... Via Uncle Bob's blog post I found this little guideline from MS:
Guidelines for Test-Driven Development.

Perhaps it's a useful technique they describe, but I totally agree with Uncle Bob. It's not TDD.

Oh, and look at the rating of that article. Ratings like that are troublesome of course. What is it that people dislike? Is it the described process or the description itself or what? I put my money on the described process.




What O/R illusion, take two

Mon, 07 Nov 2005 02:05 +0100

My evil plan worked out even better than I dared to hope for. Mats is certainly back to blogosphere, and what a comeback it was! :-) Well, since it worked so well the previous time and I really liked reading Mats' blog posts and all the comments, I just can't leave this and have to write another post with questions. First a short background: Mats first wrote: The O/R Illusion. I wrote: What O/R illusion? Mats then wrote: Long Live The Cache and Multi-Level Caching and the Cancel Button Dilemma. Which is where we are now. Make sure you also read all the great comments to all three of Mats' blog posts! OK, here are some comments/questions carrying on from Multi-Level Caching and the Cancel Button Dilemma. (Old stuff written in italics.) [Jimmy] No matter which approach to O/R Mapping you choose (OODB way or RDB way), the O/R Mapping relieves you from having to write lots of tedious code for moving data back and forth, right? [Mats] Sure, compared to doing data access completely manually, but I'm not sure an O/R Mapper necessarily takes away much more of the work than, say, DataSets. [Jimmy again] Might that depend upon which your main model (or starting model) is? I mean whether the database is your main (or starting) model or if it's the domain model? Or do you mean that even if the domain model is the main model you would start writing your tests against datasets? Well, that is possible of course, but is it common...? Perhaps it is and I'm just not being flexible enough in my thinking... I know, let's not get started on which programming model is wanted regarding the domain model "thingies". [Jimmy] What do you think about letting the reading be done the OODB way and the writing in the RDB way in certain scenarios? I mean so that before writing, a defined chunk is refreshed and/or read in completion? [Mats] Well, except that the read-only reading, which probably is some kind of reporting, probably ought to go the RDB way :-P There's always going to be compromise. I usually try to do as much as I can with O/R Mapping - in order to see why it doesn't work so well, if nothing else - but of course the pragmatic approach that Roger tells me he usually goes with is what I'd recommend – bringing up "dead" DataTables (that don't lazy load, dirty track and whatnot) to fill those grids and then use O/R for the edit screens... makes 100% sense to me. [Jimmy again] Sorry, I wasn't very clear. What I meant was that the user often browses around a bit and then when he wants to make a change, he has to request a mode shift somehow (it can be done implicitly as well, of course) in order to prepare for allowing the user to make the change. At that point stale data is swapped for fresh data. That was the scenario I meant. Is it always weird? Is it ever interesting? BTW, in relation to this, how do you envision pessimistic concurrency will fit in with the OODB way? And regarding bringing up "dead" DataTables for reading and using O/R for the edit screens, then what is the core model? Is it the database? Nothing wrong with that of course, I'm just asking. :-) [Jimmy] Do you envision any differences between the two approaches when it comes to TDD? Perhaps it's more about for example inverse property management (or not) then, which requires support from a framework? Or will the OODB way regarding "only" memory management require sacrifices of the Persistence Ignorance (PI) level? (Hmmm... That felt strange to write. I mean that the OODB way would sacrifice the PI-level... It should be the other way round, shouldn't it? Is it?) [...]



dev112 and two services

Wed, 02 Nov 2005 23:01 +0100

(image) (image)
dev112 has now released its two first services, architecture review and mentoring. (Texts in Swedish only.)

It will be sooo fun to work with those guys!




What O/R illusion?

Wed, 02 Nov 2005 23:00 +0100

Ah, finally Mats is back in the blogosphere. It took some serious nagging, but considering the interesting blog post he wrote today, it was worth it.
:-)

The question is, how can I "force" Mats to write more? My evil plan is to accomplish that by writing a blog post with questions for him... Let's see if it works. The questions I've come up with so far are (in no particular order):

  • No matter which approach to O/R Mapping you choose (OODB way or RDB way), the O/R Mapping relieves you from having to write lots of tedious code for moving data back and forth, right?


  • What do you think about letting the reading be done the OODB way and the writing in the RDB way in certain scenarios? I mean so that before writing, a defined chunk is refreshed and/or read in completion?


  • Do you envision any differences between the two approaches when it comes to TDD? Perhaps it's more about for example inverse property management (or not) then, which requires support from a framework? Or will the OODB way regarding "only" memory management require sacrifices of the Persistence Ignorance (PI) level?

    (Hmmm... That felt strange to write. I mean that the OODB way would sacrifice the PI-level... It should be the other way round, shouldn't it? Is it?)


  • When it comes to the example with anOrder.GetTotal(), would you consider the following to be a decent solution in some situations?
    • Gets use a field in the Order (a persistent one).
    • Changes (such as adding order lines or changing the discount and so on) that affect the value will "trigger" an update to the Order field.

  • Do you ever see the need for several memory management spaces for a single user? If so, how will that affect the picture?
Like Mats, I'm not too fond of the names (especially not "RDB way") for describing the two O/R Mapping styles. I'm sure we will soon see some alternative suggestions for them...
:-)




Academia and TDD

Wed, 02 Nov 2005 09:50 +0100

I'm afraid I don't have the low-down on what academia thinks about TDD. Fortunately I have a chance to check that out soon.

I will be talking about "Experiences of how testing affects the design" at a seminar at the local university late November. The seminar will be a mixture of academic researchers and industry people, with the focus being on Model Driven Architecture and Testing. More information can be found here.

I can't help it, but the agenda looks a bit funny with people from the university, Ericsson, Volvo and yours truly (a one man shop)... It's of no great importance of course, just a bit of fun.
:-)




TDD still not popular?

Tue, 01 Nov 2005 22:50 +0100

I recently had the chance to ask something like 100 .NET developers (highly skilled) if they used Test Driven Development (TDD). To my great surprise only three of them said they did. I was expecting above 50%...!

Why is this? Is there another bandwagon that people are jumping aboard instead, one that is mutually exclusive and that I haven't found and/or understood?




OreDev

Thu, 13 Oct 2005 23:55 +0100

In mid November a new Swedish conference called ÖreDev will be taking place in Malmö. I will get to meet Eric Evans in real life for the first time and also hook up with lots of old and new friends. I hope to see you there!




JAOO 2005, follow up

Wed, 12 Oct 2005 23:50 +0100

I was looking for some new inspiration and I got more than I was bargaining for.
:-)

Just as I expected, it was a great week! I'm not going to write a post with a lot of name dropping, just pick out some of the many interesting people and happenings.

  • Martin Fowler asked if I wanted to join the final panel. I realized straight away that it was going to be very tough, but how could I possibly resist such a challenge?
    :-)
    It's been years since I felt as much of a rookie as I did on that panel chaired by Martin. The other panelists were Frank Buschmann (you have probably read some of his POSA-books), Steve Cook from the Software Factories team as the latest merit and Dave Thomas, whose list of merits is as breath taking as his verbal abilities. So, in comparison I was like a rookie, but hey, I would do it again, and again.


  • Craig Russell (Sun) who is one of the main guys behind JDO (among other things) provided me with several interesting ideas during the week...! A lot of food for thought that I have to chew on!


  • Over the years I have been in contact with Ed Jezierski of PAG at Microsoft several times, but now I finally got the chance to meet him in real life for the first time and it was great to see how similar we think about techie stuff.
    :-)


  • After my dinner with Eric Meier (lead for COmega and one of the language designers of C# 3) my brain was aching. (So were my cheeks from all the laughter.) My conclusion was that the coming few years look to be very interesting!




Agreed, code is model

Mon, 10 Oct 2005 07:50 +0100

:-)

I really liked this blog post by Harry Pierson! I think he and I are on the same wavelength, but I wanted to write down a few reflections.

I've been trying to live the "code is model"-life for a few years now and I really like it. As I see it, that's very much what Domain Driven Design [Evans DDD] is all about, focusing on the model which is expressed in code. It's also about trying to keep that model in code as clean as possible, avoiding distractions such as infrastructure in the core model.

However, as always, things are not black and white. I think there might be a risk of lack of analysis. Kim Harding Christensen got me interested in Modeling in Color as one analysis focused technique, which integrates well with Domain Driven Design. (I'm looking forward to give it a try myself in an upcoming project.) But then we are back to *AsSketch again and we are still inline with Harry's post.

Let's see what Harry writes about "Code is model" next... Harry?
:-)




An integration wish

Sun, 09 Oct 2005 23:30 +0100

I have been adding tools that are completely independent from one another to my tool box for quite some time now with the purpose of being able to mix and match as I wish. However, for a while now I have been thinking that it would be nice to see an integration as well. The example I'm thinking about is integration between an OR Mapper such as NHibernate and an Inversion of Control-container so that Domain Model instances can be reconstituted in defined ways and won't require default constructors. This would be a step (a small one, but nevertheless a step) towards a higher degree of Persistence Ignorant Domain Models.

Oh, and Paul Gielens mentioned this to me the other day - is it possible that *two* guys be totally off?
:-)




Some mistakes when using NHibernate

Sun, 25 Sep 2005 21:50 +0100

I'd like to follow Ingo's example and post about some mistakes I have made when using NHibernate. Take this with a pinch of salt though because I haven't checked it much yet... Anyway, here goes:

  • It was my belief that when you used assigned Ids you had to be specific and tell NHibernate whether you wanted UPDATE or INSERT. But in a recent build that's no longer the case if you use a version-tag. It can then be used by NHibernate to decide on what DML-operation is needed.
  • Until recently I believed that when one entity had a list of other entities, then the relationship had to be set up by maintaining a foreign key "field" in the child entities, even if the only required navigation was from parent to child. I learned this from one of the attendees on a recent course I held. Blush. Nevertheless I firmly believe that this was the case in an early build and that's the reason for my holding on to it... At least I hope that's why. That would make it a bit less embarrassing for me...
    :-)
  • Finally, be careful using "cascade=true" when you describe relationships between entities. Again, I haven't investigated this very much, but I think this was the cause of a problem I had regarding "moving" entities across sessions.




Intrigued by LINQ?

Thu, 22 Sep 2005 23:50 +0100

I guess a lot of people are these days. And my guess is that many of them are also thinking about how to prepare for the transition to a LINQ-world in the not too distant future, right?

As I see it, a good move would be to start looking at one of the OR Mappers that are around today. Sure, there are big differences with regards to LINQ, but also quite a lot of conceptual similarities.

An even better move would be to get interested in Domain Model-based design, for example Domain-Driven Design [Evans DDD]. After all, it all comes down to design.
:-)




Language innovations aren't unimportant after all?

Thu, 22 Sep 2005 09:30 +0100

Someone said recently that there isn't much more to be gained from language innovations...!

Well... I don't agree.
:-)
Let's take a couple of examples.

  • First of all, I find myself pointing to COmega features over and over again.
  • Perhaps you have been inspired to try out another language recently? For instance there is *a lot* of talk about Ruby and its features.
  • Then we have all the current buzz about the new C# 3 language innovations, and LINQ, and it also seems that there is some interest for mixins as well, according to this post. (But to a fairly large degree extension methods could probably help out instead.)
  • Oh, and then there's all the buzz about DSL. It's different from the other things mentioned above, but isn't it about language innovation too, in a way?
So, again, I don't think language innovation is unimportant. On the contrary!




Inspiration mode

Mon, 19 Sep 2005 23:10 +0100

Ah, I'm back from having been in something like survival mode for quite some time. I have really been concentrating on a big development project for the past few months. So now I'm really in need of some new inspiration.
:-)

Due to obligations related particularly to the project I just mentioned I couldn't make it to a special event in Colorado. But coming to my rescue is next week's JAOO, so I will definitely be getting my share of new ideas.

Oh, and I heard from the organizers that Kim and I have over 50 people signed up for our DDD-workshop on the Friday. And now that Microsoft have obviously invented OR Mapping (sorry guys, I couldn't resist that), perhaps I might also get a good turn-out for my OR Mapping session at the Enterprise .NET Development track on the Tuesday. Well, I'm not going to talk about LINQ, but many of the concepts and probably also the problems and opportunities are similar.




Transactional Domain Model objects, follow up

Mon, 19 Sep 2005 11:35 +0100

I have received lots of interesting feedback to this blog post, and I'd like to share some of it with you.

Frans Bouma wrote about some basic support he has built into LLBLGen Pro for creating a transactional domain model.

Ingemar Lundberg wrote about how he has long used Memento pattern [GoF Design Patterns] for getting transactional-ish semantics, both in Delphi and C#.

Anthony Williams blogged about it here, and says this is a common C++ idiom called Strong Exception Safety Guarantee.

Thom Lawrence pointed out that COmega has transact/commit/rollback blocks, which might be just what I'm looking for.

Talking about COmega, this reminds me that I haven't thought too much about its support for parallelism in a while. That in its turn reminds me that I have to mention a must read from earlier this year, Herb Sutter's article here.




A great resource for TDDers

Thu, 08 Sep 2005 17:01 +0100

Christian Crowhurst pointed out this one to me. Check it out!




I've been podcasted (in Swedish)

Thu, 08 Sep 2005 17:00 +0100

A few weeks ago Dag König posted a podcast. A podcast with me, of all people.
:-)
Yesterday an old friend told me he had listened to the interview while chopping wood. According to him, it worked out very well.
;-)




Don and Saga

Wed, 10 Aug 2005 21:33 +0100

When Don Box says "saga", I wonder if he means saga the way I first read about it in Jim Gray's and Andreas Reuter's book "Transaction Processing: Concepts and Techniques". I'm sure we will soon know.

I have been planning to experiment a bit on my own with an implementation of that for a couple of years, but if you delay an experiment long enough, you apparently don't have to do it.
:-)




Irony of life

Sun, 7 Aug 2005 22:05 +0100

Here's another example of one of life's little ironies.
:-)
Just when many people in .NET land seem to think that one language (typically C#) is enough and that the possibility to mix and match several languages in .NET isn't in the least bit important, the opposite seems to proove itself. Take these as examples:

In Java land I've Rod Johnson claim that Java as a language might be less important in a couple of years from now, but Java as a platform might be stronger than ever. This opinion was based on the assumption that more and more languages could be compiled into Java byte code.

Martin Fowler is always telling us about interesting concepts found in other languages such as Ruby and SmallTalk, which is a very good basis for understanding newly added concepts to, say, C#.

It has been said (I think I first heard it from the Pragmatic Programmers) that it's a good idea to learn a new programming language every year. First I thought "Yeah, yeah, that's for people with too much time on their hands". I have since changed my mind... (I tried to persuade the local university that this is a niche to focus on, to attract people in the trenches into taking a course or two every year. It will be interesting to see if they agree.)

Finally, yet again Domain Specific Languages (DSL) comes in as an example. I mean, that's taking the "let's add a new language" to the extreme, isn't it?




Newkirk and JAOO 2005

Wed, 03 Aug 2005 16:00 +0100

Jim Newkirk blogs about JAOO here and says he thinks my and Kim's tutorial will be an interesting one. Did I ever mention that Jim is one extremely smart guy?
;-)

No but seriously, Jim has an important point about how difficult it is to compare different conferences. They are so different by their very natures.

That said, something that surprises me about JAOO is that so few seem to know about it. That’s strange and it's a shame too, considering that it's an extremely good conference. Sure, they get lots of attendees, but when I talk around with people, very few have heard about the conference... I'm sure that will change, and maybe already this year.




COmega, C# 3 and Luca

Tue, 26 Jul 2005 23:50 +0100

Yep, it was no coincidence that Luca moved to the C# team... Some derivate of COmega is coming...
:-)




Reflections on Ubiquitous Language

Fri, 22 Jul 2005 13:30 +0100

You know it and I know it; I'm good at kicking in open doors.

Today I'm going to kick in three open doors by talking about reflections on the Ubiquitous Language [Evans DDD]. Reflections that are somewhat new to me, but now feel so obvious that everybody else has probably been thinking this way for a long time. Anyway, it's kicking in time:

  • I'm currently working on a project with a lot of Service Orientation (SO) focus. You didn't expect that, did you?
    :-) It has occurred to me that the Ubiquitous Language is also extremely important in the Service context, not just for Domain Model focused situations. It brings with it increased clarity and understanding, crispness, mapping between requirements and development, and so on. Services gain too, just as Domain Models do when the Ubiquitous Language is applied.


  • The Ubiquitous Language is of course a very important enabler when applying Domain Specific Languages (DSL). If you succeed in building your Domain Model in accordance with the Ubiquitous Language that you and your clients are using, the chance of defining a DSL that your clients can use is so much bigger. Ah, it's all coming together.
    :-)


  • When I worked as a teacher in the software engineering department of the local university, some of my colleagues kept talking about how the department would benefit from having additional linguistic and semantic expertise. The reason was that this would give an interesting effect on modeling exercises and discussions. Now I understand a little better what they were talking about, more than a decade later. Sigh.
Ah, good. Obvious or not, I had to get that out of my system.

All in all, the Ubiquitous Language is, in my opinion, sooo important. And it's still growing on me.




What process to use?

Thu, 14 Jul 2005 23:52 +0100

For a change I will talk briefly about process matters today. I'm really not a process guy,... but I've heard it said over and over again and I think I can see it in my own past and present projects as well. The process that is used doesn't matter too much. What really matters is to talk a lot with the customer. Understand each other. Use transparency and instant feedback. That will give good result, no matter which process is used.




CI finally

Tue, 12 Jul 2005 22:30 +0100

I'm late to the game but I have now (just like the rest of the world) been using Continuous Integration (CI) for a couple of months, thanks to my colleague Christer Åkesson.

CI increases speed a lot! It's pretty much like TDD in a sense. It keeps the project moving forward all the time. It's also pretty much about preparing for deployment from day one, and not getting into that "ouch, the bits should also be deployed" mode at the end.




Update to the "law" of hype evolution

Mon, 04 Jul 2005 09:40 +0100

From Martin's and David's posts I take it that I should update my "law" of hype evolution presented here. (Well, I should have understood this after having spoken to Steve Vinoski at JAOO last year, but I'm a bit slow off the mark.)

I need to add "understanding". After "hangover" comes "understanding" or at least willingness to understand... Then "positioning". Like this:

  • Hype
  • Hangover
  • Understanding
  • Positioning
BTW, I currently prefer to think about SO* in the way David calls "Services as Integration Gateways", but I can't say I know or have thought too much about the whole thing...




dev112 (blog post in Swedish)

Mon, 04 Jul 2005 07:07 +0100

En ny företeelse som kallas dev112 startar idag och jag är en av dev112-arna!
(image)

Ah, detta skall bli sååå kul! Jag skall göra projekt och erbjuda tjänster ihop med nio andra, som var och en är oerhört mycket duktigare än vad jag är...! (Det gör jag i och för sig varje dag, men... Äh, ni förstår!)
:-)

Till att börja med kommer det erbjudas lite fortlöpande information, t ex "Veckans tips" som alltså kickar igång på "allvar" om en vecka. I höst så släpper vi några av de "riktiga" tjänsterna.

Du hittar mer information här: www.dev112.com
Du prenumererar på feeden här: www.dev112.com/blogg112rss.xml




STOM - Software Trade Off Matrix

Wed, 29 Jun 2005 06:45 +0100

Daniel Akenine (Swedish Microsoft) put forward an interesting idea about setting up a matrix with quality attributes at the SweNug Architecture Summit. If the client wants certain aspects in the project, this could incur generalized costs. For example, quality attribute A increases the cost by 15%. Is it worth it?

It would give the client a feeling of the costs, but might also increase clarity of what is built and bought.

Normally it's tricky to discuss non-functional requirements with the client. "Do you want internationalization? Would you like to be able to change database product? Is a good operations story important?" The client will always say "yes, yes, yes". How to map these requirements to cost is not always obvious.

Coming up with a matrix with some coarse grained factors should be really helpful. The problem is just creating that matrix. That will of course be complex. For a start, the attributes aren't binary...
:-)
But is it possible that a simple approach might take us quite a long way?

Does anyone already have anything useful up and running?

Ex:

Quality Attribute Cost/Time impact
Database independence 15% (?)
Internationalization 5% (?)
etc... ...




Transactional Domain Model objects

Tue, 28 Jun 2005 07:07 +0100

On my list of things I'd like to experiment with is using Systems.Transactions for creating transactional Domain Model objects.

As I understand it, there are transactional Hashtables and the like on the way, or if we are in a hurry, we can create our own.

The programming model typically looks something like this now (in some unknown language, JimmyIsNot#):

theOrder.Date = DateTime.Today
theCustomer.Address.Street = "Large street 52"
BeginTransaction
PersistChangesToDatabase
CommitTransaction

Wouldn't this be nice?

BeginTransaction
theOrder.Date = DateTime.Today
theCustomer.Address.Street = "Large street 52"
PersistChangesToDatabase
CommitTransaction

I have to admit there are some appealing things about having a transaction that spans changes to the loaded domain model objects and the persist operation to the database. So that if the persist operation fails, the changes to domain model will also be rolled back (when we want that behavior). The traditional approach to this is just to say that the domain model objects that are loaded in the session are in inconsistent state and should be dropped and re-instantiated. Often that's perfectly all right, but as always there are situations for having a variation.

It would even be nice to have transactions for the loaded domain model objects themselves. I change this and that, but then the change of this other something fails. Then I'd like to be back at square one, not in the middle (again in some situations)... Could it be that I like the transaction abstraction too much, though...? I'm also concerned for the sacrifice in POCO-ness... But it's still a fun experiment.

Anyway, has anyone given it an honest try yet?




Stubs aren't Fakes

Mon, 27 Jun 2005 07:05 +0100

Martin Fowler wrote "Mocks aren't Stubs" quite some time ago. After having discussed a variation on this theme, also for quite some time, with Christian Crowhurst and Claudio Perrone, my conclusion regarding the variation is that "Stubs aren't Fakes".

Nope, I'm not joking. I'm serious. I think good names are dead important for our language as developers. See what happens otherwise, for example:
Architect, Component, Service, ...
And you can probably add to this list, right?

Astels writes the following in his TDD-book:
"Stubs: A class with methods that do nothing. They are simply there to allow the system to compile and run.
Fakes: A class with methods that return a fixed value or values that can either be hardcoded or set programmatically.
Mocks: A class in which you can set expectations regarding what methods are called, with which parameters, how often, etc. You can also set return values for various calling situations. A mock will also provide a way to verify that the expectations were met."


One less bit of fuzziness.
:-)




Ubiquitous Language and Swedish, follow up

Fri, 24 Jun 2005 10:30 +0100

Today it's the most important party day of the year here in Sweden, it's the "Midsommar". We dance around a pole, wear flowers on our heads, sing about frogs, eat raw fish, and drink vodka shots. Can you visualize that!
;-)

Therefore I thought it was in place with a blog post with at least some Swedish connection.

Most people who have commented on this blog post said "English for techie stuff, Swedish (or whatever native language) for business stuff". That means that it's usually best to use Swedish for coding domain-specific things if that's what you are using when in discussion with the client. I think they are right... Hmmm... Why did it take me so long to realize this? It's very much in the spirit of the Ubiquitous Language. I just have to learn to live with the increased ugliness in code, and the price is lower than the benefit.

The only comment in the other direction said that the company might be bought by a company from abroad and voilà. I guess many of us have some experience of that. I was trying to maintain some French code many years ago, and... Ah, perhaps that's why I've struggled against using Swedish. (Ask the shrinks, there's always something lurking from the past.) Now it all becomes clear. Not that I have anything in particular against French. I just don't understand it well enough.
:-)

But thinking too much about a possible sell out is preparing for the unexpected in most cases and it doesn't sound such a good idea... And if it happens, it's probably best if the code is crisp and in good shape. Then the translation should be as simple as possible (but is probably not simple anyway due to other differences).

OK, time for some raw fish for me... :-)




Dropping the I-prefix?

Thu, 23 Jun 2005 07:20 +0100

Ingo's refreshing blog post about dropping the I-prefix in interface names has made me pay attention to that old habit of mine. After all, the difference between an interface and an abstract class isn't that big, and perhaps the distinction will become even less clear and/or meaningful in the not too distant future, if I understand the signals correctly.

That said, I have done some inner-reflection and found out that I (i.e. me this time) get a slowdown in reading and understanding code when the I-prefix has been dropped. I know, it sounds totally ridiculous, but again, that's what happens. Although I guess it's probably something that I will get used in a few hours. Something you have used for a decade takes some time to "unlearn", right?

Or is my slowness in adopting it partly because C# doesn't differentiate between inheritance and interface-implementation? Java has a difference, so does VB.NET. Is it that the C# designers just understood the meaninglessness of the I-prefix and didn't want to create a somewhat artificial distinction?




Why so much buzz about POCO?

Wed, 22 Jun 2005 12:50 +0100

Some people think that POCO is given way too much attention. What's the point?

I think it's pretty much a matter of the Single Responsibility Principle (SRP) [Martin PPP]. Giving additional infrastructural responsibilities to a class that has a clear domain specific responsibility comes at a price.

Of course the price might very well be small compared to the benefit. Or it may not.




Context again

Tue, 21 Jun 2005 18:35 +0100

Once again I have been reminded that context is important. In two different contexts, I learned two very different things about AOP:

  • It's only for sexually frustrated geeks
  • It's extremely useful and will solve all problems
As always I think it might be something in the middle. That's the context I live in.




Shoemaker's child

Mon, 20 Jun 2005 19:48 +0100

After reading Martin's great article about Language Workbenches and Domain Specific Languages (DSL), it occurred to me that the language workbench is built pretty much in a Domain Model-ish way...

It's a bit strange that it took so long for us developers to eat our own dog-food? I mean, considering that the Domain Model-style has been used for such a long time to build so many different things... Perhaps a good example of the shoemaker's child?
:-)




The premiere boat trip of the year

Mon, 20 Jun 2005 19:45 +0100

Ah, we had a great boat trip today, me and my family. I was reminded that our spot on the planet is paradise when the weather is merciful. It was pretty empty in the archipelago and everything went smoothly. I did not forget to pull up the anchor when we went back this time...
:-)

I know that you expect some kind of technical coupling, but this post is different. The next won't be, I promise.
:-)




Pair presentation

Sun, 19 Jun 2005 22:16 +0100

I've recently had the pleasure of working with Erik Dörnenburg, Patrik Löwendahl and Kim Harding Christensen on three different presentations/tutorials.

I've heard before that doing pair presentations is a safe way of getting lower evaluation scores, but I don't think that's necessarily true. I had a great time with all three of them and I think that should go some way towards making the audience enjoy it as well.

I have also noticed that I learn a lot from doing it! It's a bit like pair programming...
:-)




More blogs you should read

Sun, 19 Jun 2005 22:15 +0100

Two more of my friends are now blogging, and what interesting posts they have come up with:




IASA inaugural meeting

Thu, 09 Jun 2005 23:01 +0100

On June 30th I will be speaking at the inaugural meeting of IASA Sweden. The presentation, which I plan to make pretty informal and interactive, is called "Application Architecture techniques I've been late in embracing" (but it will be in Swedish). I will be talking about Dependency Injection, AOP, UI Mapping and Continous Integration. (Hmmm... Continous Integration isn't an application architecture technique, but...)

You'll find more information about the meeting at Mikael Freidlitz's blog post here. See you there!




NWorkspace update

Thu, 09 Jun 2005 23:00 +0100

Yep, I still believe in the idea of an abstraction against which to program your consumer, one that can delegate to some popular OR Mapper or a Fake that fakes the database. I'm using it daily in my work on a current project and sure, there has been some friction, but overall I think it is serving me, my team and the project well.

I was listening to Rod Johnson the other day while he talking about Spring and it occurred to me that Spring has something regarding a generic Exception hierarchy for abstracting Exceptions from different OR Mappers and datastores that is exactly one of the things I have in NWorkspace, only that my version is much less sophisticated.
:-)
So perhaps there is some momentum in the idea after all. Oh, and there are more signs....

I was really interested in Kim Harding Christensen's usage of the Specification pattern [Evans DDD] for querying as well. I think it's a great way of making the code more intention revealing. So far I have used more generic queries, even if I have created type safe query objects such as CustomerQuery, but to my mind using Specifications is even better. What's more, if those specifications could use some generic query solution, the whole thing would be even nicer. Furthermore, Kim is using something similar to NWorkspace in his own development, but without a generic query language.

Yet another sign is that Sebastien Ros of Evaluent has created something he calls EUSS which is also similar to NWorkspace, including a generic query language. It will be very interesting to see if it takes off!

OK, to balance this post a bit, it might be that the generic query language is the problem and that it will be too powerless to be useful often enough. I strive for 80% of the cases. We'll see...




Architect levels

Mon, 06 Jun 2005 22:21 +0100

I recently listened to a presentation where the presenter talked about different levels for architects. First there are those architects that operate from a cloud free level. They can see highways and such and focus on the big picture.

Then there are the architects that operate from helicopter level. They also have the big picture, but one that is obviously smaller and more detailed. They can see just how bad the traffic jam problems are.

What was missing was a third level, the one on the ground. It's the guide example as described in this article by Martin Fowler.

And as usual I think a combination is a good solution; at times it is best to operate on the ground, sometimes a bit higher and sometimes by looking at the big picture.
:-)




Time for Spring.Net

Mon, 06 Jun 2005 22:20 +0100

While hanging out with Rod Johnson (the Founder of the Spring framework) the other day I was reminded that I need to have a close look at Spring.Net as soon as I get a chance. Well, it was already my intention because I really have to get going with "automatic" Dependency Injection (DI) as soon as possible. As well as this, adding AOP to the arsenal is also something I'd like to do for a long time.




POCO or PI?

Sat, 04 Jun 2005 11:35 +0100

For a while I have been describing classes that aren't prepared in any specific way for persistence as POCO (Plain Old CLR Objects), however, I'm not sure it's such a good idea. POCO is a direct translation of POJO from Java land, and POJO was the description of classes that doesn't carry extra code for only work in EJB containers. Not persistence in specific.

When I discussed this with Martin Fowler he said that perhaps Persistence Ignorance (PI) is a better and clearer description.

Mats Helander on the other hand isn't so fond of PI. He says that there are lots of other aspects to be ignorant about, which in turn would lead to Ignorant Objects (IO). That would be similar to POCO, but POCO is more of a well established acronym.

Your take?




Data Mapping Application Block

Thu, 02 Jun 2005 22:50 +0100

My friend Kim Harding Christensen just notified me about the Data Mapping Application Block "wannabe" here.




Look grandma!

Thu, 26 May 2005 11:05 +0100

Look grandma, I'm an architecture blogger.

Being a developer is useless - at least in the eyes of my grandma. She needs help with painting, carpentry and digging, not having loops written. But perhaps she might see me as being somewhat more useful now. (I'm still a developer, but I don't *have* to tell her.) And anyway, I don't think she has any plans for building a new house so she won't realize that architecture is a "tricky" word...
:-)

It feels good! Nobody wants to be the black sheep grandchild.
:-)




Hands on at the Expo-C tutorial

Tue, 24 May 2005 20:30 +0100

I'd like to make a quick clarification regarding my and Kim Harding Christensen's tutorial ("Applying DDD") at Expo-C next week. In the description it says that you will try out applying DDD "yourself hands on".

There *will* be some hands on exercises, but there won't be a room full of computers and we don't expect you to bring a laptop fully configured either. Please do if you want to of course, but it's also the case that there will be over 40 participants and that makes it practically difficult for just two lecturers to help out with coding. Therefore the hands on parts will be regarding modeling, and we plan for quite a lot of interactivity.

"No code?" you ask. Oh, Kim and I will show *lots* of code of course for clarifying the concepts and trying out different solution proposals.




Mixins in C# 3?

Sun, 15 May 2005 22:40 +0100

Back to a favorite old topic of mine.

At the SweNug architecture summit I heard that Microsoft is considering adding support for mixins in C# 3... I discussed this with Anders Hejlsberg not so long ago (less than a year) and he didn't seem too keen at that time. Perhaps he has changed his mind. Or perhaps it was just the implementation proposals I discussed that he didn't like.
;-)

Here are a few quotes from friends of mine regarding the possibility of mixins:

  • Ingemar Lundberg: "Decomposition on steroids."
  • Rickard Öberg: "The best of both worlds, expose a coarse grained API, implement it fine grained."
There are several different approaches of course. A common solution is to support mixins with the help of multiple inheritance, but I think Stanley Lippman at Microsoft made it pretty clear in a series of blog posts that he, ehrm, wasn't fond of that.
:-)

The AOP people call it AOP Introductions and it's commonly implemented with some dynamic proxying technique. Think of it like if you say that your class implements a certain interface, the class also gets the implementation of that interface automatically. So you would not need the tedious forwarding code that is so common in situations like this where you just need to delegate the calls to a generic class.

Another solution would of course be to solve it with DSL. I heard a rumor today that that delegation is something Microsoft is currently working on to solve with DSL. Perhaps that's the solution that the C# 3 rumor was touching on? We'll see...

It's just typical - wanting C# 3 way before C# 2 has been released, eh?
:-)




ADDDP?

Wed, 11 May 2005 14:03 +0100

Believe it or not, but I think it's now just a matter of weeks before I have the first draft of the manuscript written. Manuscript? What manuscript, you ask. Well, the manuscript of what will hopefully become my next book. The current suggestion for its title is "ADDDP" or "Applying Domain Driven Design and Patterns".




We are different

Wed, 11 May 2005 14:02 +0100

One of my favorite activities nowadays is going to workshops and I have been to three different workshops this first half of 2005. All of them have been informal discussion groups, with lots of networking and lots of sharing.

Around a year ago I discussed the idea of getting together in a room and discussing design problems and solutions etc with a friend of mine who is in top management at a big company (not IT-related). He was completely shocked and said something like "Are you insane? Are you sharing your ideas with your competitors? Our employees would never be allowed to do that."

Honestly, I was also taken aback because I hadn't thought about it in that way before (although of course I am totally aware of what customer information can't be shared). Anyway, after having thought about it for a little while I came to the conclusion that if there are fifteen people at the workshop, then I receive comments from fourteen for every comment I "pay". Pretty good, don't you think?
:-)

I hope our workshops continue the way they are.




Languages, Swedish or English for development?

Wed, 11 May 2005 14:01 +0100

I'm pretty fond of the idea of Ubiquitous Language [Evans DDD]. But customers in Sweden speak about their business in Swedish (usually) and I want to program in English...

Comments?




Follow up on the Soft Center workshop

Wed, 11 May 2005 14:00 +0100

A bit late, but better late than never. Here are a few comments/reflections on the Soft Center workshop mentioned here.

  • First of all I'd like to thank Soft Center for sponsoring us with gourmet sandwiches. And a big thanks to Christer Åkesson for the gift to go in my new office (Jolt cola). Much appreciated!
  • Software Factories came up again and again. Could it be perhaps because Jan Bosch has been a teacher at the local university and his book was written here? Or perhaps that some of the attendees have been working with product lines on real world projects? Or perhaps just because DSL, for example, is very interesting?
  • To my surprise, I got no support at all when it came to skipping a Service Layer [PoEAA] in cases where there is no network involved. Sure there are situations for Service Layers anyway, but I failed to argue for there being situations where it's better to skip it.
    :-)

Seeing how there was so much interest, and that everyone agreed that they enjoyed the workshop, we will do it again, probably this autumn. There may also be a cooperative design-session, or we may have that separately, we'll see.




What to write by hand

Wed, 27 Apr 2005 11:37 +0100

It's time to kick in some more open doors.
:-)

I have recently found myself saying/writing a mantra over and over again. Something like: "Declare or map the simple, hand-write the complex".

What I mean it that it's great to get tool support for the easy, boring stuff so that it's dealt with automatically instead of having to code it by hand. Writing it by hand just doesn't add any value, it is just risky and boring. On the other hand, it's worth spending time on the complex, interesting stuff, developing it by hand! That's what we want to think about and work hard on!

Creating some tool support for the complex parts is often too difficult and too case specific to be worth it. Sure, what is complex today will probably be simple and boring tomorrow so the line is moved all the time.

I guess another way to see it is that you might need tooling support in order to deal with the complex parts at all. That mindset might say: "Tools take away the work for the simple parts and make the complex parts possible." I'm afraid that I'm just not there yet.
:-)




Expo-C in Karlskrona

Tor, 07 Apr 2005 23:02 +0100

At last there's going to be a REALLY good event in Karlskrona (which is 20 minutes by car from where I live in south of Sweden).

At the end of May there will be a software architecture conference called Expo-C, with speakers such as Claes Wohlin, Rod Johnson, Rickard Öberg, Kim Harding Christensen, Daniel Häggander, Johan Larsson and yours truly. This will be SO MUCH FUN!!!
:-)




I'm in shock

Mon, 04 Apr 2005 22:02 +0100

Just like Scott, I'm also in shock! In a good way though!
:-)

And I'm not in shock because the MSDN article refers to some old articles of mine (which I wrote a few years ago). No, it's because Microsoft discuss OR Mapping in kind of a positive way, and not in the context of ObjectSpaces.
;-)

Who knows, perhaps this will be proved wrong in the future.

Talking about this, you've got to read this blogpost by Andrew Conrad. He's giving a balanced view which I like a lot!
:-)




How to become a better programmer

Mon, 04 Apr 2005 22:01 +0100

I know, I'm a bit slow, but with every passing day I become more and more convinced that the single most important technique in becoming a better programmer is learning to use TDD.

Hey, I've been using this stuff for a couple of years and I wrote something TDD-ish in my last book [NED] in early 2001 so I'm not all *that* slow. The thing is, I'm still getting even more fond of the technique...

The obvious question then is, why isn't this taught on the beginner programming courses in universities? Or is it? I don't think it is, but I'd love to be proved wrong.
:-)




Signs of spring

Mon, 04 Apr 2005 22:00 +0100

Ah-ha, I got you there, didn't I? You thought I was going to talk about the Spring framework, right? Sorry, no, this will be about the ordinary spring, the one that is coming (or has come) to Sweden right now.

I guess we Swedes are the most weather fixated lot around so trying to detect signs of spring is a big thing for us. I have found a couple myself:

  • I have washed the cars, which doesn't happen all that often. A sure sign that spring is on its way.
  • We have taken the trampoline out into the garden for the kids.
  • I have used the barbeque three times over the last two weekends.
  • I have put the skis and sleds away in the attic.
It's got to be spring, right?
:-)




Follow up on separate development teams by layer

Fri, 25 Mar 2005 15:51 +0100

As some people will have noticed, I don't have comments enabled at my blog. However, I do receive some comments every now and then by email via this page. For instance I have received some comments to this blog post and since they are too good to be kept from the public, here they are. :-) Philip Nelson wrote: "At PAi, I have finally been able to assemble a team that was built with the idea of not specializing. As a consultant, you would not be given the chance I suppose. It always remains true that the every person has strengths, weaknesses, skills and interests that make us unique, but as far as responsibilities, we try to be very very broad. For example, there are only two real job titles here, developer and it guy (held by one person). Everything from build issues, debugging, designing, sql writing, deployment and even help desk is shared by everybody. In the case of help desk, it's a rotating spot each week. We've taken this now to extend to the whole company. Where as we used to have a Payroll department, a Year End Compliance department, Distributions and Legal Compliance departments, we have now cross trained our entire service organization. The primary motivation was to extend our vision of making a retirment plan "simple" for our users. What we can now offer is that when you call our toll free number, you will always be 2 tones from a real human, and with few exceptions, that person will be able to handle any question. In the past this meant getting transferred from department to department. Now your phone call is quicker, the answer more consistent, our our job scheduling efforts are much simpler. This approach has been in place since last august and our customer feedback has been phenominal." Martin Rosén-Lidholm wrote that the most important thing to consider is to be pragmatic about the resources that are in the team. Ingo Lundberg said more or less the same. Martin Fowler wrote: "I don't know what was in other people's heads. This was what was in mine. My objection is not about people specializing in certain layers, but organizing your team that way. The scenario that I object to is [...]



NorDev, Mats and Patrik

Fri, 25 Mar 2005 15:50 +0100

As you know, I'm very happy to be speaking at NorDev this May. I have already mentioned that my friends Rickard Öberg and Erik Doernenburg will also be there, as will two other friends, Mats Helander and Patrik Löwendahl.

Mats has promised that we can throw gadgets at him if he codes badly on stage. It probably won't happen, but I'm not going to miss out on the chance.
;-)

Patrik and I will be giving a workshop on day 3 about how DDD could be implemented. How's that for fun! It's a dirty job, but someone's gotta do it.
:-)




JAOO 2005

Wed, 23 Mar 2005 21:10 +0100

I saw on the main page here that I am already on the list of speakers for JAOO 2005. That's very good news for me! I also saw that Ivar Jacobsen, Uncle Bob, Steve Vinoski and Ted Neward (and a couple more) will also be there.

Folks, don't miss JAOO 2005. JAOO was such a great event last year, and I think it will be even better this year!
:-)

Don Box, for example, won't be making the same mistake this year, according to this blog post.
:-)




Separate development teams by layer

Fri, 11 Mar 2005 07:52 +0100

The other day my friend Ingo Lundberg pointed out to me that I had made a point in some text that I thought it was a good thing to provide a simple model to the UI-programmers so that they can focus on what's important in the UI, while at the same time saying lots of good things about XP-principles. This effort of separation between UI part and the rest might not be 100% in line with XP, or? That reminded me of a discussion we had in Lillehammer in January. Martin Fowler talks about it here. One of the points on the list was "Separate development teams by layer" where "no" got 22 votes, and "yes" got 1. I was puzzled to see such a joint understanding of something I wasn't sure about, so you can probably guess who voted "yes". Not that I necessarily think it's always a good idea to separate by the developer teams' technical specialties, but that it might be a good idea. And I couldn't stand it seeing a 0, nothing is as black or white. :-) A couple of years ago I had a vision that it would be nice if developers had the chance to see the whole picture by developing everything to do with a use case, from UI to DB and everything in between. Unfortunately I used that principle in a project, with a less than optimal result. One of the developers was pretty new to most of the used technologies except UI stuff. So on top of the user requirements, he also had to learn loads of new technologies, which just wasn't possible with the schedule. In that particular case we changed principles and went for technical skill focus instead, and it turned out to be MUCH better. Since then I have used that principle lots of times and I still think it might be a good idea. For example right now, I'm working on a large system with a colleague. He is focusing on the UI, I'm focusing on the model. He is really happy because it frees up time for him to do wonderful things in the UI, I'm really happy because I just can't do anything as wonderful things in the UI... :-) So, my current conclusion is that depending upon the team, to some extent it might be a g[...]



Refactoring on steroids...!

Fri, 11 Mar 2005 07:51 +0100

I'm as fond of refactoring and its tools' support as the rest of you.

However, when chatting with Mats Helander the other day, he helped me understand another kind of tool which is great for refactoring in some situations.

Imagine taking your model written in code, visualizing it without losing or adding anything, then imagine making structural changes in the diagram mode. Again, imagine that the visualization is just the code, but shown another way. What a great refactoring tool that would be for some situations...!

Sorry for kicking in open doors.
:-)




Private interface-implementations or not?

Fri, 11 Mar 2005 07:50 +0100

I had a great discussion with Ingo Lundberg the other day about dealing with interface implementations. Call me old-fashioned, but I still have the tendency to make methods that implement interfaces private. Ingo, on the other hand, thinks that if the class implements the interface, then the interface and the methods belong to the class and that shouldn't be hidden.

Of course I had to try to come up with something in defense. Here's a lame attempt:

  • Sometimes you don't have a choice because the class might already have a property get/set with a certain name and the interface you want the class to implement will use the same name, but only a get.
  • Ingo gave me one argument. The class might implement an internal interface, so then it's not so nice to use public methods.
  • If you use private interface-implementations, it's easier to detect old code that should be cleaned up if you decide that the class shouldn't implement the interface any longer.
  • When you look at the method that is privately implementing an interface, then it's obvious why the method is there. I mean, it's a little bit intention revealing.

I know - I said it was a lame argument. Can you help me out? Or should I just change default style?
;-)




NorDev with Erik Doernenburg

Thu, 10 Mar 2005 22:49 +0100

My friend Erik Doernenburg just told me that he can and will co-host my TDD-presentation at NorDev in May. That's going to be s-o-o-o much fun!

Erik works at ThoughtWorks in England and he is probably best-known for having built Neo.

Even before this, I'd heard from a lot of people that NorDev would seem to be the event of the year in Sweden and is something that's not to be missed.
:-)




Evening workshop about design

Thu, 10 Mar 2005 22:48 +0100

To celebrate the fact that spring will probably be starting around then, I'm setting up a small, informal, free workshop about software architecture and design the 7th of April between 17:00 and 21:00 at Soft Center in Ronneby (in the south-east of Sweden).

Depending on numbers, we will sit around a table discussing prioritized design problems, or use the "open spaces" method and vote with our feet.

I bet some of you are wondering what some typical and discussable design problems are, right? Let's see... Off the top of my head, one idea is that I'd like to discuss some approaches for cooperation between Repositories, Factories, Services and Aggregates [Evans DDD]. Another is to discuss versioning of SOA-ish services. Think about problems you have in your daily work or have thought about or have read about or... Please note though that I don't decide what topics to discuss, we vote and prioritize together after having heard everybody's proposals (or use "open spaces" as I said).

We will use English if there are international guests in our group, otherwise Swedish. If you talk Java or C# or some other programming language, that's *not* important.
:-)

If you're in the neighborhood that day and are interested in software architecture and design, I promise that you don't want to miss this! If you want to come, let me know by sending me an email no later than the 29th of March, but the earlier the better. The early bird...
:-)




Time for RSS any year now?

Thu, 10 Mar 2005 22:47 +0100

OK, I'm definitely not a marketing guy, but I have tried (just out of kindness, really!) hinting to some 'local' organizations that 2005 could well be a good year to have an RSS feed or two. At least if you want to give your message more exposure and draw in the world around you a little closer. Of course I fail every time.
:-)

And NO, I haven't discussed the techie stuff, just the concept and purpose.
:-)

So I just thought I should link to Scoble's good blog post instead:
"No RSS? No downloads? No interaction? Fake content? You're fired!"

Robert, I feel your pain!
:-)




What can I say? Mark...

Thu, 10 Mar 2005 22:46 +0100

Do you know Mark Miller? If not, this blog post of his pretty much gives you a feeling of who he is! And if you know him, read the post anyway!

LOL!




New office

Mon, 07 Mar 2005 22:00 +0100

It's time to get back to my roots. I started with software development at Soft Center in Ronneby 1987, first studying at the university, then working at a company there, followed by teaching at the university. Now, after almost twenty years after I started there, and six years after I left, I have rented an office there again. Here's a picture of the outside of the premises I'm renting an office in (Soft Center house 4).
(image)

It's a small office and the person who will be there most of the time is my colleague Per-Ola Olsson (Per-Ola has been working for me since last autumn. He works with system development, currently pretty much with ASP.NET, WinForms, NHibernate, etc.).

I'm sure this could lead to some interesting contacts and future projects with the other companies located there and with the university as well.

One important reason for the choice of the office's location was that 10 Mb internet is included in the rent. Nirvana, eh?
:-)

Here are two more pictures of some of the other buildings (6-8 to the left, and 2-3 to the right):
(image)   (image)




You can teach an old dog new tricks!

Fri, 25 Feb 2005 07:45 +0100

A few years ago a carpenter friend of mine helped out a lot in the building of my new garage. I bet now you want to hear about how little I actually did, even though I did my best, or about how sore my muscles were, but I'm not going to talk about that...
:-)

At that time, I had been drinking my coffee black for twenty years or so. But on every coffee break, I would just be sitting down to drink my coffee when my friend would just have finished his and he would say, "OK, back to work". He took milk in his coffee, which made it drinkable instantly. Mine was too hot to touch (since we make VERY hot coffee). Of course I had to start taking milk in my coffee as well, and ever since that day I can't be without it, not because of the heat regulating feature, but because of the improved taste.

So, the moral of this story is that all it takes to teach an old dog new tricks is a good enough reason. Everything is doable, but it's absolutely not enough to say "Do it because I say so!".
:-)




NorDev

Wed, 23 Feb 2005 08:10 +0100

A brand new Nordic software development conference called NorDev is seeing the light of day. You'll find more information here (in Swedish). I will be speaking there along with Rickard Öberg and several others.




VSLive! - Follow up

Wed, 16 Feb 2005 23:05 +0100

A bit late, but here are a few words about VSLive last week. I thought it went really well, and it was a very busy week. First of all, here's a picture of me giving my DDD talk. Judging by my body language, I have no idea what I was talking about at that particular moment. :-) After my DDD talk I got lots of requests for book tips which I was really happy about! As well as the referenced books in the presentation ([Evans DDD] and [Fowler PoEAA]), I'd also like to recommend the following, some of which are based on trusted friends' recommendations: Nicola, Mayfield, Abney: Streamlined Object Modeling Coad, Lefebvre, De Luca: Java Modeling In Color With UML Wirfs-Brock, McKean: Object Design Bauer, King: Hibernate in Action I had a long discussion with Steve Swartz from the Indigo group at Microsoft and we have decided to set up a mini project. You'll hopefully see the first results of that within a few weeks, at my and Steve's blogs. It's always great to meet Mark Miller, and his upcoming tool, "Refactor!", simply rocks! If I had to pick one thing, the most interesting thing about last week was meeting Aleks Seovic who is working with the port of Spring to Spring.NET. Among other things we had a lo-o-o-ng discussion about the AOP support in Spring.NET, and I'm eager to try out using AOP Introductions (mixins) as a way of taking composition to a new dimension. It's possible even today, but Aleks is rewriting the AOP support a little bit so I might wait a few more weeks. Finally...! :-) I met lots and lots of other interesting folks as well, of course, but this is enough name-dropping for now. :-) [...]



VSLive! - The Heat is On

Wed, 02 Feb 2005 08:45 +0100

VSLive! 2005 in San Francisco is less than a week away now, and if you want to find out a bit more about what's going on there is some information to help.

For example, the Indigo Day will probably be a big thing. Clemens and Richard tell us that there will be interesting secret announcements here and here.

BTW, I had an introduction to DDD published here prior to my DDD talk.

I hope to see you next week!




Sooner or later

Tue, 25 Jan 2005 22:18 +0100

I used to teach database design at the university in the early nineties. I still remember how I said time and time again that the ordering of the result from a SELECT-statement in SQL was undefined and the decision was up to the SQL engine, unless there was an ORDER BY-clause in the SELECT-statement. Today I think I saw a bug because of that for the first time. I know what you're thinking, but I wasn't the one responsible for creating the sproc with the bug!
:-)

A sproc had been used for almost three years, but all of a sudden it had started misbehaving. (There was actually another bug as well, but it had been hidden due to the default ordering.) Today the default ordering has become different and... CRASH!

Sooner or later, "all" dormant bugs come back and bite us!




Lightweight reflection

Tue, 25 Jan 2005 22:17 +0100

MS talked about lightweight reflection in the context of ObjectSpaces as a new feature for .NET 2.0. Does anyone know what happened?




NWorkspace, are runtime-defined loadgraphs essential?

Tue, 25 Jan 2005 22:16 +0100

I'm thinking about whether I need to add parameters to GetById() and GetByQuery() in order to control at runtime what will be eager loaded. Right now I don't have that functionality in NWorkspace. I'm personally trying to use Aggregates [Evans DDD] as the mechanism for dealing with this. Am I reading too much into the Aggregate concept?

And if you really do need lazy, you *can* do that with static meta data in the OR Mapper of your choice (if you can live with the possible read inconsistencies)...

And if this is just a problem in a tiny proportion of situations (which - as I hinted - I currently think it is for a well-designed system), you can always skip the NWorkspace and go directly to your infrastructure in those rare occasions.

Am I trying to simplify this too much?




NWorkspace, progress report

Tue, 25 Jan 2005 22:15 +0100

I thought a quick progress report on NWorkspace would be in keeping here. Apart from what I have discussed so far in this blog, I have also added the following:

  • Support for validation so that PersistAll() will throw an exception if it finds broken rules in any of the instances that will be persisted. There is a default implementation to use in your entities, but it's totally customizable so I don't care at all how an entity signals a broken rule. That goes for the adapter implementations that are around also. You just have to create an implementation of IValidator if you have your own validation schema in the entities.


  • More querying capabilities, such as getting the result as fields and not only as types from the Domain Model. I have also added some support for the most common aggregate queries.
Please note that NWorkspace is very much in pre-alpha mode, currently only with adapters for a fake persistence solution and for NHibernate. That said, I'm thinking about freezing the feature set now and showing what I have got pretty soon. What I'm thinking about for the moment is whether I need support for runtime-defined loadgraphs as well in the extremely basic feature set.




A bit quiet on the blog front

Sun, 16 Jan 2005 22:32 +0100

OK, mine isn't the most regular blog around, but I have tried to post something about once a week for almost two years. However, for the next few months blog posts will appear less frequently, because I need to free as much work time as possible in order to finish a big writing project, on top of all the ordinary projects. And that goes for my forum postings etc as well.

See you on the other side of the deadline.
:-)




Swedish article

Sun, 16 Jan 2005 22:31 +0100

Here's the link to a Swedish article I've written about Patterns or Refactoring.




Black box always better?

Sun, 16 Jan 2005 22:30 +0100

Is black box design always better than white box design? The clue here is the word "always".
:-)

Of course it's not, but there was a point in time when I tried really hard to always get as much black box-ish design as possible for my applications. I have already told you here that testing is one reason for moving slightly to a more white box style.

Another eye-opener was a story several years ago when I overheard a discussion between an anthropologist and someone else. The anthropologist said that the black box design used for the door openers on a new train here in my neck of the woods was bad. (This has nothing to do with software...) The "problem" was that the toilet doors were locked by pressing a button and the door was unlocked when opened in the normal way from the inside. There was no way for the nervous toilet visitor to check if the door was locked or not, which is normal behavior for most people.
:-)




Solutions Architect MVP

Mon, 10 Jan 2005 08:02 +0100

Last week MS awarded me the MVP title of "Visual Developer - Solutions Architect". I know the word "Visual" will make a couple of my friends laugh. Let's just say that the visual stuff isn't exactly my thing.
:-)

I have to admit I wasn't expecting this, especially not after all the grief I give MS about the "single message". So, thanks, I'm honoured!
:-)