Ubiquitous Language
Já faz algum tempo que alguns alunos me perguntaram o que era Ubiquitous Language, com isso me motivou a fazer este post. Espero realmente que seja útil.
Ubiquitous Language é um conceito muito comum em DDD(Domain-driven Design).
Basicamente é um dos conceitos que o DDD utiliza, que tem como finalidade: “falar” a língua do usuário/cliente . Manter uma única linguagem de domínio que seja entendível tanto para os desenvolvedores quanto para o cliente.
Vamos falar de outra forma.
No DDD você tem o Domain/Domínio que é o primeiro D, que é a parte mais “importante” desta abordagem. Pois esse domínio é exatamente o problema que queremos resolver, o problema do cliente.
Problemas
Normalmente não conhecemos a área do cliente, por isso se faz necessário o entendimento por completo ou parcial do domínio(problema do cliente).
O cliente usando a sua linguagem pede algo que pode ser entendido[isso acontece sempre] de outra forma pelo desenvolvedor ou analista.
Outro problema também seria a falta de cuidado para definição de nomes de classes, métodos, variáveis etc, causando problemas de entendimento na equipe e favorecendo ao aumento na dificuldade de manutenção dessas classes e entendimento no código.
Possível solução
Para esses “problemas” anteriores se os desenvolvedores tivessem o conceito de Ubiquitous Language bem definidos na equipe, esses problemas poderiam ser evitados. Quando se tem por exemplo uma classe chamada StrUtil.java onde muitos de nós adotamos como classes utilitárias[inclusive eu confesso, mas não da forma como passada aqui claro 😉 ] é no mínimo perigoso, pois o nome dessas classes não refletem bem a sua real função.
Mas então você defende: “- Ah mas é uma classe utilitária de strings, onde você pode fazer certas manipulações com Strings”.
Ok ! Mas muitas vezes por não tem um bom senso o desenvolvedor acaba criando uma classe UtilUtil, ou seja, essa sua classe StrUtil não está manipulando somente String ela pode está fazendo determinadas funções que são completamente diferentes, métodos que não tem nada em comum, como manipulação de datas etc, e esse é o problema.
O que o DDD com o Ubiquitous Language fala é bem simples:
Todo comportamento do seu sistema deveria estar implementado em classes cujos nomes devem fazer parte do domínio do problema, do domínio do cliente.
Isso é válido não somente para nomes de classes,mas para métodos, variáveis e tudo dentro do domínio, assim como também para o problema em si.
Esses nomes devem ter o mesmo[se não bem próximo] significado tanto para a equipe quanto para o cliente, facilitando assim a comunicação entre os mesmo, sem falar que irá melhorar muito a manutenção e entendimento do código.
Essa “linguagem” é um meio termo entre a linguagem técnica e a linguagem do cliente. O seu cliente não irá entender seu dialeto técnico e você provavelmente não irá entender[pelo menos no início] a linguagem do cliente. Assim utilizando esse conceito você irá facilitar a comunicação entre todos[desenvolvedores, analistas e cliente].
O cliente[conhecedor do domínio/problema em detalhes] deve conversar com os desenvolvedores[que possuem o conhecimento para a solução] que conhecem a programação em detalhes, para juntos, chegarem a uma língua comum, onde que todos consigam se entender e que será usada não somente nas conversas mas também no desenvolvimento do software.
Com essas conversas constantes e com a utilização desse conceito de linguagem comum, todos juntos chegarão a um consenso sobre o domínio, definindo assim o modelo do domínio[Domain Model].
Domain Model em resumo é a abstração do problema real, criada em parceria com os especialistas no domínio[normalmente o cliente e/ou analista] com os desenvolvedores.
É utilizando esse modelo que os desenvolvedores vão implementar em código[seu código irá refletir a solução para o problema do cliente], exatamente como foi acordado e as chances de cair naquele velho problema de telefone sem fio[cliente diz X, analista entende –X+2, desenvolvedor implementa Y] serão mais escassas.
Conclusão
Podemos observar que o conceito de Ubiquitous Language é bem simples, e parece que não tem muita importância, pois no resumo é apenas a padronização de nomes de métodos, classes etc, claro que tudo dentro do domínio.
Mas vimos também que não é somente isso, a idéia de Ubiquitous Language no DDD é criar um canal de comunicação entre o cliente e a principal peça: o desenvolvedor.
Pois é ele que irá criar o produto que o cliente deseja.
E através da Ubiquitous Language podemos juntamente com o cliente definir um modelo para o sistema, fazendo com o que as chances de problemas de má interpretação sejam anuladas[ou parcialmente anuladas], assim deixando o sistema mais limpo, fácil manutenção, simples alteração e de quebra, sendo entregue no prazo.
Bem espero ter conseguido explicar um pouco sobre Ubiquitous Language.
Abraços
You can contact Client Assistance by means of phone, Livve Chat, email.
Also visit my homepage … check here
NBA, MLB,
My website: get more info
They also have the selection oof mailing their ticket into a
state lottery office.
My webpage: 파워볼사이트
Thhe job is exchanged for money and there are no otherr added benefits,
such as overall health insurance coverage.
My blog post :: 요정 알바
If youu win the jackpot, yyou will obtain a telephone get in touch with from
an agent of Lotto India shortly immediately after the winning
draw.
Alsoo visit my webpage … 스피드키노
Particularly when they face sexist conduct or garner attention for items like their appearance.
My website; 마사지 알바
She at some point sedured a complete-time common position at a video production enterprise.
Look at my web blog … 바 알바
dark web search engines darknet websites
Winning numbers will be posted beneath following the close of each andd every draw.
My webpage: 파워볼게임
The Living Wage Calculator sets a baseline, but it does nnot cover every thing.
Feel free to visit my page … 유흥알바
The sum of the interest price and all fees is identified as thee annual percentage
price, and the APR you obtain lazrgely depends on your credit.
my blog; 무직자대출
NordVPN is supplying a fully-featured threat-free
30-day trial if you sign up at this web page.
my web-site: 토토사이트
Sadly, Indian judiciary does not have the role of a paralegal, per se.
my website website
Scholars are studying how it impacts students, teachers and college
district budgets.
Also visit my blog – 요정 알바
If you have no credit history, you maay well be capable to receive
a loan with no credit verify, but here are some restrictions.
Also visit my web page … 정부지원대출
In March 2006 they walked off tthe job, demanding full-time status at KORAIL.
my wweb site – 유흥알바
They give a lot of bouses and special deals ffor nnew andd old players.
Here is my blog … homepage
This licencce is strictly supervised and is monitored just about very
3 years, getting to meet a wjde range of needs.
my homepage: FELX비트볼
“Every jobb addwd indicates a different Albertan is getting a typical paycheque.
Have a look at my homepage – 여성알바
Your completed filled loaqns for undesiirable credit on-line
application wioll be forwarded to the lenders.
Stopp by my web-site … 소액대출
In the case of Bitcoin lotteries, Provably Fair is absolutely excellent.
Alsso visit my web blog 엔트리파워볼
Also the app is geofenced out of any federal properties, a biig difficulty inn the nation’s capital.
Also visit my webpage … here
blackweb tor market url
You full and submit the form for a payday loan with CashinaMoment online in juswt minutes.
Feel free to vieit my blog; 모바일 대출
She iis at the moment a geaduate student aat Hitotsubashi University researching labor concerns.
Also visit my web-site 여성밤알바
A jackpot or annuity prize must be claimed in person at
Lotttery headquarters in Middletown.
Also visit my web-site :: 리플파워볼
For instance, we caan ooffer loan in Texas, California,
Alabama and Florida.
Feeel free to surf to my web-site 소액대출
Joiining the military is mandatory foor boys upon graduation, and
some girls are also obliged to join.
Feel free too surf to my webpage; 노래방알바
Major international tournamernts are also covered, including the European Championships.
my homepage; get more info
For borrowers, it really is like the most comfy economic cushion.
My webpage :: 정부지원대출
Wagering requirements arre at 45x for thhe crypto provides,
slightly greater than we’d like tto see.
my website :: web page
Your numbers came uup in the Powerball draww and you just
won the lottery!
Look into my homepage – 파워볼게임
dark market 2023 black internet
This will be extra competitive thazn getting an English teaching
position, but not not possible.
My web site … webpage
The debt-to-earnings ratio (DTI) indicawtes how considerably of your revenue you devote on debt.
Heree is my web-site … 정부지원대출
This will happen unless you claim bonuses that are verified
too be fair and withdrawals.
Also visit my blog post … minjw.rimmablog.com
black internet dark market onion
Thhe NCAA willl make use of digital ticket delivery foor the 2022 Division I Women’s Volleyball Championship.
My page; 유로밀리언
To prevent paying interest, you can apply for a % intro
APR credit card.
Also visit my blog powt :: 정부지원대출
But some women have been so worn down by the competing stressors of tthe pandemic that they welcome thhe
shift to fewer paid operasting hours.
Feel freee to surf to myy page … 밤일알바
The complete-time employment price (FTER) is the % of people employed FT amongst the total population.
My web blog – 유흥알바
The most ffective offshore sportsbooks take live bets on games while they are
unfolding.
Also visit my web-site: 안전토토사이트
It offers a danger-free of charge bet off up to $500 and a $1,
000 match deposit for a new wagerer.
Feel free too viit my web-site – 토토사이트추천
“They have consented to boost the nmber to 110,
000 in the next one year,” said Ghimire.
Here is my web site :: web page
According to the Pew Research Center, 16% of Americans have earnerd earnings froim aan on the internet gig platform, at some poimt in time.
Feel free to surf to my website – 이지알바
Applying for the loan only takoes about ten minutes, and you can get approved in no time.
Look into my weeb blog … 대환대출
This loan-finder is focused on speedy loan processing
and making certain that borrpwers have access to versatile lolan options.
Feeel free to surf to mmy web-site – 신용대출
In the healthcare sector especially, 94 percent of paid healthgcare workers
are females, as are 96.1 % of assistant nuurses annd 95.eight % of
rgistered nurses.
Review my webpage 텐프로 알바
The Division seeks to maximize Maryland Lottery sales all through
the state.
my website: 유로밀리언
Currently, 44 states annd three territories (Washnington D.C., Puerto Rico, annd thee US Virgin Islands)
run a state-wide lottery.
Also visit my web-site :: 네임드파워볼