English for restaurant client side and listings

This commit is contained in:
Claudio Maggioni 2018-05-25 09:54:38 +02:00
parent 8b4a7010f9
commit b5f6988f23
1 changed files with 89 additions and 14 deletions

103
main.tex
View File

@ -291,7 +291,7 @@
\textit{InteGRaREST} comunica con \textit{InteGRa} attraverso
chiamate \textsc{SOAP}\cite{wiki:soap};
\item \textit{InteGRa Mobile}, l'applicazione per dispositivi mobili, comunica
\item \textit{InteGRa Mobile}, l'applicazione per dispositivi mobili, comunica
con \textit{InteGRaREST} grazie a una versione client di \textit{restaurant},
in grado di gestire (in modo limitato) operazioni eseguite in mancanza di
connessione alla rete.
@ -413,7 +413,13 @@
respective Javadoc comments (in english, as in the original sources).
\end{en}
\begin{lstlisting}[caption=Interfaccia della classe \textit{JsonProducer}, label={lst:jsonprd-java}, language=Java]
\begin{it}
\def\jsonprdjava-title{Interfaccia della classe \textit{JsonProducer}}
\end{it}
\begin{en}
\def\jsonprdjava-title{Class interface of \textit{JsonProducer}}
\end{en}
\begin{lstlisting}[caption=\jsonprdjava-title, label={lst:jsonprd-java}, language=Java]
/**
* Something that generates JSON responses
*/
@ -475,8 +481,22 @@ public abstract class JsonProducer {
\texttt{GSON} di classe \textit{Gson} è il serializzatore a JSON offerto dalla
libreria omonima.
\end{it}
\begin{en}
For a better reading of the listing \ref{lst:jsonprd-java}, it is necessary to
consider that the \textit{Error} class is a Java enumeration containing error
messages thrown by the library. In addition, the \textit{ErrorDetails} class
enables external code to create custom error messages. Finally, the static
object \texttt{GSON} of class \textit{Gson} is the JSON serializer offered by
the library of the same name.
\end{en}
\begin{lstlisting}[caption=Interfaccia della classe \textit{ReadableRESTController}, label={lst:rdbrest-java}, language=Java]
\begin{it}
\def\rdbrestjava-title{Interfaccia della classe \textit{ReadableRESTController}}
\end{it}
\begin{en}
\def\rdbrestjava-title{Class interface of \textit{ReadableRESTController}}
\end{en}
\begin{lstlisting}[caption=\rdbrestjava-title, label={lst:rdbrest-java}, language=Java]
/**
* A REST Controller only readable
* @param <T> The readable entity class
@ -568,8 +588,22 @@ public abstract class ReadableRESTController<T extends Readable,
classe figlia di \textit{PrimaryKey<T>} è contenuta come attributo nella
classe ``entità'' \textit{T}, che a sua volta estende \textit{Readable}.
\end{it}
\begin{en}
Even the listing \ref{lst:rdbrest-java} needs a brief explaination. The
abstract class \textit{Readable}, used as constraint for the class first generic
parameter, is the father of each ``entity'' class, while
\textit{PrimaryKey<T>} is the father of the class that contains the primary
key of \textit{T}. An instance the \textit{PrimaryKey<T>} child is embedded as
an attribute in the ``entity'' class \textit{T}, which itself extends \textit{Readable}.
\end{en}
\begin{lstlisting}[caption=Interfaccia della classe \textit{CRUDRESTController}, label={crudrest-java}, language=Java]
\begin{it}
\def\crudrestjava-title{Interfaccia della classe \textit{CRUDRESTController}}
\end{it}
\begin{en}
\def\crudrestjava-title{Class interface of \textit{CRUDRESTController}}
\end{en}
\begin{lstlisting}[caption=\crudrestjava-title, label={crudrest-java}, language=Java]
/**
* A REST Controller readable and writable
* @param <T> The readable and writable entity class
@ -636,13 +670,25 @@ public abstract class CRUDRESTController<T extends CRUDable, U extends
Si precisa che la classe \textit{CRUDable} è un estensione della classe
\textit{Readable} che contiene metodi per l'inizializzazione dell'oggetto
sulla base di dati in input, contenuti in \textit{MultivaluedMap<String,
String>}. Di conseguenza, le classi ``entità'' che estendono CRUDable
String>}. Di conseguenza, le classi ``entità'' che estendono \textit{CRUDable}
possono essere usate per operazioni di scrittura, come quelle implementate
da \textit{CRUDRESTController}.
\end{it}
\begin{en}
The \textit{CRUDable} class extends \textit{Readable} and offers
some methods useful for object initialization based on input data given
as \textit{MultivaluedMap<String,String>}. Therefore, the ``entity''
classes that extend \textit{CRUDable} can be used for read-write operations,
e.g. the ones implemented in \textit{CRUDRESTController}.
\end{en}
\begin{lstlisting}[caption=Interfaccia della classe \textit{CRUDUtils}, label={lst:crudutils-java}, language=Java]
\begin{it}
\def\crudutilsjava-title{Interfaccia della classe \textit{CRUDUtils}}
\end{it}
\begin{en}
\def\crudutilsjava-title{Class interface of \textit{CRUDUtils}}
\end{en}
\begin{lstlisting}[caption=\crudutilsjava-title, label={lst:crudutils-java}, language=Java]
/**
* Database access class. Access statically
*/
@ -770,6 +816,11 @@ public abstract class CRUDUtils {
input, per la registrazione della \textit{timestamp} di creazione o modifica
di un record, e altro ancora.
\end{it}
\begin{en}
Beside what shown, \textit{restaurant} includes many utility methods able to
manage \texttt{.properties} files, to validate input data, to register
creation and update \textit{timestamps}, and much more.
\end{en}
\begin{it}
\subsubsection{\textit{restaurant} -- lato client}
@ -778,10 +829,27 @@ public abstract class CRUDUtils {
che aggiunge tipizzazione statica, i classici costrutti della programmazione
ad oggetti, nonchè il supporto alle generiche. Segue il listato dell'interfaccia della
classe \textit{RESTService}, la quale contiene metodi statici per comunicare
con il server asincronamente tramite istanze di classi-entità, cioè classi
con il server asincronamente tramite istanze di classi ``entità'', cioè classi
figlie della classe astratta \textit{Table}.
\end{it}
\begin{lstlisting}[caption=Interfaccia della classe \textit{RESTService}, label={lst:restservice-ts}, language=Java]
\begin{en}
\subsubsection{\textit{restaurant} -- client side}
The client portion of the \textit{restaurant} library is implemented with the
\textit{TypeScript} progamming language, an extension of \textit{Javascript}
offering static typing, common OOP constructs and generics support. The
following listings describes the \textit{RESTService} class interface, which
contains some static methods useful to exchange data asyncronously with the
server in the form of instances of ``entity'' classes, inheriters of the
abstract class \textit{Table}.
\end{en}
\begin{it}
\def\restservicets-title{Interfaccia della classe \textit{RESTService}}
\end{it}
\begin{en}
\def\restservicets-title{Class interface of \textit{RESTService}}
\end{en}
\begin{lstlisting}[caption=\restservicets-title, label={lst:restservice-ts}, language=Java]
export class RESTService {
...
@ -957,14 +1025,21 @@ export class RESTService {
\end{figure}
\begin{it}
Nella lettura del diagramma di Gantt in figura \ref{fig:ganttitgmob} \`e necessario tenere a mente che il completamento dell'intera applicazione non \`e certo per
la fine di maggio. Ci\`o che dovr\`a essere necessariamente completato \`e la parte pi\`u importante del progetto:
\textit{restaurant}, il motore di sincronizzazione online/offline e libreria generica che permette di implementare
velocemente nuove sezioni dell'applicazione.
Il diagramma di Gantt in figura \ref{fig:ganttitgmob} non è stato rispettato:
il progetto non è stato completato entro la fine di maggio. Tuttavia, ci\`o che
è stato e doveva essere necessariamente completato \`e la parte pi\`u importante del progetto:
\textit{restaurant}, con il motore di sincronizzazione online/offline e
l'implementazione delle procedure generiche che permette di implementare velocemente nuove sezioni dell'applicazione.
\end{it}
\begin{en}
\blindtext
The Gantt diagram in figure \ref{fig:ganttitgmob} was not followed: the
project was not completed within the end of May. However, the most important
piece of software that did have to be working by the deadline was finished:
\textit{restaurant}, with the online/offline syncronization engine and the
interface and implementation of the procedures needed for generating in an easy
fashion new sections of the app.
\end{en}
\begin{it}
\subsection{Fasi del progetto}