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

When should I use Handler Block Helper? #103

Open
ShannonChenCHN opened this issue Jan 31, 2018 · 0 comments
Open

When should I use Handler Block Helper? #103

ShannonChenCHN opened this issue Jan 31, 2018 · 0 comments

Comments

@ShannonChenCHN
Copy link

ShannonChenCHN commented Jan 31, 2018

Thanks for open sourcing such a great project!

After reading the README documentation, I just couldn't understand the Handler Block Helper part.

The README documentation says:

This is specifically useful for cases in which you want a separate object or class to be the handler for a deeplink route. An example might be a view controller that you want to instantiate and present in response to a deeplink being opened.
...
...

These two mechanisms (weak target and class target) provide a few other ways to organize deep link handlers without writing boilerplate code for each handler or otherwise having to solve that for each app that integrates JLRoutes.

In my opinion, JLRoutes is mainly intended to do 2 things:

  • Routing URLs
  • Decoupling View Controllers

In some cases, using JLRoutes is good for decoupling, but if we use handler block helper classes to define some custom handler classes, we need to import JLRoutes, and implement predefined protocol methods or inherit classes. would this go to the opposite way?

Feel free to point out if I was wrong.

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

No branches or pull requests

1 participant