What PHP Framework Should Be Used in Developing a Social Media Management Web Project

cakeexoticInternet και Εφαρμογές Web

13 Δεκ 2013 (πριν από 4 χρόνια και 4 μήνες)

150 εμφανίσεις





UNIVERSITY OF WATERLOO

Software Engineering



What PHP Framework Should Be Used in Developing
a Social Media Management Web Project









Syncapse
Corp.

Toronto, ON M5H 3G8














Prepared by

Nirujan Suresh

Student ID: 20378236

Email
:
nsuresh@uwaterloo.ca

2A Software Engineering


May, 7
, 2012


Nirujan Suresh

78
Connery Cresc
ent,

Markham, ON

L3S 4E6


May 7
, 2012


Dr. Charles, Clarke, Director

Software Engineering

University of Waterloo

Waterloo, ON

N2L 3G1


Dear Dr. Clarke:



The
enclosed report entitled
,
What PHP Framework Should Be Used in Developing

Social Media Management Web Project
,
is my first work term report. It is related to my work at
Syncapse Corp., where I was employed during my 2A work term.



Syncapse produces a social media management web application that allows companies
to
organize, collect,
measure, and publish social media content

[1]
. I was em
ployed in the
Development Team,
which
is responsible

for the developing new features,

and

fix new and
existing bugs within the Syncapse

platform
. During my co
-
op term,

I was
responsible for
numerous

bug fixes,

feature

development,
and creating

scripts

within the platform
.



This report
analyzes different PHP frameworks that can be used in
developing a social
media management web project
. More specifically, it will list the design constraints and criteria
and
evalu
ate
it against two frameworks
.

The solution of the best PHP framework to use
in a
social media management web project
will be dis
cussed.

The report’s audience would be for

web
developers wh
o

understand

the advantages in developing a web project with
in

a framework
.




I would like to thank my Development Team leader, Colin Hutchinson, and my co
-
workers, Tyler Kivari,

and Peter
Ludlow for their ongoing support, and advice throughout my
co
-
op term. I hereby confirm that I receiv
ed no help, other than what is
mentioned in the
reference list in writing this report. I also confi
rm that this report has not been
previously
submitted fo
r academic credit at this or any other academic institution.


Sincerely,



Nirujan Suresh

Student ID: 2037823
6


Execute Summary



Syncapse has requested to support Facebook Albums within the current platform.
However, a
PHP
framework must be used to
implement and design

this key feature.

The
Syncapse platform is a social media management web project and it is absolutely crucia
l

that the
web project is developed within a PHP framework.

This report will provide an analysis and
comparison between two
frameworks
,

CakePHP and Symfony
, evaluating them against a list of
constraints and criteria.

Th
is report evaluates the two PHP
frameworks

against a set of five criteria: rapid
development, maintainability, risk and security, extra
features and tools, and cost.

Within each
criterion,
a quantitative analysis of the framework was

given and the most preferable framework
was stated.

Both frameworks
were similar in certain criterion
. However, CakePHP was more
preferable in both rapid

dev
elopment and secur
ity/risk. Symfony was more preferable in extra
features and tools.
Symfony, a well
-
known
frameworks,

created by Sensio Labs

provides many
features and tools within the framework that allows developer more flexibility and options in
developing

a social media management web project. CakePHP,
known for its rapid development
environment provides a rapid development process and many tools and features to maintain
security and
stability within the project.

Both frameworks
are

open
-
source a
nd free.

Ultimately
,

the analysis and evaluation indicates that CakePHP was
more preferable than
Symfony.

Within a social media management web project, both rapid development and security
are two critical
constraints
.
This report recommends that CakePHP
should be the main
framework within a social media management web project and the team leader, project managers
and developers should allocate tim
e, research and
experimentation in developing with CakePHP
.

iii


Table of Contents

Execute Summary

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

iii

List of

Figures

................................
................................
................................
................................
..
v

List of Tables

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

vi

1
Introduction

................................
................................
................................
..........................
1


1.1



Purpose of the Report
................................
................................
......................
1


1.2


Background Information

................................
................................
.................
2

2
Problem Specification

................................
................................
................................
..........
3


2.1


Problem Specification in

Detail

................................
................................
......
3


2.2



Design Criteria and Constraints

................................
................................
......
4


2.3



Evaluation Criteria

................................
................................
..........................
4


2.3.1



Rapid Development

................................
................................
.........
5


2.3.2



Maintainability

................................
................................
.................
6


2.3.3



Risk and Security

................................
................................
.............
6


2.3.4




Extra Features and Tools

................................
................................
.
7


2
.3.5



Cost

................................
................................
................................
..
7

3


Solutions

................................
................................
................................
..............................
9


3.1


CakePHP

................................
................................
................................
........
9


3.2



Symfony

................................
................................
................................
..........
9


3.3



Alternative Solutions Not Considered

................................
............................
9

4

Evaluation

................................
................................
................................
..........................
11


4.1



Rapid Development

................................
................................
......................
11


4.2


Maintainability

................................
................................
..............................
11


4.3



Risk and Security

................................
................................
..........................
13


4.4



Extra Features and Tools

................................
................................
..............
13


4.5



Cost

................................
................................
................................
...............
14

5

Results

................................
................................
................................
................................
15

6

Conclusion

................................
................................
................................
.........................
16

7

Recommendation

................................
................................
................................
...............
17

References

................................
................................
................................
................................
......
18

Acknowledgements

................................
................................
................................
........................
19

Glossary

................................
................................
................................
................................
.........
20

Appendix A
: Features and Tools in CakePHP

................................
................................
...............
21

iv


List of Figures

Figure 1.1
:
MVC Request

................................
................................
................................
................
2


Figure 2.1:

Facebook Album View

................................
................................
................................
..
3

Figure 2.2
:

PH
P Framework Management Diagram

................................
................................
.......
5

Figure 2.3:
User Attack to Web Projects

................................
................................
.........................
7

Figure 3.1:

PHP Framework
Speed Comparison

................................
................................
...........
10

Figure 4.1:

Helpers in CakePHP Framework

................................
................................
................
12

Figure A.1
:
CakePHP Validation Array

................................
................................
........................
21


v


List of Tables

Table 5.1: Weight Scores

................................
................................
................................
...............
15
























vi


1

Introduction

1.1 Purpose of the Report

Syncapse is a company that develops a social media management platform for companies
to
organize, publish and measure their social media contents

in

Facebook, Twitter, and YouTube

[1]
.
The

platform

is

used by many companies
and big corporations.
Syncapse

give
s

an option to
their clients

to expand their knowledge in so
cial media contents by upgrading
the Syncapse

platform to do more in
-
depth

analysis

and
measurements

(i
.e.
S
yncapse Analytics
Suite).

In January 2012, I was given a task to implement and
design

that would allow clients to
publish, edit, and analyze
albums in their Facebook page

within the platform
.

Both the front
-
end
and back
-
end development needs to be worked on. Due to this problem, the easiest and most
efficient way to complete this tas
k is to use a PHP framework to help organize and improve the
efficiency

of coding in

this
social media management
web project.




In order to implement Facebook
Albums in the Syncapse Platform
,
a list of design
constraints must be followed in order to
merge the code with
in

the existing platform.
A list of
constrain
ts was

given based on the previous
code that exists

in the
current Syncapse
platform
.
Given these constraints, I have proposed a solution of specific PHP framework
that should be
used in a
social media management web project
. Additionally, there are many other benefits that
a PHP framework can offer
within the web project.

The report provides an evaluation between two different PHP frameworks.
It

will

provide
some background information on

the Facebook Platform

and

why we use a framework
.
Next, the
report will define some key design constraints and c
riteria, along with a brief overview of two
possible PHP frameworks.
The report will then evaluate these frameworks with each
criterion
.

Finally, the report will summarize the analysis of the results
, draw the conclusion of which PHP
framework is more
preferable
,
and make recommendations
.

This report is intended for any web
developers
,

including developers at Syncapse and Facebook
,

who

have

experience and interest in
using social media
and the Facebook Platform.



1


1.2 Background Information


Syncapse uses
the Facebook Platform
to draw information
about social media content.
In

addition

of getting information about
people, photos,
and
pages
,
the Facebook Platform

can
retrieve data such as likes,
comments, and

URL

links.

The Facebook Platform

provides
developers with a set of API’s and tools which will enable them to get
the

information mentioned
above.

These API’s can also be use
d

to publish content directly to Facebook without having to
access a Facebook account.


The Graph API is the main core of the Facebook platform.
This API consists of objects
that
contain a specific set of data.
Some
examples of objects are

post, album
,
and

page.

The
Graph API allows developers to read and write these objects into Facebook.

Syncapse uses the
API’s connections

to examine connections between objects.
For an example,
Bob is a fan of the
McDonald’s Facebook Page and Bob is friends with Rob.
This

relationship

is

known as a
connection
.
All the objects in the Graph API have connections whic
h contain valuable data

[2]
.


The Model
-
View
-
Controller

(MVC)

is the architectural pattern that is used in every PHP
framework.

The Model
is
responsible for storing and maintaining the application data within the
web project.
The Controller
is responsible for handing any requests made by the client.
Any
transfer of data will be controlled using the Controller code. The View will
render

the data

from
the model.

This is what the client will interact with. A sample MVC call
will start with a request
from the

client,
and
ultimately

end up in the view,

as shown in
Figure 1.2.

CakePHP is
a
n open
-
sou
r
ce

PHP framework and it uses the MVC architecture.

T
his framework allows developers to
create their web applications
effectively

giving th
em a list of valuable features to use

[3]
.




Figure 1.1
.
An example of a MVC
request used in a CakePHP framework.

2


2

Problem Specification

2.1
Problem
Specification
in Detail


As part of the Syncapse Platform,
clients should be able to publish a photo, status update,
and
a post

to the
ir Facebook Pages.
However, Syncapse has not implemented publishing albums
to Facebook.
I was

responsible
in completing

this task
which would

allow clients to

upload and
publish their own album to Facebook
. This would appear on their Facebook page
.


In order
to upload these photos to the Syncapse Platform, an
API that uploads photos

must be used.
It’s far more efficient to use
third

party software to upload photos rather than
creating an API from scratch that
would
allow photos to be uploaded to the Syncapse Platform; it
will save valuable time.

The user will be able to edit their uploaded images s
uch as adding,
deleting, and edit the image

and album

description.


Displaying all these
data in a
pleasant

and efficient way
was

also a major concern.

It was
originally thought that we would be handling a few hundred Facebook albums. However, some
clients have reported that they currently have more than 400 Facebook albums and over 40,000
images in total.
Due to the
immense number of photos, the original

layout of displaying our data
ha
d to be changed
.

I

needed to find a way to create these views which will be used repeatedly,
and allow our platform to handle hundreds
of images being uploaded at once.

Therefore,
we need
to develop a new way
to display
thousands of new and existing data i
n Facebook
, similar to what
Facebook develop
ed

as shown in
Figure 2.1
.



Figure 2.1.

Facebook

has

arranged their albums in thumbnail
s

by using a PHP framework and calling the
same view element for each album
.

Each album

will re
-
direct to its own view page.


3



All these problems m
entioned above can be solved by using a PHP framework. A
framework will allow
many useful features that can be used for efficiency, and rapid
development.
Typically,

a framework helps rapid development in any web project which will
save time, build more stable applications, make development easier with larger teams,
and
reduce the number of r
epetitive code.
Due to the
popularity, there are many frameworks to
choose on
e.
A decision had to be made on which of these framework would be best suited in
implementing albums in the Syncapse Platform.



2.2
Design Criteria and Constraints


The Syncapse product management team has defined the following technical constraints

for
the
implement
ion of

Facebook Albums in the Syncapse Platform.



It must be
compatible

with all browsers in every operating system available in the
market



The framework

must

be compatible with

PHP 5.2, and MySQL

5.5



It must support browser caching and
object
-
relational mapping (ORM)

The PHP frameworks discussed in this report satisfies these technical constraints.


2.3 Evaluation Criteria


When determining what PHP
framework is

most suitable in resolving this problem, there
are many key factors that
need

to be considered.
As mentioned before,

the sole purpose of
developing in a framework
is to speed up the development process.



Depending on the framework, speeding up the development process could be defined
in a
differen
t. In every PHP framework, the MVC architecture is used.
This is one example of how
all frameworks speed up the development process.
Separating

a web project into three distinct
sections that perform different tasks allows a developer

to
separate
the user
interface (UI) from
the
application code.
Developers have the freedom to develop on individual elements within this
architecture

without affecting the work of other developers

[3]
.

I
t makes coding less complicated
and therefore, speeds up the development
process
, as shown in
Figure

2.2
.

4





Figure 2.2
.
Using a PHP framework,
a

web project

is

broken into sections
which
will lead to
rapid

and
efficient development within a team.



However,
certain PHP frameworks offer unique
features and tools
that make it more
convincing to develop wi
thin that particular framework.
Ultimately
, these features will end up
speeding the development process while adding other benefits

and maintaining stability within
the application
.



The following subsections belo
w will define
a list of criteria in which
possible
framework solutions will be evaluated against.
These criteria
must be satisfied
within a
reasonable
certainty

and is required in developing albums in the Syncapse Platform.




2.3.1

Rapid Development

The whole point in developing in a framework is to speed up the developing process.
However, some frameworks may require some time and extra reading to understand how the
framework works.
Every
framework

follows the MVC architecture but
they dif
fer in
the
presentation.
Furthermore
,

every framework differs in the content they offer and the way the
y

handle and
operate

their framework. Some frameworks will take longer to setup and configure
certain settings. This may
include

setting up the database
,
configuration

of

complicated

files

(i.e.

XML

file
s
)
,
and
installing

required software.



5


The difficulty behind how the framework works and developing within the framework is
also a big factor.
For an expert programmer, developing in a new framework may
take days to
get used to

but for a novice programmer, this proce
ss may take weeks.
The difficulty could cause
inconsistently with
in the developing tea
m and will raise many concerns.
Therefore, the
framework must be

fairly simple to understand

by supplying
any manuals,
tutorials,

and

sample
code

available online
.








2.3.2 Maintainability


With more enhancements and technological innovations being discovered and created

in
the w
eb, it is importan
t that

the framework
updates with
it. It

should have a wide range of
support to new add
-
ons

and features that will allow developers to update their application with
the latest
enhancements and improve their style of coding.



Many frameworks are open

source.

This will allow developers to change and improve the
existing framework and distribute it to the web.
This is very beneficial because it merges many
innovative ideas by developers and gives others an opportunity to use it for their own use.
Many
frameworks

also have blogs and forums for developers to express their feelings and thoughts.
Along with documentation
, these will add
stability and maintainability within a framework.

This
is
especially

crucial for
a large web project used by millions of customers and developed by
hundreds of developers.
As a result, t
he software must be up to date
and
stab
le
.



2.3.3

Risk and Security


It is important to always protect software from any
dangerous

data
. The Syncapse

Platform allows clients to upload photos, video, and info
rmation from their own computer.
Th
is
could pose a threat to
the platform since all the data will

be stored and processed into a database
,
as shown in
Figure 2.3
.

Certain validation and security measurements must be made to any data
being received by the client
.

A

framework could be responsible in providing some
tool

that
effectively checks for
malicious

data.


6



Figure 2.3.
The attack begins by a user submitting
malicious data
.
The server will store this data but will
n
ot process this data correctly and most likely return errors
. A keyword list should be used to check for
any dangerous data.



New software updates

can also pose a risk within a web project in a framework.
New

and
untested code
within

a framework

upgrade

could
break the
web
project due to
compatibility

issues.
More problems will arise and downgrading versions may be impossible

or
unsupported
.

T
herefore
,

the framew
ork upgrade could be
permanent
.
It is

important
to check

for any
compatibility issues before upgrading
the framework
.






2.3.4

Extra
Features

and Tools


This is what differentiates
the most
between PHP frameworks.

Every
framework

offers a
variety of unique features and tools to help reduce the work load in developing a project and
increase the speed of development.

For instance, having the
ability

to create a
plug
-
in

within a
framework is very beneficial
and time saving
.

A plug
-
in is simply a small application that can be
used anytime by simply calling a package.

Without duplicating any code, this plug
-
in can be
created multiple times.

F
eature
and

tool help improve the style of code, add
functionality
,
simplicity and effi
ciency
in developing
a social media management web project
.




2.3.5

Cost


Most frame
works are considered open source

and therefore are free of charge
. However,
there are some PHP frameworks

that do require a fee
.
Some frameworks are custom
-
built by a
few web developers and others are developed by companies. For the most part, PHP frameworks
7


are open source and are completely free.

Most
social media management
web projects usually
use
this

type of framework.

Those t
hat have a price on them usually provide more
support,
training and features within the framework
.






8


3

Solutions


3.1 CakePHP


CakePHP

is an open
-
source and rapid development
PHP framework
.

It has been created
and maintained by many developers for the sole purpose of

creating

an easy and rapid way to
start any kind of web project.
CakePHP has an active developer team and community and offers
a variety of
features
. The current version is 2.0
and this version promises to offer useful and
innovative resources to be used in developing web projects

[3]
.


3.2 Symfony


Symfony

is
another open
-
source PHP framework.

Symfony was developed by the
interactive agency Sensio Labs for its own use. However
in 2005, Sensio Labs published this
framework under

MIT Open Source license.
It is currently o
ne of the well
-
known frameworks
that many developers use today. Symfony offers a v
ariety of resources and support.
Currently on
version 2.0, Symfony is being used

by many well
-
known companies such as Yahoo!, and
Dailymotion

[4]
.






3
.3

Alternative Solutions Not Considered


With the advancement of technology and web development,
there are
many frameworks
out there that are
faster, and perform at a higher
level than CakePHP and Symfony, as shown in
Figure 3.1.
Yii and DooPHP are two of the fastest framework available today.
However, they
are fairly new and have only released their framework three years ago.
Both Yii and DooPHP
released their first version of their PHP framework in 2009.


9



Figure 3.1.
Speed comparison between different PHP frameworks measured in requests/second.



New PHP frameworks wi
ll be a big risk for companies.
Developing in a new

framework
could cause problems such as lack of support, frequent bugs and defects, and slow upgrades
.

For
personal web projects, this risk can be
ignored
. However for companies like Syncapse, it is
important and
crucial

to stick with a PHP
framework

that
is reliable,
stable,

and has lots of
support and resources to use.

The software that is used by Syncapse will be used by thousands

of
people so it is important to maintain stability within the platform.



10


4

Evaluation



The following subsections below will
provide a direct comparison of CakePHP and
Symfony against each criterion.

The PHP framework that is most preferred in each criterion will
be
stated
.


4.1 Rapid Development


Cake
PHP excels in this area.
CakePHP is well known for its rapid development process.
It requires you to set up
the

database without configuring any type of files.
With its manual
available on the web, CakePHP
has the advantage for any beginners to start developing their web
project a
s quick as possible.
It has a small learning curve

and there is little to no complicated
steps in any

of the

installation process.
It works in any web site directory with little or no Apache
configuration

[3]
.

This is the ideal framework to use for any developers that are new in using
frameworks and need to complete their web project quickly and effectively.



Like CakePHP, Symfony
is also a fairly simple framework
to understand. However,
CakePHP’s models are
written in PHP
and Symfony’s models are written in YAML.

YAML is a
human friendly data serialization standard that Symfony uses in their
database

[5]
.

T
his requires
more

configurations

within
the installation process.

On top of this, Symfony’s has a larger

learning curve

than CakePHP
.

In comparison with CakePHP, Symfony will require more time,
research and dedication to get a web project up and running. Due to the strict deadline,
CakePHP

is
preferable

to Symfony.



4.2 Maintainability


In CakePHP, a variety of support is given to people who use this framework.
A
community is available which allows developers to report/track any bugs,

discuss any issues, and
ultimately

communicate between developers across the world.

CakePHP also offers t
raining for
developers new in developing within a framework.
With millions of people using this framework
every day, CakePHP is
consistently

being
upgraded with

new features

and resources to its
framework (open
-
source).

Maintain
ing

a web project, such as the Syncapse Platform is simple if
CakePHP

is being used.

CakePHP offers components
-
like classes such as
helpers

which
11


separates

different views in packages. These packages can be called at anytime and this allows
developers to main
tain and upgrade their project with ease and efficiency.

This idea of using
helpers in a CakePHP framework is shown in
Figure 4.1.


Figure 4.1.
The main layout of the webpa
ge can consist of many helpers and elements. These helpers are
maintained and updated
separately from other view elements.




In
contrast
,
Symfony
also provides a variety of supports to developers.
Similarly

to

CakePHP, a community
is available.

A live community
, training

and membership forums are
resources Symfony

offers

to web developers. Since a lot of companies use
Symfony

as their PHP
framework, Sensio Labs is involved in adding features and upgrades to Symfony.
Symfony is
very reliable and is known internationally
,

as companies such as
Yahoo!, and Dailymotion
use
this framework daily

[4]
.
Symfony is very flexible and can be used in a variety of ways. It offers
the use of using reusable code (similar to helpers in CakePHP),
and templates.


In general, both frameworks have
a sustainable framework which is

mainta
ined by
developers frequently. They both offer various ways of support and offer many kinds of
resources and tools to maintain a social media management web project
. With respect to the
maintainability of the framework, CakePHP and Symfony are equally
pref
erable
.








12


4.3 Risk and Security


Both frameworks have been used for over 8 years and therefore both frameworks have
some sort of way of protecting from harmful data.

The Syncapse

Platform

must protect against
harmful data that are sent by
the
client to maintain stability
.

However, there are

some

risks
in
using CakePHP
or

Symfony.


CakePHP comes with built
-
in tools
to protect against harmful data
,

f
orm tampering, SQL
injections, and input validation
. These

are some ways that users can
send malicious data to the
server.
The CakePHP sanitize class can be used to prevent and get rid of these dangerous data.

Data validation can validate data before being sent to the database

[3]
.
Furthermore,
CakePHP
offers other ways to prevent users to
input malicious data
, and store clean data entry into the
database.


In
contrast
,

Symfony

offers a validation system that protect against harmful data.
Unlike
CakePHP, Symfony doesn’t have a single class that it could call to protect against
all
harmful
d
ata
sent by

users.

Creating a validation method is not trivial and requires some effort. However,
Symfony creates

a

strong and flexible validation system that can remove data that the developer
may find to be unnecessary

[4]
.

However, for simplicity and
protection, CakePHP offers a
simple, fast, and secure way to protect against different type of ways that users can input
malicious data. With respect to security
,
CakePHP is very preferable to Symfony.



4.4 Extra Features and Tools


Cake
PHP excels in
this

criterion
.
It offers
many features and tools to developers to aid in
rapid development process, and
add

new and innovative functionality to web projects.

For a
social media management web project, features such as

caching, validation, helpers,
URL
routing
, and strict naming convention will be an asset.

The manual makes it extremely easy and
convenient

to find common task that CakePHP offers
web developers.

For more information
about the
se

features that CakePHP offers, view
Ap
pendix A.


Similar to CakePHP, Symfony offers many features and tools for web developers to be
used in certain web projects.
Symfony has components
that implement common features that
13


many web developers need to develop websites.
It has a cookbook to guide developers in
creating a solution to a common problem such as

templates
,

and caching.
Symfony has external
software

to provide developers with a much eas
ier

and friendly way of doing certain task. For
example, Symfony uses
Swift
M
ail
er

which is a
powerful

and flexible web application that
handles
the

client’s

mailing needs
. Using software in which other companies have tested,
upgraded and
fully innovated will provide developers with
the best
applications
available.



Although
Symfony offers more features and tools for developers to use, CakePHP offers
features that can be

quickly developed

with.

However,
Symfony is
preferable to CakePHP.


4.5 Cost


Both frameworks are open
-
source. Therefore
,

any developer can access, modify and use
this framework for free.

Furthermore
, any training, manual, or resources to external and useful
information is also free

for both CakePHP and Symfony. With respect to cost, CakePHP and
Symfony are equally preferabl
e.



14



5

Results


After evaluating each framework with the following criteria mentioned above,
it seems
that both
CakePHP and Symfony

are great
framework
s

to use in a soci
al media management web
project.

However, certain criteria take priority over others.
In a deadline of two months,
rapid
development will be the number one priority
while the cost will be the least
important.

The evaluation
shows that CakePHP has a significant advantage when it comes to
rapid
development
,

and

risks/
security
.

With the exception of maintainability and cost,

Symfony has the
only advantage over features and tools.

Although features and tools are

considered a great asset
in web development,

it is important to have a rapid development process within a social media
management web project. These projects will take a considerable amount of time and it is
unnecessary to add features and tools
to
innovate the project

at an early stage
.
With thousan
ds of
inputs being processed and uploaded every day, security is also important for a social media
management web project.

Table 5.1
summarizes these evaluations to the list of criteria, each
having
a percentage weight.

Table 5.1
: Weighted Scores

Criteria

CakePHP

Symfony

Rapid Development

(35
%)

30

15

Maintainability

(20%)

15

15

Risk and Security

(25
%)

20

15

Extra Features and Tools

(15%)

5

15

Cost

(5%)

5

5

TOTAL

75

65

Ultimately
,

CakePHP is a better PHP framework for social media management web
projects and it makes it the appropriate choice
for web developers to use.
However, it is also
important to recognize that without the need for a rapid development process, Symfony would be
the better framework.




15


6

Conclusion


The
results of the evaluation indicate

that CakePHP and Symfony are both PHP
frameworks that share some similar aspects.
However,
some major differences are visible when
evaluatin
g both frameworks with security/
risks,

features/tools,

and rapid development.


CakePHP offers tools
that defend against any threats from user input.
It’s well known for
its rapid development process and therefore, it makes it an ideal framework to work with any
web project that needs to

finish their project at a certain deadline.
Social media management web
projects will consume a lot of time
and consistency

is very important to maintain.
However
,

Symfony offers more features and tools than CakePHP which developers can use to improve
efficiency and
functionality

in
a social media management web project.



Aside from the similarities

and features,
the most influential factor on the outcome was
the r
apid development and security.
CakePHP is meant for rapid development while Symfony
offers more features and resources
in developing a web project.
For a social media management
web project like the Syncapse Platform, speed and security are one of the few
crucial

criteria

that
are noted in the design process.


Ultimately
,

CakePHP is more preferable for a social media management web project
and
makes it the ideal framework to work with

under these circumstances
.
I
t is important to notice
that with the
similarities
, time,

and the weight factors
ignored
, Symf
ony will be the better
framework.




16


7

Recommendation


Although the report
recommends using CakePHP over Symfony for
the

framework
to be
used in a social media management web project,
Symfony will be the better framework if time
was not a factor.
Symfony does have a bigger learning curve than CakePHP but in the long run,
Symfony will be more
valuable and rewarding.



To compensate for the rapid development process and smaller

amount of

security tools

available
,

Symfony offe
rs th
i
rd
-
party software, features
and tools.
This gives more variety to
build the application
.

F
urthermore, it allows you to use these software building blocks without
having to use the framework in its entirety

[4]
.


There is a slight risk in upgrading frameworks in their beta version. Although both
frameworks are equally preferable
, it is important that upgrading to beta versions will not
maintain a social media management web project. This may cause instability beca
use beta
versions of frameworks are not fully tested for bugs and defects.



Regardless, CakePHP
is

preferred over Symfony.
With this solution in mind, developers
and
especially

lead developer
s

should spend a few days researching

the features, and tools that
CakePHP offers. In order to use this framework as eff
ectively

as possible, the basic knowledge
of this framework should be understandable before any development has begun.

The project
manager should allocate some days for deve
lopers to spend time getting familiar with CakePHP.












17


References

[1] “
Syncapse Corporate Social Media Management Platform
”,
Syncapse

Corp
, 2012, [Online],
Available:
http://syncapse.com/platform/
,
Last
Accessed: May, 6, 2012.


[2] “
Graph
API
”,
Facebook
, 2012, [Online], Available:
https://developers.facebook.com/docs/reference/api/
, Last Accessed: May, 6, 2012.


[
3
]
“CakePHP,
The Manual
”,
Cake Software Foundation Inc
,
2
012
, [Online], Available:

http://book.cakephp.org/1.3/view/876/The
-
Manual
,

Last
Accessed:
May
,

6, 2012
.


[
4
] “
Learn Symfony
”,
Fabien Potencier
, 2012, [Online], Available:
http://symfony.com/doc/current/index.html
, Last Accessed: May, 6, 2012.


[5]
C.C. Evans
,

YAML
”, 2012, [Online], Available:
http://yaml.org/
, Last Accessed: May, 6,
2012.

18


Acknowledgements


I would like to thank Andrew Morton and Mahesh Tripunitara for their assistance in
deciding my work term report topic.
I would also like to thank
my

colleague
s, Tyler Kivari, Peter
Ludlow, and Colin Hutchinson for their on
-
going support through my work term and giving me
insights into this topic.
They

provided me with some valuable tips and resources and their
expertise on PHP framework development pr
oved to be priceless.





19


Glossary

PHP
:
Server
-
side scripting language widely used for web development

MVC

(Model
-
View
-
Controller)
:

an architectural pattern used in software that divides an
application into three parts.
The model represents the
application’s data. Th
e
controller is
responsible for translating user input and transferring data. The view
generates

the data to the
user


ORM
:
a technique for accessing, manipulating, and addressing objects without the need to relate
to their data sources.

XML

(Extensible Markup Language):

a document
(
markup language), filled with text that is
both

human and machine readable.


Apache
:

a web
server. A web server is a computer or software that help deliver content that is
accessed through the Internet.

YAML
:

human
-
readable data serialization format [5]




20



Append
ix A: Features and Tools in CakePHP


CakePHP offers many features and
tools for developers to ease on their developing
process by making it more efficient and innovative to create applications.

Specifically in a social
media management web project, there are some key features that could be use
d

to aid in rapid
development

and stability.

The model, database, controller and view in CakePHP have a specific naming
convention. For example, if a model class is named SampleProject, then this class would be
found in a file named sample_project. This creates a strict and defined n
aming process within
web
application. I
t reduces the confusion between different naming conventions from
developers. By using
these naming conventions
, developers gain functionality without the hassle
of any configuration. If a database table, a controller

class, and a view template were name
sample, SampleProjectController, and index respectively (assuming the model class is connected
with the database table), CakePHP will know that a request to this view template maps a call to
the index() function of the

SampleProjectController where the SampleProject

class

is available
[3].

Cache is a temporary storage for any web documents.
This is
especially

useful
in a soci
al
media management web project.
In the Syncapse Platform, caching is used for expiration, login

duration
,

login
credentials
,

and faster web page loads.

CakePHP provide
s a Cache class which
provides
a simple and generic way to read, write, and configure cache

[3]
.
For example,
if a
developer wants to read

a

cache
d value
, they will do the following:

$sample = Cache::read(‘sample’);

//where $sample will store the
cached value


CakePHP provides a Validation class
containing

many built
-
in validation rules that
makes it easier for
validating data
.

Instead of writing
these validations

separately, the Vali
dation
class contains many validation techniques and wraps them up in
one

array. For example, to
create a validation rule where a password must be between 5 to 15

characters long,
Figure A.1
will show the array that needs to be created
:


21


:


Figure A.1.
This array will validate a password. The password must be between 5 to 15 characters. If the
password does not fit this criterion, a message w
ill

appear.


As seen from the image above, it takes little effort to create these validation rules. The
CakePHP man
ual will provide many more rules that can be used in a validation process.

There
are rules specific for email verification,
number comparison, string comparison, money, phone
numbers and more

[3]
.



22