-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
define application region as function #3570
Comments
I am ok with region accepting a function returning a region, but I think the pattern to follow would be more like how a view class can be a function on collection view. What is unique about this situation to my knowledge would be that this would be the first instance of anything that can be defined with a function. I also can't come up with a suitable use case for why this needs to be, but it seems straight-forward enough to implement. @marionettejs/marionette-core ? |
It does seem straightforward. However, I think I'm still confused as to our rationale for having this facility in Application at all, as it to me seems to be a point of confusion; certainly, it was confusion that stemmed the initial discussion. That is, Application has a feature-limited version of something that View has a much more full-featured version of, and I'm not sure why. The demo for it linked from the docs does not to me make a compelling case for why I'd even want it in the first place, and as such I've never used it, yet it exists, so there must be some excellent reason that I'm just not seeing. If it is indeed the absolute best way to handle some use case, then I think we should make it as useful as possible, but if not, then to me it seems that View does this better. |
As an example, even a complex application is, in general, well-served by having just a single Application instance. Our hypothetical app needs a root View, and let's say that root view is going to own Does having |
I don't want to hijack this issue too far, but I think the question comes down to what comes first. Some people prefer There is an argument that you can setup views all the way down where parent views setup their own children in At one point Marionette was considering adding "sub-apps" to the library but it was determined to be too opinionated for the library and Mn would focus on views. However adding a |
i think i can mixin and what if we are talking about ui control |
define Application region in runtime
as i can see, there is no chance to do it right now, because user can pass to
region
property region classif this improvement will be accepted: #3569 , then i can offer this kind of improvement for resolving this issue
Application
this will help define application as a function, and allow to initialize a region only if a region will be accessed, even after start of application
The text was updated successfully, but these errors were encountered: