Final Presentation

Download Report

Transcript Final Presentation

Supervisor: Victor Kulikov
Oded Duek
Aviv Grinblat
Final presentation Spring 2010
Motivation
 Business owners often want to advertise their
business to people that are located near their businesses.
 It would be nice if there was an easy way to check the
efficiency of the advertisements.
 In order to improve their services, business owners
might want to do surveys.
Goals
 Gain experience in programming a complex
and varied application.
 Learn to program in JAVA
 Make GUI, work with SQL based database
 Use different kind of API’s
 Learn to work with Web Service
 Use Design Patterns to solve common problems
Technologies
 JAVA
 Java DB (Derby)
 Soap Web Services
 Netbeans
 API (JXMapKit, JFreeCharts and more)
N-tiers
GUI Layer:
Displays and receive information related to
BLL layer.
GUI
Business Logic Layer:
Controls an application’s functionality by performing
detailed processing.
Data Access Layer:
Manages the communication with Database layer.
BLL
Business logic layer
DAL
Data access layer
Database Layer:
Keeps tables with data neutral and independent from
application.
Database
Derby DB
Application Description
Server side:
Comunication:
Client side:
 Small part of BLL
 DAL
 Database
Soap messages using
JAX-WS
 GUI
 Most of BLL
 Getting maps from
OpenStreetMap
 Geocoding from Yahoo
Database
On Delete Cascade - specifies whether you want rows to be deleted
in a child table when corresponding rows are deleted in the parent table
Dal
Interface Connection:
A connection (session) with a specific database. SQL statements
are executed and results are returned within the context of a connection.
CreateStatement:
Creates a Statement object for sending SQL statements to the database.
MAX Function:
Returns the largest value of the selected column
JOIN Operation:
Combines records from two or more tables
BLL
Client Side Class Diagram:
BLL
Server Side Class Diagram:
BLL
Comparable:
This interface imposes a total ordering on the objects of each class that
implements it. This ordering is being performed using compareTo method.
Containers:
 TreeSet
 List
 Set
Security:
Each bit or character from the password plaintext is encrypted by a XOR
operation with a bit or character from a secret key resulting in a cipher text.
str  key  cipher
BLL
Communication with client objects:
Problem:
 How the clients get the advertisements and feedbacks?
 How to get the positions and feedback answers from clients?
Solution:
API based on Observer
Design Pattern.
BLL
Add Event use case:
BLL
Web Services:
Used to integrate computer applications that are written in different
languages and run on different platforms. Web services are language and platform
independent because vendors have agreed on common web service standards.
Web Services models fall into two categories:
 REST based
 SOAP/WSDL-based
JAX-WS: The Java API for XML Web Services is the current model for
SOAP-based web services in Metro (web services stack).
GUI
Map API:
JXMapKit - An open source Swing component created by the developers
at SwingLabs.
JXMapKit is preconfigured with 2 default providers:
 OpenStreetMap
 NASA’s Blue Marble satellite images
Customizing the Map:
 Re-Centering
 Adding Waypoints to a set
 Using a custom Waypoint Renderer
 Drawing static text
 Adding polygon overlay using formula:
X+latitudeDist∙cos(w∙t) + Y+longitudeDist∙sin(w∙t)
 Adding legend image
GUI
Charts API:
JFreeChart- a free chart library for the Java
platform. It is designed for use in applications,
applets, servlets and JSP
Creating charts with JFreeChart is a three step process:
 create a dataset containing the data to be
displayed in the chart.
 create a JFreeChart object that will be
responsible for drawing the chart.
 draw the chart to some output target.
GridBagLayout-flexible layout manager that aligns components vertically
and horizontally, without requiring that the components be of the same size.
GUI
BalloonTip API - Allows adding to swing component
different types of balloons that shows information
We wrote the text in HTML
JOptionPane - makes it easy to pop up a standard dialog
box that prompts users for a value or informs them of something
JCalendar - JCalendar is a Java date chooser bean for
graphically picking a date
JClock - A simple clock consists of SpinnerNumberModel
components arranged with FlowLayout
Design Patterns
 Singleton
One instance of a class or one value accessible globally
in an application. (Encrypt, ListenerList )
 State
An object's behavior change is represented
by its member classes, which share the same
super class.
 Observer
One object changes state, all of its dependents
are updated automatically.
SUMMARY
Gain experience in programming a complex
and varied application
GUI
BLL
Business logic layer
DAL
Data access layer
Database
Derby DB
SUMMARY
Make GUI, Use different kind of API’s
SUMMARY
Work with SQL based database
Learn to work with Web Service
SUMMARY
Use Design Patterns to solve common problems
singleton
All in JAVA