rest - Symfony2 multiple kernels for different purposes? -


i wanted ask question here, i'm building application using symfony2 , require rest api @ point.

i don't want wait point rebuild app later, decided work on appropriate structure / architecture now.

so, question is: practice have multiple kernels? reason performance considerations of loading bundles twig , several others not required api.

i appreciate if point me resources on that, no matter answer is!

@edit

to clarify i'd do:

  • have 1 kernel called webkernel prepared full html responses
  • have kernel called apikernel stripped bundles not needed api (twig, etc.)
  • have 2 front controllers [web.php , api.php] both utilizing respective kernel
  • have web server configured redirect api.php front controller on /api/* or using api subdomain

is wise? i'm aware need have separate environment-like (i guess having separate environments do) configuration files account missing bundles in apikernel.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -