Git is one of the most popular version control systems, originally created for aiding development of the Linux kernel.
To start working with UserFrosting, you will need to use git. Git is important to use with UserFrosting for four reasons:
git is not the same as GitHub! GitHub is a "social coding" company, while git is the open-source software around which GitHub was built. Many open source projects choose to use GitHub to host their git repositories, because GitHub offers free hosting for public repositories. However, you should be aware that there are other companies that offer free git hosting such as Atlassian (Bitbucket). Both also offers free private repositories. You can also set up your own server to host repositories, or use a third-party package such as Gitlab, which has GitHub/Bitbucket-like features such as issue tracking, code review, etc.
By default, MacOS and other *nix operating systems should come with git preinstalled. If you would like to update your version of git, you can do so with their installer.
Git has an installer that you can use for Windows - Git Download.
Up until March of 2012, PHP didn't really have a good project-level package manager. There was PEAR, but it failed to keep up with the evolution of the PHP community. In March of 2012, on the heels of the PHP Standard Recommendations (PSR) project, Composer was released and a new era of PHP began.
If you've been out of the PHP world for a while, you might have missed this critical shift. Over the past few years, Composer has risen to become the de facto package manager for PHP, with Packagist as its main public package repository. This means that the best way to incorporate third-party code (which you definitely should do) is by installing and using Composer - at the very least, in your development environment.
Composer also handles autoloading, which means that the days of needing long blocks of
require statements in your code are over. It fully implements the PSR-4 standard for autoloading, which further helps the PHP community develop a consistent approach to releasing and consuming packages.
To check if Composer is already installed:
$ composer --version Composer version 1.9.3 2020-02-04 12:58:49
The full instructions for installing Composer can be found at their website. We strongly recommend that you install Composer globally on your system. This will let you run Composer using the
composer command. For convenience, we recap the global installation instructions here:
mv composer.phar /usr/local/bin/composerto make
composeravailable as a shell command.
On some versions of MacOS the
/usr directory does not exist by default. If you receive the error "/usr/local/bin/composer: No such file or directory" then you must create the directory manually before proceeding:
mkdir -p /usr/local/bin.
grunt, to name just a few. Node.js also includes
npm (Node.js Package Manager).
The Node.js website provides easy-to-use installers for most operating systems. We recommend using the latest version of Node.js (13.9 at the time of this writing), however any version later than 10.12 will suffice.
To check if Node.js is installed:
$ node -v v12.14.1
Node.js has an installer that you can use for MacOS and Windows - Node.js Download.
npm stands for Node Package Manager. npm is to Node.js as Composer is to PHP - it is used to grab the various Node packages that are required by UserFrosting's installation and build tools. When you installed Node, it should have automatically installed npm as well. However, we still recommend updating npm (if unable to update, any version later than 6.x will suffice):
$ npm install npm@latest -g
UserFrosting also uses Yarn and Bower (deprecated) for frontend dependency management. If you do not have this installed, don't worry! UserFrosting's build scripts will automatically install it for you.
Standards are boring. But guess what? "Boring" == "predictable" - a good thing when it comes to writing code. Most of your time spent as a developer is actually spent reading, not writing code. Without a clean set of standards and good comments, it can be difficult to read your own code 3 months after you wrote it, let alone someone else's code.
Sooner or later, you may want to generate some low-level documentation for every class and function in your application. Don't try to do this by hand!
Instead, by following a specific set of standards for in-code comments ("doc blocks"), you can use automated tools that will scan your codebase and generate the appropriate documentation.
For PHP code, use the phpDoc standard to document your classes, methods, and member variables. You can then use ApiGen to automatically generate clean, attractive, fully searchable API documentation for your application.