Difference between revisions of "Developers/Getting Started"

From PartKeepr Wiki
Jump to: navigation, search
 
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 [[re-generate your environment in order to rebuild the cache|gotcha}}
+
{{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 ==

Latest revision as of 12:21, 10 October 2015

This documentation doesn't apply to PartKeepr 0.1.9 or earlier
This documentation doesn't apply to git master commit 0ec91393ff81726c9c25683b6729519791ce5705 and earlier

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.

If you are using the dev environment, changes to the files should be immediately be visible.
For the prod environment, you need to re-generate your environment in order to rebuild the cache

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.