Developers/Getting Started
Contents
Source Code Structure
PartKeepr's directory structure mostly follows the Symfony Best Practices.
Frontend
Currently, all frontend code resides in src/PartKeepr/FrontendBundle/Resources/public/js.
{{note|For the prod environment, you need to [[re-generate your environment in order to rebuild the cache|gotcha}}
Backend
We use one bundle per major functionality in PartKeepr. This is in contrast to the Symfony2 best practices where all logic resides in one AppBundle bundle.
The reason for that is that the code base is so large, that the structure would become quickly confusing.
Environments
Please read the Symfony2 Environments documentation.
prod Environment
The prod (=production) environment which the user runs PartKeepr as. The JavaScript code is combined and minified, caches are in place and the system should have the best performance.
This is also the default environment which is called when the user enters the web/ directory.
dev Environment
The dev environment is used by developers. Caching is little and JS files aren't combined or minified to make debugging easier. Verbose logging will take place.
You can enter the dev environment by calling web/app_dev.php.
test Environment
The test environment is used for unit testing.
setup Environment
This is a stripped-down environment with little bundles for the setup procedure, just enough to use controllers and YAML parsing. This environment also uses an its own SetupAppKernel.
setup_test environment
The setup_test environment is used to test the config given by the user within the setup and executes all setup actions. This has been done in order to keep the existing configuration until the setup is complete.
Making Changes
When you make changes to the code, especially the configuration or the javascript files, you might need to re-generate your environment.