% output=pdftex interface=en
%!iTeXMac(project): context


\setupcolors[state=start]

\setuppapersize[A4]
\setuplayout[location={middle,singlesided},
%leftmargin=1.5cm,rightmargin=4cm,leftedge=.5cm,rightedge=.5cm,
width=fit,height=26.5cm,topspace=1cm,backspace=3cm]
\setuppagenumbering[location=bottom,alternative=singlesided]

\useencoding[ffr] \mainlanguage[fr]
\enableregime[il1]

\usemodule[chart]

\setuptolerance [tolerant]

\def\dobeginoflist{}
\def\doendoflist{}

\definecolor [bleuclair] [r=0.8, g=0.8, b=1]

\setupFLOWcharts
	[
	nx=4,
	ny=4,
	maxwidth=1.4\textwidth
	]

\setupFLOWshapes
	[background=color,backgroundcolor=bleuclair,
	framecolor=darkblue]


\setupFLOWlines
	[rulethickness=1pt,color=darkblue]


\startFLOWchart [webstatique]
	\startFLOWcell
		\name {client}
		\location {1,1}
		\shape {24}
		\text {Visiteur}
		\label [b] {demande \type{index.html}}
		\connection [brpl] {serveur}
		\comment[b]{1}
	\stopFLOWcell
	\startFLOWcell
		\name {createur}
		\location {3,1}
		\shape {45}
		\text {Créateur du site}
		\label [b] {dépose \type{index.html}}
		\setupFLOWlines[dash=yes]
		\connection [bbtr] {serveur}
		\setupFLOWlines[dash=no]
	\stopFLOWcell
	\startFLOWcell
		\name {serveur}
		\location {2,3}
		\shape {34}
		\text {Serveur web}
		\label [t] {renvoie \type{index.html}}
		\connection [tltr] {client}
		\comment[t]{2}
	\stopFLOWcell
	\startFLOWcell
		\name{legende}
		\location{1,4}
		\shape{0}
		\connection [rrll] {legende2}
		\comment[t]{\rm\it Traitement séquentiel}
	\stopFLOWcell
	\startFLOWcell
		\name{legende2}
		\location{2,4}
		\shape{0}
		\setupFLOWlines[dash=yes]
		\connection [rrll] {legende3}
		\setupFLOWlines[dash=no]
		\comment[t]{\rm\it Traitement différé}
	\stopFLOWcell
	\startFLOWcell
		\name{legende3}
		\location{3,4}
		\shape{0}
	\stopFLOWcell
\stopFLOWchart

\startFLOWchart [webdynamique]
	\startFLOWcell
		\name {client}
		\location {1,1}
		\shape {24}
		\text {Visiteur}
		\label [b] {demande \type{index.html}}
		\connection [brbl] {serveur}
		\comment[b]{1}
	\stopFLOWcell
	\startFLOWcell
		\name {createur}
		\location {3,1}
		\shape {45}
		\text {Créateur du site}
		\label [r] {alimente}
		\setupFLOWlines[dash=yes]
		\connection [rrtr] {bdd}
		\setupFLOWlines[dash=no]
	\stopFLOWcell
	\startFLOWcell
		\location {2,2}
		\shape {34}
		\name {serveur}
		\text {Serveur web}
		\connection[brll]{bdd}
		\comment[b]{2}
		\connection[tltr]{client}
		\comment[t]{4}
		\label [t] {construit et renvoie \type{index.html}}
		\label [b] {interroge}
	\stopFLOWcell
	\startFLOWcell
		\name {bdd}
		\location {3,3}
		\shape {59}
		\text {Base de données}
		\label [t] {renvoie les données}
		\connection [tttr] {serveur}
		\comment[t]{3}
	\stopFLOWcell
	\startFLOWcell
		\name{legende}
		\location{1,4}
		\shape{0}
		\connection [rrll] {legende2}
		\comment[t]{\rm\it Traitement séquentiel}
	\stopFLOWcell
	\startFLOWcell
		\name{legende2}
		\location{2,4}
		\shape{0}
		\setupFLOWlines[dash=yes]
		\connection [rrll] {legende3}
		\setupFLOWlines[dash=no]
		\comment[t]{\rm\it Traitement différé}
	\stopFLOWcell
	\startFLOWcell
		\name{legende3}
		\location{3,4}
		\shape{0}
	\stopFLOWcell
\stopFLOWchart


\startFLOWchart [spip]
	\startFLOWcell
		\name {client}
		\location {1,1}
		\shape {24}
		\text {Visiteur}
		\label [b] {demande \type{index.html}}
		\connection [bbnt] {serveur}
		\comment[lb]{1}
	\stopFLOWcell
	\startFLOWcell
		\name {serveur}
		\location {1,3}
		\shape {34}
		\text {Serveur web}
		\label [b] {interroge}
		\connection [brnl] {spip}
		\comment[lt]{2}
	\stopFLOWcell
	\startFLOWcell
		\name {createur}
		\location {3,1}
		\shape {45}
		\text {Créateurs du site}
		\setupFLOWlines[dash=yes]
		\connection [bbtt] {spip}
		\comment [t] {alimente via un navigateur web}
		\setupFLOWlines[dash=no]
	\stopFLOWcell
	\startFLOWcell
		\name {bdd}
		\location {3,3}
		\shape {59}
		\text {Base de données}
	\stopFLOWcell
	\startFLOWcell
		\name {vide}
		\location {2,3}
		\shape {none}
		\text {Vérifie la fraîcheur des données et les met à jour si nécessaire}
	\stopFLOWcell
	\startFLOWcell
		\name {spip}
		\location {2,2}
		\shape {35}
		\text {SPIP}
		\label [l] {renvoie la page}
		\connection [ntrr] {client}
		\comment[t]{3}
		\setupFLOWlines[dash=yes,color=bleuclair]
		\connection [bbll] {bdd}
		\label [r] {assure la cohérence du site}
		\setupFLOWlines[dash=yes,color=darkblue]
		\connection [pbpr] {spip}
		\setupFLOWlines[dash=no,color=darkblue]
	\stopFLOWcell
	\startFLOWcell
		\name{legende}
		\location{1,4}
		\shape{0}
		\connection [rrll] {legende2}
		\comment[t]{\rm\it Traitement séquentiel}
	\stopFLOWcell
	\startFLOWcell
		\name{legende2}
		\location{2,4}
		\shape{0}
		\setupFLOWlines[dash=yes]
		\connection [rrll] {legende3}
		\setupFLOWlines[dash=no]
		\comment[t]{\rm\it Traitement différé}
	\stopFLOWcell
	\startFLOWcell
		\name{legende3}
		\location{3,4}
		\shape{0}
	\stopFLOWcell
\stopFLOWchart

\starttext

	\FLOWchart[webstatique]
	\FLOWchart[webdynamique]
	\FLOWchart[spip]

\stoptext