When it comes to automating database migrations then there seem to be two main approaches. First, doing it outside of application by adding database migration into deployment script. Second, is making database upgrade part of application startup logic. Continue reading
Category Archives: General Development
Set up test state using API when running tests via UI
When writing tests via UI it usually makes sense not to use UI for setting up application state. First, using UI for setup makes your UI tests even slower. Second, you may need to write some additional UI automation code simply for setup.
Continue reading
Validation beyond single Entity with DDD
Validation of business rules has been one topic that I have thought of again and again. More specifically how to implement validation using Domain Driven Design.
Continue reading
User experience and aesthetics
I believe that usability is critical trait of any software system. In fact so much so that I don’t think one could effectively separate usability design from general application design.
Continue reading
New classes for improved readability
In general design decisions are driven by either implementation problems or desire to improve readability. Interestingly I have found that for me the latter often drives refactorings inside existing classes but rarely creation of new classes. However creating new class to make important domain constraints or business rules explicit can be much more expressive than just introducing some new local variable or method.
Implementing validation using validity scopes
In a typical business web applications there are following common options for validating business rules:
– Validator, usually in presentation layer which checks rules related to single UI form or Presentation Model object
– Service in domain layer which validates input parameters of its business methods
– Entity or Value Object in domain layer which validates changes made to its state
All of these have their benefits and tradeoffs hence it usually doesn’t make sense to apply only one strategy for all types of rules. One possibility for establishing common validation guidelines for the application is to use the concept of validity scope.
Continue reading
Domain model implementation consideration – dealing with presentation-domain model mismatch using rich domain model
Sorry about the title 🙂
In a typical data management system significant amount of effort is spent on implementing mappings between three different models – presentation, domain and persistence model. In this article I will describe one approach to dealing with these transformations in case special ORM tool cannot be used.
Continue reading
Case study of implementing DDD
Following is a brief description of the lessons learned when rewriting one single player online game using DDD. Team who did this work was: Kirill, Jaanus, Erik and I. I think that this is the first implementation of Domain Model or DDD in Aqris.
Continue reading
Do the simplest thing that works cause you ain’t gonna need it anyway
One widely known agile principle is Do the Simplest Thing That Works. Often this guideline transforms into “Do the Fastest Things that Works”. I suppose that the logic behind this is that if something can be done fast then it must be simple, right? Problem is that given principle is as much about simplicity of reading the code than it is about writing it.
Continue reading
About complexity
It seems to me that the complexity of any system (solution) that doesn’t contain unnecessary redundancy is constant given the set of requirements is has to fulfill. It is only possible to redefine that complexity – to move it from one level to other but one cannot reduce it. So what are the possibilities to tackle with complexity? Basically we can either abstract or partition.
Continue reading