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). Unlike GitHub, Atlassian 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.3.1 2017-01-07 18:08:51
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.
You may need to run the above command(s) with
On some versions of MacOS the
/usrdirectory 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 (7.x at the time of this writing), however any version later than 4.x will suffice.
To check if Node.js is installed:
$ node -v v7.4.0
Even though we'll be using these tools to get our application ready for deployment, you don't actually need to install Node.js on your live server. You can install it locally, perform your installation and build tasks, and then push the built application to the live server afterwards.
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 3.x will suffice):
$ npm install [email protected] -g
UserFrosting also uses Bower, a frontend package manager. 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.