TypeScript library for implementing Domain-Driven Design in web apps
Перейти к файлу
Shai Rose 7fa004e0a0 added husky pre-push hook for docs 2018-07-24 17:52:00 +03:00
.github Let's get this show on the road! 2017-09-12 23:22:45 +03:00
.idea minor change to docs 2018-07-24 13:49:34 +03:00
docs cleanup 2018-07-24 17:46:44 +03:00
lib cleanup 2018-07-24 17:46:44 +03:00
paris.wiki@b8bd573bd0 updated docs 2018-07-24 16:44:58 +03:00
.editorconfig Let's get this show on the road! 2017-09-12 23:22:45 +03:00
.gitignore Merged PR 1816120: Angular 6 2018-05-14 06:24:59 +00:00
.npmignore Downgraded angular version 2017-10-20 10:26:54 +03:00
LICENSE Initial commit 2017-09-12 12:29:04 -07:00
README.md updated docs 2018-07-24 16:33:15 +03:00
gulpfile.js Merged PR 1816120: Angular 6 2018-05-14 06:24:59 +00:00
index.d.ts Merged PR 1816120: Angular 6 2018-05-14 06:24:59 +00:00
index.ts Downgraded zonejs and systemjs 2017-10-20 14:30:18 +03:00
karma.conf.js Adding dataset options, using the allItemsProperty config. 2017-09-14 09:21:12 +03:00
package.json added husky pre-push hook for docs 2018-07-24 17:52:00 +03:00
protractor.conf.js Let's get this show on the road! 2017-09-12 23:22:45 +03:00
rollup.config.js Merged PR 1816120: Angular 6 2018-05-14 06:24:59 +00:00
test-config.js Let's get this show on the road! 2017-09-12 23:22:45 +03:00
test-main.js Let's get this show on the road! 2017-09-12 23:22:45 +03:00
tsconfig.json Merged PR 1816120: Angular 6 2018-05-14 06:24:59 +00:00
tsconfig.lib.json Merged PR 1816120: Angular 6 2018-05-14 06:24:59 +00:00
tslint.json Let's get this show on the road! 2017-09-12 23:22:45 +03:00
typedocconfig.ts removed unused code 2018-07-24 16:10:05 +03:00
yarn.lock Let's get this show on the road! 2017-09-12 23:22:45 +03:00

README.md

Paris

Paris is a TypeScript library for implementing Domain-Driven Design in web apps. Paris, fashion capital of the world, where all the models want to be.

Usage

First, define an Entity:

@Entity({
	singularName: "Todo Item",
	pluralName: "Todo Items",
	endpoint: "todo/items"
})
export class TodoItem extends EntityModelBase{
	@EntityField()
	text:string;
	
	@EntityField()
	time:Date;
}

The above defines an Entity, which can be used to query the todo/items server endpoint, like this:

const paris = new Paris();
paris.getItemById(TodoItem, 1).subscribe((todoItem:TodoItem) => {
	console.log("Todo item with ID 1: ", todoItem);
});

Advanced

Github

Check the Wiki for advanced uses and explanations.

Check the Source Typescript models for a detailed look under the hood.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.