Pergunta

Using devexpress 12.2.x
Lets say we create a cross platform application. SomeApp
The following projects are created:
SomeApp.Module
SomeApp.Module.Web
SomeApp.Module.Win
SomeApp.Web
SomeApp.Win

Now each of the .Module projects contains a xafml file.

So far I've only made changes in my SomeApp.Module project, but I've been wondering what would be the effect/purpose of making the changes in for e.g. SomeApp.Module.Win project. Basically whats the differences between those xafml files and when would I make changes in the one and not the other?

Foi útil?

Solução

Refer to the Application Solution Structure

A application solution contains the following:

  • Windows Forms Application Project - Code, specific to the Windows Forms version of your application.

  • Web Application Project - Code, specific to a browser-based interface.

  • Module Project - Use this assembly to implement UI-independent application elements. For example, in it you can define a business model. Subsequently, both the Windows Forms and ASP.NET Web applications will have a similar business model.

  • Windows Forms Module Project - Use this assembly to implement application elements for the Windows Forms application version. This assembly is referenced in the Windows Forms application project only.

  • ASP.NET Web Module Project - Use this assembly to implement application elements for the ASP.NET Web application version. This assembly is referenced in the Web application project only.

Further Reading

Outras dicas

XAF overlays the changes in the module difference files. The model applied to your application (that is, the model resulting from overlaying all the Model.DesignedDiffs.xafml - files in your modules) is the file Model.xafml in your main project(s) (SomeApp.Web, SomeApp.Win)

The question which adjustment should be made in which xafml-file is hard to answer. We have tried several solutions already, none is really perfect. A general rule of thumb could be: Adjustments to an element are applied to the xafml file of the module where the element is defined.

Sometimes, especially if you have a layered application, it could be that you will have to apply the same adjustment in two different modules (e.g.: Label of a data item on a product level could differ from that on a customer level) .

In Devexpress XAF applications have three main parts. Module, Module.Win.Control, Module.Win. Win.Control part include Module part and Win Part include Win.Control part. So Model.DesignedDiffs.xafml files have same behavior.

If you change on module xafml, it affects other xafml files but you change win xafml file, it affects only itself. This structure is same like dll reference.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top