7 bundles for highly effective software development€¦ · 7 bundles for highly effective software...
Transcript of 7 bundles for highly effective software development€¦ · 7 bundles for highly effective software...
7 bundles for highly effective software development
Maurits van der ScheeInnovation Engineer CDNLeaseWeb, Netherlands
/LeaseWeb● LswDefaultRoutingBundle - consistency● LswApiCallerBundle - debugging● LswMemcacheBundle - performance● LswGettextTranslationBundle - internationalization● LswSecureControllerBundle - security● LswVersionInformationBundle - testing● LswAutomaticUpdateBundle - versioning● LswRemoteTemplateBundle - migration
Corporate Social Responsibility
● LeaseWeb.com: “to stimulate hosting developments, LeaseWeb shares its knowledge with the hosting community through LeaseWeb Labs.”
● Other things we do:– Green technology
– Programs for non-profits
– Supporting charities
LswDefaultRoutingBundle
● ..provides – Default Templating
– Relative Routing
– Default Routing
● Improves consistency● Opinionated (vs. configurable)
LswDefaultRoutingBundle
● ..provides – Default Templating
– Relative Routing
– Default Routing
● Improves consistency● Opinionated (vs. configurable)
Relative Routing
● If your current route is 'fos_user.user.index' and you use a route 'view' (that does not exist). The relative routing feature will automatically search for 'fos_user.user.view'.
● If your current route is 'fos_user.user.index' and you use a route 'group.view' (that does not exist). The relative routing feature will automatically search for 'fos_user.group.view'.
LswApiCallerBundle
● ..adds cURL API call functionality with full Web Debug Toolbar integration.
● Improves debugging
● Supports– JSON, XML, HTML
– GET, POST, PUT, DELETE
LswMemcacheBundle
● Memcache Doctrine caching and session storage in the Web Debug Toolbar.
● Improves performance
● Supports– Memcached v2
– Anti-Dog-Pile
LswGettextTranslationBundle
● ..adds native (faster) gettext translation support and is easy to use.
● Improves internationalization
● Features– Generate “.pot” file per bundle/app
– Maintain “.po” files per language per bundle/app
– Combine into one file for optimal performance
Gettext Usage
● Easy functions in both Twig and PHP:● _(string)● __(string,parameters...)● _n(singular,plural,number)● __n(singular,plural,number,parameters...)
● Examples:● {{ _('Customer %s',customerNumber) }}● $this->showSuccess(_('The data has been saved.'));
LswSecureControllerBundle
● provides '@Secure' annotation to secure actions and controllers.
● Improves security
● JMSSecurityExtraBundle is Apache2 licensed● LswSecureControllerBundle is MIT licensed
LswVersionInformationBundle
● ..adds output of SVN and Git "status" commands to the Web Debug Toolbar.
● Improves testing
● Testers must know what they are testing
LswAutomaticUpdateBundle
● ..enables automatic updates of the application from the Web Debug Toolbar.
● Improves versioning
● Using and test the stable components
LswRemoteTemplateBundle
● ..allows you to load your (view) template from a remote site.
● Improves migration
● Redirects using “.htaccess”● Loads template using cURL● Stores template contents in (shared) session
.htaccessredirect
Symfony1 application Symfony2 application
Sessionstorage
Templateaction
RemotetemplatebundlecURL