Whitehowk is framework for building web apps starting from basic MVC app finishing large enterprise ready applications. Most of funstionality placed on separate units called modules. Core features provides controll over this modules and base funstions like routing, serice container and event dispatching.
Start point of CMF and kernel initializer
Kernel is core of CMF. It’s responcibilities are:
- Initialize modules Load modules information, resolve module dependencies and merge DI contexts.
- Boot modules Here modules are configurate DI container and other module related services.
- Initialize DI container Compile DI container.
- Initialize Request
- Handle requst
- Send response to browser.
Modules acts like plugins. Each module should implement ModuleProvider interface, and provide information about itself, required dependencies and configure if nesessery DI container, add compiller passes or register service definitions.
class ModuleProvider implements ModuleProviderInterface
{
/**
* Return module name in format {$vendor/$name}
* @return string
*/
public function getName()
{
return 'sample/acme';
}
/**
* Return array of module names
* @return array
*/
public function getDependency()
{
return array(
'oz/core',
'oz/twig'
);
}
/**
* Configure module services and provide shared
*
* @param ContainerBuilder $container
* @return void
*/
public function boot(ContainerBuilder $container)
{
$container->setDefinition('acme.some_service', new Definition('Acme\SomeService'));
$container->addCompilerPass(new AcmeServiceProvider());
}
}
Composition - Composite layout component, mix of Apache tiles and Magento layout. Based on Symfony components.