- Notifications
You must be signed in to change notification settings - Fork18
sideshowcoder/ddd-js-sample-code
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Sample code for the Domain-driven design in JavaScript book. The code samplesand additional resources are organized by chapter and example.
- ExpressAppfrom chapter 1.
No sample code in this chapter.
- Underscore Source code is availableon Github.
- PrisonerTransferprisoner transfer module, including the basic layout for the tests, andfeatures runnable.
- Weapons: Example how aggregation of weapons could work, calling deep insideobjects, which is most likely a bad idea.
node weapons/weapons.js - Composition and Inheritance: See the appropriate subfolder.
- Domain Objects: See chapter 3 prisoner transfer.
- My Mock: Example mock, built using a simple object, run via
node my_mock/my_mock.js - Simple Object: Battle Orc
node simple_objects/battle_orc.jsOrcnode simple_objects/orc.js - Sinon Example: Example usage
sinonfor mocking, run vianpm installtoinstall dependencies, andnpm test.
- ExaggeratingOrc
exaggerating_orc.js, shows working with private and publicmethods - not a value object
not_value_objects.js, show how objects can be modified - Value object example based on coins,
coin.js - Using value objects in wallet
wallet.js - Events
event.js - Orcs repository
orcs.js - Alternative active record style getting orcs
orcs_ar.js - Sending letter via a postman
postman.js
- sample notifier
npm installto load the dependencies andnpm run notifierto run the code is innotifier.js
- sample math
node math.js - using array functions to process
node transport_time.js - loggable example
node oo_orc.js - state in basic objects example
node thing.js - events
node events.js - jumping counter managing state
node counter.js
- pjax-example: run
npm installin thechapter_8/pjax-examplefolder and runnpm startto try it out. - ember-example: run
npm installin thechapter_8/ember-examplefolder and runnpm startto try it out. deactivate_button.htmljquery example deativating a button inline, to try itsimply open in a browser.- car configuration example to work with constraints and logic
node car_configurator.js
About
Sample code for the Domain-driven design in JavaScript book
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.