Monday, June 10, 2013

Do your aggregates touch each others' private parts?

Most of current programming languages support access modifiers. I cannot imagine any contemporary language, which would not allow the developer to protect access to classes, methods, fields, or functions. Without them, we would not be able to maintain abstractions and encapsulation.

In Java, there are four modifiers: public, protected, default, and private, in C# there is additonal concept of internal, which reffers to assembly, and in Scala, there are possibilities to fine-tune the scope with scoped private and scoped protected modifiers. Other languages, like C++, or F# for instance, also give us some possibility to modify access. They may vary from language to language, but the idea is the same - to protect parts of the code.
(Actually, in C++ there is also a concept of friend, so that other class can get some private access to another class - hence the comment, that in C++ friends can touch each others' private parts... ;)  )



Looking from the time perspective, I can observe certain regularity. The default modifier (usualy without any keywords) tends to be more public for younger languages. By this I mean, that default access in older languages (like C++) was ment to be private. In Java, which is a little more modern language, when You use no access modifying keyword, You will be able to access that code from the package. And finally, in very young languages like Scala (and in F#, I believe), no access modifying keyword means, that the code is public. Why is that? I do not know. I can only guess, but I personally like the Scala way.

OK, let's go back to Domain-Driven Design...

Tuesday, April 23, 2013

Domain-Driven Design in Kraków

The beautiful thing in IT world is, that people are willing to share their knowledge. That's why we write blogs, speak at conferences and form local communities.

There are already couple of such communities in Kraków. Sometimes I think, that this city is really the Sillicon Valley of Poland (and maybe even of this part of Europe). There is SCKRK (Software Craftsmanship in Kraków) for software craftsmen, there are many PJUG (Polish Java User Group) meetings for Java people, KGD.NET (Kraków's Group for Developers .NET) for .NET people, Lambda Lounge for functional languages enthusiasts, Bright talks, Kraków Scala User Group, DataKRK, Hacker Space, JAR Camps and many others.

If you are in Kraków, you can always check what is going on today and come to learn and share some knowledge.

On the other hand, there are communities around the world, which are about Domain-Driven Design in particular. The other day I thought, that maybe we can do something similar in Kraków... My current company really liked the idea and decided to become a sponsor - so here we are:

DDD-KRK - meetup for Domain-Driven Designers in Kraków.



We are going to meet once a month - the plan is to make it always the first Tuesday, but the very first meeting was another day and the second will also be on different day. :) I received many wishes and congratulations from other communities in other cities. Thanks for that!

For the first meeting I prepared a presentation about introduction to DDD, and then we started a discussion about business value of it. I hope people enjoyed it. There are some photos on the event page.

The second meeting is going to be really great. At May 6th-9th there will be Implementing Domain-Driven Design workshops with Vaughn Vernon in Kraków. After the last day (Thu) we will have DDD-KRK meeting and Vaughn with Alberto Brandolini decided to give some talks to the fresh formed community. Again, thanks for that!

So... If you are reading this and you know something more about DDD, and you are willing to share your thoughts, and... you know you will be in Kraków someday, do not hesitate to contact me, and we will figure out how to find you some audience. ;)

If you are not that familiar with DDD yet, but you are willing to dig into the topic, join our community - become a Domain-Driven Designer and participate in our meetings.

Friday, March 22, 2013

My 3 cents on 33rd Degree 2013 Conference

Last week I attended, for the third time, the 33rd Degree Conference. This time I had an opportunity to give a talk by myself, so I was able to take another look at the event. I met some old friends and some new people too. I listened to inspiring talks and to couple of boring too. We also had some great talk till the late night at the first day. This was a good event. I only lack some party, like the one, that for example, usually during Java Developers Day takes place.


As the year ago, I decided to give some subjective marks for each presentation. And by subjective I mean, that notes were taken only be me, according to my perception, my knowledge and my sense only. There was nothing personal in them, so please treat them appropriately. :)

Tuesday, February 5, 2013

Axon 2.0 released

In the CQRS world people don't like frameworks. People like to concentrate on the domain and on customer's problems. This is really great, but in the end you have to write some code to handle command, load aggregate, or save and dispatch events. Long story short, you need an infrastructure.

Although it is not that hard, to write this code, it is still the code that has to be written, tested, and maintained. There can also be some tricky places - especially if you have to distribute the system, or implement sagas. So, why bother with that, if we can take someting of the shelf, and just use it in our system? If the framework does his job, is flexible and does not deny things that we need, I would recommend to use it. It allows us to concentrate on the business problem. Of course, if you use the right tool for the job.

I mention that, because there was a major release of Axon Framework 2.0 couple of days ago. This is a Java open-source framework for CQRS and/or Event Sourcing based applications, but not only.


What we can find in Axon 2.0?

I have been using Axon 1.3 with success, and it really helped me with the infrastructure. In the 2.0 version, there are some improvements, which can make this framework even more usable. The new version has added easier API, performance improvements, out of the box scalability support, and MongoDB-based event store implementation.

Let's take a closer look at the framework capabilities.