Download the PHP package clabonte/codeprimer without Composer
On this page you can find all versions of the php package clabonte/codeprimer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download clabonte/codeprimer
More information about clabonte/codeprimer
Files in clabonte/codeprimer
Package codeprimer
Short Description CodePrimer, customizable production-grade code generator for architects and team leads
License MIT
Homepage https://github.com/clabonte/codeprimer
Informations about the package codeprimer
CodePrimer
CodePrimer’s primary objective is to allow software architects and senior developers to define the data model and related processing from a business point of view so that it can be easily understood and manipulated by entrepreneurs, business managers and business analysts before starting the software development process.
As such, it is meant to prime the software development process using simple, easy to use and effective representations that can be objectively interpreted by business and techies willing to cooperate to create digital businesses.
CodePrimer interprets this data model to generate a set of artifacts (e.g. source code) that are combined to build a production-grade software solution following the architect's vision to guide the development team to use his best practices.
The project offers an opinionated architecture, called Business Bundle to get started. The resulting solution is meant to be highly scalable, yet requiring very low maintenance by leveraging the best DevOps practices with a minimal technical team.
It liberally borrows and integrates concepts and best practices that have been made available over the years by several movements in the software development space, such as UML, Domain-Driven Design (DDD), agile, micro services and DevOps.
The resulting architecture and implementation is not meant to please everyone but the underlying goal is to produce top quality software that is meeting the business objectives for what it is being built and be easily understood, maintained and evolved by a software development team at a fraction of the time usually required to achieve production-grade software..
Thanks to the high flexibility of its artifact generation engine, the project can be easily tailored to suit any programming language or any architecture/framework chosen by the architect.
Documentation
In order to fully understand and leverage the capabilities offered by CodePrimer, you should refer to the following documents:
- Concepts
- Structure and Guidelines
- CodePrimer Data Modeling
- CodePrimer Process Modeling
- Available Artifacts
Getting Started
CodePrimer can be added as a library to an existing PHP project or used standalone to either generate artifacts or prime a new project.
Prerequisites
No matter how you want to use it, the installation instructions assume you already have the following:
Installation
Generating artifacts in an existing project
If you already have an existing PHP project, and you want to use CodePrimer to generate artifacts (e.g. source code) in it, you can simply add CodePrimer via composer:
Then, you will need to generate the configuration files for your project by running the init
command and answering the various questions asked:
This will generate a set of files under the codeprimer
directory that will be used by the prime
command to generate the various artifacts you need:
Using CodePrimer in standalone mode
If you don't have an existing project, or you are simply curious to see how it works, you can still clone the repository and installing its dependencies:
- Clone the repo
- Run composer install
Once you have cloned and installed the project, you can generate a set of Channel sample application by running the following command:
Take a look at the sample/output
folder to see the Artifacts generated by CodePrimer.
Usage
In order to understand what CodePrimer can be used for, it is best to look at a sample application.
You can also consult the list of Artifacts currently available and planned for CodePrimer.
Command Line
CodePrimer offers a simple CLI to either initializes a new CodePrimer-compatible project via the init
command:
This command will create, at a minimum, the following files in the selected destination:
Once you have initialized your project, you can prime artifacts via the prime
command:
Configuration
The prime
command currently uses the following files (generated by the init
command) to configure its execution:
codeprimer/codeprimer.yaml
This file defines the list of Artifacts to generate for your project. Unless you want to change the list of artifacts to generate for your project, you do not need to modify this file.
codeprimer/bundle.php
This file coordinates the creation of your Business Bundle through the invocation of your factories (see below). As such, you should not modify this file.
codeprimer/DatasetFactory.php
This factory defines the list of Dataset
instances that are part of your application.
You need to modify this file to design your business/application model as follow:
- Create a set of public methods starting with the
create
name prefix with no parameters (e.g. createUserRole()) - Each
create
method must return aDataset
instance describing a dataset used in your application. - The
bundle.php
file (see above) will automatically invoke all thecreate
methods to add allDataset
instances to your application business bundle.
codeprimer/BusinessModelFactory.php
This factory defines the list of BusinessModel
instances that are part of your application.
You need to modify this file to design your business/application model as follow:
- Create a set of public methods starting with the
create
name prefix with no parameters (e.g. createUser()) - Each
create
method must return aBusinessModel
instance describing a business model used in your application. Your business model may reference datasets and/or other business models defined in their respective factories. - The
bundle.php
file (see above) will automatically invoke all thecreate
methods to add allBusinessModel
instances to your application business bundle.
codeprimer/BusinessProcessFactory.php
This factory defines the list of BusinessProcess
instances that are part of your application.
You need to modify this file to design your business/application model as follow:
- Create a set of public methods starting with the
create
name prefix with no parameters (e.g. createRegister()) - Each
create
method must return aBusinessProcess
instance describing a business process used in your application. Your business process must reference datasets and/or business models defined in their respective factories. - The
bundle.php
file (see above) will automatically invoke all thecreate
methods to add allBusinessProcess
instances to your application business bundle.
Roadmap
The high level roadmap and progress is available here
To have a more detailed view on upcoming changes, please look at the Product Roadmap or open issues for a list of proposed features and known issues.
Contributing
See CONTRIBUTING
Contact
Project Link: https://github.com/clabonte/codeprimer
License
This project uses the following license: MIT
All versions of codeprimer with dependencies
ext-ctype Version *
ext-iconv Version *
ext-intl Version *
doctrine/inflector Version ^1.3
symfony/console Version ^5.1
symfony/yaml Version ^5.1
twig/twig Version ^2.0