Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Remove IModelBindingMessageProvider interface #6069

Closed
SteveSandersonMS opened this issue Apr 4, 2017 · 8 comments
Closed

Remove IModelBindingMessageProvider interface #6069

SteveSandersonMS opened this issue Apr 4, 2017 · 8 comments

Comments

@SteveSandersonMS
Copy link
Member

See the discussion at #6055 (comment)

Basically, we don't really want to have interfaces for this sort of thing. But currently we do because:

  • When @dougbu tried to not have an interface for this before, he encountered some issue to do with overridable setters or something - not sure of the details
  • Removing the interface would mean moving the .resx file from the Mvc.Core project to the Abstractions project, and figuring out whether this has effects on build or localisation
@rynowak
Copy link
Member

rynowak commented Apr 4, 2017

Removing the interface would mean moving the .resx file from the Mvc.Core project to the Abstractions project, and figuring out whether this has effects on build or localisation

We still want this contract to exist in some form. That might be an abstract class, or a 'highly virtual' class. The initialization code can still live in Mvc.Core

@Eilon
Copy link
Member

Eilon commented Apr 11, 2017

@SteveSandersonMS - let's try the highly-virtual-class approach here.

And, please post an Announcement for this, because this breaking change will certainly affect some users.

@SteveSandersonMS
Copy link
Member Author

@Eilon OK. Who's best to ask about what consequences (if any) there are with moving a .resx file across projects? As in, is there some external list of .resx files or other localisation things that has to be updated too so that when we ship a release, somehow translations get done into other languages?

@dougbu
Copy link
Member

dougbu commented Apr 11, 2017

@SteveSandersonMS moving a .resx file is identical to deleting an internal one place and adding something similar elsewhere i.e. there's nothing to see here.

However, why do you need to move the .resx file or even some of the resource definitions? As @rynowak said, "The initialization code can still life [sic] in Mvc.Core."

@rynowak
Copy link
Member

rynowak commented Apr 11, 2017

"The initialization code can still life [sic] in Mvc.Core."

Where do you see that?

@SteveSandersonMS
Copy link
Member Author

moving a .resx file is identical to deleting an internal one place and adding something similar elsewhere i.e. there's nothing to see here.

OK, that's good. I still don't know by what magic process we end up having multilingual releases of the framework (i.e., how some third-party vendor (presumably) gets notified to do translations and how they know where to find the .resx files, etc.), but I'll trust that the magic is sufficiently good that everything still happens properly even if files are moved around.

The initialization code can still life [sic] in Mvc.Core.

@rynowak, you said it here.

OK, I'll try to leave it there if I can.

@Eilon
Copy link
Member

Eilon commented Apr 11, 2017

Nothing is actually translated right now, so if a RESX needs to move, it's conceptually just like moving any other file around.

As far as the overridable setters problem, I have no idea what that could be, so I'd say charge ahead and see what you run into.

@SteveSandersonMS
Copy link
Member Author

Posted announcement: aspnet/Announcements#240

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

No branches or pull requests

4 participants