Stocks Mashup Projec..

guitarchanceΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 5 χρόνια και 4 μήνες)

273 εμφανίσεις

1

|
P a g e


AJAX
-

World Wide Stocks Display MashUp

Report


INTERNET PROGRAMMING

CI 123465


Team Members & Collaborators:

WIL
L
Y

NGUYEN QUANG MINH

(Matric:

G0802482F

)

YULSTAR LUKIMIN

(Matric:
G0801713J

)

CHRIS LOK JIANMING

(Matric: G0801688L

)


Master in
Information Systems

DIVISION OF

SCHOOL OF WEE KIM WEE & COMPUTER ENGINEERING

NANYANG TECHNOLOGICAL UNIVERSITY



Date of Report :
6
TH

April 2009

2

|
P a g e


Table of Contents

1. Introduction

................................
................................
................................
................................
..............

3

1.1 Purpose of the system

................................
................................
................................
........................

3

1.2 Need for the System

................................
................................
................................
...........................

3

2. Features of the System

................................
................................
................................
.............................

4

2.1 User Functions UML Modeling
................................
................................
................................
............

5

2.2 Advantage of the System

................................
................................
................................
....................

5

2.3 Scope of the system

................................
................................
................................
............................

6

2.4 Future development

................................
................................
................................
...........................

6

3. How the system wo
rks

................................
................................
................................
..............................

7

3.1 Implementation

................................
................................
................................
................................
..

9

4. Difficulty/ Challenges Faced.

................................
................................
................................
...................

10

4.1 Debug and Software Testing


................................
................................
................................
..........

10

5 Instruction for Compilation, installation and execution

................................
................................
..........

11

5.1 Instruction for Administrator

................................
................................
................................
............

11

5.2 Instruction for User

................................
................................
................................
...........................

11

6. Conclusion

................................
................................
................................
................................
...............

12

6.1
Roles of Team Members

................................
................................
................................
...................

12

END OF REPORT

................................
................................
................................
................................
..........

12





3

|
P a g e


1.

Introduction

The current
stocks display system u
sed in booms berg are designed for general public
information broadcast.
T
he information given does not
implicitly shows the differen
t
stock exchange centers
.
The broadcast is only based on text and numbers often be

overwhelming if too much information is shown
.
The World
-
Wide Stock Monitoring
System that we are introducing here is going complement this

form of display system
.


http://mobitop.cais.ntu.edu.sg/willy/stock/login.html


1.1 Purpose of the system

The
main
objective of
World
-
Wide Stocks Monitoring System is to provide users
with an
easy tracking and
monitoring
system
of

international
stocks
on a graphical interface.

1.2 Need for the System


Currently the stocks interface is dull and does not have any form of aesthetics, just
numbers and Symbols. It could not be displayed on
too large a screen or else the numbers
will overwhelm people reading it.

We hope to
complement the

text intensive display

system
.

This software categorizes

stock information

bas
e

on
their
location and displaying
them
graphically

on a
global

map
.




4

|
P a g e


2
.

Features of the System








(1) Stocks Select

(2)Markers Display

(5)Add RSS

(3)Google
Map

1. User Selection


周T 獹s瑥洠a汬潷猠畳u牳r瑯ta摤⽲d浯癥many 獴潣欠f牯r 瑨t
摩獰day⁳y獴敭s

㈮2p瑯捫猠䵯湩瑯物湧


周T py獴敭s浯湩瑯牳t瑨e opp 晥e摳da湤n
牥晲e獨es

楴s
摡瑡⁰t物潤楣a汬y

㌮3䝯潧le 䵡瀠䑩獰aay 楮ie牦ace


周e py獴e洠e湡扬敳b獴潣歳s 楮景f浡瑩潮o
ca瑥g潲楺e搠潮d
g汯扡l

䵡p

㐮4佮l
-
灡来
-
摩獰day


T桩猠䅊䅘 a灰汩ca瑩潮o楳 晵汬y 摯湥 潮o1
-
p
age⸠周畳T
瑨敲e⁷潵汤⁢ 漠 e牶rr⁤ 灥湤nnce⁡晴f爠瑨r⁩湩t楡氠汯慤i

㔮⁁摭楮R獴牡瑯爠tcce獳s


呯⁵灤T瑥t眠剓p⁦ ed猠瑯⁴桥⁳y獴敭s


(4) One Page Operations

5

|
P a g e


2.1
User Functions

UML Modeling

Use Case Diagram













2.2

Advantage of the System

1.
The system will enable stocks to be displayed on

very large screens in commercial
areas.

2. Ease of Use. The processing of the RSS
-
feeds and updating are all done automatically
in the background. The User would only need to input the stock he wanted to monitor.

2. The system allows software administrators to change the stocks to be presented
in the
system.

3. The system is based on live feeds. Thus the data is as new as the feeds given.

4. This system can also be used by individuals, helping the users to consolidate important
stocks and putting everything into one place.




Database
Administration

Stock Selection

Add Feed

Stock Display

Administrator

User

Remove Feed

Add Stock

Remove Stock

Show Centers

6

|
P a g e



2.3

Scope of the s
ystem

The System will cater to the Actors.


a)

Administrator

b)

User



2.4

Future development

Following features are out of scope for this development and recommended to be
consider in future phase.

1.

Displaying more stocks in a single column

2.

Providing
non
-
delayed
sources

3.

Parsing more detailed stock information

4.

Providing
Warning systems

to alert users of trend in stock
.


5.

Providing better interface to display more country for stock.




7

|
P a g e


3
.

How the system

works

The software is a mashup of Google
MAP

and Stocks RSS Feeds.

It has a
n

in
-
built xml
-
storage database.


INPUT : Live RSS Feeds (from Various Stock Exchange around the world.)

OUTPUT :
Stock Mashup display from various RSS Feed and display it to World Map
by using the
Google
MAP

API



(With
Reference to the Collaboration Diagram on the next page)


Firstly, the user is to select the various stocks from all the different exchanges. The
system will then match the stock to its representing RSS feeds

in its XML database
.
The
system will send reque
st from the RSS feeds. The returned data

is then to a RSS parser
which will extract the needed information. The extracted information is then separated
into their various locations. The Google API is then used to locate the Exchange centers
and display the

extracted information. The RSS feeds are continuously monitored. If
there is a change in the feeds, the new information is again extracted and updated onto
the various Exchange centers.



8

|
P a g e



















AJAX

AJAX

AJAX

Simplified Collaboration Diagram for
Core Module after Login

XML Data Formatting

RSS Feeds

RSS Feeds


RSS Feeds


PHP

FORM

XML Database

Containing Database of
RSS Feeds.

1: Request(XML)

2: Return (RSS URI)

7: Format(Stock)

3: Request Feeds (RSS URI)

8: Marker (Display)

6: MAP API(All info)

Map


Markers1

Markers2, 3

RSS Parser

4: RSS feeds

5: Parsed data

1.

User fills form with the needed stocks and presses the Show Button.

2.

The XML database returns the RSS
URIs back to Explorer.php.

3.

The Explorer calls for RSS Feeds Retrieval.

4.

RSS Feeds from various stock centers are sent to the RSS Parser

5.

The Parser returns Parsed data.

6.

Google Map API is activated to Draw the required Markers.

7.

The marker send the Parsed data

for Formatting

8.

The Formatted Data is passed back to be displayed in the Markers.

9

|
P a g e


3.1

Implementation


The system is written entirely using Javascipt and Php.

Php code is

made using

the CodeLobster PHP Edition IDE
, notepad++ and Adobe
Dreamweaver
. The
Javascipt is written on Eclipse IDE
/Netbeans IDE
. The Cod
ing are

hosted

on
the
mobitop server, an

Apache Server using the XMAPP (croX
-
plateform
Apache server

2.0
, Mysql, Php

5.2.3.
, Perl) Server Package.

The XML database

interface

is written using
the
Prototype toolkit

by using AJAX request
.


Deployment Diagram


Client


Server


AJAX

Architectural


















Application Server

Apache 2, Php 5.2.3

Resources

Client

Google Server


GOOGLE Map
Provider


VARIOUS

RSS FEEDS


XML DATABASE


LOGIN

MashUp


Google
Map

Interface



RSS PASER


DATABASE

ACCESS

AJAX

10

|
P a g e


4
.

Difficulty
/ Challenges Faced.

1) Google map API
need
ed

a
key, and key is locked to domain.

This proved much
difficulty when testing the system.

2) There was insufficient

time

for development.
There were m
ultiple project deadlines

and particularly heavy

w
ork
-
study commitments from all the members.

3) This project is particularly difficult
because the RSS feeds to live stocks are not readily
available.
Most of the feeds are only available when the market is open. Thus little work
can be done after 1am Singapore Time.

And most stock RSS are not free, (fyi a fee of
S$500 is needed for real tim
e stock yearly.)

4) The updated status of the stock information up is really depend on the RSS Feed
provider, this mean if the provider did not provide the latest stock information, the system
will also display the similar information. In other hand, if th
e provider provide the latest
data, hence our system our will display the latest information.

5
)
G
oog
le API

The Google API does not allow multiple marker to be opened at the
same time. A
third party API is used
bypass the limitation.

6
) Integration


The
r
e

were much problems with the integration of the entire project.
Much effort was used to ensure the components are asynchronous to each other.

7
) XML Database


A XML Database was created using
XML DOM element and display
use the AJAX request from
Prototype Toolkit to read and write database.



4.1
Debug and Software Testing



In the initial testing, the core modules were tested/debugged using white
-
box methods.
When the system was integrated, the mashup was tested using black
-
box testing methods.
All functions were tested.



11

|
P a g e


5

Instruction for Compilation, installation and execution

This mashup requires no prior compilation or installation. User would simply need to
access the mashup address.
However there are some software requirements. User would
need an updated Internet Explorer/Firefox for handling of the Javascript and PHP
operations.

5
.
1

Instruction for Administrator

1)
Administrator have to visit
http://mobitop.cais.ntu.edu.
sg/willy/stock/login.html

and login
into the system.

2)
Administrator have the option of add
ing

new RSS feed of

stocks in the database.

This
interface is provided via “Add RSS Function”

3) The rest of the functions are be referred to the User Instruction.

4) Sample Administrator Account: Name: Admin, Password: 123456, Type : Admin


5.
2

Instruction for
User

1)
User have to visit
http://mobitop.cais.ntu.edu.sg/willy/stock/login.html

and lo
gin into the
system.

2)
User would then need to select the stocks he wants via “checklist”.

3)
Press t
he ‘submit’ button. And the stocks will be displayed.

4) Sample User Account: Name: Admin, Password: 123456, Type : User




12

|
P a g e


6
.

Conclusion

All Team members were able to excel in their talents in various programming and
documentations tasks.
All

members helped out in the integration of the software
. The
project was very successful considering the huge amount of programming hours involved
and
the work
-
load of all members

are facing currently
.

We have learnt much from this
course and we thank Professional Dion for his guidance.


6.1
Roles of Team Members


WILLY NGUYEN QUANG MINH


(Matric:
G0802482F
)


Prin
cipal Programmer for Google API and

Int
egration of the
Systems

Assistance for Documentation


YULSTAR LUKIMIN



(Matric: G0801713J)



Principal Programmer for RSS Feeds

Parser
, Database Systems
,

Assistance for Documentation


CHRIS LOK JIANMING



(Matric: G0801688L)


Principal Requirements Analysis and Documentation,

Assistance Programmer and Debugger
















END OF REPORT