Ubiquitous Language


Published on

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Main problem in software is miscommunication
  • The common language is in the middle and not more of business language nor technical language Somewhere in between, not programmers completely conforming to biz language
  • Maintainability – classes and packages are named/grouped in a way that makes sense in the real world Agility improve - Precise Communication
  • We understand each other Software development is by its nature a series of translations and compromises. What the end user wants, what the customer is willing to pay for, and what is technically feasible rarely combine to form a unified set of features. In this talk we will explore how an Agile team can work to understand each other better, in particular at the communication divide between stakeholders and developers. We will show you how to develop a domain-specific ubiquitous language, how to lessen the responsibility gap between managers and developers, and how to use your codebase as the central source for documentation.
  • Ubiquitous Language

    1. 1. Improving stakeholder/software developer communication with an Ubiquitous Language Alline Watkins & June Clarke
    2. 2. The problem Programmers speak using technical jargon (design patterns, acronyms, geeky in-jokes) Domain experts use terminology specific to their field of expertise Computers speak programming languages something's gotta give!
    3. 4. u·biq·ui·tous /yo͞oˈbikwətəs/ Adjective: Present, appearing, or found everywhere. Synonyms: omnipresent (Dictionary.com) UBIQUITOUS LANGUAGE . A language structured around the domain model and used by all team members to connect all the activities of the team with the software. (Excerpted from Domain-Driven Design by Eric Evans )
    4. 5. "We understand each other."   The Art of Agile Development   James Shore and Shane Warden (O'Reilly. Copyright © 2008. All rights reserved.)
    5. 6. User Stories Project Meetings Team E-mails Instant Messages Schedule Plan Software Documents AND SOURCE CODE !! Where to apply:
    6. 7. The advantages... Faster communication Less risk of miscommunication Knowledge of Domain can resides in codebase Overhearing Source Code easier to understand (maintainability, extensibility)
    7. 8. NO When User logs on with valid credentials, an empty panel is displayed. User Story Example: YES When Player logs on with valid credentials, an empty board game is displayed. (from a Tic Tac Toe Game software example)
    8. 9. NO . Integer i = new Integer(); . String char1 = new String(); . public class GameDAO() { } . catch (Exception e) Code Example: YES . String realMeaningOfMyString = new String(); . public class ScoreDataLoader() { } . catch (Exception NotLoggedInException) NO . Ambiguities . Inconsistencies . Synonyms . Abbreviations YES . Clarity . Precision . Reuse . Full Names
    9. 10. <ul><li>package tictactoe.client.userInterface; </li></ul><ul><li>/** </li></ul><ul><li>* Add the string O or X to a cell in the grid. </li></ul><ul><li>*/ </li></ul><ul><li>public class ShowCellGrid { </li></ul><ul><li>public static void displayUser (Grid grid , Cell cell) { </li></ul><ul><ul><li>if (! Initialization . flag </li></ul></ul><ul><ul><li>&& Initialization. gameStatus .get Sequence () == null </li></ul></ul><ul><ul><li>&& isEmpty (grid, cell)) { </li></ul></ul><ul><ul><li>Initialization. flag = true; </li></ul></ul><ul><ul><li>String mk = showString (Initialization.gameStatus </li></ul></ul><ul><ul><li>.get CurrentUser ().ge tUserString ()); </li></ul></ul><ul><ul><li>grid .setHTML(cell.getRowIndex(), cell.getCellIndex(), mk ); </li></ul></ul><ul><ul><li>Initialization. gameStatus .get Status ()[cell.getRowIndex()][cell </li></ul></ul><ul><ul><li>.getCellIndex()] = Initialization . gameStatus </li></ul></ul><ul><ul><li>.get CurrentUser (); </li></ul></ul><ul><ul><li>GameEnd. checkEnd (Initialization. gameStatus , </li></ul></ul><ul><ul><li>cell.getRowIndex(), cell.getCellIndex()); </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><li>(...) </li></ul><ul><li>} </li></ul>A class BEFORE and AFTER Ubiquitous Language <ul><li>package tictactoe.client.userInterface; </li></ul><ul><li>/** </li></ul><ul><li>* Performs a move in the game. </li></ul><ul><li>*/ </li></ul><ul><li>public class PlayerMove { </li></ul><ul><li>/** </li></ul><ul><li>* When the player clicks in a cell, the game draws an O or a X on the * game grid depending on which player's turn it is. </li></ul><ul><li>*/ </li></ul><ul><li>public static void makeMove (GameGrid gameGrid , Cell cell) { </li></ul><ul><ul><li>if (! GameInitialization. waitingMoveFlag </li></ul></ul><ul><ul><li>&& GameInitialization. currentGameStatus .get SequenceWinner () == null && isCellEmpty (gameGrid, cell)) { </li></ul></ul><ul><ul><li>GameInitialization. waitingMoveFlag = true; </li></ul></ul><ul><ul><li>String marker = showPlayerIcon ( Game Initialization. currentGameStatus </li></ul></ul><ul><ul><li>.get CurrentPlayer ().get PlayerIcon ()); </li></ul></ul><ul><ul><li>gameGrid .setHTML(cell.getRowIndex(), cell.getCellIndex(), marker ); </li></ul></ul><ul><ul><li>GameInitialization . currentGameStatus .get GameMoves ()[cell.getRowIndex()][cell .getCellIndex()] = GameInitialization. currentGameStatus .get CurrentPlayer (); </li></ul></ul><ul><ul><li>CheckWinner . checkForWinner ( Game Initialization. currentGameStatus , cell.getRowIndex(), cell.getCellIndex()); </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><li>(...) </li></ul><ul><li>} </li></ul>(Excerpted from a Tic Tac Toe Game source code)
    10. 11. Which one would a Stakeholder better understand? <ul><li>Player Move </li></ul><ul><li>    Performs a move in the game. </li></ul><ul><li>  </li></ul><ul><ul><li>Make Move  </li></ul></ul><ul><ul><li>When the player clicks in a cell, the game draws an O or a X on the game grid depending on which player's turn it is. </li></ul></ul><ul><ul><li>Is Cell Empty </li></ul></ul><ul><ul><li>The Player can select a cell only if it wasn't already selected. </li></ul></ul><ul><li>Show Cell Grid </li></ul><ul><li>    Add the String O or X to a cell in the grid. </li></ul><ul><li>   </li></ul><ul><ul><li>Display User  </li></ul></ul><ul><ul><li>Is Empty </li></ul></ul>(Excerpted from a Tic Tac Toe Game source code)
    11. 12. [email_address] [email_address]