== Latest Folder Structure
– Project root
— Core Files
— Bootstrap
— App ???
— Config
— Environments
— Storage
— Cache ???
— Uploads
— Themes
— Modules: AKA Plugins. A group of components & features.
— Module: A reusable & distributed collection of features, components and extensions.
—- Bootsrap
—- Build :
—– bin:
—– conf:
—- src/AppWip: for PoC & temp code that’s still WIP and only used in dev env.
—- src/Core:
—- src/Features: code specific to 1 feature, utilising componenets when needed.
—- src/Components : resuable chunks of code, usually refactored code extracted from Features into resuable chunks. Types of Componenets: RestApiClient, DatabaseAbstration, Algorithoms,
—- src/Extensions: Extend the functionality of existing code by wrapping & altering other components and features behaviour ??? Same as Addon ???
—- Dist:
—- Public: may contain views, css, js, imgs and any static assets. Should this be insite Dist folder ???
—- Tests:
=== Explanations
=== Module Names Ideas
– AppMonoModule: for the AIO monolothic modules & plugins used in simple projects & PoC.
–
=== Folder Structure Info Sources
– https://forum.yiiframework.com/t/difference-between-extensions-and-modules/82014
– https://www.geeksforgeeks.org/whats-the-difference-between-an-angular-component-and-module/
– https://stackoverflow.com/questions/2702816/module-vs-component-design
– https://softwareengineering.stackexchange.com/questions/316199/differences-between-the-terms-modules-plugins-extensions
– https://github.com/laravel/framework/tree/11.x
=== questions
– How to organise modules & projects using multiple programming languages?
–
== WP Dev Framework notes
=== WP COncepts and tools to prepare
– Post Type
– CRUD
– CRUD GUI Scafolding
– Plugin
– Plugin APP : Holds all buisness related cusomozations instead of creating mulriple plugins.
– Plugin Addon : Adds features to exsiting plugin.
– Plugin Module ?? :
– Theme / Child Theme
– Widgets
– Meta Boxes
– ShortCode
– Templates
– WP Admin Pages / Settings Pages
– WP Admin Menu
– FE Sidebars
–
== Expected components for common web dev frameworks
– Front end & backed GUI
– CRUD framework w/o GUI
– DB / Flat File DB
– routing
– config
– templates
– MVC / MVP pattern?
– ORM ?
– Plugins / Addons / Modules / Components
– Scheduling system / Event Management
– API Client
– Cache
– Validation
– Error Handling / Excaptions
– File / Class Autoloader
– Loggin
– IoC Container (Inversion of Control Container)
–
== Software Architecture
=== Terms & concepts
– Quality Attributes = non-functional requirements = Constraints = Non behavioural requirements
– Macroscope VS Microscope
– Big Design UpFront BDUF
– Item Potency VS Mutation
– Conceptual Model
=== C4 Model
– Context
– Containers
– Components
– Code
== MVC / MVP
MVC is a UI pattern . Not the same things as code architecure !
== JS Notes
– Declaritive vs expressive statements
– Lambda expression / Arrow Function
– JS hoisting
– Execution Context Stack
== General Naming Convention
How should varialbes, functions, classes and namespaces should be named ?
== Other notes
– https://stackoverflow.com/questions/421965/anyone-else-find-naming-classes-and-methods-one-of-the-most-difficult-parts-in-p
– context + verb + how
– verbAdjectiveNounStructure
–
– Transformer: XFromY / XToY
–
== useful-naming-conventions
.From https://caseysoftware.com/blog/useful-naming-conventions
”
verbAdjectiveNounStructure – with Structure and Adjective as optional parts
For verbs, I stick to action verbs: save, delete, notify, update, or generate. Once in a while, I use “process” but only to specifically refer to queues or work backlogs.
For nouns, I use the class or object being interacted with. In web2project, this is often Tasks or Projects. If it’s Javascript interacting with the page, it might be body or table. The point is that the code clearly describes the object it’s interacting with.
The structure is optional because it’s unique to the situation. A listing screen might request a List or an Array. One of the core functions used in the Project List for web2project is simply getProjectList. It doesn’t modify the underlying data, just the representation of the data.
The adjectives are something else entirely. They are used as modifiers to the noun. Something as simple as getOpenProjects might be easily implemented with a getProjects and a switch parameter, but this tends to generate methods which require quite a bit of understanding of the underlying data and/or structure of the object… not necessarily something you want to encourage. By having more explicit and specific functions, you can completely wrap and hide the implementation from the code using it. Isn’t that one of the points of OO?
”
== Namin convention based on Laravel
https://laravel.com/api/9.x/
=== Namespaces and Class Names
– Auth
** Access
– Cache
– Broadcasting: used with WebSockets for live updates ?
– Bus ?
– Config
– Console
– Container
– Cookie
– Database
– Encryption
– Events
– Filesystem
– Mail
– Http: HTTP Client
– Notificaitons
– Queue
– Routing
– Session
– Support ?
– Validation
– View
–
=== Class Name Keywords
– Factory
– Adabter
– Decorator
– Strategy
– Facade
– View
– Response
– Parser
– Provider
– Validator
=== Function Name Keywords
– Get
– Set
– Save
– Delete
– update
– Notify
– generate
– process : for queues
== Docker CODE SAMPLES
[bash]
—-
export Image_Name=mhart/alpine-node
export Image_Version=latest
export Container_Name=$(basename $PWD)
alias ss=”source .docker.env”
alias dnew=’docker run -it –name $Container_Name -p 35729:35729 –volume=”$PWD:/mnt/app” $Image_Name:$Image_Version sh’
alias dstart=’docker start -a $Container_Name’
alias dattach=’docker exec -it $Container_Name sh’
alias dstop=’docker stop $Container_Name’
alias ddelete=’docker stop $Container_Name && docker rm $Container_Name’
—-