My favorites | Sign in
Project Logo
                
Search
for
Updated Apr 25, 2008 by marcello.sales
Labels: Phase-Requirements, Phase-Design
ApplicationArchitecture  
The application architecture documentation describes the layers, the functions, artifacts, etc.

D-Model-View-Controller (DMVC)

The architectural model of MyBikeRides is an instance of the MVC architecture, with an additional layer called Data. the D of our DMVC will provide fundations for the persistence of data using an Object-relational mapper (ORM) framework such as Hibernate, JDO, JPA. Therefore, it's concern is to separate the data later from the business logic in a transparent way.

The implementation of this architecture was first commited at revision r73.

Data Layer

The data model will depend on the technical decisions presented at the DataPersistence documentation. No matter which type of database will be chosen, the persistence framework must support both SQL and XML for its operations:

  • Data Marshal: Serialization of a class instance (object data) to the data to be persisted on the data model. This is the strategy used by the ORM framework that sits in between the D and M layers.
  • Data Unmarshal: Deserialization of an instance raw data from the database to one or a collecion of class instances.

Different the techniques are used to map objects to relational databases. However, our strategy will be taken on the following way:

  • Identify which entities/classes will be persisted, and which attributes should be transient or persistent;
  • The mapping technique can very from
    • One-Class to One-Table: The mapping is one-to-one between a class and a database table:
      • This technique allows the complete usage of the table columns as the needed data holders for attributes;
      • Each tuple on the database is then an instance of a given class;
      • Guarantee that the database table design is normalized by complying to the first 3 nornal-forms (http://www.datamodel.org/NormalizationRules.html);
      • Class Hierarchy is usually treated as another mapping from one-to-one between the super class and its child classes:
      • All instances are referenced by primary/foreign keys normalized mappings;
      • One of the most complete references for this subject is the Mapping Objects website.
    • Family of Classes to One-Table: The mapping is many-to-one between a hierarchy of classes and a single database table:
      • The instances may, or may not be from all the types.
      • This technique may lead to "incomplete" tuples on a give table where an attribute does not always have a value, thus its "data placeholder" or database column will be NULL;

Architectural decisions in how the data must be persisted will influence in the decision of which Database System we should go with. Storying the entire XML provided by the Garmin user seems to be reasonable only if the Database System is smart enough to provide capabilities of retrieval in both XML or SQL, since we could either use tools and interfaces for both "worlds".

TODO: NORMALIZED VIEW OF THE DATA AND ITS OBJECT-RELATIONAL MAPPING MODEL.

Model Layer

The model will be composed by the entities extracted from the Requirements documentation, and can be defined as possible:

  • User/Biker: is the natural result of having the user of the system being defined as the specialized type (a biker, in this case);

Web User

It is an abstract user with a username, password and email information.

Biker

As the name explains, it contains the name, address, zip code, etc about the biker.

Chris defined a BaseUser... That should be refectored in here... Or we could use his naming convention.

CLASS DIAGRAM AND STRUCTURE STILL NEED TO BE DESIGNED.

In the case of the Routes/Rides classes/entities, the GaminDataBinding explains how the 1-to-1 transformation of the XML schema classes to JAVA classes. In this way, these classes are going to be resused during the Data Binding and DataTransformation phases.

TrainingCenterDatabaseType

The main class from a Gamin's GPS artifact is the TrainingCenterDatabaseType class and it is AGGREGATED by Folders, ActivityList, WorkoutList, CourseList and AbstractSource. (The any extension element in XML schema is used to allow XML Schame class extensibility).

The only sets of classes of our interests are Folders and Activities.

ActivityListType

It is the only one type used in this aggregation level, which includes the complete list of the tracks, laps, etc.

ActivityType

Each activity type on the ActivityListType has its own list of attributes regarding the complete activity. It is aggregated by a list of ActivityLaps.

ActivityLapType

It contains information about each lap in a given activity. The complete information about the avarages of heart beat rate or speeds are part of this class as its attributes.

TrackType

Each activity lap is aggregated by a list of TrackTypes.

TrackPointType

The track type contains a list of Track Points which gives information in a specific time such as position, distance so far, etc.

View

Since the view is the Web, the application will make use of JSP's.

http://code.google.com/p/csc667-termproject/source/browse/trunk/mybikerides/webcontent/pages

MORE TO BE DEFINED

Controller

The controller will be used Servlets that will make calls to the Facades/internal controllers from the model application. It is implemented in Struts 1.3 and it is basically a set of Servlets that better maps the HTML forms into JAVA. More to be discused at

http://code.google.com/p/csc667-termproject/source/browse/trunk/mybikerides/webcontent/WEB-INF/struts-config.xml?r=73

The Action Servlets are created at the client.web controllers:

http://code.google.com/p/csc667-termproject/source/browse/trunk/mybikerides/webcontent/WEB-INF/src/logic/edu/sfsu/cs/mybikerides/client/web/controller

See the "View" section above for the references to the JSP pages.

More references about struts at the following list:


Sign in to add a comment
Hosted by Google Code