SpoonX/aurelia-api

Inversion of Control

Closed this issue · 11 comments

Thanks for the link, an interesting read (bookmarked).

I agree with IoC, that's why I wanted to import DOM in your other PR. This is a very easy thing to do.

yeah, but listens to an event added to well document actually. either ways, it' PAL, and the idea of it is to be a wrapper already

@doktordirk Yes, but again, using DI won't be a problem because it will just return the thing without modifications. The only difference is that it allows you to extend or override DOM completely.

can make an issue there

It's just my way of saying, we can do the exact same thing, for the exact same reason with fetch. Unless that changed and I'm talking nonsense :p

would change all modules. that may not be wanted. but there is only one aurelia-composed event. but i guess one can find hypothetical scenarios with two different implementations of 'document'.

Would it, though? Because DI takes the instance and returns it if it doesn't have anything registered. The application wouldn't change. Which to me sounds like it's safe to change. I might not understand your reasoning though

as mentioned i have a hard time thinking today, so i might not even understand my reasoning myself. 😄 so, lets better continue another day.

aurelia.use.instance('endpointName', restInstance); could be of use
(to be called in Config.registerEndpoint() )

Closing this for now. If this is still relevant, feel free to reopen the issue.

Note: this is a copy-paste comment to clean up the issues. It's not personal, and I didn't review the issue before posting this. They're all outdated and I need a way to figure out what's still relevant.

Thank you for understanding :)