architecture.tex 2.3 KB

123456789101112131415161718192021222324252627282930313233
  1. \section{Software Architecture of a \salespoint{} Application}
  2. Software often need to be adaptive, flexible, and extendable.
  3. Using a suitable architecture pattern, such as the Model-View-Controller pattern, helps to meet these non-functional requirements.
  4. Figure \ref{sp5-arch} gives an overview of how a \salespoint{} application is modelled.
  5. \salespoint{}, as domain framework, takes the place of the model in the MVC pattern.
  6. The model can be extended by sub-classing \salespoint{} classes or by introducing entirely new classes.
  7. \salespoint{} model classes and sub-classes thereof are transparently stored in a database.
  8. If new classes are added to the model and their state is also required to be persistent, the developer also has to facilitate persisting those objects using the JPA-API.
  9. \begin{figure}[ht]
  10. \centering
  11. \includegraphics[width=0.6\textwidth]{images/sp5-arch.pdf}
  12. \label{sp5-arch}
  13. \caption[Overview of a \salespoint{} application.]{MVC-pattern of a \salespoint{} application divided into application specific code (red) and framework code (blue).}
  14. \end{figure}
  15. The controller and view are application-specific and have to be implemented by the user.
  16. Although \salespoint{} does not require a specific framework or API like Swing~\cite{swing} or SWT~\cite{swt}.
  17. However, because \salespoint{} is intended to be used in conjunction with the Spring MVC~\cite{spring} framework for SWP at TU Dresden, \salespoint{} contains supplementary code, easing the development of Spring applications.
  18. This supplementary code consists of Spring MVC \code{PropertyEditor}s, and custom, \salespoint{} specific JSP-tags.
  19. \\
  20. \begin{figure}[ht]
  21. \centering
  22. \includegraphics[width=0.45\textwidth]{images/sp5-layered.pdf}
  23. \label{sp5-layered}
  24. \caption{Layers of a \salespoint{} application.}
  25. \end{figure}
  26. A layered view of the software architecture of a \salespoint{} application is shown in Figure \ref{sp5-layered}.
  27. The bottom layer corresponds to a DBMS, chosen by the developer.
  28. As stated in Section \ref{sec:jpa}, JPA works with every DBMS for which a JDBC driver is available.
  29. The JPA provider, which is also chosen by the developer, interfaces with the JDBC driver and \salespoint{}.
  30. \salespoint{} in turn uses a class library, namely Joda Time~\cite{jodatime}, to deal with dates and times.