Ok, notícia velha, me critiquem por ser lerdo, mas não posso deixar de comentar esta excelente entrevista do Eric Evans no infoQ.
The long-term trend is toward applying software to more and more complex problems deeper and deeper into the heart of these businesses. It seems to me this trend was interrupted for a few years, as the web burst upon us. Attention was diverted away from rich logic and deep solutions, because there was so much value in just getting data onto the web, along with very simple behavior. There was a lot of that to do, and just doing simple things on the web was difficult for a while, so that absorbed all the development effort.
But now that basic level of web usage has largely been assimilated, and projects are starting to get more ambitious again about business logic.
|
|
Com outro trecho mais adiante…
Combine that with the imperative to produce Web UIs mediated by http and html (which were not designed for that purpose) using quite primitive, first-generation tools. During that period, creating and maintaining a decent UI became so difficult that little attention was left for design of complex internal functionality. Ironically, at the very moment that object technology took over, sophisticated modeling and design took a heavy hit.
Sintetizam as desculpas (esfarrapadas) para se produzir aplicações baseadas em objetos burros nos últimos anos.
For example, SOA, when it is used well, provides us a very useful way of isolating the domain.
Este é outro ponto interessante. Muitas vezes vemos SOA sendo utilizado como desculpa para modelos de objetos burros e fracos, ou até mesmo para uma volta ao Dicionário de Dados. Serviços não trocam, ainda, objetos inteligentes e sim estruturas de dados mas dentro do serviço nós temos um sistema OO e, como tal, deve ser construído utilizando objetos!
E lembrem-se: objetos são dados e comportamento num mesmo conceito.
But back when the J2EE frameworks first came out, it utterly buried that basic expressiveness under mountains of framework code. Following the early conventions (such as EJB home, get/set prefixed accessors for all variables, etc.) produced terrible objects.
Isso eu comentei bastante no artigo sobre VO/BO.
Rails has generated a lot of excitement because it finally seems to make creation of Web UIs as easy as UIs were back in the early 1990s, before the Web. Right now, this capability has mostly been applied to building some of the vast number of Web applications which don’t have much domain richness behind them, since even these have been painfully difficult in the past. But my hope is that, as the UI implementation part of the problem is reduced, that people will see this as an opportunity to focus more of their attention on the domain. If Ruby usage ever starts going in that direction, I think it could provide an excellent platform for DDD. (A few infrastructure pieces would probably have to be filled in.)
Este trecho toca na minha crítica #1 com Rails: domínios fracos baseados em Bancos de Dados. A linguagem Ruby é tão cheia de vantagens que a limitação imposta pelo modelo CRUD do Rails me irrita profundamente. Ok, você não precisa ter um modelo fraco em Rails, mas você também não precisa ter um modelo fraco ao usar EJB 2.1, VB 6 ou Delphi e isso nunca evitou este problema.
More out on the cutting-edge are the efforts in the area of domain-specific languages (DSLs), which I have long believed could be the next big step for DDD. To date, we still don’t have a tool that really gives us what we need. But people are experimenting more than ever in this area, and that makes me hopeful.
Outro ponto muito bom. DSLs são iminentes mas as ferramentas simplesmente ainda não chegaram lá. O grande perigo é que o conceito está se tornando popular mas não existem ferramentas. Algo semelhante aconteceu com OOP, as linguagens eram procedurais mas todo mundo falava em OO, gerando a célebre consideração sobre C++ que eu traduzo mal e porcamente abaixo:
C++ é como sexo para adolescentes
- Está na sua cabeça o tempo todo.
- Todo mundo fala disso o tempo todo.
- Todo mundo acha que todo mundo está fazendo o tempo todo.
- Quase ninguém está fazendo de fato.
- Os poucos que fazem:
- estão fazendo mal e porcamente.
- têm certeza que da próxima farão melhor.
- não fazem com segurança.
- Ainda assim todo mundo fala sobre como estão tendo sucesso com isso, ainda que uns poucos tiveram qualquer nível de sucesso
Bom, não percam!