Silverlight MVVM Business Application : Where to place the resource files?
The default Silverlight Business Application (VS2010) creates some resources files (ValidationErrorResources.resx and RegistrationDataResources.resx) in the Web project and creates links to these in the Silverlight project.
But in the client Silverlight project there are also some resource files (ApplicationStrings.resx and ErrorResources.resx)
I would like to implement the following design:
Client
- Presentation.Silverlight (Only xaml)
- Presentation.ViewModel (ViewModels
- Presentation.Domain (Entities and links to validation resource files)
Server
- Server.Infra (entity framwork)
- Server.Domain开发者_运维问答 (POCO entities + repositories + validation resource files)
- Server.Web (Web Applicatin project)
My question : where to put the resource files with the translations from labels for the presentation layer ?
Is this defined in : Presentation.Silverlight, Presentation.ViewModel or Presentation.Domain ???
Itb depends on the label onviously! For instance the display name of a field ....need to be the same all over the application thus, it needs to be defined on the server side...i.e. in the data annotations of the business classes.
On the contrary a Title of an action menu might belong to the presentation layer.
精彩评论