parent
096bc54e01
commit
589db06671
@ -0,0 +1,43 @@
|
||||
\begin{figure}[H]
|
||||
\begin{subfigure}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=hbs, numbers=none, backgroundcolor=\color{bgColor}]
|
||||
<div>
|
||||
\end{lstlisting}
|
||||
\caption{Composant \entity{Mustache} \og \texttt{component\_start} \fg}
|
||||
\end{subfigure}
|
||||
\hfill
|
||||
\begin{subfigure}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=hbs, numbers=none, backgroundcolor=\color{bgColor}]
|
||||
<div>{{@partial-block}}</div>
|
||||
\end{lstlisting}
|
||||
\caption{Composant \entity{Handlebars} \og \texttt{component} \fg}
|
||||
\end{subfigure}
|
||||
|
||||
\begin{subfigure}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=hbs, numbers=none, backgroundcolor=\color{bgColor}]
|
||||
</div>
|
||||
\end{lstlisting}
|
||||
\caption{Composant \entity{Mustache} \og \texttt{component\_end} \fg}
|
||||
\end{subfigure}
|
||||
|
||||
\begin{subfigure}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=hbs, numbers=none, backgroundcolor=\color{bgColor}]
|
||||
{{>component_start}}
|
||||
<p>Hello, world!</p>
|
||||
{{>component_end}}
|
||||
\end{lstlisting}
|
||||
\caption{Email avec \entity{Mustache}}
|
||||
\end{subfigure}
|
||||
\hfill
|
||||
\begin{subfigure}[t]{0.45\textwidth}
|
||||
\begin{lstlisting}[language=hbs, numbers=none, backgroundcolor=\color{bgColor}]
|
||||
{{#>component}}
|
||||
<p>Hello, world!</p>
|
||||
{{/component}}
|
||||
\end{lstlisting}
|
||||
\caption{Email avec \entity{Handlebars}}
|
||||
\end{subfigure}
|
||||
|
||||
\caption{Exemple de définition et d'utilisation d'un composant avec \entity{Handlebars} et \entity{Mustache}}
|
||||
\label{hbs1}
|
||||
\end{figure}
|
@ -0,0 +1,17 @@
|
||||
\begin{figure}[H]
|
||||
\includegraphics[width=0.9\textwidth]{hbs2}
|
||||
\caption{Version HTML d'un email d'exemple}
|
||||
\label{hbs2a}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\begin{lstlisting}[language=hbs, numbers=none, backgroundcolor=\color{bgColor}]
|
||||
Hello, user!
|
||||
|
||||
This is an automated email sent to you,
|
||||
just to tell you that your favorite animal is:
|
||||
[ The Giraffe ]( https://wikipedia.com/wiki/Giraffe )
|
||||
\end{lstlisting}
|
||||
\caption{Version texte d'un email d'exemple}
|
||||
\label{hbs2b}
|
||||
\end{figure}
|
@ -0,0 +1,84 @@
|
||||
digraph nestjs1 {
|
||||
rankdir=LR;
|
||||
|
||||
subgraph cluster_generator {
|
||||
{
|
||||
rank=same
|
||||
PrintGenerator
|
||||
TemplateGenerator
|
||||
}
|
||||
PrintGenerator -> TemplateGenerator
|
||||
|
||||
label="handlebars-generator"
|
||||
style="filled"
|
||||
color="#e0e0f0"
|
||||
}
|
||||
|
||||
subgraph cluster_mailing_nest {
|
||||
subgraph cluster_generatormodule {
|
||||
GeneratorService -> PrintGenerator
|
||||
label="GeneratorModule"
|
||||
style="dotted"
|
||||
}
|
||||
|
||||
subgraph cluster_UploadModule {
|
||||
{
|
||||
rank=same
|
||||
UploadService
|
||||
AmazonUploadService [color=dimgrey,fontcolor=dimgrey]
|
||||
}
|
||||
UploadService -> GeneratorService
|
||||
UploadService -> AmazonUploadService [color=dimgrey]
|
||||
label="UploadModule"
|
||||
style="dotted"
|
||||
}
|
||||
|
||||
subgraph cluster_SenderModule {
|
||||
{
|
||||
rank=same
|
||||
SenderService
|
||||
AmazonSenderService [color=dimgrey,fontcolor=dimgrey]
|
||||
}
|
||||
SenderService -> AmazonSenderService
|
||||
label="SenderModule"
|
||||
style="dotted"
|
||||
}
|
||||
|
||||
label="mailing-nest"
|
||||
style="filled"
|
||||
color="#e0f0e0"
|
||||
}
|
||||
|
||||
subgraph cluster_mint {
|
||||
subgraph cluster_MintMailingModule {
|
||||
MintMailingService -> UploadService
|
||||
MintMailingService -> SenderService
|
||||
|
||||
label="MintMailingModule"
|
||||
style="dotted"
|
||||
}
|
||||
|
||||
subgraph cluster_OrderService {
|
||||
{
|
||||
rank=same
|
||||
OrderService
|
||||
OrderController [shape=rectangle]
|
||||
}
|
||||
OrderController -> OrderService
|
||||
OrderService -> MintMailingService
|
||||
|
||||
style="dotted"
|
||||
}
|
||||
|
||||
subgraph cluster_Rest {
|
||||
Rest [label="..."]
|
||||
Rest -> MintMailingService
|
||||
|
||||
style="dotted"
|
||||
}
|
||||
|
||||
label="mint-service"
|
||||
style="filled"
|
||||
color="#f0e0e0"
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
|
||||
\begin{figure}[H]
|
||||
\begin{lstlisting}[style=JavaScript]
|
||||
export abstract class IChildService {
|
||||
// ...
|
||||
}
|
||||
|
||||
@Injectable(IChildService)
|
||||
export class ChildService implements IChildService {
|
||||
// ...
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class ParentService {
|
||||
private childService: IChildService;
|
||||
|
||||
constructor(
|
||||
childService: IChildService
|
||||
) {
|
||||
this.childService = IChildService;
|
||||
}
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
@Module({
|
||||
providers: [
|
||||
ChildService,
|
||||
ParentService
|
||||
],
|
||||
exports: [
|
||||
ParentService
|
||||
]
|
||||
})
|
||||
export class ParentModule {}
|
||||
\end{lstlisting}
|
||||
|
||||
\centering
|
||||
\includegraphics{nestjs1}
|
||||
\caption{Exemple d'injection de dépendances avec NestJS}
|
||||
\label{nestjs1}
|
||||
\end{figure}
|
@ -0,0 +1,29 @@
|
||||
\begin{figure}[H]
|
||||
\begin{lstlisting}[style=JavaScript]
|
||||
@Injectable()
|
||||
export class MyService {
|
||||
constructor(
|
||||
parentService: ParentService
|
||||
) {
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
// Comme ParentModule exporte ParentService,
|
||||
// ce service est facilement rendu disponible ici pour MyService:
|
||||
ParentModule
|
||||
],
|
||||
providers: [
|
||||
MyService
|
||||
]
|
||||
})
|
||||
export class MyModule {}
|
||||
\end{lstlisting}
|
||||
|
||||
\centering
|
||||
\includegraphics{nestjs2}
|
||||
\caption{Exemple d'import de dépendances avec NestJS (suite de \ref{nestjs1})}
|
||||
\label{nestjs2}
|
||||
\end{figure}
|
After Width: | Height: | Size: 13 KiB |
Loading…
Reference in new issue