Difference between revisions of "Developers/Getting Started"
(Created page with "{{note|This documentation doesn't apply to PartKeepr 0.1.9 or earlier}} {{note|This documentation doesn't apply to [https://github.com/partkeepr/PartKeepr/tree/master git mast...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 11: | Line 11: | ||
{{note|If you are using the [http://symfony.com/doc/current/cookbook/configuration/environments.html dev environment], changes to the files should be immediately be visible.|reminder}} | {{note|If you are using the [http://symfony.com/doc/current/cookbook/configuration/environments.html dev environment], changes to the files should be immediately be visible.|reminder}} | ||
− | {{note|For the [http://symfony.com/doc/current/cookbook/configuration/environments.html prod environment], you need to | + | {{note|For the [http://symfony.com/doc/current/cookbook/configuration/environments.html prod environment], you need to [[Developers/Re-generating_the_environment|re-generate your environment]] in order to rebuild the cache|gotcha}} |
== Backend == | == Backend == | ||
Line 18: | Line 18: | ||
The reason for that is that the code base is so large, that the structure would become quickly confusing. | The reason for that is that the code base is so large, that the structure would become quickly confusing. | ||
+ | |||
+ | == Environments == | ||
+ | |||
+ | Please read the [http://symfony.com/doc/current/cookbook/configuration/environments.html 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 [https://github.com/partkeepr/PartKeepr/blob/sf2migration/app/SetupAppKernel.php 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 [[Developers/Re-generating_the_environment|re-generate your environment]]. |
Latest revision as of 12:21, 10 October 2015
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.
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.