avelino/cookiecutter-bottle

Bottle() to each controller

Opened this issue · 0 comments

Hi Thiago,

I am learning Python and to start one app and I have used Boottle and like a base, I am using your template structure of cookiecutter-bottle. I noticed that each controller you create a new variable Bottle(), e.g.:

home.py > home_app = Bottle()
user.py > user_app = Bottle()

I noticed too that Bottle() in other files like routes.py and manage.py.
How I am only a student yet, this detail left me curious. Various instances of the Bottle() dont leave the application more heavy? Well, imagining that application going grow and controllers will grow too.

Don't to use a singleton Botte() dont is the good practice in this case? Why do you made this way?

Thank you