Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two stage component registration. #10

Open
thruflo opened this issue Nov 11, 2011 · 1 comment
Open

Two stage component registration. #10

thruflo opened this issue Nov 11, 2011 · 1 comment

Comments

@thruflo
Copy link
Owner

thruflo commented Nov 11, 2011

If we register ISettings first, all other components can require and read settings during initialisation. This removes the need for a venusian scan / being aware of module import order.

@thruflo
Copy link
Owner Author

thruflo commented Nov 11, 2011

It could also be that if we registered ISettings and IPathRouter first, with the mapping to 'dotted.names' we could also support exposing urls via decorator / function call.

i.e.: register a path router with an optional mapping of regexp patterns to request handler dotted names, then provide a method to insert new mapping items. Use the regexp pattern as a key:

if the pattern is the same as an existing mapping item
    if the dotted name / some other identifier is the same
        pass # it's already in there
    elif the new item has an `override=True` property and the old one doesn't
        replace item at the same position in the mapping list
    else
        throw error # either a clash or a double override
else
    insert at the *top* of the list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant