Giter Club home page Giter Club logo

ddd-js-sample-code's Introduction

Domain-driven design in JavaScript Sample Code

Sample code for the Domain-driven design in JavaScript book. The code samples and additional resources are organized by chapter and example.

Chapter 1

Chapter 2

No sample code in this chapter.

Chapter 3

  • Underscore Source code is available on Github.
  • Prisoner Transfer prisoner transfer module, including the basic layout for the tests, and features runnable.

Chapter 4

  • Weapons: Example how aggregation of weapons could work, calling deep inside objects, 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.js Orc node simple_objects/orc.js
  • Sinon Example: Example usage sinon for mocking, run via npm install to install dependencies, and npm test.

Chapter 5

  • ExaggeratingOrc exaggerating_orc.js, shows working with private and public methods
  • 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

Chapter 6

  • sample notifier npm install to load the dependencies and npm run notifier to run the code is in notifier.js

Chapter 7

  • 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

Chapter 8

  • pjax-example: run npm install in the chapter_8/pjax-example folder and run npm start to try it out.
  • ember-example: run npm install in the chapter_8/ember-example folder and run npm start to try it out.
  • deactivate_button.html jquery example deativating a button inline, to try it simply open in a browser.
  • car configuration example to work with constraints and logic node car_configurator.js

ddd-js-sample-code's People

Contributors

sideshowcoder avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.