About Features Downloads Getting Started Documentation Events Support GitHub

Site Tools


development:recommended_tools

Recommended Tools

Developers are free to use whatever tools they prefer, but this page provides some suggestions that may help newcomers make the most of VuFind development.

Editors / IDEs

Some developers prefer to use a simple text editor to quickly and easily edit individual files. Others prefer a full-fledged IDE (Integrated Development Environment) which imposes a “whole project” view of the code and includes a built-in understanding of the code which enables it to detect errors, make suggestions and offer navigational shortcuts during programming. As a general rule, an IDE has a steeper learning curve than a basic editor and consumes more resources; however, it offers great advantages when undertaking more complex programming tasks. Basic text editors can offer more speed, and some also include plug-ins to enable certain IDE-like functionality.

At Villanova, Demian uses the free, open source Visual Studio Code IDE for most of his work (and has previously been successful using Netbeans), while Chris uses the Notepad++ text editor.

Version Control

It is strongly recommended that you use some sort of version control software to keep track of revisions while programming. This provides a valuable safety net for reverting bad changes, remembering why particular adjustments were made, etc. In the case of Git, the tool used by VuFind, it also offers powerful collaboration and sharing capabilities. Whether you plan to work locally or share with the local community, Git is a tool worth learning more about, as is the GitHub platform, which enhances Git's native sharing capabilities with web-based collaboration tools.

Dependency Management

VuFind loads its external dependencies using Composer. An understanding of Composer is important when running VuFind from a source checkout or when adding new third-party libraries.

Grunt

VuFind, as of version 3.1, ships with a Gruntfile to help manage front end tasks like compiling less/scss, compressing js, and checking coding standards. See the documentation to get started.

Meeting Project Standards

The VuFind project includes unit tests and automated code style checks designed to insure the consistency and integrity of the code. Whenever a Git commit is made or a GitHub pull request is opened, continuous integration processes run to validate the changes, and alerts will be thrown if anything breaks.

Tests

The unit tests page talks about how to run tests locally.

Style

For style compliance, VuFind uses PHP_CodeSniffer and PHP-CS-fixer, each of which is capable of detecting (and sometimes automatically fixing) different issues. In recent versions of VuFind, these tools will be installed automatically by Composer.

To test style compliance with PHP_CodeSniffer while in your VuFind directory, you can test a single file with:

vendor/bin/phpcs --standard=PEAR [file]

Or, through Phing, you can check the whole project:

vendor/bin/phing phpcs-console

To automatically fix certain PHP_CodeSniffer issues, you can run:

vendor/bin/phing phpcbf

To automatically fix additional issues with php-cs-fixer, from the base of your VuFind directory, run:

vendor/bin/phing php-cs-fixer

If you are unwilling or unable to run these tools locally, note that if you open a pull request against the main VuFind repo, they will be automatically run by continuous integration and you can view a list of issues in the resulting Travis report. Before you spend time manually fixing anything, you can post a comment on the pull request to ask for assistance with running the automatic processes.

development/recommended_tools.txt · Last modified: 2019/01/30 16:22 by demiankatz