klein icon indicating copy to clipboard operation
klein copied to clipboard

app vs router

Open wsanchez opened this issue 9 years ago • 1 comments

When we write this is documentation:

app = Klein()

This suggests that an instance of Klein is an "application", which is confusing because we sometimes also write something like:

class MyApplication(object):
    app = Klein()

Is an instance of MyApplication an "application" also? I think that we should come up with consistent and appropriate terminology, which will aid users as they learn how to use this framework.

wsanchez avatar Dec 10 '16 00:12 wsanchez

My suggestion would be:

class MyApplication(object):
    router = Klein()

That is: we should refer to a Klein instance as a "router", and to classes that contain a router (and routes) as "applications".

There seems to be some use of that terminology in open tickets.

Once we have some agreement on terminology, let's clean up the docs to be consistent in their usage thereof.

wsanchez avatar Dec 10 '16 00:12 wsanchez