Friday was the last day of the training course and today we went over a couple of patterns and had a discussion on Domain Driven Design. After the discussion, we were released to continue working on our end to end solution. The team I was on (Go Conquistadors!) got all the way down to the database second out of four teams. We were first to have all parts vertical though. Then we started to refine our design even more. And that is where we left the solution on Friday night.
People Bowing Out
As the day progressed, I started noticing people leaving to get back home. It could be due to the holidays that they were not able to stay until the close of training on Friday night. I think most everyone was mentally tired and some of us were physically tired as well by this time. We lost the most people by 10PM.
The training lasted from 9AM to 3:30AM tonight. I was pretty much done by about 1:30AM, but I hung out until we were done with the training. I did notice that the focus and intensity seemed to lighten up today. It could be that much of what we were learning was finally taking hold for most people. Or it could be that I was really tired. :D
So I mentioned that we finished a vertical solution from the UI down to the database. That felt pretty good to get there with the fluent interfaces. Of course, now that we had it one way, we could refine it or find another way to implement the same thing. You may have noticed that I posted last about some of the directions we were going with our solution. I worked on the repository and mapper's fluent interfaces. I wasn't quite happy with the solution for the repository that I had come up with because it required the client of this interface to have knowledge of the parameters real names and it only did ANDing (this AND this).
So Friday evening, I put in some work to get it closer to this:
Repository.get().a_list(Where<Product>.has_a(x => x.department_id).equal_to(department_id)).and_a().or_a()
It is not complete yet, but I imagine in some of my free time at home I will continue to develop the solution. Now the client caller only has to have knowledge of domain object properties, which it already does have the need to know. It gives you an elegant solution that looks like this:
I could show something like this to my wife and she would be able to read it. For each product in the repository list where product has a department id equal to the department browser dto's department id, return a map from product to a product browser dto.
The End of the Night
The night wrapped up with a picture of everyone in the boot camp survival T-Shirts and watching a video on Randy Pausch's Last Lecture named "Really Achieving your Childhood Dreams".
Randy Pausch was an inspiration to millions. He was diagnosed with terminal cancer at some point before this presentation. He will make you smile, laugh and possibly cry. I would suggest to watch it with those you care about as it will warm your heart.