Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{remotion-mixins-disclaimer}

h5. This tutorial...

...has its focus on how to use re-motion mixins. It is not supposed to be a general introduction on the whys, why nots and whens of mixins. Such a backgrounder is in the works but not here yet. 

For this reason, the examples used for illustration are not fully convincing, because they are actually too simplistic forare part of re-motion
mixins.
The code samples illustrate how to use _re-motion mixins,_ notlibrary whenis topart useof them.the re-motion mixins shine in large, complicated architectures, because re-motion mixins give you a flexible tool for slicing and dicing code across arbitrary axes. Distributing code along inheritance hierarchies is useful, but most non-trivial domains are too messy to be mapped across trees of ancestry. 

The potential for abuse is significant, because re-motion mixins can provide convenient alternatives for various design patterns and well-thought-out architectures. Some people will like that more than others; some of them will be liked more than others by their maintenance programmers. For the time being, such issues are beyond the scope of this tutorial, but any report from the field or thought is welcome.  

What you see in this tutorial is LESS you get, by the way. Not all features of re-motion mixins are covered by this tutorial yet. If you run into problems or think "I wish, re-motion mixins could do...", don't hesitate to ask if your particular desire has not been implemented already. Send email to [mailto:cm@re-motion.org].

h5. re-motion mixins are part of re-motion

The _re-motion mixins_ library is part of the larger re-motion web framework. No separate assembly exists for it, because re-motion mixins depends on 
various utilities that comprise re-motion's core and reside in the web framework. There is currently no single assembly that contains only mixin functionality that can be used independently. If you want to use mixins in your project, you have to add {{Remotion.dll}} assembly and its interface assembly {{Remotion.Interfaces.dll}}. to re-motionyour mixinsVisual canStudio beproject.
used
without the rest of h5. Getting re-motion,
butYou atcan thiseither timebuild youre-motion haveby toyourself preventor theyou compiler from erroneously removingcan download the all-important reference tobinaries via the {{Remotion.dll}} assembly. (See "Use force" below.)

h5. Third-party libraries

re-motion require three extra DLLs
- {{Castle.Core.dll}} -- courtesy to [httpcommunity page (https://www.castleprojectre-motion.org/]
- {{Castle.DynamicProxy.dll}} -- courtesy to [http://www.castleproject.org/]
- {{log4Net.dll}} -- courtesy to [http://logging.apache.org/log4net/]

h1. Sample code
{panel}
The sample code of the tutorial is located at 

   [builds/).

If you want to build re-motion, you can get the source code from the following subversion repository: https://svn.re-motion.org/svn/Remotion-Contrib/Samples/Mixin/WikiSamples/]

TheIf twoyou assembliesdo - {{Remotion.dll}} and {{Remotion.Interfaces.dll}} - is located in the {{lib}} sub-directory. 
{panel}

h5. Versions

The re-motion mixins tutorial assumes re-motion version 1.13.6., the same as the [PhoneBook tutorial]. All sample code should not want to work with subsequenta versions just as well. At the time of this writing, the most recent version of re-motion is _1.13.35._

h5. Use force

In the code samples in the tutorial, we use the (more or less arbitrary) line
{code}
FrameworkVersion.RetrieveFromType (typeof (IMixinTarget));
{code}

This line has no function except for giving the compiler a reason to keep the reference to {{Remotion.dll}} for loading. 

If you don't do this, you will get the following exception: [re-motion mixins TypeInitializationException]

h5. API reference available, but...

The re-motion framework, and this includes re-motion mixins, comes with a good API reference. The bad news is that currently there is no web version of it. You have to resort to a single .chm file generated with NDoc (part of NAnt). For this reason, no links to API documentation can be provided. You find the re-motion online help (for 1.13.6) [here|http://re-motion.org/community/LinkClick.aspx?fileticket=Z1ruZwb6DgQ%3d&tabid=69].

h5. "re-motion mixins" -- plural problems

In [rubicon] parlance, the library is named "re-motion mixins", what suggests a plural. However, "re-motion mixins" is commonly used as a brief form of "re-motion mixins library", what requires the singular. In this tutorial, we stick to rubicon's convention and inflect to "re-motion mixins"'s singular, i.e. "re-motion mixins IS", not "re-motion mixins ARE". Other examples for such a convention exist, the most famous is "The United States of America". 

From [wikipedia|http://en.wikipedia.org/wiki/United_states_of_america#Etymology]:

{panel}
The phrase "the United States" was originally treated as plural—e.g., "the United States are"—including in the Thirteenth Amendment to the United States Constitution, ratified in 1865. It became common to treat it as singular—e.g., "the United States is" -- after the end of the Civil War. The singular form is now standard; the plural form is retained in the idiom "these United States".
{panel}

At rubicon, no civil war was required to establish the singular inflection for a plural wordtrunk build, you might want to get a version that was used to write all hands on labs or tutorials. This would be: https://svn.re-motion.org/svn/Remotion/tags/1.13.87

Please read „How to build.txt" (found in the base directory of the repository) before your build re-motion.

h5. Hint: Where to place your binaries
There are several ways to add binaries in folder hierarchies in a project. We recommend them to put them in a subfolder under the solution file anlongside the projects for the solution.

Back to the table of content: [re-motion mixins#The re-motion mixins tutorial]