| 1 | -*- mode: text; fill-column: 80 -*- |
|---|
| 2 | |
|---|
| 3 | In ExtremeProgramming, the features of the software are described in |
|---|
| 4 | the form of UserStories, which is a short narrative describing someone |
|---|
| 5 | (or some other system) using the software for something. UserStories |
|---|
| 6 | should not have many details: these are in the corresponding |
|---|
| 7 | CustomerTests. |
|---|
| 8 | |
|---|
| 9 | XP Dojo's user stories are very fine-grained, so that it is possible |
|---|
| 10 | to develop one completely within a typical session for its developers |
|---|
| 11 | (one or two hours). Therefore, to assist readers in understanding XP |
|---|
| 12 | Dojo from its stories, several of these are often grouped under a |
|---|
| 13 | heading with an introductory paragraph. Within a heading, each bullet |
|---|
| 14 | item is a story. Sub-bullets are sequential events in the story. |
|---|
| 15 | |
|---|
| 16 | Paragraphs below that are not bulleted probably need breaking down... |
|---|
| 17 | |
|---|
| 18 | = Preliminaries = |
|---|
| 19 | |
|---|
| 20 | == Licence == |
|---|
| 21 | |
|---|
| 22 | XP Dojo is (C) Dominic Williams, Nicolas Charpentier, Virgile |
|---|
| 23 | Delecolle, Fabrice Nourisson and Jacques Couvreur, and distributed |
|---|
| 24 | under the revised BSD licence. |
|---|
| 25 | |
|---|
| 26 | * The copyright and licence is inserted at the top of each source |
|---|
| 27 | file. |
|---|
| 28 | |
|---|
| 29 | == System Requirements == |
|---|
| 30 | |
|---|
| 31 | * Runs under Windows, Mac OS X, Linux and BSD. |
|---|
| 32 | * Requires Erlang/OTP only. |
|---|
| 33 | |
|---|
| 34 | == Installation == |
|---|
| 35 | |
|---|
| 36 | * Install from source. |
|---|
| 37 | * Install the binary distribution on Windows. |
|---|
| 38 | * Install the binary distribution on Mac OS X. |
|---|
| 39 | * Install on NetBSD etc. with pkgsrc. |
|---|
| 40 | * Use from a Live CD distribution |
|---|
| 41 | |
|---|
| 42 | = Running = |
|---|
| 43 | |
|---|
| 44 | == Running the server == |
|---|
| 45 | |
|---|
| 46 | * Starting a server |
|---|
| 47 | * Adding nodes to a server |
|---|
| 48 | |
|---|
| 49 | == Starting a client == |
|---|
| 50 | |
|---|
| 51 | * The command-line client is started by opening an Erlang shell (erl |
|---|
| 52 | or werl). |
|---|
| 53 | * The graphical client is started by calling |
|---|
| 54 | application:start(xpdojo_client) from an Erlang shell |
|---|
| 55 | * The Web client is started by opening the appropriate URL from any |
|---|
| 56 | Web browser. |
|---|
| 57 | |
|---|
| 58 | == Upgrading == |
|---|
| 59 | |
|---|
| 60 | XP Dojo may be upgraded without stopping the software. |
|---|
| 61 | |
|---|
| 62 | * Upgrading manually |
|---|
| 63 | * Upgrading automatically |
|---|
| 64 | |
|---|
| 65 | = Browsing code = |
|---|
| 66 | |
|---|
| 67 | The code organisation, in each of the supported languages, is |
|---|
| 68 | presented in a structured, uniform manner, regardless of the |
|---|
| 69 | underlying filesystem organisation. Navigation is also possible by |
|---|
| 70 | following cross-references within the code itself. Code is displayed |
|---|
| 71 | one function at a time. |
|---|
| 72 | |
|---|
| 73 | * Command-line synopsis |
|---|
| 74 | * Graphical client synopsis |
|---|
| 75 | * Web synopsis |
|---|
| 76 | |
|---|
| 77 | == Browsing Erlang code from the command line == |
|---|
| 78 | |
|---|
| 79 | * Listing Erlang applications |
|---|
| 80 | * Listing Erlang modules |
|---|
| 81 | * Listing Erlang functions |
|---|
| 82 | * Displaying an Erlang function |
|---|
| 83 | * Listing the tests of an Erlang function |
|---|
| 84 | * Displaying a test of an Erlang function |
|---|
| 85 | |
|---|
| 86 | == Browsing C code from the command line == |
|---|
| 87 | |
|---|
| 88 | * Listing C programs |
|---|
| 89 | * Listing C modules |
|---|
| 90 | * Listing C functions |
|---|
| 91 | * Displaying a C function |
|---|
| 92 | * Listing C types |
|---|
| 93 | * Displaying a C type |
|---|
| 94 | * Listing C globals |
|---|
| 95 | * Displaying a C global definition |
|---|
| 96 | |
|---|
| 97 | == Browsing Erlang code from the graphical client == |
|---|
| 98 | |
|---|
| 99 | The graphical client is a single window containing (from top to |
|---|
| 100 | bottom): a menu bar, a synopsis area, three scrolled lists side by |
|---|
| 101 | side, two editors side by side, and a status bar. |
|---|
| 102 | |
|---|
| 103 | * Selecting an Erlang application |
|---|
| 104 | * Selecting an Erlang module |
|---|
| 105 | * Selecting an Erlang function |
|---|
| 106 | * Selecting the test of an Erlang function |
|---|
| 107 | |
|---|
| 108 | == Browsing Erlang code on the Web == |
|---|
| 109 | |
|---|
| 110 | * Selecting an Erlang application |
|---|
| 111 | * Selecting an Erlang module |
|---|
| 112 | * Selecting an Erlang function |
|---|
| 113 | * Selecting the test of an Erlang function |
|---|
| 114 | |
|---|
| 115 | = Test driven development = |
|---|
| 116 | |
|---|
| 117 | Unit tests drive most development actions : |
|---|
| 118 | |
|---|
| 119 | == Test driven Erlang development from the command line == |
|---|
| 120 | |
|---|
| 121 | * Creating an Erlang module. |
|---|
| 122 | * Adding an exported Erlang function to a module. |
|---|
| 123 | * Adding an unexported Erlang function to a module. |
|---|
| 124 | * Modifying the arity of an Erlang function. |
|---|
| 125 | |
|---|
| 126 | * Modify the process dictionary before and after running tests (help |
|---|
| 127 | ensure code doesn't use it). |
|---|
| 128 | |
|---|
| 129 | = Refactoring = |
|---|
| 130 | |
|---|
| 131 | Programmers may select from many refactorings to be performed |
|---|
| 132 | automatically. |
|---|
| 133 | |
|---|
| 134 | == Refactoring Erlang from the command line == |
|---|
| 135 | |
|---|
| 136 | * Renaming an Erlang module |
|---|
| 137 | * Renaming an Erlang function |
|---|
| 138 | * Extracting an unexported Erlang function. |
|---|
| 139 | |
|---|
| 140 | = Feedback = |
|---|
| 141 | |
|---|
| 142 | Code is continuously and automatically compiled in the background. |
|---|
| 143 | |
|---|
| 144 | Unit tests are continuously run in the background, and results |
|---|
| 145 | displayed on the fly. |
|---|
| 146 | |
|---|
| 147 | Acceptance tests are continuously run in the background and results |
|---|
| 148 | displayed. |
|---|
| 149 | |
|---|
| 150 | Programmers can undo an unlimited number of changes, or revert |
|---|
| 151 | directly to any previous stable state. |
|---|
| 152 | |
|---|
| 153 | = Code mutation = |
|---|
| 154 | |
|---|
| 155 | Code is automatically mutated in order to detect untested code, and to |
|---|
| 156 | compute a traceability matrix between code and user stories. |
|---|
| 157 | |
|---|
| 158 | |
|---|
| 159 | = Team work = |
|---|
| 160 | |
|---|
| 161 | Development is carried out by any number of programmers (pairs) |
|---|
| 162 | working simultaneously. |
|---|
| 163 | |
|---|
| 164 | A session (and sandbox) is automatically created when unit tests are |
|---|
| 165 | modified such that they fail. The session is automatically closed, |
|---|
| 166 | and the code committed to the server, when they are 100% again and |
|---|
| 167 | there are no regressions on acceptance tests. In the meantime, at any |
|---|
| 168 | time, a session may be returned to the previous 100% state. |
|---|
| 169 | |
|---|
| 170 | Each time a pair commits a modification, every other active session |
|---|
| 171 | receives an immediate update. If the same change set may be applied |
|---|
| 172 | locally without breaking any tests, XP Dojo applies it automatically, |
|---|
| 173 | otherwise it puts it in a queue for the programmers to apply manually. |
|---|
| 174 | |
|---|
| 175 | The same function may be modified concurrently in separate sessions, |
|---|
| 176 | but a visual indication is provided for each line of code modified by |
|---|
| 177 | another pair. |
|---|
| 178 | |
|---|
| 179 | = Collective code ownership = |
|---|
| 180 | |
|---|
| 181 | In extreme programming, the code is collectively owned by all the |
|---|
| 182 | developers. XP Dojo helps to achieve collective code ownership in the |
|---|
| 183 | following ways: |
|---|
| 184 | |
|---|
| 185 | * For each module, a chart ranks developers by number of changes to |
|---|
| 186 | that module, percentage of all developer's changes spent on that |
|---|
| 187 | module, or by most recent change to the module. |
|---|
| 188 | |
|---|
| 189 | * For each developer, a chart ranks modules by number of changes to |
|---|
| 190 | that module, percentage of all developer's changes spent on that |
|---|
| 191 | module, or by most recent change to the module |
|---|
| 192 | |
|---|
| 193 | = Coding standard = |
|---|
| 194 | |
|---|
| 195 | One important practice that contributes to collective code ownership |
|---|
| 196 | is using a consistent style in the code: |
|---|
| 197 | |
|---|
| 198 | * Regardless of the style and formatting used when entering code, code |
|---|
| 199 | is stored and displayed in a consistent way, according to |
|---|
| 200 | customisable rules. |
|---|
| 201 | |
|---|
| 202 | * The graphical client forces code into the standard format |
|---|
| 203 | on-the-fly, as it is being entered. |
|---|
| 204 | |
|---|
| 205 | * Modifications to the style rules are automatically applied |
|---|
| 206 | throughout the code. |
|---|
| 207 | |
|---|
| 208 | * Each symbol must comply with the naming standard for its |
|---|
| 209 | category. Naming standards are programmable rules. |
|---|
| 210 | |
|---|
| 211 | * Naming standards may be modified, and the modification applied to |
|---|
| 212 | existing symbols by providing a transformation rule. |
|---|
| 213 | |
|---|
| 214 | * Hooks are provided to define higher order coding standards. |
|---|
| 215 | |
|---|
| 216 | = Frequent releases = |
|---|
| 217 | |
|---|
| 218 | * Code may be exported for release as a binary distribution |
|---|
| 219 | |
|---|
| 220 | * Code may be exported for release as a source distribution |
|---|
| 221 | |
|---|
| 222 | * For source code releases, a copyright notice may be automatically |
|---|
| 223 | inserted into each exported source file |
|---|
| 224 | |
|---|
| 225 | * Release bundles may be built using only modules actually used by |
|---|
| 226 | the acceptance tests. |
|---|
| 227 | |
|---|
| 228 | = Distributed extreme programming = |
|---|
| 229 | |
|---|
| 230 | A list of currently connected users is displayed. |
|---|
| 231 | |
|---|
| 232 | Two connected users may pair up on a task: |
|---|
| 233 | |
|---|
| 234 | * They see the same screen, but only the driver may modify it |
|---|
| 235 | |
|---|
| 236 | * A special test/code mode supports automatic switching of drivers |
|---|
| 237 | when a test is added and when it passes. |
|---|
| 238 | |
|---|
| 239 | * They are connected by SoftPhone (or console chat as a fallback or |
|---|
| 240 | for low bandwidth connections). |
|---|
| 241 | |
|---|
| 242 | * Sessions may be started on one machine, and instantly continued on |
|---|
| 243 | a different machine. |
|---|
| 244 | |
|---|
| 245 | = Customization = |
|---|
| 246 | |
|---|
| 247 | In addition to being open source and open to contributions, XP Dojo |
|---|
| 248 | can be enriched and customised in two ways: |
|---|
| 249 | |
|---|
| 250 | * the command line interface may be used to write scripts |
|---|
| 251 | |
|---|
| 252 | * hooks are provided for Erlang or Python code to modify the default |
|---|
| 253 | behaviour, e.g.: |
|---|
| 254 | |
|---|
| 255 | ** sorting function for module and function lists |
|---|
| 256 | ** actions to be performed at certain key moments (such as a |
|---|
| 257 | successful or a failed build, a new passing customer test...) |
|---|
| 258 | |
|---|
| 259 | ============================================================================== |
|---|
| 260 | MORE IDEAS BELOW, need digesting... |
|---|
| 261 | ============================================================================== |
|---|
| 262 | |
|---|
| 263 | User stories may be listed and prioritised, and linked to |
|---|
| 264 | corresponding acceptance tests. |
|---|
| 265 | |
|---|
| 266 | In Erlang and C, the expression preceding the current cursor position |
|---|
| 267 | can be evaluated, and its result displayed (as in Emacs-lisp). |
|---|
| 268 | |
|---|
| 269 | Every interaction with the server is logged, and may be undone and |
|---|
| 270 | replayed. |
|---|
| 271 | |
|---|
| 272 | Import code from an existing project. |
|---|
| 273 | |
|---|
| 274 | Ide (de RJ): |
|---|
| 275 | No need to make a snapshot of the entire codeline, though in a more "real" |
|---|
| 276 | system, my fantasy is that every green bar updates every computer in the |
|---|
| 277 | universe with the version that just went green. |
|---|
| 278 | |
|---|
| 279 | De moi (inspir par Joe): |
|---|
| 280 | Marqu tous les modules (y compris de la distrib Erlang) utiliss lors de |
|---|
| 281 | l'excution des tests de recettes, et utiliser cette liste pour prparer |
|---|
| 282 | un package de livraison le plus compacte possible. |
|---|