Skip to content

Commit

Permalink
Move content for pages without sections to the introduction
Browse files Browse the repository at this point in the history
References #11
  • Loading branch information
andreashuber-lawo committed Oct 27, 2015
1 parent c5e200f commit d5a6034
Show file tree
Hide file tree
Showing 23 changed files with 458 additions and 527 deletions.
43 changes: 20 additions & 23 deletions Lawo.EmberPlusDoc/Content/FutureDirections.aml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,26 @@
<topic id="b8313245-587c-4147-91e6-0accaccb2a77" revisionNumber="1">
<developerConceptualDocument
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction/>
<section>
<content>
<list class="bullet">
<listItem>
<para>
<externalLink>
<linkText>Short to Medium Term</linkText>
<linkUri>https://github.com/Lawo/ember-plus-sharp/issues?q=is%3Aopen+is%3Aissue+milestone%3A*</linkUri>
</externalLink>
</para>
</listItem>
<listItem>
<para>
<externalLink>
<linkText>Long Term</linkText>
<linkUri>https://github.com/Lawo/ember-plus-sharp/issues?q=is%3Aopen+is%3Aissue+no%3Amilestone</linkUri>
</externalLink>
</para>
</listItem>
</list>
</content>
</section>
<introduction>
<list class="bullet">
<listItem>
<para>
<externalLink>
<linkText>Short to Medium Term</linkText>
<linkUri>https://github.com/Lawo/ember-plus-sharp/issues?q=is%3Aopen+is%3Aissue+milestone%3A*</linkUri>
</externalLink>
</para>
</listItem>
<listItem>
<para>
<externalLink>
<linkText>Long Term</linkText>
<linkUri>https://github.com/Lawo/ember-plus-sharp/issues?q=is%3Aopen+is%3Aissue+no%3Amilestone</linkUri>
</externalLink>
</para>
</listItem>
</list>
</introduction>
<relatedTopics/>
</developerConceptualDocument>
</topic>
Original file line number Diff line number Diff line change
Expand Up @@ -5,126 +5,123 @@
<topic id="fa86e52c-0fb0-4acb-9b55-fb689eb5f17c" revisionNumber="1">
<developerConceptualDocument
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction/>
<section>
<content>
<introduction>
<para>
The types in this namespace help to implement the <application>MVVM</application> pattern. For a nice
introduction to <application>MVVM</application> please refer to
<externalLink>
<linkText>Ivo Manolov's Blog</linkText>
<linkUri>http://blogs.msdn.com/b/ivo_manolov/archive/2012/03/17/10284665.aspx</linkUri>
</externalLink>.
</para>
<alert class="note">
<para>
The types in this namespace help to implement the <application>MVVM</application> pattern. For a nice
introduction to <application>MVVM</application> please refer to
<externalLink>
<linkText>Ivo Manolov's Blog</linkText>
<linkUri>http://blogs.msdn.com/b/ivo_manolov/archive/2012/03/17/10284665.aspx</linkUri>
</externalLink>.
Please ignore the section discussing the
<codeEntityReference>T:System.Windows.Input.ICommand</codeEntityReference> interface and its implementation.
We will see below how <codeEntityReference>T:System.Windows.Input.ICommand</codeEntityReference> is no
longer necessary with <application>XAML</application> frameworks that offer triggers or behaviors.
</para>
<alert class="note">
</alert>
<para>To summarize, the important facts of <application>MVVM</application> are the following:</para>
<list class="bullet">
<listItem>
<para>
Please ignore the section discussing the
<codeEntityReference>T:System.Windows.Input.ICommand</codeEntityReference> interface and its implementation.
We will see below how <codeEntityReference>T:System.Windows.Input.ICommand</codeEntityReference> is no
longer necessary with <application>XAML</application> frameworks that offer triggers or behaviors.
At compile time, there is a unidirectional dependency between the different entities: The
<application>View</application> references
the <application>ViewModel</application>, which in turn references the <application>Model</application>.
However, the <application>ViewModel</application> does not know anything about the
<application>View</application> and the <application>Model</application> does not know anything about the
<application>View</application> or the <application>ViewModel</application>.
</para>
</alert>
<para>To summarize, the important facts of <application>MVVM</application> are the following:</para>
<list class="bullet">
<listItem>
<para>
At compile time, there is a unidirectional dependency between the different entities: The
<application>View</application> references
the <application>ViewModel</application>, which in turn references the <application>Model</application>.
However, the <application>ViewModel</application> does not know anything about the
<application>View</application> and the <application>Model</application> does not know anything about the
<application>View</application> or the <application>ViewModel</application>.
</para>
</listItem>
<listItem>
<para>
The main responsibility of the <application>ViewModel</application> is to provide the data in the format
needed by the <application>View</application>, offer methods for the actions that can be performed on the
<application>View</application> and provide events that the <application>View</application> needs to
subscribe to.
</para>
</listItem>
<listItem>
<para>
The <application>ViewModel</application> is fully GUI-technology-agnostic and can be exercised by
automated tests.
</para>
</listItem>
<listItem>
<para>
The <application>View</application> defines how the data of the <application>ViewModel</application> is
presented to the user. It is often implemented solely in <application>XAML</application>. In the cases
where <application>C#</application> code is necessary, the code only concerns itself with the presentation
of the data but not the business logic.
</para>
</listItem>
<listItem>
<para>
The <application>Model</application> is implemented without consideration for how the GUI will look like.
It simply provides all necessary data, offers methods to modify the data and enforces the business logic.
The data is provided in the format that is most convenient and efficient for the
<application>Model</application>.
</para>
</listItem>
</list>
<para>
A <application>ViewModel</application> is particularly easy to consume from a
<application>XAML</application>-based GUI (<application>WPF</application>,
<application>Silverlight</application>, <application>Windows Store App</application>, etc.):
</para>
<list class="bullet">
<listItem>
<para>
Databinding: Normal properties as well as
<codeEntityReference>T:System.Collections.ObjectModel.ObservableCollection`1</codeEntityReference>
properties can be bound to controls directly in <application>XAML</application> (no code behind is
necessary). Changes in the GUI are automatically pushed to the bound properties and changes to the
properties automatically lead to updates of the GUI.
</para>
</listItem>
<listItem>
<para>
Control Behavior:
<codeEntityReference qualifyHint="true">P:Windows.UI.Xaml.Controls.Control.IsEnabled</codeEntityReference>
and similar GUI behavior properties can be bound to properties of the <application>ViewModel</application>
directly in <application>XAML</application>.
</para>
</listItem>
<listItem>
<para>
Triggers and Behaviors: Events on GUI controls can be bound to <application>ViewModel</application>
methods directly in <application>XAML</application>, such that a method is called whenever the associated
event is raised (see
<codeEntityReference>T:Microsoft.Xaml.Interactions.Core.CallMethodAction</codeEntityReference>).
</para>
</listItem>
</list>
<alert class="note">
</listItem>
<listItem>
<para>
The main responsibility of the <application>ViewModel</application> is to provide the data in the format
needed by the <application>View</application>, offer methods for the actions that can be performed on the
<application>View</application> and provide events that the <application>View</application> needs to
subscribe to.
</para>
</listItem>
<listItem>
<para>
The <application>ViewModel</application> is fully GUI-technology-agnostic and can be exercised by
automated tests.
</para>
</listItem>
<listItem>
<para>
The <application>View</application> defines how the data of the <application>ViewModel</application> is
presented to the user. It is often implemented solely in <application>XAML</application>. In the cases
where <application>C#</application> code is necessary, the code only concerns itself with the presentation
of the data but not the business logic.
</para>
</listItem>
<listItem>
<para>
For simple applications, it is often unclear at first where to best draw the line between the
<application>Model</application> and the <application>ViewModel</application>. If one follows the
<application>MVVM</application> pattern to the letter and implements all the business logic in the
<application>Model</application>, the <application>ViewModel</application> often degenerates into a class
that does little else than forward function calls between the <application>Model</application> and the
<application>View</application>. In such cases I think it is perfectly acceptable to implement much or even
all business logic in the <application>ViewModel</application>. Note that the most important aspect of
<application>MVVM</application> is the separation between <application>View</application> and
<application>ViewModel</application>. Whether and where to separate the <application>Model</application>
from the <application>ViewModel</application> is of lower importance and should be decided based on the use
cases. For example, the <application>Model</application> in the
<link xlink:href="4afc50e6-0e92-4bf2-b7e2-4e8bb55dfc2d#GlowAnalyzerProxy">Glow Analyzer Proxy</link>
application is the <codeInline>Settings</codeInline> class, which is responsible for the storage of the
application settings. All other business logic is implemented in the
<codeInline>MainWindowViewModel</codeInline>.
The <application>Model</application> is implemented without consideration for how the GUI will look like.
It simply provides all necessary data, offers methods to modify the data and enforces the business logic.
The data is provided in the format that is most convenient and efficient for the
<application>Model</application>.
</para>
</alert>
<para>This topic contains the following subtopics:</para>
<list class="bullet">
<listItem><para><link xlink:href="1bb898de-b98c-4b38-958a-1368c2ffebd0"/></para></listItem>
<listItem><para><link xlink:href="d640f3f7-b516-4428-8ceb-d7a9a703babd"/></para></listItem>
</list>
</content>
</section>
</listItem>
</list>
<para>
A <application>ViewModel</application> is particularly easy to consume from a
<application>XAML</application>-based GUI (<application>WPF</application>,
<application>Silverlight</application>, <application>Windows Store App</application>, etc.):
</para>
<list class="bullet">
<listItem>
<para>
Databinding: Normal properties as well as
<codeEntityReference>T:System.Collections.ObjectModel.ObservableCollection`1</codeEntityReference>
properties can be bound to controls directly in <application>XAML</application> (no code behind is
necessary). Changes in the GUI are automatically pushed to the bound properties and changes to the
properties automatically lead to updates of the GUI.
</para>
</listItem>
<listItem>
<para>
Control Behavior:
<codeEntityReference qualifyHint="true">P:Windows.UI.Xaml.Controls.Control.IsEnabled</codeEntityReference>
and similar GUI behavior properties can be bound to properties of the <application>ViewModel</application>
directly in <application>XAML</application>.
</para>
</listItem>
<listItem>
<para>
Triggers and Behaviors: Events on GUI controls can be bound to <application>ViewModel</application>
methods directly in <application>XAML</application>, such that a method is called whenever the associated
event is raised (see
<codeEntityReference>T:Microsoft.Xaml.Interactions.Core.CallMethodAction</codeEntityReference>).
</para>
</listItem>
</list>
<alert class="note">
<para>
For simple applications, it is often unclear at first where to best draw the line between the
<application>Model</application> and the <application>ViewModel</application>. If one follows the
<application>MVVM</application> pattern to the letter and implements all the business logic in the
<application>Model</application>, the <application>ViewModel</application> often degenerates into a class
that does little else than forward function calls between the <application>Model</application> and the
<application>View</application>. In such cases I think it is perfectly acceptable to implement much or even
all business logic in the <application>ViewModel</application>. Note that the most important aspect of
<application>MVVM</application> is the separation between <application>View</application> and
<application>ViewModel</application>. Whether and where to separate the <application>Model</application>
from the <application>ViewModel</application> is of lower importance and should be decided based on the use
cases. For example, the <application>Model</application> in the
<link xlink:href="4afc50e6-0e92-4bf2-b7e2-4e8bb55dfc2d#GlowAnalyzerProxy">Glow Analyzer Proxy</link>
application is the <codeInline>Settings</codeInline> class, which is responsible for the storage of the
application settings. All other business logic is implemented in the
<codeInline>MainWindowViewModel</codeInline>.
</para>
</alert>
<para>This topic contains the following subtopics:</para>
<list class="bullet">
<listItem><para><link xlink:href="1bb898de-b98c-4b38-958a-1368c2ffebd0"/></para></listItem>
<listItem><para><link xlink:href="d640f3f7-b516-4428-8ceb-d7a9a703babd"/></para></listItem>
</list>
</introduction>
<relatedTopics/>
</developerConceptualDocument>
</topic>
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@
<topic id="d640f3f7-b516-4428-8ceb-d7a9a703babd" revisionNumber="1">
<developerConceptualDocument
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction/>
<section>
<content>
<para>
The following subtopics discuss the application of <application>MVVM</application> with the help of actual
code in the <link xlink:href="4afc50e6-0e92-4bf2-b7e2-4e8bb55dfc2d#GlowAnalyzerProxy">Glow Analyzer
Proxy</link> application:
</para>
<list class="bullet">
<listItem><para><link xlink:href="bbf1edda-4568-4afa-b5c6-27bb3e76aa5e"/></para></listItem>
<listItem><para><link xlink:href="a8575c94-9500-4717-b35b-cd2f5eff1a4e"/></para></listItem>
<listItem><para><link xlink:href="3cb24140-51e8-496c-966c-e556f0418e85"/></para></listItem>
</list>
</content>
</section>
<introduction>
<para>
The following subtopics discuss the application of <application>MVVM</application> with the help of actual
code in the <link xlink:href="4afc50e6-0e92-4bf2-b7e2-4e8bb55dfc2d#GlowAnalyzerProxy">Glow Analyzer
Proxy</link> application:
</para>
<list class="bullet">
<listItem><para><link xlink:href="bbf1edda-4568-4afa-b5c6-27bb3e76aa5e"/></para></listItem>
<listItem><para><link xlink:href="a8575c94-9500-4717-b35b-cd2f5eff1a4e"/></para></listItem>
<listItem><para><link xlink:href="3cb24140-51e8-496c-966c-e556f0418e85"/></para></listItem>
</list>
</introduction>
<relatedTopics/>
</developerConceptualDocument>
</topic>
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
<topic id="ac9ad3f4-2105-45ee-8dbf-c60bcfe85227" revisionNumber="1">
<developerConceptualDocument
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction/>
<section>
<content>
<para>
</para>
</content>
</section>
<introduction>
<para>
</para>
</introduction>
<relatedTopics/>
</developerConceptualDocument>
</topic>
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@
<topic id="3cb24140-51e8-496c-966c-e556f0418e85" revisionNumber="1">
<developerConceptualDocument
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction/>
<section>
<content>
<para>This topic contains the following subtopics:</para>
<list class="bullet">
<listItem><para><link xlink:href="f7165a59-bc56-4571-8dcb-79b4161ceb01"/></para></listItem>
<listItem><para><link xlink:href="ac9ad3f4-2105-45ee-8dbf-c60bcfe85227"/></para></listItem>
</list>
</content>
</section>
<introduction>
<para>This topic contains the following subtopics:</para>
<list class="bullet">
<listItem><para><link xlink:href="f7165a59-bc56-4571-8dcb-79b4161ceb01"/></para></listItem>
<listItem><para><link xlink:href="ac9ad3f4-2105-45ee-8dbf-c60bcfe85227"/></para></listItem>
</list>
</introduction>
<relatedTopics/>
</developerConceptualDocument>
</topic>
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
<topic id="48ea11d2-ae3a-4fb7-9baf-1612d57d3f97" revisionNumber="1">
<developerConceptualDocument
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction/>
<section>
<content>
<para>
</para>
</content>
</section>
<introduction>
<para>
</para>
</introduction>
<relatedTopics/>
</developerConceptualDocument>
</topic>
Loading

0 comments on commit d5a6034

Please sign in to comment.