cuba-platform / cuba

CUBA Platform is a high level framework for enterprise applications development
https://www.cuba-platform.com
Apache License 2.0
1.34k stars 219 forks source link

Extract part of UrlRouting functionality to global module #3174

Open alexbudarov opened 3 years ago

alexbudarov commented 3 years ago

Environment

Description of the bug or enhancement

UrlRouting provides some useful functionality to generate routes to screens. Often developers need it to generate links for emails, SMS etc. Such logic is usually located in the core module.

However UrlRouting implementation depends on web infrastructure and is available only in web module.

Suggestion Extract some part of UrlRouting logic that doesn't depend on web screens infrastructure, create a global bean with methods to generate routes. We understand that screens registrations are not available in global module, so developers will need to pass "main screen id", "screen id" parameters to the url generator as string literals. But it's better than necessity to copy logic from WebUrlRouting to project's code.