/app
├── /Application
| ├── /Exceptions
| ├── /Middlewares
| ├── /Providers
| ├── /Requests
├── /Domain
| ├── /MyDomainA
| | ├── /Contracts
Document for the best design choices you can make for your software.
Terminology
- DDD - [Domain Driven Design][ddd-wikipedia]
- FF or FTF - Function First Design, or File-type First Design is structuring your application by it's function before the files such as a directory named
components
containing all component files.
File Structure
Structuring applications is hard, here are a few resources to help.
- a list on Medium
- Animated Stickers channel
- Анимированные стикеры телеграм channel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate tile files that can be used with https://www.marzipano.net | |
# This is a config file for https://krpano.com/tools/kmakemultires/config/ - | |
flash=false | |
html=false | |
xml=false | |
panotype=autodetect | |
tilesize=512 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// probability that the event with the passed probability will NOT occur | |
function complement(p) { | |
return 1 - p; | |
} | |
// probability that a and b will happen when neither outcome | |
// is affected by the other (accepts 1 or more arguments) | |
function intersectionOfIndependentEvents(a, b) { | |
var ret = a; | |
for (var i = 1; i < arguments.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"region": "Arica y Parinacota", | |
"region_number": "XV", | |
"region_iso_3166_2": "CL-AP", | |
"provincias": [ | |
{ | |
"name": "Arica", | |
"comunas": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/* eslint-disable consistent-this */ | |
let middlewareManagerHash = []; | |
/** | |
* Composes single-argument functions from right to left. The rightmost | |
* function can take multiple arguments as it provides the signature for | |
* the resulting composite function. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ProcessWireValetDriver extends BasicValetDriver | |
{ | |
private $possibleDirectories = [ | |
'', // PW in root, do not remove except you're sure you never use it | |
'/dist', | |
'/public' | |
]; |