\documentclass{beamer}
\usetheme{Malmoe}

\begin{document}

\title[Moose Tutorial]{A bare simple Moose tutorial}
\author[N. Anquetil]{Nicolas Anquetil}
\institute[RMod / INRIA]{
  RMod team \\
  INRIA Lille Nord--Europe \\
  nicolas.Anquetil@INRIA.fr
}
\date[September 2012]{September 18, 2012}

%==================================================
\begin{frame}[plain]
  \titlepage
\end{frame}

%==================================================
\begin{frame}{Warnings}

\begin{itemize}
\item This very simple tutorial should help you understand some ideas behind Moose and what it can do
\item You are supposed to have some basic knowledge of Pharo (e.g. what is the ``World Menu'') to follow this
\item We will assume you have a working Moose image. This tutorial uses Moose 4.6, but it should work for many other versions
\item This tutorial is not a step by step recipe, it is expected that your explore a bit around the few simple tasks illustrated here
\end{itemize}

\end{frame}

%==================================================
\begin{frame}{The Moose Panel}
\begin{itemize}
\item First you should bring on the ``Moose Panel'', accessible from the World Menu

\begin{center}
\includegraphics[scale=0.2]{Pictures/mt-moosePanel.png} 
\end{center}

\item The Moose Panel allows to manipulate models (create, delete, import, export), navigate them and call other tools on them
\end{itemize}

\end{frame}

%==================================================
\begin{frame}{Creating a Smalltalk model}
\begin{itemize}
\item We will start by creating a model, which means analyzing some piece of code and represent its entities and their dependencies into a Moose model
\item We will create a model of some Smalltalk code, for this use the ``ST'' button at the top right corner of the Moose Panel

\begin{center}
\includegraphics[scale=0.2]{Pictures/mt-mooseStWizard.png} 
\end{center}

\end{itemize}

\end{frame}

%==================================================
\begin{frame}{Creating a Smalltalk model}
\begin{itemize}
\item The ``ST'' button opens a wizard where we can select some Pharo packages (in our example, Collections) and send them to the ``Selection'' area

\item When this is done, finish the wizard simply accepting the default options

\item Models can also be loaded from .mse files (``MSE'' button next to the ``ST'' one) or from ``Fuel'' files

\item You can generate .mse files of programs in other languages using external tools. For example, verveineJ generates a .mse file from a Java project
\end{itemize}

\end{frame}

%==================================================
\begin{frame}{Exploring a model}
\begin{itemize}
\item After finishing the wizard, you should be back to the Moose Panel, with a model in it (left most pane)

\item Click on the model name and on any element of the list to bring something like this view

\begin{center}
\includegraphics[scale=0.2]{Pictures/mt-panelNavig.png} 
\end{center}
\end{itemize}

\end{frame}

%==================================================
\begin{frame}{Exploring a model}
\begin{itemize}
\item You can already navigate the model for example:
  \begin{itemize}
  \item Select``All model classes'' in the second pane (next to the list of models)
  \item Select a class in the list that appears
  \item Select all methods of that class (if it has more than one)
  \item Select a method of that list
  \item Select all the methods it invokes
  \item Select one of these methods
  \item Select the class owning it
  \item \ldots
  \end{itemize} 
\end{itemize}

\end{frame}

%==================================================
\begin{frame}{Exploring a model}
\begin{itemize}
\item Moose models contains several kind of Entities\footnote{class \texttt{FAMIXSourcedEntity}}:
  \begin{itemize}
  \item Packages (or Namespaces in Java)
  \item Classes, Interface, Parameterized classes
  \item Methods, Functions
  \item Attributes, Variables, Method parameters
  \end{itemize} 
\item These entities are related by four possible Associations:
  \begin{itemize}
  \item Invocations (between two methods or functions)
  \item Reference of a Class in some code (typically a method)
  \item Access of an Attribute in some code
  \item Inheritance between two classes
  \end{itemize} 
\item There is also belongs to relationships as between a method and its class
\end{itemize}

\end{frame}

%==================================================
\begin{frame}{Exploring a model}
\begin{itemize}
\item You will notice that there are tabs in the Moose Panel's panes
\item You are encouraged to try up these tabs and see what they offer.
\item Some interesting ones at this stage are:
  \begin{itemize}
  \item Displays various metrics and properties of an entity
  \item Displays the source code of an entity
  \item Displays a graphical visualization using polymetric view (look for this in the Moose Book\footnote{\url{http://www.themoosebook.org/}} on chapter ``6.1 -- System Complexity'')
  \item Pharo interpret on the entity (\texttt{self} represents the entity (or group of entities), you can explore it with the Pharo inspector)
  \end{itemize} 
\end{itemize}

\end{frame}

%==================================================
\begin{frame}{A tool: Mondrian}
\begin{itemize}
\item Mondrian is a scripting tool to create visualizations on the models. For example the graphical tab in the Moose Panel for some entities (or group of entities) displays a Mondrian visualization of that entity (or group of)
\item You can call the Mondrian tool by right clicking on a model's name, or on an entry in the Moose Panel's lists.

\begin{center}
\includegraphics[scale=0.2]{Pictures/mt-callMondrian.png} 
\end{center}
\end{itemize}

\end{frame}

%==================================================
\begin{frame}{A tool: Mondrian}
\begin{itemize}
\item We will not teach here how to use Mondrian (see the Moose Book) for this
\item You can try out the very script we entered in the example and click on the black triangle to have the visualization appear. It will only work if you called Mondrian on the entry ``All model packages''
\begin{center}
\includegraphics[scale=0.2]{Pictures/mt-MondrianEx.png} 
\end{center}
\end{itemize}

\end{frame}

%==================================================
\begin{frame}{A tool: Mondrian}
\begin{itemize}
\item In the preceding view, nodes are packages and there are links when one package uses another (e.g. a method in a package needs a method in another one)

\item The parameters of the polymetric view are:
  \begin{itemize}
  \item Width of the package indicates how many classes it has
  \item Height indicates how many methods it contains
  \item Color indicates how many clients it has, darker means more clients
  \end{itemize}
\end{itemize}

\end{frame}

%==================================================
\begin{frame}{Closing up}
\begin{itemize}
\item You can explore other functionalities of the Moose Panel, for example by exporting and importing models
\item You can look at the Meta-Model behind Moose (Famix), using the ``Meta Browser'' available from the World Menu. For example look below Famix.Entity / Famix.SourcedEntity
\item A great power of Moose also comes from the possibility to manipulate and query the models programatically and to extends the exsiting tools
\end{itemize}

Have Fun !

\end{frame}

\end{document}