{"id":22486980,"url":"https://github.com/gnodi/danf","last_synced_at":"2025-04-23T16:07:06.008Z","repository":{"id":23655162,"uuid":"27025800","full_name":"gnodi/danf","owner":"gnodi","description":"Danf is a Node.js full-stack isomorphic OOP framework allowing to code the same way on both client and server sides. It helps you to make deep architectures and handle asynchronous flows in order to help in producing scalable, maintainable, testable and performant applications.","archived":false,"fork":false,"pushed_at":"2019-02-18T10:20:11.000Z","size":3473,"stargazers_count":58,"open_issues_count":1,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-23T16:06:59.641Z","etag":null,"topics":["architecture","asynchronous","danf","dependency-injection","event","framework","isomorphic","nodejs","oop","universal"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnodi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-23T07:54:24.000Z","updated_at":"2023-12-21T14:33:41.000Z","dependencies_parsed_at":"2022-08-21T20:40:38.354Z","dependency_job_id":null,"html_url":"https://github.com/gnodi/danf","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnodi%2Fdanf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnodi%2Fdanf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnodi%2Fdanf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnodi%2Fdanf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnodi","download_url":"https://codeload.github.com/gnodi/danf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250468271,"owners_count":21435452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture","asynchronous","danf","dependency-injection","event","framework","isomorphic","nodejs","oop","universal"],"created_at":"2024-12-06T17:15:42.915Z","updated_at":"2025-04-23T16:07:05.987Z","avatar_url":"https://github.com/gnodi.png","language":"JavaScript","readme":"![Danf](resource/public/img/small-logo.jpg)\n===========================================\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Build Status][travis-image]][travis-url]\n[![Dependency Status][versioneye-image]][versioneye-url]\n\nIntroduction\n------------\n\nDanf is a Node.js full-stack isomorphic OOP framework allowing to code the same way on both client and server sides. It helps you to make deep architectures and handle asynchronous flows in order to help in producing scalable, maintainable, testable and performant applications.\n\n### Why use node Node.js instead of another technology?\n\nYou certainly can find lots of reasons but there are 2 which make the success of Node.js before all others:\n- use the same language on both client and server sides\n- handle I/O in an asynchronous way to maximize your CPU load thanks to the main event loop\n\n### Why use Danf?\n\nDanf reinforces the promises of Node.js:\n- use the same code on both client and server sides *(in a classic node.js style)*\n- maximize the power of asynchronicity thanks to a nice and innovative abstraction layer *(built upon [Async.js](https://github.com/caolan/async))*\n\n### Why use Danf instead of another framework?\n\nDanf is not better as any other existing framework or library but it has its own proposal. Danf is an agnostic framework: it will not force you to use sockets or this or that database or a big client library phagocyting all the others (with heavy impact on architecture, bookmarquing, security, ...). In fact, it just provides a layer to help in making strong architectures and use the power of Node.js in an easy way. You can still use all your prefered client or server libraries/packages with Danf!\n\nHere is a fast description of its 3 layers architecture:\n- Model: implement your code in \"classes\" and use a dynamic dependency injection (SOA) to make a low coupling between your components\n- Sequencing: abstract parallel and series synchronous and asynchronous executions of methods of your model instances\n- Event: plug events on your sequences (HTTP requests, socket messages, commands, DOM events, ...)\n\nYou can make a lot of different applications with Danf:\n- Single page website (AJAX, sockets)\n- REST API\n- Task executor\n- Utility module (on client or/and server side) for modular achitecture\n- ...\n\n\u003e You can code big (and small!) performant and modular applications with a deep and strong architecture in an easy way and share your code thanks to a transparent module mechanism only requiring to use [npm](https://www.npmjs.com/) in the most standard way.**\n\nInstallation\n------------\n\n### Create a proto application\n\nThe better way to create a new application/danf module (in Danf an application is a **danf module** and conversely) is to let [Yeoman](http://yeoman.io/) do it for you!\n\nFirst, install Yeoman:\n```sh\n$ npm install -g yo\n```\n\nThen, install the specific generator for Danf applications:\n```sh\n$ npm install -g generator-danf\n```\n\nFinally, create an application using:\n```sh\n$ yo danf\n```\n\n### Start the server\n\nAfter creating your application, you should be able to start the server in this way:\n```sh\n$ node danf serve\n```\n\nThis will create a server and process client side files automatically rebuilding each time a file is changed.\nAt the end of this processing, a welcome message will be available at `http://localhost:3080`!\n\n\u003e Use `node danf serve --env prod` to start the server in prod environment (less debugging, more performances!).\n\n### Run the tests\n\nYou can run the tests of your application thanks to:\n```sh\n$ make test\n```\n\nArchitecture\n------------\n\nHere is a diagram of the macro architecture of Danf:\n\n![architecture](resource/private/img/architecture.png)\n\nFeatures\n--------\n\nHere is a list of the major features proposed by Danf:\n- An object-oriented programming layer (with ensured interfaces).\n- An inversion of control design (dependency injection via configuration files).\n- A perfect isomorphism allowing to use the same code on both client and server sides (in a standard node.js coding style).\n- A homogeneous way to handle all kind of events (HTTP requests, socket messages, commands, DOM events, ...).\n- An original abstraction layer over [Async.js](https://github.com/caolan/async) to manage asynchronicity.\n- A helper to develop ultra performant AJAX and \"real time\" applications supporting deep linking.\n- A natural approach to share your modules and use others just using [npm](https://www.npmjs.com/).\n- Some other helpful sub features to easily manage cookies, session, ...\n\n\u003e Danf is stable and is already used by some applications in production.\n\nCommunity\n---------\n\nDanf is a young framework and the community is still small but active. You can post your issues on [github](https://github.com/gnodi/danf/issues) or on [stack overflow](http://stackoverflow.com/) with the tag `danf` and you will get an answer as quickly as possible.\n\nIf you want to contribute, here is a not limited list of how to do:\n\n- Fork the project on [github](https://github.com/gnodi/danf) and improve features, documentation, ...\n- Code your own module. In Danf, an application is a **danf module** and conversely. This way you can easily share your modules with other people simply using [npm](https://www.npmjs.com/) (here is a [list of available danf modules](resource/private/doc/modules.md)).\n- Participate to the community in asking questions in the issues or on stack overflow.\n\n\u003e Danf is always improving. Keep an eye on its new versions and features!\n\nDocumentation\n-------------\n\nGet a quick [overview](resource/private/doc/overview/index.md) of the framework architecture and possibilities.\n\nLearn more about the framework in the [documentation](resource/private/doc/index.md).\n\nTests\n-----\n\nYou can run the tests of the framework using:\n```sh\n$ make test\n```\n\nLicense\n-------\n\nOpen Source Initiative OSI - The MIT License\n\nhttp://www.opensource.org/licenses/mit-license.php\n\nCopyright (c) 2014-2016 Thomas Prelot\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[npm-image]: https://img.shields.io/npm/v/danf.svg?style=flat\n[npm-url]: https://npmjs.org/package/danf\n[downloads-image]: https://img.shields.io/npm/dm/danf.svg?style=flat\n[downloads-url]: https://npmjs.org/package/danf\n[travis-image]: https://img.shields.io/travis/gnodi/danf.svg?style=flat\n[travis-url]: https://travis-ci.org/gnodi/danf\n[versioneye-image]:https://www.versioneye.com/user/projects/54da27f8c1bbbd5f8200020a/badge.svg?style=flat\n[versioneye-url]:https://www.versioneye.com/user/projects/54da27f8c1bbbd5f8200020a","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnodi%2Fdanf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnodi%2Fdanf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnodi%2Fdanf/lists"}