BSc Computer Science Final Year Project Report

footballenoughSoftware and s/w Development

Oct 30, 2013 (4 years and 8 days ago)

101 views

2012/2013





BSc

Computer Science

Final Year Project Report

April
20
13

ByteSize


T
he
Educational
Network F
or St
udents


Student :
William Daly

Supervisor

:

James Doherty

Second Reader

:

John
O'Mullane










In fulfilment
of the requir
e
ment
s for the degree B
Sc Computer Science

Final Year Report

P a g e

|
2


Declara
tion of Originality


In signing this declaration, you are confirming, in writing, that the submitted work is entirely your
own original work,
except where clearly attributed otherwise, and that it has not been submitted
partly or wholly for any other educational award.

I hereby declare that:
-



this is all my own work, unless clearly indicated otherwise, with full and proper
accreditation;




with
respect to my own work: none of it has been submitted at any educational institution
contributing in any way towards an educational award;




with respect to another’s work: all text, diagrams, code, or ideas, whether verbatim,
paraphrased or otherwise modif
ied or adapted, have been duly attributed to the source in a
scholarly manner, whether from books, papers, lecture notes or any other student’s work,
whether published or unpublished, electronically or in print.


Name:




Signed:


________________________
_______


Date:






P a g e

|
3


T
able o
f Contents

Section













P
g

List
o
f Acronyms








5


Acknowledgements








6


1
-

A
bstract










7


2
-

Introduction








9

Fi gure 2.1


The
Uni ted

States Smartphone Market






10

Fi gure 2.2



The
HTC Wi l dfi re And Samsung Gal axy S3








1
1


3
-

Backg
round









1
4

Fi gure 3
.1


Some Of The Popul ar Networks Used By Students







1
4


4
-

Design









1
7

Fi gure

4
.1



Overvi ew Of
The Database Structure








18


5
-

Implementation









2
0

Fi gure

5.1



How The Web Pages Cal l One Another And How they Interact Wi th The Respecti ve Databases


2
2

Fi gure 5.
2


The Custom Icons Created Whi ch Hel p A User To Navi gate The Si te Easi er




23

Fi gure
5.
3



Expands On Cl i ck And Has A Counter To Leave The User know How Many Avai l abl e Characters

25

Fi gure 5.
4



Comment
Submi
t Form, It Expands On Cl i ck Si mi l ar To A Post And Has A Character Counter Al so

25

Fi gure 5.
5



The
Androi d Process Manager In Acti on








2
7

F
i gure 5.6



Ecl i pse SDK Al l owi ng For Easi er GUI Desi gn







2
8

F
i gure 5.7



End Resul t Of Ecl i pses Drag And Drop GUI On The Emai l Cl ass





2
9

Code

5
.1



Sni ppet Of

Code Showi ng How A Users Data Is Sani ti zed And Then Regi stered Into the System


21

Code

5
.
2



Sni ppet Of Code Showi ng How Errors Are Deal t Wi th In The System





21

Code

5
.
3



Sni ppet Of Code Showi ng Checki ng If A

User Is Currentl y l ogged Into The System



2
2

Code

5
.
4



Sni ppet Of Code Showi ng The Inserti on Of A Users Query Into The Database




24

P a g e

|
4


Code 5.5



Sni ppet Of Code Showi ng The Java Behi nd The Mai n Menu In The Androi d Appl i cati on



28

Code 5.6



The Equi val ent XML Code Generated For emai l.xml Through The Drag And Drop UI



29


6
-

Evaluation








3
2

Fi gure 6.1


“The Homer” The Embodi ment Of Too Much Functi onal i ty And Not Enough Desi gn


32

Fi gure 6.2



Ori gi nal Rough Draft For The Si te
, Was Tested By Users And C
aused Many Probl ems Ini ti al ly

33

Fi gure 6
.
3



Feedback Gathered From Users







3
3

Fi gure 6.4



Re
-
desi gned Look For
The Si te







34

Fi gure 6
.
5



Re
-
desi gned Look For The Si te Feedback






34

Fi gure 6.6


More Detai l ed Vi ew Of The Comments Box






3
6

Fi gure
6.7



Sel ecti ng The Java Database Causi ng An Error





3
6

Fi gure 6
.
8



Typi cal Layout Exampl es
For

Androi d
, These Were Later Added To My Own Appl i cati on


3
8

Fi gure 6
.
9



The Androi d Appl i cati on Granti ng The User the Abi l
i ty To Check Speci fi c Posts



39

Fi gure 6
.
10



Home Screen Prevents User Progressi ng Any Further Into The Si te Unl ess They Have A Val i d Logi n

39








4
0

Fi gure 6
.
11



An Exampl e Of

What Woul d Have Been The L
ogi n Screen For The Project



40


7
-

Conclusion
s a
nd Future Work






4
2

Fi gure 7.1


An Exampl e of A code Styl i ng Integrated Wi th A Users Post




43

Fi gure 7.3



Gi vi ng Each User Some Sort Of

Face To Hel p Fi l ter The Bad Ones Out



44

Fi gure 7
.
4



Twi tter Trends Al l owi ng Users To See What’s Popul ar On The Si te At Any Moment In Ti me

4
4

Fi gure 7.5



Communi cati on Across Vari ous Pl atforms

Was

Greatl y Mi ssed




4
5








P a g e

|
5


L
ist of Acronyms

H
TML

= Hyper Text Mark
-
Up Language


CSS

= Cascading Style Sheet
s

XML

=
Extensible
Markup Language

Php

=
Hypertext Preprocessor

SQL

=

Structured Query Language


C
/C#

=
A
re popular programming languages simply c
alled C

and C#

OS

= Operating System

IOS

= Internet Operating System

AVD

= Android Virtual Device

SDK

=
S
oftware development K
it

I.T

= Information Technology

CIT

= Cork Institute o
f Technology

UCC

= University College Cork


P a g e

|
6


Acknowledgements

First of all I would like to thank my supervisor
James Doherty

for allowing me to take on this project
I was passionate about

and
for helping me

with
it
throughout
the year
.

His constant feedback and
critiquing helpe
d me to push myself and get the

project towards
its

f
u
ll potential.


A big thanks to

the staff
at UCC for their continued hard work and help. Both the
lecturers
for
teaching me
everything I know in the field of Computer Science
through the past four years but also
the help
-
desk

workers

who ensured everything
went

smoothly both on the opening day
and the
years

gone by
.



Finally I would like to thank my family and friends for putting up with my

constant moaning about
the project and supporting me through the difficult

times. Without
their

constant feedback and
opti
mism my project would have never

been

finished and
reached the heights that it did.



















P a g e

|
7


1
-

Abstract


ByteSize is the real
-
time educational network that connects students to the latest questions,
opinions and news relevant to their college degree.

It cuts out the clutter of conventional learning
using small burs
ts of information to maximise their

learning

potential. With

ByteSize it

s easy to
register and get started. All you need is a valid e
-
mail address and you
a
re good to go. Open the
doorway to thousands of students around the world in one common goal
-

learning.


Using ByteSize you can share
knowledge from fell
ow students globally at anytime.

ByteSize as a project is divided into two separate
parts
, a completely functional and easy
-
to
-
u
se
website followed by a corresponding

and equally functional

An
d
roid application.

Both strive to
of
fer the s
ame core functionality and
features, however both due to my own experience with each
respective platform
s strengths/weakness’s

they differ
slightly

when it comes to the minor features.


With the
website a user can register easily and from there continue
to use the
rest of the site.

When they are in they can fin
ally posts problems/queries
anonymously

and wait for fellow students to respond with a suitable answer.

There are no profiles names
, avatars or other clutter that get in the way of the co
re
functionality of
the website


learning.

Along with these core functions, the site also offers

some more light
-
hearted features. A
n insight into

how a user can use the site with an FAQ section
, an About page
which lets them get to

know the main people behi
nd the site

and a
contact page which has a
bi
g
thank you for their attention.

The
main
technologies
used in creating the

website part of the

project includ
e.



P
hp



HTML



CSS



MySql



JavaScript/Jquery



Ajax



P a g e

|
8


The Android app still offers the same core
functionality

as the website

in
that
a user can post a question
, view it along with all the other posts submitted
and wait for an adequate response.

Similar to the site a user can look at the
FAQ section
and a
bout page
.

However the Android
brings even more

features

to the table and in
some ways improves upon the website.

The contact page is fully functional and allows a user to
submit an e
-
mail directly from the application without having to go through a third
party
(unlike

the
site

where a user needs

to login to their e
-
mail provi
der
)
.

On top of that there’s a game where the
user can play with the ByteSize logo,
a

simple

quiz and
a
credits page.

Similar to the site several
technologies

had to be encorporated

to have the app functioning as desired.

The
y are as follows



Java



XML



SQLite



Android AVD/SDK
( Software Development Toolkit )

managers



Eclipse
(
Juno
)














P a g e

|
9


2
-

Introduction


The aim of this project is to get a fully functional single
site along with a corresponding
Android application where
students (specifically Computer Science students

and other I.T related
courses
) c
an

go
ask simple question and get simple answers.

However before
the project

could ever
be embarked upon there was a need to make sure that
there was a necessity
for this

project

or if
Computer Science students themselves thought it was a good idea and one worth pursuing further.





Having talked with friends and students in Computer Science and similar fields
it was

realised a lot of them thought it was a good project to

implement (
others

thought it was

not worth

trying to re
-
invent the wheel copying
such sites as StackOverFlow.com
)
. Most agreed that it was a
feasible project and one that could be as simple or complicated as
it
needed to be

for the five

or so
months of development
.

It was crucial
to get
this initial
positive input
from the Computer Science
students as they would regularly be used for
critiquing and feedback

in the incremental
development of the project.




It was decided that when
i
mplementing the

site

that

using Php would be

the best language
to use

for several reasons
.





One reason was the wealth of resources available for the language. Because Php is so
popular

for both hobbyists and professionals

there are several tutorials and g
uides available
all over the web from individuals on Youtube to the Php online manual.

When developing
the site
these set of guides would become crucial in implementing

both

the main structure
of the site but also in eradicating any bugs

that would occur
.




Another reason
to choose Php

is
it offers

a

great way to re
-
use the languages

(
and in many
way re
-
learn
) from
first year of college

taught in

CS1109

: Programming

And

Web
Development


and allow an easy accessible place for the students to connect and contribute
to from virtually anywhere in the world.

All they need is a browser and an internet
connection.


P a g e

|
10


I
t was

contemplated for a while what mobile platform was the best to pursue in terms of
both technical skills required to make it, but also the very practical angle of “Will people use this if I
develop on platform X?”
. At the time of

deciding it was known

that

Android
s

phone

were beginning
to dominate the market in terms of numbers and from student feedback
it was

found

many
students were in a similar position to
one another in
having to purchase an entry level smart
-
phone
because shortage of funds

but still w
a
nting all the
benefits

of apps
, internet
-
access,
a

digital
camera

and all the utility a smart
-
phone brings
. It became
obvious

that
Android

was a solid platform to
develop the a
pp
lication if reaching students was the primary goal
.



B
uilding a

native
app for Android would allow
for

contact
ing

a larger number of students
sinc
e Android is now the dominant operating system

on the smart
-
phone market
.

This would allow
the use a language taught in second year of Computer Science

CS2500

:

Software Development


with Java
, still learn some new technologies in XML and
the Android SDK/AVD managers plus

not
have to
learn

any completely new languages in

Objective C

or C#

to
reach a large portion of the
users as physically possible
. The choice to

construct a native app over
a
simple a re
-
designed
s
tyle
sheet

for mobile devices

was made in order to make the project more difficult and ensure it
justified the
six or so

months development time allocated by the college.




Fi gure 2.1


The
Uni ted States Smartphone Market As Of August 2011


However just because Android phones now ha
s

majority sh
are in the smart
-
phone market
didn’t mean
that a

resource intensive
application

could be constructed. One of the down
-
sides of
Android is because the
OS

is used across so many different models of phones

and altered by
P a g e

|
11


manufacturers

that trying to design an application can prove difficult.

It isn’t the case of “one size
fits all” that is a bit more familiar in the world of IOS.
What works on a Samsung Ga
laxy S3 will not
necessarily work on a HTC Wildfire even if the version of Android is the same.


Screen sizes,
resoluti
ons,
even the button configu
r
a
t
ion on a phone can be completely different

and in turn
change the experience a
user has when interacting

w
ith

the applica
t
i
on
.

The
projects
application
needed to be s
omething that would be relatively light
-
weight in resources

in order to perform well
on every phone
,

adaptive to all screen sizes plus resolutions and
still allow the user to do what they
need as
efficiently
as possible.







Fi gure 2.
2



The
HTC

Wi l dfi re And Samsung Gal axy S3;

Same Operati ng System, Compl etel y Di fferent
Experi ence

From Left To R
i ght ( HTC Wi l dfi re , Samsung Gal axy S3 )


Another

thing to note about the Android platform is that because it’s so easily accessible to
most users/customers that there is a very large scope of people who use it

and within Computer
Science

it
has proved

to be

a very platform indeed
.


It was research
ed

that t
wo
aged
50
+

students

in college who use Android

said they would use
the

application

when it was constructed
.

One of the
students at the time was studying cloud computing in CIT and had admitted to being overwhelmed
by the sheer amount of information

on the web as

well as the (
unnecessary
) detail some people
would post

when researching how to tackle
his

assignment
s
.

I
t was

realised when
sitting
down with
him

and breaking

down

the problem

into the simplest elements as possible
,

(
he was

creating a

basic
-
airline website in Php,
he couldn’t und
erstand how to query a database

and output the
results
)

only
then he

could

piece them together

and then

go ahead solve the

problem

he was
presented with.


When

taking

a very “
simplistic
” approach,

keeping the

explanations brief plus the use

of

metaphors
the student

took

to it far better th
a
n when
trying
to dive straight

into the more
P a g e

|
12


technical side of things.

He

later

made reference to tutorials h
e had seen online at
thenewboston.org


crediting his style of tutorials
as

being

very

helpful. He explained the main
strengths of the tutorials as being




R
elaxed



Assumes

the viewer knows nothing

and builds from the ground up




B
rief



The tutorials

never
went over the 10
minute mark,

nice
digestible

chunks




Humorous



Explained detailed

topics in a rather light
-
hearted manner




I
nformative



A
bove all else it was this
;

after every 2
-
3 tutorials you felt enlightened and
really maximised your learning w
ith short bursts of
information


Wh
en doing further research for the

project i
t was

decided that that
TheNewBoston had a
lot of what was

wanted in the

site
already
incorpora
ted into his tutorials and that they’d draw as a
good source of inspiration for when
implement
ing featu
res

into the

project.

His

idea of brief burst
s

of information

was very intriguing

and noticed it was more common than what originally thought.
With Social network giant Twitter being a major advocator of this with their character limit
of
140
characters

which confines it
s users to
“micro
-
blogs”
. This
is a great
idea because it keeps things

(and people) to

the point and cuts out the
unnecessary

details
. It prohibits them from going on
large

explan
a
tions

on
subject
s unrelated to the topic and ultimately
gives

t
he user what they
want

instantly
.


Of course

the option of having
a seasoned industry pro

or lecturer readily

av
ailable to sit
down and walk a student

through the baby steps

won’t
always
be available
. S
ometimes you have to
rely on fellow students

to help explain a topic
.
Many students benefit

more

from such an approach
with fellow
classmate
s

explaining various

categories of Computer Science

to them
. Once such
example was the concept of polymorphism

in Object
-
oriented programming
, for a long time

s
tudents in the class

could not
fully understan
d
or have the confidence to

explain it out loud.

To
give some background polymorphism is explained on Wikipedia and reads as follows.



Subtype polymorphism
, often referred to as simply
polymorphism

in the context of
object
-
oriented programming
, is the ability to create a variable, a function, or an object that has
P a g e

|
13


more than one form. In principle, polymorphism can arise in other computing contexts and shares
important similarities with the concept

of
degeneracy

in biology.”



However a
student

in Computer Science

explained

it

to
the
class

in a

rather strange but

elegant
manner that

could

be fully understood by
people of all skill levels.




“Polymorph
ism is like being a transformer
,
a class

can have one

or more forms and
opera
te differently according to what form it’s in

but
at the core it’s still awesome and still very
very useful
.”


The

explanation had a profound effect on the class

and it proved
how such a simple
metaphor could go so far into a
person
s

understanding of a complicated topic.

It shaped the way
the class
view
ed

learning and how different
approaches

to it

could work on different individuals.

Having followed u
p on this way of learning I stumbled

across the whole idea of “Explain It Like I’m
5” which is
a forum
on the popular website Reddit and has a quart
er

of a million subscribers , this
showed
that it

s a

fairly popular way for answers to be answers.
It’s no coincidence that It has
recently become a very popular Youtube series,
it
’s

very effective

method

in hammering home a
point

to a person uneducated on a certain topic
.

After
further
research

was done it was
realised
having
a twitter
-
like network with a corresponding app on android so users could

query and get
answers to quiet complicated topics

could have serious potential
.

The end goal is to help CS
students get a real grasp on certain modul
es

or topics

that
they
wou
ldn’t be able to

before
.









P a g e

|
14


3
-

Background


Despite there already being ot
her sites that carry out

this function
, it was

felt none of them
really catered to people who are n
ewer to
Computer Science,
all the
various

programming

languages and
fields it entails.

Sometimes a question is so basic that if asked on one of
the major
programming or Computer Science

sites
like
S
tackoverflow

a student will provoke a more
“senior”
member
to criticise them
for them not doing the
adequate

research beforehand
.
So despite being a
place to go for a
nswers to I.T related questions
, s
uch

sites

never really
cater

for

the newer
members

on their boards
.


Of

course there are other sites that in
-
directly help
students reach other studen
ts

with
questions related to Computer Science
. Such sites like

Facebook

and Twitter allow a student to add
their fellow classmates as “friends” and from there they can ask one another for advice on college
related topics. E
ven
Re
ddit allow students to ask

questions with an increased cha
nce of getting a
response to it as supposed to using the former.




Fi gure 3
.1


Just Some Of The Popul ar Networks Used By Students

From Left To R
i ght ( Twi tter, Facebook, Reddi t )


However t
he
problem that arises with these

sites is
from the moment

a person

logs on
.
B
ecause the site isn’t buil
t for this specific purpose
, t
hey can often get distracted.

They’re like a
Swiss army knife in the fact that they
offer the user

all these great

fea
tures
, however they
spend so
long looking for the one

tool

they

want

that they

forget what they

came for in the first place
.

R
ecent studies have shown that sma
rt
-
phone users alone log

in to Facebook fourteen

times a day.

So not only is a user potentially just logging in to get help with research

on
an assignment, they’re
checking photos,
status
updates and general news.

As useful a service as many of these sites
P a g e

|
15


provide, they begin to become counter
-
productive

beyond a ce
rtain time frame
, a time frame that
seems to be over
-
taken by most people using the site.




The

hope when creati
ng this site was to have a very

responsive

(
having experienced certain
sites on a relatively poor connection, this was high up the priority
list
)

and

efficient way of students
reaching to one another without the clutter of avatars usernames or number of tweets

(basically
the stuff that allows for one to flex their ego somewhat)
.

All of these

could
potentially

be de
ployed
internally in a colleg
e n
etwork so tha
t

students would be connected
immediately

from day one

of
their course
.


Being able to deploy it on a college network was something
that was
never really
settled
on as it wasn’t decided

h
ow any college would react to such a system

running internally
. On
one hand it functions as an in
-
direct grinds system for students
that a college themselves

can easily
monitor and administrate

the content of
. However on the other hand the site could be viewed as a
sort of place
for students to copy and infringe
assignments

from one another, which is not the
intended purpose of the site or
what any
college

wants
.

To this day the site

still has the ability to

easily be implemented within a college
network;

however the moral dilemma

still stands
.




With creating the site there was an opportunity to use the languages
never really

covered

extensively during the four years of

college

and
that
have become increasingly popular in the past
few years
.

Languages such as Javascript

and
JQuery( JQuery is just a library of Javascript functions)

have

shown themselves

to be diverse enough to both be able to function within a browser but also
powerful enough that

stand
-
alone

applications can be built using them.

They also require a set of
sk
ills that are

sought after enough that companies like IBM would look for them on an applicants
résumé
.

When IMB

came
to UCC giving a talk
about some of their internship programs
(Extreme
Blue)

and graduate positions these languages made frequent
appearances

on their slides
.

It was
realised t
he site

part of the project really became a great opportunity to explore these languages
and use their features in an interesting and dynamic way.

They would be
incorporated

mostly for
the GUI
combined with
ele
ments of
HTML and CSS to give the
interface

more of a polished look.

The aim of using these technologies within the site wasn’
t just to
claim

they were used

and throw
them down on a
résumé
, but

rather

to

serve
and prompt the user towards the next step of
the site
.
W
ith

a more “responsive”

design the hope is the user is never in doubt as to how they’d achieve
the next step
.



P a g e

|
16



The decision was made to omit avatars or the ability for a user to post up their own custom
avatar from the site.

With no avatars pe
ople can’t discrim
in
ate one another (they also

are blocked
from being able

up
load a new one every day either
) and with no username a person shall remain
anonymous so they can ask questions without getting
insulted

for being a user who

spams


or
makes poor
ly constructed

posts
. The lack of usernames
is a decision that

still
to this day

I’m

not
sure was for the best as maybe there

was a
necessity

for a way to filter such people out
, the right
balance

was never really struck

there
.

A thought that occurred was
maybe count a users post
internally in the system and then “reward” then with certain avatars/icons in the system to
encourage better posts and give an idea of a persons skill
-
level when they answer
a q
uestion.


On top of all the problems that
were
face
d
while

developing
the site
there was
t
he Android
application to consider as

well. From researching existing applications on

the

Android

marketplace

it was

know
n that

no app served the same purpose as
the project

would
. The only

application that
came close t
o providing the same service was for a website called Quora. However Quora caters to
a completely different audience. Quora isn’t specifically designed with Computer Science in mind,
it

s a general forum where people from any background/profession can
login

(using their Twitter or
Facebook details) and ask a question

on their forums
. It aims for the opposite spectrum of people in
that it

s more for the professional who wants a deep
er, more

comprehensive answer

on a
complicated topic
. It has a
correspond
ing
An
droid application on the market
place but it catered to
a completely different target market.

The sites mentioned earlier e.g
Twitter etc
have application
s

on the marketplace

and can be used similar to the
ir respective

site but are

pretty unpleasant t
o use
for anything apart from casual browsing.


Anything beyond that was laborious and
slow;

with my
application allowing the user to post easily was priority.










P a g e

|
17


4
-

Design


When

originally designing the site it was kno
w
n

the database would be the mos
t important
component
. The site is driven by user
content;

both submissions and viewing

them

submissions

a
re
core to how the site operates
.

Without the data
that
users submit the site is essentially a hollow
shell.

So coming up with a database schema was an issue that wasn’t taken lightly
. It was

acknowledge
d that

a poor database design
or rushing into how the data is structured
could lead to
disastrous consequences

later down the road
.

For a project that had a rela
tively short time
-
frame
to complete this was an issue that needed to be tackled swiftly and efficiently.


Ori
ginally the thought of
incorporating

a
n internal

search engine
to the site would be a
g
ood
feature
. This search engine would allow

the user to sear
ch phrases or terminology
relevant to their
query

in the hope of narrowing down what they were after

by feeding them back the returned
results
.

This was quickly dismissed as sea
rch engines are not a light fea
ture that c
an

be
incorporated easily, in many respects creating a good search engine could be a project within itself.

To add this on
-
top of the sites other
components

and the
n
have to try
make an equivalent

feature
on for the

Android application would prove too much

s
o the
decision

to
avoid

making a search
engine was made

relatively quickly
.


Another
possible
choice was to make one

single table holding all the posts and comments

generated by the users
.

The benefits

were that the data would be easy to access, easy to
manipulate and would allow for easy maintenance as it would all be in one
convenient

spot and not
spread out
over many tables.

However for all the many positives it showed in having one single
table ther
e was the one unavoidable and disadvantage
;

that it would seriously hinder performance
.
I
t would be
come next to

impossible to manage this data once a larger number of users started
using the site

unless a powerful server(s) were
acquired
.

Data would
be
slo
wer loading as

it would
not

be
split evenly amongst different tables but rather

the whole entire table would still have to be
loaded when the user first arrives at the site.

Even if they ju
st wanted to query one specific
category it would still take longer

to filter it out from one big table rather than spreading the load
amongst other tables.


P a g e

|
18


A basic overview of the chosen database design
with
the essential part
s

of the site

showing
,

it displays clearly
how the different databases

function and
communicate amongst one another
. All
data is submitted

to

and displayed from
main.php
. Only the user table gets it data elsewhere, that
being
from
register.php



Fi gure

4
.1



Overvi ew Of
The Database Structure


All of the

various tables in the database are all stand
-
alone and connect together via the
main page

(
main.php
) where a user ca
n access using the login screen. All of the various categories
are their own tables as to make filtering the data cleaner,

simpler and more

efficient on the site.

P a g e

|
19


Each posts table has the same data inputted to it and displays the same on main.php
.
Each user
p
osts

can post an
original comment

or a “status”

from which other comments

can extend

it in the
hope of answering the users query

via “comments”
.

So for each post there will always be
comments but not visa
-
versa.

A person cannot refer to a comment directly within the site but can
do it by referencing the comment id e.g “Hey #2 I like how you answered that question”




post_id



G
ives
the post

its own unique identification number

so it

s easier to refer to for
other users on the site
.

It also helps with the grouping of comments.




post_title



Q
uick summary of what the problem is
.

Gives a user scanning through the site a
quick insight in
to the post and
gives them the option
if

they want to investigate

into it
further.




post_query



A

more detailed expl
anation of what the problem is.

Builds on top of what was
said in

the post_title


The comments table
is similar

to the posts table in its structure but behaves differently as it relies
on previous posts to exist in order to reference them.

If there is no post made then the comment

form is not generated allowing a user to submit.




comment_id


Used to pair off post_
id with group_id , also allows for
display
ing

the
com
ments of

a post in a newest to oldest
fashion
.




group
_id


All comments that are generated link to a post by its post_id ,

using this post_id
all comments can be grouped under it. So when a post is being viewed a user can click the
comments button and see all the

(grouped)

comments below it.




comment_content


What a

user is saying in response to the original post
.

They are
confined to a character limit as well when trying to respond similar to the original poster.



P a g e

|
20


5
-

Implementation


Website Implementation

When implementing the project
there was
a good idea from

the start what technologies
that would be used

and why.

For the website part of
the project it was

know
n

that it’d be written

in

predominately Php

for the mechanics along with HTML to structure the web
-
pages.
Along with
them

languages

Jquery/Javascript and CSS

were to be used in giving

the site that p
olish and a
friendly GUI for the user to interact with

(
and
also for reasons stated earlier in the report)
.


A
hierarchal

structure
of
web
-
pages

was developed

so that it would be easy to
implement
any necessary
changes throughout the site but also allow

for easier bug tracking and
helping with
eradicating them
.

I
mplement
ing

this hierarchal

structure

was imperative in adhering

to a more
object oriented style of programming. The ideas of encapsulation, security and re
-
usable code were
fundamentals that

did
n’t want to lose out on jus
t because the language of choice (Php)

wa
s using

didn’
t strictly enfor
ce it
.

The three main Php files
from
where the rest branched off from were
connect, users and general. These were the core part of the site and stopped any
errors in the rest
of the site mak
ing their way back towards them.




c
onnect.php

-

T
he centre

piece for

all the other web
-
pages. Here it

would initialise a
connection to the
created
database
. E
ventually
these would
be connected outwards to all
the other
pages.

Connect also dealt with any erro
r
s
that could arise in my system. I
f for
example the database wa
s down or a connection was lost
, it would give an error message
that would be passed down to the rest of the pages so for whatever the page a user was on

they would be informed.


Below
c
onnect.php were the
two

sub pages general
.php

and users
.php
.






u
sers.php



This was the page that dealt with the users in both the registration process but
a
lso in the login and validation. It sanitized the data that the users enter in both login and
registering. It checks has the user registered before,
if they have a valid e
-
mail or if they are
already logged into the system at a particular time and trying t
o re
-
log in.

P a g e

|
21



Sample piece of code for users.php that registers the user into the system if they have passed all
the other checks mentioned above.



//Function that submit our user data into the database


function

register_user
(

$register_data
){



array_walk
(

$register_data
,

'array_sanitize'

)

;



$fields
=

'`'

.

implode
(

'`, `'

,

array_keys
(
$register_data
))

.

'`'

;



$data
=

'
\
''

.

implode
(

'
\
' ,
\
''

,

$register_data
)

.

'
\
''

;



mysql_qu
ery
(

"INSERT INTO `users` ( $fields ) VALUES ( $data )"

)

;


}


Code

5
.1



Sni ppet Of Code Showi ng How A Users Data Is Sani ti zed And Then Regi stered Into the System




g
eneral.php



Is a much simple
r

file that does basic validation checks for users.php
. It
has an
array that waits for any error that might be passed from users.php and stores them, when
finally at the end of the file it will output the errors so the user can see what mistake in
registration etc they have made.



//Any errors that get stored
into $errors will use this function to output it


function

output_errors
(

$errors
){


$output
=

array
()

;





foreach
(

$errors
as

$error
){


$output
[]

=

'<li>'

.

$error
.

'</li>'

;


}


return

'<ul>'

.

implode
(

' '

,

$output
)

.

'</ul>'

;



}



Code

5
.
2



Sni ppet Of Code Showi ng How
Errors Are Deal t Wi th In The System


Finally the file that binds all three of these together to make for one simple call to all the
other sub
-
files is init.php. This file initialises the connection to the database ( via connect.php ) and
uses the other two files
( general.php and users.php )

for validations and registration.



P a g e

|
22



/**Calling all the other files**/



require

'database/connect.php'

;



require

'functions/users.php'

;



require

'functions/general.php'

;




//checks if they're logged in


if
(

logged_in
()

==

true

){


$session_user_id
=

$_SESSION
[
'user_id'
]

;




}


Code

5
.
3



Sni ppet Of Code
Showi ng Checki ng If A User Is Currentl y l ogged Into The System


I
t was known that

the project would be dealing largely with d
ata

generated from
students
.

So setting

up a database

and having the different parts of the site to communicate with one
another s
eamlessly was an important part
of the project.


Fi gure

5
.
1



How The Web Pages Cal l One Another And How they Interact Wi th The Respecti ve Databases

P a g e

|
23


O
riginally
it was planned t
o
incorporate

some
sort

of search engine within my site so users
could potentially add their own categories of questions or more accurately filter down a past
question and see the answers. This however proved to
o

difficult and was aware of the time
restrictions on the project.
T
he Android project

also had to
be
consider
ed

so incorporating a search
engine inside
the
site

was not feasible
.

In the end
it was
opted to set up fixed tables (as seen earlier
in the Database schema)
that
could easily create and then allow users to search
them.

As part o
f
the user friendly GUI c
ustom icons

were created to go along with the sites theme

so a user could
easily
recognize

a category they would want to search by its logo.

A
n open
-
source

of

Jquery code
called Avgr
u
nd

was used to help the user navigate the various sections of the site. It

has a similar
effect to Windows 8 start menu

in which panels appear to the foreground from the background
enabling a user to select which category they want to view
.


Fi gure 5
.
2


The
Custom Icons Created Whi ch Hel p A User To Navi gate The Si te Easi er


Within main.php there lies the code that allows a user to submit their query.

It’s a very elegant
piece of code that works
alongside some J
avascript to restrict the users post to the

370 character
limit. As can be seen below it’s a simple if and else, if the user submit
s

an empty piece of text it
does nothing. Otherwise submit their query into the database. T
here is a piece of J
avascript that
P a g e

|
24


runs along this

code that counts the numbe
r of character
s

allocated in the form (370) and
decrements it as the user is typing

each character
. It works and feels very similar to that of Twitter
and their 140 character limit.

(This can all be found on my directory linked at the bottom of the
report)


<?php


$db
=

DBconnect
()

;



//if the user hasn't typed anything or has spaces


if

(

!

strlen
(

trim
(

$userPost
)

)

){


echo

'<div id="errorMessage"> '

;


//does nothing


echo

'</div>'

;



}


//else if the user has typed something


else
{



$userTitleQuery
=





"INSERT


INTO `$userSectionChoice`( post_title , post_query )


VALUES ( '$userTitle' ,
'$userPost')



"

;



//run the query and enter their data into the database


mysql_query
(

$userTitleQuery
)

;



}



?>


Code

5
.
4



Sni ppet Of Code Showi ng
The Inserti on Of A Users Query Into The Database


The user selects what category
they

want via
the

dropdown box e.g Java, Php etc. Then they give
their post a title and explain what the problem is exactly

(as can be seen above with post_title and
post_quer
y). If there’
s no problem

they

get inserted directly into the database with the
corresponding category tagged onto them
, so if it was given
a
Java
tag
it’ll be
submitted

to the
java_posts table to make for easier searching later
. After that
every single

post is listed

in its
corresponding category

along with all the previo
us posts and comments to browse
.

From there the
ability to comment on the submitted post becomes available


P a g e

|
25




Fi gure 5.
3



The Layout Of The

Submi t Form, It Expands On Cl i ck And Has A Counter To Leave The User know
How Many Avai l abl e Characters Are Left


Comments operate nearly the exact same way as a post.

The only main difference is that the ability
to have a “title” with your comment is exe
mpted. This is for two main reasons




Keeps the site nice and clean, leaving nothing but the user content in clear view.



There’s no real need for this as the original post already provides a post title letting people
know of the general topic.



Fi gure 5.
4



The Layout Of The
Comment
Submi
t Form, It Expands On Cl i ck Si mi l ar To A Post
And Has A
Character
Counter Al so



P a g e

|
26


Just to summarise briefly the technologies that were used and how they were implemented in the
site aspect of the project.





Php



Main mechanics behind the site, initialising connection to the database, manipulating
data and

handling forms



HTML



Gives each page

its structure

by helping to a
llocate

each part of the site its position
on the browser



CSS



Use
d

for styling each page and giving the site

a more professional look



MySql



Most important part of the site, inputs and outputs the user data on request

and
helps filter out the unnecessary or undesirable data



JavaScript
/
JQuery


Helps make the site more r
esponsive by dynamically changing
depending on the users last action



AJAX



Used to dynamically load each category of posts

as the user selects one



Xampp(Apache 2.4.3 )



The program used that allowed the site to run locally and help with
rapid development
and
testing



Android

Application

Implementation

B
efore any serious developing with my Android application

could begin it was imperative to
have a comprehensive
unders
tand
ing of

the Android process lifecycle.

Many differe
nt sources and
tutorials spoke o
f

it

being crucial in order to understand how the operating system works and how
it manages applications.
One could simply not just dive in and start creating an
application from
scratch without knowing the mechanics behind Android and the way it starts and manages
applications.

A
thorough

description of it can
be found
on the Android developer page

but
just
to
quote an important part.


“When an application compon
ent starts and the application does not have any other components running,
the Android system starts a new Linux process for the application with a single thread of execution. By
default, all components of the same application run in the same process and t
hread (called the "main"
thread). If an application component starts and there already exists a process for that application (because
another component from the application exists), then the component is started within that process and
P a g e

|
27


uses the same thread

of execution. However, you can arrange for different components in your application
to run in separate processes, and you
can create additional threads for any process.”





















Fi gure 5.
5



The
Androi d Process Manager In Acti on


A process
has one main thread which is also named the UI thread which lives as long as the
process lives. A process can also have more threads which are useful for background tasks.

A
process starts when the user launches your application, assuming that it is not ru
nning already in
the background.

Th
e process end is less determined
. It will happen sometime after the user or
system has closed all the activities.

If for example you have one activity and the user pressed on the
back key, the activity gets closed.


P a g e

|
28


Late
r when the phone gets low on memory (and eventually it will happen) the process will
quit.

If the user launches
the
program again and the process was not killed yet the same process
will be reused.


P
ublic

class

MenuClass

extends

ListActivity

{


String

classes
[]

=

{



"SQL"

,


"FAQ"

,


"About"

,


"Contact"

,


"Calculator"

,


"Play"

,


"Mystery"

,


"Quiz"

,


"Sound"

,


"Game"

,


"Credits"


}

;



@Override


protected

void

onCreate
(

Bundle

savedInstanceState

)

{


super.
onCreate
(

savedInstanceState

)

;



requestWindowFeature
(

Window
.
FEATURE_NO_TITLE

)

;



getWindow
().
setFlags
(

WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN

,


WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN

)

;




setListAdapter
(

new

ArrayAdapter
<
String
>(

MenuClass
.this

,




android
.
R
.
layout
.
simple_list_item_1

,

classes
))

;


}

Code 5.5



Sni ppet Of Code Showi ng The Java Behi nd The Mai n Menu In The Androi d Appl i cati on











(
Clicked

Form

Widgets

)



P a g e

|
29


F
i gure 5.6



Ecl i pse SDK Al l owi ng For Easi er GUI Desi gn


In order to implement a face or GUI for the user to interact with I needed to create them
from scratch using XML.
Having

no prior experience with XML

it was originally thought this would
prove difficult, however

Eclipse allo
w
s

for a dream
-
weaver like way of drag and dropping button
s
,
sliders
, forms

etc and having the corr
esponding code generated from them
.

However problems
occurred whenever
changes to
the

generated

code

had to take place.




e
mail.xml

-

Example of xml code automatically generated by Eclipses drag and drop GUI
interface.

email.xml calls t
he class
example.java

to allow

the user to submit an e
-
mail to
whoever they need to and provides the form
.





















F
i gure 5.7



End Resul t Of Ecl i pses Drag And Drop GUI On The Emai l Cl ass


P a g e

|
30


Because the code wasn’t being built from the ground up by the developer with
traditional methods
and noting/commenting accordingly what every bit of code did, if changes needed to be made it
usually meant restarting the whole design again. This was one example of how when the
development was taken out from the developer hands that
it could sometimes be counter
-
productive and in this case, more time consuming than by conventional methods.


<?
xml

version
=
"1.0"

encoding
=
"utf
-
8"
?>

<LinearLayout

xmlns:android
=
"http://schemas.android.com/apk/res/android"


android:orientation
=
"vertical"

android:layout_width
=
"match_parent"


android:weightSum
=
"100"

android:layout_height
=
"match_parent"
>


<ScrollView

android:layout_weight
=
"30"

android:layout_width
=
"fill_parent"


android:layout_height
=
"fill_parent"
>


<LinearLayout

android
:orientation
=
"vertical"


android:layout_width
=
"match_parent"

android:layout_height
=
"match_parent"
>


<TextView

android:text
=
"Email address(es):"


android:layout_width
=
"wrap_content"

android:layout_height
=
"wrap_content"
><
/TextView>


<EditText

android:layout_height
=
"wrap_content"


android:layout_width
=
"match_parent"

android:id
=
"@+id/etEmails"
>


</EditText>


<TextView

android:text
=
"Hateful Intro:"


android:
layout_width
=
"wrap_content"

android:layout_height
=
"wrap_content"
></TextView>


<EditText

android:layout_height
=
"wrap_content


Code 5.
6



The Equi val ent XML Code Generated For emai l.xml Through The Drag And Drop UI


Just to summarise briefly the
technologies that were used and how they were implemented in the
site aspect of the project.









P a g e

|
31



Android App

Technologies Overview



Java



Main mechanics behind the site, initialising connection to the database, manipulating
data and handling forms



XML



Gives each page its structure by helping to allocate

each part of the application

its
position on the
phones screen



SQLite (Eclipse
plug
-
in
)



I
nputs and outputs the user data on request and helps filter out
the unnecessary or undesirable data



AVD
Manager



The program used
generated an Android phone of choice,
allowed
to run it
locally and help with rapid development plus testing



SDK(
Software Development Toolkit)



Had all the android libraries readily available to
implement along with the AVD mana
ger. Such libraries as Google Maps, using Gmail and
allowing access to the cameras on
a phone
.



Eclipse
(
Juno
)



An IDE that allowed the installation of plug
-
ins such as the android AVD
Manager and Android SDK. It also has

all Java libraries readily available on prompt which
speeds up development.













P a g e

|
32



6
-

Evaluation


(1)
Website
Evaluation


Despite building
this system

for Computer Science

students

it was

decided to sample from
a large and varied scope of people.

The reasoning behind this
was
to make the

project

as user
-
friendly and intuitive
as
possible for both the site

and the Android application.

So
when drawing
the
rough
sketches
/blueprints

for

the user interface

plenty of inspiration was

draw
n

from existing
models
made by

industry giants such as Google
,
Twitter
,

Apple

and more recently Microsoft

(particularly their Windows Phones)
.

All of these companies have a very minimalist approach to
th
eir software and websites that
enables the user to

get straight to the main functionalit
y.


Lessons
had been learned from existing proje
cts that too much functionality and not enough design could
lead to disastrous consequences. Even this report bring written right now is using Microsoft Word
2003, a prod
uct with a ton of features
that most people
haven’t a clue how to use.










Fi gure 6.1



“The Homer” The Embodi ment Of Too Much Functi onal i ty And Not Enough Desi gn



This
ideology

of design inspired the project greatly so
a rough draft

was drawn up
immediately
to retrieve feedback

from

tested

users

as soon as possible
.
P
laceholders

were used
heavily and
approximately

positioned

in accordance
with
where every
thing would go just to give
the testers

a
good idea where it was all heading design wise.

Never once was a single design

ever

overly commit
ted

to
as

it was known

the GUI
was going to be chopped and changed regularly
.

It
P a g e

|
33


would have
wasted
precious
time
and
resources.
Similarly
the
mechanics
of the
site needed
to be
tested

as
well
alongside
the
design

so they

could be
incorporated

together seamlessly

at the end
.










Fi gure 6.2



Ori gi nal Rough Draft For The Si te
, Was Tested By Users And Caused Many Probl ems Ini ti al l y



It was soon

realise
d

that having the

design so heavily influenced by existing industry sites also has
its down
-
sides as

well.

Having
users

interact with it from

both

a large diverse base of people
.
Ranging from Computer Science to

Electronic Engine
e
ring

or

no college qualification

at all
,
both
male plus

female, from
ages
19 to 55 most of the questions that
aro
se

from these users

were pretty
similar.


48%

30%

22%

Is this some sort of Twitter
educational site?
Can I log in with my Twitter?
Why does it look like Twitter
so much?
P a g e

|
34



Fi gure 6
.
3



Ini ti al

Feedback Gathered From Users




Desp
ite knowing and informing them i
t was
only
a rough
-
draft and had yet to carve out
the fine details it couldn’t be ig
nored just how much confusion the design

was ca
using at such an
early stage. It was clear a
distinction

had to be drawn

with

the

project so that people would
understand it was its own stand
-
alone website and not some Twitt
er extension.

This was the first
time during the project that user feedback had been used and turned out to be incredibly useful in
steering the project in the right direction.

It would have been painful to have
committed

to this
style for the site only to

then realise at the very end t
hat it all
that it
needed to be changed because
it looked similar to another existing site.



Having gone and done research on other

existing
sites a more solid design was drawn up
with a co
mpletely different colour scheme
,
logo and overall feel to the site. From the same users
who test
ed the site in the early stages
, they were again asked to give their feedback as to how the
new
ly designed

front
-
page looked and felt.



Fi gure 6.4



Re
-
desi gned Look For
The Si te



The feedback this time proved to be a lot more positive and the distinction had seemed to
finally been drawn
away
from Twitter.

The questions asked earlier were a thing of the past and the
queries
had become more of a curiosity behind the technologies
used

rather than that of a Twitter
extension.

P a g e

|
35






Fi gure 6
.
5



Re
-
desi gned Look For The Si te

Feedback




After getting the user interface finally constructed properly and precisely it was
time to test the mechanics of the
site that were already in place.

It
was kno
w
n

the site had it
s bugs
,
but the plan with testing was to see if the site was “usable” and rea
dy for users on the op
ening day
when giving a demonstration
.

The essentials

such as being able to login or

register were working
perfectly. T
ests had been

ru
n

with the user forms for posts and comments

p
utting in various
characters
-
combinations
to try
working

a way

a
round the site.

Such combinations numerical or
short

usernames, short passwords and invalid e
-
mails were all rejected if the user was entering
faulty data.



For the most pa
rt the
posting aspect of the
site was okay in terms of

usability, a user could
post
a query with limit
ed characters into the required f
ield no problem.

Posting was quick and
efficient as all the images to be displayed on the site weren’t user generated

or fed out from a
database

but integrated

onto the site itself
.

Posts were skimmed down to the blocks of text that
users posted in
origina
lly,
this kept the site being very responsive

and lightweight

(
which was
mentioned earlier I’ve been the victim of sites with large amounts of data or images

and this really
hinders usage if the site is unresponsive
)
.




However bugs began to arise when a user wanted to comment on
one

particular post.


The data would never

be

input
ted

in the database when the query would press “submit query”,
rather it would only work after the user had refreshed the page upon submittin
g.
Getting inside the
code and seeing how it worked didn’t help with this bug

as logically it made sense
, however
I
50%

40%

10%

I like where you're going
with it
The new colours are a lot
better
I liked it more before
P a g e

|
36


suspect
it might have been how HTML handles form
s and passed them through to Php

that would
have been the

source of the

proble
m
.

It’s a bug I wanted to eradicate as it was pretty central to
how the site wor
ked
, but as the opening day was on the horizon I had to cut my losses and work on
more “core” aspects of the projec
ts.















Fi gure 6.6



More Detai l ed Vi ew Of

The Comments Box



Another known bug is how the data is presented. As seen above all comments and

posts
are shown with a caption, content
, number of comments and a chance for a new user to input a
comment. However when I implemented this for all the datab
ases (Python,Php etc…) it didn’t seem
to work with Java. The contents of the Java table would sometimes come up empty and show
nothing was submitted

(despite seeing the tables and knowing there

was indeed information
stored
), and in some of the worse cases

it would stop

the content of the other databases loading up
as

well.



The solution
that

was

used was to import

an older snippet of code
which

had

been

archived

that

does effectively the same job in filtering

through the table and

load
s

the contents of
the Java table
.

This worked in loading the contents of both the Java table and the others but lost
so
me of the features that

had

been

later

implement
ed

(latest CSS styling and counting the number
of comments to a specific post

were both missing
)
. This was
one case where arch
i
ving code
P a g e

|
37


regularly came to save development and allowed time to work on other aspects of the project.

This
potentially could have taken hours to fix if an earlier (working) version of the code wasn’t readily
available.


Fi gure
6.7



Sel ecti ng The Java Database Causi ng An Error


Overall designing the website part of the project was very much a “trial and error”
experience that had to be hammered into shape from user feedback and intuition.

The fina
l design
though is a very
sleek
,
minimalist

and user
-
friendly site that makes it very easy to
jump

into the site
and get work done.


(2)
Android Application

Evaluation


The Android application
design
on the other hand

turned out to be a big surprise and

was
very
straightforward
to de
sign

(and a welcome surprise

at that

seeing as developing the mechanics
proved very tedious indeed)
.

Mostly due to Eclipses Android SDK which allows to develop the
interface XML files very easily

using a drag and drop method with the equivalent code being
gene
rated on an ongoing basis.

Amongst these
drag and drop

options are




B
uttons



F
orms



T
ext
-
V
iews



Check
-
Boxes



Radio
-
Buttons



S
liders




Etc.


P a g e

|
38


All of
these in
-
built features makes for a
very pain free

experience on the GUI front

when
developing an Android
application.

It saved a lot of precious time

as the opening day was fast
approaching.



B
ecause

Smartphone’s

and the applications they run are a relatively new technology there
are

far more “standard” ways to develop apps and how to lay them out.

There wasn’t much user
input required as Android applications for the most part, operate in a very similar way to one
another and why fix what isn’t broken?

A developer has far less scope to play around with and
even publishing an application

even
has to
go through a “check” by

a committee of

Apple or Google
depending on the platform

to see if it adheres to its standards or if there is any copyright
infringement
.


This is very u
nlike
modern day
web
-
technology
’s

which have

been around

the since
the early
1990’s

or so

and as result have grown a lot more organically with less standards but
rather

“layout conventions”

that make it easier for a user to navigate
.

When designing

and publishing a
website

a web
-
site a

developer

just has to hire a domain and can ma
ke a site with whatever and
however they want.

There’s no “committee” such as Google or Apples for applications when
deciding to publish a website.

Hence the need the need to gather a resource pool of users that
could regularly be contacted with for feedback on the current development

during the site
.

There
was not much need for
test
users during the Android development cycle as it was decided to sti
ck
with these standards

(sliders, menu
-
layout etc.
)

and stay true to the styling of a GUI on the Android
platform.


P a g e

|
39




Fi gure 6
.
8



Typi cal Layout Exampl es
For

Androi d
, These Were
Later

Added To My Own Appl i cati on



P
osting

using the Android application
was
good

in terms of usability

and in some cases
had extra features than the site.
Using the
A
ndroid application a

user

had the ability to

reference a
specific post number from the databas
e and check the contents of it(
this
was something that I
wanted
incorporated into

the site but couldn’t figure out how to

go about

implement
ing it
)

filtering
it out away from the rest of the unrelated posts.

Because of my familiarity with Java it was far
easier to implement this feature into the Android application

wit
h all of its in
-
built libraries

as
supposed to
t
he site which I found more difficult

using P
hp
.










Fi gure 6
.
9



The Androi d Appl i cati on Granti ng The User the Abi l i ty To Check Speci fi c Posts



Another feature of the Android application that
doesn’t

make an appearance in the site is
the ability to

be able to e
-
mail or contact
an individual

directly. On the site you have t
o use an
external client like G
mail etc

(or whoever your e
-
mail service provider is)

to send your message

but
on the Android application this third
-
party is cut out completely allowing the user th
e ability to e
-
mail them directl
y.

This is again down to Androids SDK which easily allows a developer to
implement such features and because of my familiarity with J
ava this proved far easier than to do
so on the site

(
Php needs an actual

running
s
erver

to be able to use such functions as mail()

but the
project was being run locally using XAMPP so this
wasn’t a possibility
).


P a g e

|
40



However the Android application for many
of its
benefits

has many draw
-
backs as

well.
Some features proved far harder to implement than originally intended
. For example in the site a
user has to have a valid login account after registering if he

or she

wants to ac
cess the main part of
the site. I
mplementing such a system is very straight
-
forward in Php and took little to no time to get
up and running. However on the Android platform this
proved to be

far trickier

and had to be cut
from the project to be
ready
on time for

the opening day
.




Fi gure 6
.
10



The

Si te Home Screen That Prevents A User From Progressi ng Any Further Into The Si te Unl ess They Have
A Val i d Logi n


This was one example of
how I underestimated

how difficult or easy it is to code specific
features in a language and taking f
or granted each languages respective strengths or weakness’s.

In
this regard Php allowed for a far easier way to implement a single login form due to its ability to
integrate easily with HTML

and send data to/from a form
.

Despite being able to design it ea
sily, its
far more difficult

to integrate Java with XML

an
d have them working
seamlessly,

If the time were
there to have
implemented

it properly the app
lication

would have had the

splash screen

followed

promptly

by a login screen that would look similar to
the
Skype

application

on Android

as shown
below.


NOTE :


A
splash screen

is an
image

that appears whi
le a game or program is loading




Wikipedia







P a g e

|
41








Fi gure 6
.
11



An Exampl e Of What Woul d Have Been The Logi n Screen For The Project



This makes the application very easy to use as
there’s

no confusion with the options
available to them and would have been

perfectly

in the same line of design as the web
-
site

aiming
for a quick
, clean and

simplistic layout.

On top of this it adds security to the users account that no
third party can access the account they have created without having their own login details.

The
appli
cation I constructed had no such login screen and so security was highly compromised as
anybody who could get access to a users phone could browse and post at will.


This was probably
the most glaringly obvious gap between that of the app and of the site.
Every other difference
between the two was minor

and really didn’t
affect

the
overall picture of the project.















P a g e

|
42












7
-

Co
nclusions

And Future Work



Overall I am pretty pleased with the project I produced as I feel
I got a chance to show
off
a lot of my main strengths as a
Computer Science student
.

I predominately showed

off my web
skills with nice use of what I learned particularly in first year

and pushing them further d
ealing with
larger databases while

introducin
g

other languages such as AJAX, Javascipt and Jquery
. I plan to
continue to use much of the source code especially from the site to implement it in my own
personal projects later down the road. Much of the existing code is highly recyc
l
able such a
s the
registration/login infrastructure, the submitting a post into the site as well as how the posts and
comments reference one another.

The Android application will work as a great reference point in
the future should I embark on a
nother application or want to

aid another person with their android
application
.




However if I had another 6 months I feel I could really incorporate a t
on more of the
functions I origin
ally wanted and also eradicate some of the known bugs in my project.

One feature which would have

made the project a whole more impressive would be the ability to
indent a users code when they post.

Similar to
many
other programming boards so its easy to
distinguish t
he code from the actual question or solution.

P a g e

|
43




Fi gure
7
.1


An Exampl e of
A
Code
Styl i ng Integrated Wi th A Users Post



As it can be seen here it is very easy to distinguish the two from one another and would
make the site very “user
-
friendly” and easy on the eye for people who wouldn’t be regular users.

This proved difficult to incorp
orate due to having to create an additional form field that would input
the code and then reference it to the correct comment.


With more time I feel this could have been
included and would have added a certain “polish” to the site.



Another feature I
would have liked is a way for users to rate a particular post or comment.

Along with this would be an integrated rating system that would put the best posts
towards the top
and the best comments at the top as well. On the flip
-
side

any bad posts or comments would be
filtered towards the bottom and eventually deleted.



Fi gure 7.2



Facebook “Li ke” Symbol Al l owi ng The User To Rate A Status



A button that would operate pretty similar to Facebooks infamous “Like” button would be
tagg
ed along with every post and comment allowing a user to rate it as they see fit.

The problem
with incorporating it though is
It came down to user authentication
.

It
would have proved
very
difficult to allow each user a respective rate and
then
restrict them to just one
rate

per post

so that
they couldn’t down
-
vote a post out of the system all on their own.

I would have to create

P a g e

|
44


additional tables on the database that would inform the system if they had already rated something
and prevent them f
rom doing so again. At that point the database scheme was drawn up and
implemented, it would have taken a long time to implement

and ensure I didn’t break anything else

but with six additional months it was
definitely

possible.



Another feature that is la
cking from the site but would have been a great one to
implement is the inclusion and display of a username.

This w
as something that was deemed
unnecessary

at the beginning of the project but as it drew towards its
competition

it became very
apparent that
a need for a way to filter out the bad users
w
as needed.

Under an anonymous
user
name
a student

is given a license

to post and rate as they please.

This can pose a problem if a
user is regularly posting bad advice or just rating something that he feels strongly about or against

regardless of its accuracy
.

It goes against the idea of students helping students and

just helps to
feed a single persons ow
n agenda.



Fi gure 7.3



Gi vi ng Each User Some Sort Of Face To Hel p Fi l ter The Bad Ones Out



With this inclusion of a username it would be easy for other posters just to ignore or
down
-
vote a person who they know advice is not of post
-
able quality.

It would also help with
admin responsibilities as they could just ban a particular users account after a number of offences
.



A great feature if more time was available would be to have a “trending” display similar to
Twitter to
allow

people

see

what ki
nd of questions or what topics are relevant at the moment and
show where the bulk of the sites users are posting.

It would also make the site interesting as it
would give it more “life” showing the different trends on a dail
y

basis and
help in
preventing t
he
site

from becoming stale.

P a g e

|
45




Fi gure 7
.
4



Twi tter Trends Al l owi ng Users To See What

s Popul ar On The Si te At Any Moment In Ti me



Again this proved to be a feature that would take a considerable amount of time to
implement.

The database would have
to be

checked periodically to check

then compare the
number of posts/comments inserted into each cate
gory
and then see which had a higher number
and then rank them accordingly.


Perhaps with an additional

six

months

and improved

SQL skills
this
would have been
available but throughout the months allocated to the project this proved to
be one feature too difficult

for me
.



As stated earlier the Android application not having a login screen was one glaring
weakness in the project.


Despite being able to design it easily, its far more difficult to integrate
Java with XML a
nd have them working seamlessly.

If the time were there to have implemented it
properly

(another six months of development)

the application would have had the splas
h screen
followed promptly by a login screen that would look similar to the Skype application on Android as
shown below.

This above most of the other features was the most obvious on the absent list and
would have priority

over all the rest

if a further si
x months were given to develop
the project
.



Finally connecting the two different platforms via the Computer Science server was the
last thing that was to be implemented on the list.

Due to the problems encountered a long the way
the decision was made to leave this last bit of the project out and focus on getting
the core
functionality working
and polished for what had been implemented

already
. Of course having the
two communicating a
cross desktops, laptops, tablets and phones would have be
en great for
P a g e

|
46


demonstrating
on the opening day

but getting the Android application conne
cting

to a remote
server

proved more difficult than

originally planned.


Fi gure
7.5



Communi cati on Across

Vari ous Pl atforms

Was

Greatl y Mi ssed





8
-

Reference List



http://stackoverflow.com/

StackOverflow

[
2
-

Introduction]
[Online Source]




http://php.net/manual/en/index.php

Php Manual


[
2

-

Introduction][Online Source]




https://www.youtube.com/

Youtube

[
2

-

Introduction][Online Source]




http://www.reddit.com/r/explainlikeimfive/


Reddit

Explain L
ike I’m 5



[2
-

Introduction][Online Source]




http://searchengineland.com/report
-
116
-
million
-
mobile
-
media
-
users
-
ios
-
driving
-
majority
-
of
-
non
-
pc
-
traffic
-
96383

P
ie chart
o
f

phone usage

[
2



Background]

[Online Source]

P a g e

|
47





http://thenewboston.org/


TheNewBoston


[
3



Background]

[Online Source]




http://en.wikipedia.org/wiki/Polymorphism_in_object
-
oriented_programming

Wikipedia on
Polymorphism

[3


Background]

[Online Source]




http://k1047.cbslocal.com/2013/04/02/new
-
study
-
reveals
-
that
-
smartphone
-
users
-
check
-
facebook
-
14
-
times
-
a
-
day/

Smartphone users alone log
in to Facebook 14 times a day


[3


Background]

[Online Source]




https://www.quora.com/

Quora

[3


Background]

[Online Source]




http://developer.android.com/guide/components/processes
-
and
-
threads.html

E
xplaining
the an
d
roid process lifecycle

[5


Implementation]

[Online Source]




http://simpsons.wikia.com/wiki/The_Homer

“The H
omer” And its origins

[6


Evaluation (
Android Application Evaluation)]

[Online Source]




http://en.wikipedia.org/wiki/Splash_screen


Wikipedia
definition

of a Splash S
creen


[6


Evaluation (
Android Application Evaluation)]

[Online Source]




http://cs1.ucc.ie/~wd1/ProjectPanther

My
own
working samples can be found
on my directory on the UCC Computer Science
server



A digital version of this report can be
at that directory also

[Online Source]


P a g e

|
48