Janne Patrikainen Flash Content Management

cortegesmashInternet and Web Development

Nov 10, 2013 (3 years and 7 months ago)

220 views

EVTEK
Institute of Technology

Degree Programme in Media Engineering





















Janne Patrikainen


Flash Content Management





















Bachelor`s Thesis
8

May

2005


Instructor: Aki
-
Ville Pöykiö, Technology Manager

Supervisor: Erkki Rämö, P
rincipal Lecturer

Language Instructor: Leena Nurmi, Lecturer
2

EVTEK

Institute of Technology




ABSTRACT




Author

Title


Number of
Pages

Date


Janne Patrikainen

Flash Content Management


4
9

pages

8

May 2005



Degree Pr
ogramme



Media Engineering


Instruct
or

Supervisor



Aki
-
Ville Pöykiö, Technology Manager

Erkki Rämö,
Principal Lecturer


The a
im of this
final year project

was to develop a Flash Content Management model
for Morning Content Management System (CMS).
The m
ain requirements for this
model were
a data integration solution and a template model. I experimented with the
possible data integration technologies to determine the best possible solution available
for Macromedia Flash MX and Flash MX 2004.
The e
xpectations were to find an
innovative approa
ch to manage the content of a Rich Internet Application with Morning
CMS.


The d
ata integration solution was implemented with Flash Remoting for PHP
(AMFPHP) open
-
source project and Flash Remoting components.
The p
rogramming
part of the thesis included
tem
plate and content request models for the Morning Flash
CMS. Project also included
Morning CMS

1.2

installation, AMFPHP services, XHTML
front
-
end and Flash front
-
end.

The Flash CMS project

was

a success and went without
problems. P
arts of the developed code

will be used in the future projects.



Keywords


Flash Remoting, content management system, PHP, MySQL



3

EVTEK
-
ammattikorkeakoulu




INSINÖÖRITYÖN








TII
VISTELMÄ



Tekijä

Otsikko


Sivumäärä

Aika


Janne Patrikainen

Flash
-
sisällönhallinta


4
9

sivua

8
.5.2005



Koulutusohjelma



Media Engineering


Ohjaaja

Valvoja



teknologiapäällikkö Aki
-
Ville Pöykiö

yliopettaja Erkki Rämö


Insinöörityön tavoitte
ena oli tutkia Macromedia
n

Flash
-
ohjelmalla tehtyjen www
-
sivujen sisällönhallinnan kehittämistä Morning
Digital Design Oy:ssä. Vaat
imuksina
Flash
-
sisällönhallinta
ratkaisulle olivat toimiva tiedonsiirto
-

ja sivupohjamalli.

Insinöörityön toteutus vaati parhaan mahdollisen tiedonsiirtoteknologian määrittelyn
Macromedia Flash MX
-

ja Flash MX 2004
-
alustoille.
Insinöörityön tavoitteena oli
löytää innovatiivinen ratkaisu Flash
-
sivustojen sisällönhallintaan.


Insinööri
työn käytännön toteutus sisälsi tiedonsiirto
-

ja sivupohjakomponentti
en
kehityksen Morning Flash CMS
-
sivustoja varten. Sen lisäksi projekti sisälsi

Morning
-
sisällönhallintajärjestelmän asennuksen, AMFPHP
-
yhdysk
äytävän palvelujen
ohjelmoinnin

sekä XHTML
-

ja Flash
-
mallisivustot. Flash CMS

-
projekti onnistui
saavuttamaan sille asetetut tavoitteet ilman ongelmia. Osia kehitetystä koodista
käytetään

tulev
issa

projekteissa.



Hakusanat


Flash Remoting, sisällönhallinta
järjestelmä
, PHP, MySQL



4

Definitions



AMF

Action Media Format
-

Macrom
edias remote procedure binary
message format.

AMFPHP

Flash Remoting for PHP
-

gateway.
See Flash, PHP and Gateway

A
pache

Apache is Unix
-
based, open
-
source Web server
. It is also
most
widely available HTTP server on the Internet.
See HTTP and
S
erver

API

Application Programming Interface API is a set of routines,
protocols, and tools for building software applications
.

Practically
API can be

any interface that enables one program to use facilities
provided by another
.

CMS

Content Management System
-

Content management is the
organizing, categorizing, and structuring of information resources so
that they can b
e stored, p
ublished, and edited.

FLA

Editable Flash
file.

See Flash

Flash

Macromedia Flash is a Rich Internet Application authoring tool.

Gateway

Gateway is a network point that acts as an entrance to another
network.

HTML

Hypertext Markup Language
-

Set of marku
p symbols or codes
inserted in a file intended for display on a WWW browser page.

HTTP

HTTP (Hypertext Transfer Protocol) is the set of rules for
transferring files on the WWW.

See WWW

LAMP

Linux
-
Apache
-
MySQL
-
PHP

Linux

Linux is a f
ree Unix
-
type operatin
g system originally created by
Linus Torvalds.

MCMS

Morning Content Management System
.
See CMS

Morning

Morning Digital Design Oy

MySQL

MySQL is an open source relational database management system
that uses SQL.
See SQL

PHP

Script programming language.

Originally derived from Personal
Home Page Tools, now stands for PHP: Hypertext Preprocessor.

RIA

Rich Internet Application is a cross between web applications and
traditional desktop applications, transfering some of the processing
to the client end.

Server

A computer or device on a network that manages network resources.

SQL

Structured Query Language
-

Standard interactive and programming
language for getting information from and updating a database.

SWF

The SWF movie file is a Macromedia technolog
y for presenting
vector graphics with animation, programming and interactivity.

WWW

World Wide Web

-

the Internet

XHTML

Extensible HyperText Markup Language
.
See HTML

XML

Extensible Markup Language
-

Flexible way to create common
information formats and

share both the format and the data.


5

Table of Contents


Abstract

Tiivistelmä

Definitions

Table of Contents


1 Introduction

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

7

2 Mor
ning Content Management

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

8

2.1 Morning Digital Design Oy

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

8

2.2 Content Management

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

8

2.2.1 Content Management Systems

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

9

2.2.2 Morning Content Management System

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

9

2.3 Macromedia Flash MX

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

11

2.3.1 Flash Usability

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

12

2.3.2 Flash Player

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

12

2.4 Flash Development

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

14

2.5 Flash Content Management Solutions

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

15

2.5.1 EGO7 CMSMX

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

15

2.5.2 comaTool v2.0
................................
................................
................................

16

3 Data Integration

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

17

3.1 Integration Technologies

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

17

3.1.1 LoadVariables and LoadVars

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

18

3.1.2 XML Connections

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

19

3.1.3 Flash Remoting

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

20

3.1.4 Web Services

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

21

3.2 Flash MX 2004 Data Integration Architecture
................................
......................

22

3.2.1 Data Integrati
on Components

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

23

4 Implementation Plan and Requirements

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

25

4.1 Server
-
side Infrastructure and Middleware

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

25

4.2 Data Integration Plan

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

26

4.2.1 Extensible Markup Language

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

27

6

4.2.2 Web Services

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

27

4.2.3 Flash Remoting

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

28

4.2.4 Flash Remoting for PHP

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

28

4.3 C
hoosing Between MX and MX04

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

29

4.4 Page Request and Template Model

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

30

4.5 Requirements

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

32

5 Content Management Solution

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

33

5.1 Deployment and Services

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

34

5.2 Page Request and Template Models

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

35

5.3 Security

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

37

5.4 Demo 2005 Web Site

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

37

6 Conclusions

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

39

References

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

41

Appendix B

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

46

Appendix C

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

47

Appendix D

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

49

7

1 Introduction


Flash Content Management is a fairly new area in the content management business.
There is only a handful of commercial Flash Content Management Systems a
vailable. In
general, integrating a content management system with a rich Internet application like
Flash web site is a difficult task. The main problem lies in the dynamic nature of the
Rich Internet Applications. Still the rich Internet applications are
becoming more and
more popular all the time. Helsingin Sanomat [32] digital paper is a good example of a
great service made with Flash.


Morning Content Management System (CMS) is a dynamic database publishing system
designed to manage HTML (Hypertext Mar
kup Language) web sites. There was a need
to experiment with different possibilities to manage the content of a Flash web site with
Morning CMS. The project was codenamed Morning Flash CMS. Morning CMS
has
been

developed by Morning Digital Design Oy.


The
purpose of this final year project

was to identify the best data integration solution
for Morning Flash CMS and to implement the solution to the

Morning

development
server. I also wanted to create reusable code and components for the future Flash CMS
proje
cts. The most important parts of the solution are the developed page r
equest and
template components. With these components

the basic

Flash CMS functionality
can be
easily implemented in the future projects.


Project was divided into following stages:
pro
posal,
technology a
nalysis,
d
esign
ing and
development.

Technology analysis included Flash data integration technology review
and data integration technology experiments.

I also researched the commercial Flash
CMS solutions available through the Internet.

D
ifferent coding parts had to be
developed at the same time so they could be tested.
Solutions were tested

after each

development

step so alternative approaches could be considered. I also included a short
segment about the Flash usability and accessibility
. Finally, a number of conclusions
could be drawn from the project.

8

2 Morning Content Management


2.1 Morning Digital Design Oy


Morning Digital Design Oy was f
ounded
1 October 2001 by uni
ting Edita
s To the Point
and TJ Group's Branding and Advertising, a
nd

Multimedia units. In

the

year 2005 Edita
Oyj and TJ Group Oyj owned Morning in equal shares. During

the

year 2002 Morning
Digital Design employed about fifty persons and had a turnover of 4,7
m. €
. Morning is
a design and production company offering dig
ital solutions for company
communication, marketing, campaigns, branding and sales boosting. Morning web site
offers a view of Mornings mission. "Morning Digital Design Oy is a specialist of digital
marketing communication. Morning designs and implements e
ffective and measurable
solutions for communicational, marketing and sales boosting purposes." [1] Some of the
Mornings biggest customers include Nokia, TeliaSonera Finland, SRV yhtiöt, Metso,
Stora Enso, Metsäteollisuus Ry, MTV3, Kiinteistömaailma, Kapite
eli and Edita. This
final year project

was done for Morning Digital Design as an attempt to improve the
Morning Content Management Systems Flash support.


2.2 Content Management


Before we can dive into the world of Content Management Systems we need to fi
nd an
answer to a simple question
: W
hat is Content Management? "Content management is
the organizing, categorizing, and structuring of information resources (text, images,
documents etc.) so that they can be stored, published, and edited with ease and
flex
ibility." [2] Content management can be a simple task when we have only one or
a
few people managing the content. Whe
n the amount of the content and

people involved
increases, the content management becomes increasingly difficult. Content management
system
s are designed to address these problems in the digital world.

9

2.2.1 Content Management Systems


Content Management System (CMS) "is used to collect, manage, and publish content,
storing the content either as components or whole documents, while maintainin
g
dynamic links between components." [2] CMS stores the content and meta data
describing the content
in
to a database (Storage). Server side programming language is
used to control the requests and responses between the client and the database (Logic).
Requ
ests are triggered by users actions and responses are displayed for the user (Front
-
end). In the model Macromedia Flash MX 2004 uses these are called presentation tier
(Front
-
end), the business tier (Logic) and the integration tier (storage).


Content Mana
gement Systems offer a wide variety of functionalities to manipulate the
content. Good examples of these functionalities are edit, preview, delete and move.
With each one of these functionalities co
me

questions that we need to address:
W
hat is
the content,

who has the right to edit the content, how to prevent multiple users from
editing the same content at the same time and so on. We can conclude that Content
Management Systems are complex systems that take huge amount of resources to
develop. Designing and

testing are crucial parts of any CMS development process.


2.2.
2

Morning Content Management System


Morning CMS is a dynamic database publishing system. With Morning CMS user can
update and manage

web sites without any technological knowledge about HTM
L
(Hypertext Markup Language) or other WWW (World Wide Web) technologies.
Content
is stored into a MySQL database and the
visual appearance is defined in
the
templates

[Appendix C]
. Template architecture makes

it

possible to change the visual
identity of a

web site in a couple of minutes. Template and content
are

combined in the
Romeo [3, 2000] component. Romeo

component [Figure 1]

processes the page requests
and constructs the resulting HTML
-
pages. Finally,
the
constructed HTML
-
pages can be
cached to
impro
ve the server performance.


10


Figure 1: Morning CMS building blocks [4]


Morning offers two
module
-
based

versions of t
he Morning CMS. Morning CMS 1.2
[Figure 2]
and Morning CMS 2.0. These CMS solutions can be further customized
according to the customers

needs. The standard module based version is easy and fast to
implement. Yet it offers

a

versatile range of features that can be adjusted to the clients'
visual identity. Platform can be any UNIX based operating system running Apache,
PHP and SQL
-
database.

Currently the Linux
-
Apache
-
MySQL
-
PHP (LAMP) is the most
popular server
-
side

a
rchitecture for the Morning CMS.



Figure 2: Morning CMS content management interface

11

Morning CMS offers easy
-
to
-
use content editing with familiar office product like
interfac
e, time
-
based publishing and removal of documents, hide and show functions for
files and folders, multilingual character support and much more. Morning CMS uses
page templates to construct the pages. One template can be used with many content
pages. Defaul
t templates can be defined for the site and for different directories. There
are tested components available for functionalities like search, sitemap and form
mailing. New components are developed all the time. Morning CMS also includes user
control, acces
s control and standard web site statistics. Mornings customers have

been
happy with the simple user interface and gentle learning curve

that

Morning C
ontent
M
anagement
S
ystems offer
.


2.3 Macromedia Flash MX


Macromedias popular vector based graphics anima
tion program Flash started its journey
during 1995 as a simple animation tool called Future Splash Animator. Future Splash
Animator was developed by Future Wave Software from their Smart Sketch drawing
software. Later in January 1997 Macromedia acquired Fu
ture Wave Software and
Future Splash Animator became Macromedia Flash 1.0 [5][22]. As a tribute to the
creator of Flash Jonathan Gay
I
have included a screenshot of Future Splash Animator
as
A
ppendix A. In

the

year 2005

the

most re
c
ent version is Flash MX
2004.
Macromedia describes their product in following way: "Macromedia Flash MX 2004
allows designers and developers to integrate video, text, audio, and graphics into
immersive, rich experiences that deliver superior results for interactive marketing and
presentations, e
-
learning, and application user interfaces." [6]. Flash MX 2004
introduced a rewritten version of the Action Script language. Action Script 2.0 is an
ECMAscript compliant language making it much easier for Java programmers to learn.
Version

eight of the Flash development platform (code named 8
-
ball) was under
development during spring 2005.


Action Script is an Object
-
Oriented Programming (OOP) language designed to enable
web site animation. Originally Action Script was released with Flash 4
. Since that
Macromedia has improved the language with each release of Flash. Action Script is a
12

sophisticated version of scripting language introduced in Flash 3. Action Script is
processed at the client machine during the runtime so it does not increase
the server load
like PHP and Cold Fusion.
O
n the other hand, Flash developer must take into account
the possible end
-
user hardware because Flash can quickly drain the client computers
limited CPU resources. Flash projects are generally compiled as SWF
-
file
s. Author can
publish the SWF file to the Internet by embedding the file
in
to a HTML
-
page. Flash
uses vector
-
based format making it great for streamlined lightweight delivery over the
Internet. There is also stand
-
alone version of the Flash Player availabl
e. Published SWF
files are also called Flash Movies, Flash applications

and Rich Internet Applications
.


2.3.1 Flash Usability


For some time Flash has been criticized about its usability and accessibility problems.
Dr. Jakob Nielsen wrote in his infamous
article
Flash 99% Bad

that "current Flash
technology tends to discourage usability for three reasons: it makes bad design more
likely, it breaks with the Web's fundamental interaction style, and it consumes resources
that would be better spent enhancing a
site's core value" [7, 2000]. Later in June 3, 2002
Macromedia announced a strategic partnership [8] with Jakob Nielsen and Nielsen
Norman Group.
The a
im was to improve the usability and the accessibility of the Flash
applications, and to improve the usabi
lity of the Flash development platform. This
partnership gave Flash the creditability it needed to become

a

widely accepted web
technology. In 2005 the trend seems to be a full
-
blown Flash web site. Most of the
usability and accessibility problems are stil
l present in many Flash applications.


2.3.2 Flash Player


Flash Player is a browser plug
-
in that must be downloaded and installed in order to view
Flash in

the

World Wide Web (WWW).
The f
irst Future Splash Animator player was
done with Java that was the
only technology available during that time able to manage
decent animations in a web browser.
The p
roblem with Java applets during 1995 was
that the performance was relatively bad. Later when Netscape plug
-
in API was released
13

in 1995, there was a way to im
prove the performance considerably. When Macromedia
Flash 1.0 was released, the first version of Flash plug
-
in was shipped out with it.
The
c
urrent version of the Flash Player is a version 7,0,19,0 released 10 December 2004.
The n
ext

major

version is code
-
named Maelstrom (Flash Player 8). Probably the most
waited improvement with Maelstrom is better Action Script 2.0 performance.
Macromedia has also promises that Maelstrom b
rings new graphical effects

to the Flash
.


Flash Player Penetration
80,0 %
82,0 %
84,0 %
86,0 %
88,0 %
90,0 %
92,0 %
94,0 %
96,0 %
98,0 %
100,0 %
June-04
July-04
August-04
September-04
October-04
November-04
December-04
5
6
7

Figure 3: Flash Player penetration in
Europe


When authoring Flash movies it is very important to decide which Flash Player we want
to support. From
F
igure 3 we can see that according to the Worldwide Survey [21] in
December 2004 88.7% of the World Wide Web (WWW) u
sers had

Flash Player 6
insta
lled. Flash Player 5 and all the older players have over 98% penetration in Europe.
14

During the Spring 20
05 most popular plug
-
in was
Flash Player 6.
The m
ain reason for
this is the Flash MX improved Action Script features. Other reason is that Flash Player
6 or newer is installed to over 97% of the browsers so most users are able to use the
Rich Internet Applications (RIA) published to Flash Player 6.


2.4 Flash Development


Morning Digital
Design specializes in
digital marketing solutions

as noted in secti
on
2.1
. Flash is an efficient
digital marketing

format

in

the

Internet
. We can divide Flash
projects
into five sub
-
groups at Morning:





Banners (animated and interactive)



Campaign sites



Web sites



Presentations



Eye
-
candy (HTML sites)


Flash banners can be f
urther divided into animated banners and interactive banners.
Campaign sites are usually part of a larger advertisement campaign designed to
communicate a specific message to the users. Because campaign sites last only for
duration of the advertisement cam
paign, they tend to have shorter lifespan than web
sites in general. Flash web sites have usually more information content and are often
designed to replace the traditional HTML

(Hypertext Markup Language) web site.
B
ackup

HTML

site for the users who do no
t have the appropriate Flash plug
-
in installed
is often required. In some cases, it can be just a short note that this site does not work
without the plug
-
in. It can also be a complete HTML version of the Flash web site.
Presentations are sometimes done wi
th Flash instead of the more traditional Microsoft
Power

Point.
With

eye
-
candy I mean
Flash an
imation
s

that have mainly

visu
al value for
the user
s
.

PHP and XML
are

often

used

with Flash if the
application needs
a

data
integration solution
.

I shall focus ma
inly on Flash web sites

in this final year project
.


15

2.5 Flash Content Management Solutions


For the purposes of this
project
, it is important to study some of the commercial Flash
Content Management Solutions available.
There is only

a

few Content Managem
ent
Systems

available that are

designed especially for Flash.
The m
ost interesting of these
are EGO7 Flash CMSMX and comaTool v2.0 CMS. Other Flash Content Management
Systems I managed to find
a
re free
-
flash
-
template [29], SCMSflash [30] and Beaver82
[31].

In addition, many Content Management
Systems

can be used to manage Flash
applications by using web services or XML (Extensible Markup Language)
.
The m
ost
interesting of these is the Macromedia Web Publishing System

because it supports

also
Flash Remoting
.



2.5.1 EGO7 CMSMX


EGO7 CMSMX is an all Flash Content Management Solution. Their Content
Management System is based on Microsoft .NET architecture, but there is also Active
Server Page (ASP) version available. "The EGO7 CMSMX is a Content Management
Sys
tem that exclusively manages an unlimited amount of Flashmx web
-
based solutions.
By separating content from functionality and design, the CMSmx makes it easy for
enterprises to manage their Flash assets through a user friendly WADI interface." [9]



EGO7 C
MSMX features

include:




Unified Access Control



Categorization



Lifecycle management



Workflow process



User, group, and role management



Native multilingual support


16

EGO7 CMSMX has a full Flash Graphical User Interface (GUI) for administrator
interface called
WADI. Web Application Delivery Interface (WADI) "operates on a
standards
-
based platform. It currently utilizes the .NET Framework as its Application
Server and features thin Client/Server XML communications. The WADI client GUI is
rendered using FlashMX" [
10].


2.5.2
C
omaTool v2.0


With comaTool v2.0

the

author has full control over website
-
structure, navigation,
links, text, pictures, colors, animations, downloads, m
usic, templates, user
-
rights
administration, release management, web
-
access statistics, ext
ernal database access,
HTML & MetaTag editing and language management. Content Management System is
based on open standards like PHP and MySQL. Their web site advertises them as the
"first fully operational Content Management Systems for Macromedia Flash"
[11].


C
omaTool v2.0 features

include:




User management



Workflow process



Templates



Multilingual support



Statistics


17

3 Data Integration


Without any data integration Flash would be

a

pretty static media.
The l
atest version of
the FLA file needs to be foun
d when any Flash web site needs to be edited. Reason for
this is that the compiled SWF files cannot be edited in any way. When the changes have
been made,

the

new SWF can be published and uploaded to the Internet. This is of
course if everything goes fine.

There are often problems when someone else has
authored the movie: Do I have the right fonts? Where is the content that I need to edit?
Is this even the newest version?


In its simplest fo
rm Flash CMS can be external text (TXT)

files that are loaded to t
he
Flash movie during the run time. By editing the external TXT files

the

author can
change the contents of the Flash movie without touching the FLA file. Instead of the
TXT files content can also be stored to a database. When we are using a database to
st
ore the content a data integration solution is needed to communicate between the
client and the server. Tech encyclopedia gives following definition for data integration.
"Data Integration describes the process of blending data from various distinct source
s to
create a larger and more comprehensive data environment. One of the most important
applications of data integration is the merging of legacy databases and infrastructure
with current enterprise applications." [14]


3.1 Integration Technologies


Differ
ent versions of the Flash have different data integration technologies available. As
a rule of thumb we can say that

the

newer the version

the

more options we have
available. Figure 4 sums up the data integration technologies available with different
versi
ons of Flash. Flash 5 has the
load variables
functions and the Extensible Markup
Language (XML) available. With Flash MX came the Flash Remoting and
LoadVars
class.

LoadVar
s

is an improved version of
load variables
functions. Flash MX 2004
introduced web s
ervices but Flash Services were only available as a separate package. It
18

will be interesting to see where Macromedia takes the data integration in the next
versions of Flash.


Technology

Flash 5

Flash MX

Flash MX04

loadVariables()

x

x

x

XML

x

x

x

LoadVa
rs Class


x

x

Remoting


x

(x)

Web Services



x

Figure 4: Flash data integration technologies overview


3.1.1 LoadVariables and LoadVars


The o
ldest method of connecting Flash to a external data source are
loadVariables()
and
loadVariablesNum()

function
s.
Load
v
ariables

functions

are

used to load variables in

a

certain format from an external source. Macromedia Flash 4 was the first version that
had
load variables

functions

available. Flash 4 Action Scripting is

an

interesting subject
again because Macro
media Flash

Lite [23] uses the same syntax
. Flash Lite has been
designed for handheld devices. With
load variables

functions

the

Flash developer is
able to develop data integration solutions
that use

Hypertext Transfer Protocol (HTTP)
to send and receive v
ariables from external data sources.


The p
roblem with the
loadVariables()

is that Flash does

n
o
t stop automatically to wait
for the results when the function is called. With this approach wait loops or Flash events
should be used to process the results be
fore anything is shown to the user. This is

n
o
t
convenient because we cannot be sure that we even get a response. In some cases result
may be an infinite loop waiting for results that are

n
o
t coming. Flash 5
load variables

functions are improved versions o
f the Flash 4 functions. To my knowledge after Flash
5 Macromedia any major changes

have not been made

to the
load variables
functions.


When Flash MX was published there was the familiar
load

v
ariables

functions

and then
the new
LoadVars

class.
LoadVars

c
lass has many improvements compared to the old
load variables functions. With
LoadVars

class the developer can "obtain verification of
19

successful data loading and ... monitor download progress" [15]. In addition the
developer can now choose which variables

to send. This can improve the performance
considerably in some cases. With
LoadVars

class

the

developer can
also
define custom
HTTP headers and

custom

error information.
For the Morning Flash CMS the load
variables functions and
LoadVars

class

can be

cons
idered too

limited.


3.1.2 XML Connections


Extensible Markup Language (XML) was designed to combine the content and the
structure universally. The Idea of the XML is that it should be self
-
describing. See the
example
s

in
F
igure 5 and in
A
ppendix B. Conten
t i
s extr
acted from
XML with
a
n

XML
parser. Parser is a program that is able to read and convert XML into value pairs by
following certain rules. Advantage with XML is that "any XML document can be read
by any XML parser, ... making your data universally a
ccessible" [16, p.18]. Extensible
in XML means "anyone is free to mark up data in any way using the language" [16,
p.19]. The freedom that XML has makes it

a

very interesting and flexible language.





<?xml

version="1.0"?>



<xml>


<contact>



<firstname>Janne</firstname>


<lastname>Patrikainen</lastname>


</contact>


</xml>


Figure 5: Example of Extensible Markup Language (XML)


Client
-
side XML support was made available in Flash 5. Lightweight programming
interface was in
cluded in order to keep the Flash Player as lightweight as possible.
Improved version of the client
-
side XML support was introduced in Flash MX. "Flash
MX improved the (XML) performance

in some cases as much as 400 percent" [20]
making it

a

usable solution

for data communication. For larger data sets, the XML
20

performance can be a problem because XML is parsed at client
-
side with the Action
Script. If the performance isn't concern and the underlying infrastructure already
supports XML, this can be the best a
nd easiest data integration solution available for
Flash MX and Flash MX 2004.


3.1.3 Flash Remoting


Flash Remoting "is an application server gateway that provides a network
communications channel between Flash applications and remote services. “ [12] Fla
sh
MX 2004 authoring environment does not support Flash Remoting out of the box
al
thou
gh

Flash Remoting is supported and developed by Macromedia. Flash Remoting
components can be downloaded

for Flash MX 2004

from Macromedias web site. Flash
Remoting servic
es are implemented with server side technologies, such as Java,
ColdFusion or ASP so

the

developer is

n
o
t tied to any one of the server side
technologies available. Flash Remoting components can be used with Flash MX, Flash
MX 2004 and Flash MX 2004 Pro. F
lash Remoting is integrated directly into Flash
Player making it the fastest data integration solution available for Flash. Flash Player 6
and Flash Player 7 are currently supporting Flash Remoting. Flash Remoting is not
likely to disappear in the next ver
sion of Flash because Macromedia is supporting the
development of Action Script 2.0 Flash Remoting components.


There are many advantages with Flash Remoting compared to other data connection
technologies available for Flash. Flash Remoting has automatic
data conversions from
native remote service code to Action

Script and b
ack making it very easy to use.
Flash
Remoting is

also

designed to integrate with established application design patterns and
frameworks. This can considerably increase the performance,

stability and development
efficiency.


Messages between Flash application and remote server are serialized using Action
Media Format (AMF). AMF has often much better performance and bandwidth use than
other solutions. AMF

is a binary format modeled on th
e Simple Object Access Protocol
(SOAP). Usually the huge packet size of SOAP and XML messages makes them very
21

inefficient in R
ich
Internet A
pplications

(RIA)
. AMF packet size is usually only a
fraction of its SOAP

or XML

equivalent. AMF can be delivered ov
er

both

HTTP and
HTTPS. “The AMF format was created by Macromedia as an attempt to replace the
need for XML objects when transferring data between a Flash movie and the server.
XML objects proved to be quite inefficient; large amounts of data were required

to
describe simple objects and the amount of bandwidth needed to transfer complex
objects from some large Flash projects was simply not acceptable.” [24]


In Flash MX 2004 Flash Remoting implements three
-
tier architecture that separates the
presentation
tier, the business tier and the integration tier. Calling

a

Flash Remoting

application service is similar to calling

a

web service or making a Remote Procedure
Call (RPC). The call to
the

remote service gives a response from the service. Data from
the serv
ice

function

is converted from

the

native data type of the service to

the

AMF
format that is used to transfer the data over the network. Result
-
handler callback routine
is used to handle the invoked data. Therefore, the service call and result handling are

considered asynchronous.


3.1.
4

Web Services


"The World Wide Web is more and more used for application to application
communication. The programmatic interfaces made available are
referred to as
Web
services
."

[18]

Web services architecture stack

[19]

ex
plaining the

Web services

layers
and technologies

further

has been included as Figure 6.
Flash MX 2004 has native
support for Simple Object Access Protocol (SOAP) and XML Remote Procedure Call
(XML
-
RPC) web services. SOAP is a "standard, extensible, compos
able framework for
packaging and exchanging XML messages" [19]
.

Support for Remote Services is
provided through Action

Script class. Flash developer can choose to use either
WebServiceConnector component or WebService class to connect
to
the

service
s
.
Call
ing
a

web

service in

different domain requires a cross
-
domain policy file.

Example
of a typical cross
-
domain policy file has been included as Appendix D.


22


Figure 6: Web Services Architecture Stack [19]


3.2 Flash MX 2004 Data Integration Architecture


Fl
ash MX Professional 2004 offers ready data integration components. Data binding
API controls the flow of information between these components. Data Integration
components are designed to support the Flash MX 2004 three
-
tier development model.
Deployment of

the components has been made as easy as possible. There is no need to
write complicated Action Script

code

with the

data integration

components. Downside
with the data integration components is th
at hand
written Action Script code can have
much better perf
ormance. Open and flexible component architecture makes customi
zing
these components poss
ible.

Action Script 2.0 components work

as supposed only in
files published to

Flash Player 7

or newer
.




23

Layer

Component

Explanation

Data Connectivity


WebServiceC
onnector

The WebServiceConnector component lets
you access remote methods exposed by a
server using the industry
-
standard SOAP.


XMLConnector

The XMLConnector class lets you send or
receive XML files using HTTP.


Data Management

DataSet

Resolver comp
onents are used with the
DataSet component to save changes to an
external data source. Resolvers take a
DataSet.deltaPacket object and convert it
to an update packet in a format appropriate
to the type of resolver.


Data Resolution


RDBMSResolver

The RD
BMSResolver component creates an
XML update packet that can be easily
parsed by into SQL statements for updating
a relational database.


XUpdateResolver

XUpdate is a standard for describing
changes that are made to an XML
document and is supported by a

variety of
XML databases.


Data Binding

Interface Components

User Interface (UI) components allow you
to interact with an application.


Figure 7: Flash MX Professional 2004 Data Integration components.


Data Integration Components


I now turn in more

detail to the
Flash MX Professional 2004 Data Integration
components summarized in
F
igure 7.

Data connectivity layer offers

a

variety of
technologies to communicate between the Presentation Tier and the Business Tier. Flash
MX Professional 2004 includes b
y default
WebServiceConnector
and
XMLConnector

components. Flash Remoting components can be downloaded from

the

Macrome
dia.

24

Managing

the

data means an "ability to perform advanced operations on a local cache of
data, including multiple sorts, filters, find
s, and offline caching" [25]. These operations
are handled in the data management layer of the Macromedia Flash
MX 2004 Data
Integration model.
Data resolution layer handles the saving and updating of the data.
Data Resolution components perform encoding a
nd decoding of data packets.

Data
binding offers a "mechanism to share data between component properties using schema
settings such as formatters and encoders" [25]. Data Binding components enable
developer to bind the data packets to the UI (User Interfac
e) components with ease and
flexibility
. User Interface components are designed to enable user interaction with the
Flash application in a standards compliant manner.



With Flash Player 7

the

developer is able perform data loading from outside its own
dom
ain as long as the server providing the data provides a
policy file.
Policy file is a
small XML file that grants cross
-
domain loading permissions.

An e
xample of a cross
-
domain policy file is provided

as A
ppendix D.


25

4 Implementation Plan and Requirements


After researching the commercial Content Management Systems (2.5
.
)

and
Data
Integration
technologies (3
.
) available, we can make

some decisions

about the

Morning
Flash CMS

solution
. First, we need to consider

what
the
server
-
side infrastructure and

middle
ware behind the Morning
CMS 1.2

are
. Then we can

define the best

data
integration
solution for that environment
. We should also consider which version of the
Flash Player we want to su
pport. Finally, we can start planning
the

Morning F
lash CMS

page reque
st

and template model
s
.


4.1 Server
-
side Infrastructure and Middleware


The
Morning Content Management System is running on Linux
-
Apache
-
PHP
-
MySQL
(LAMP) architecture. The final Flash CMS solution should also be compatible with the
LAMP. Morning Digital Desi
gn provides hosting for the Morning CMS sites so we
have full access to the CMS servers. Production servers are running live web sites so we
cannot make any radical changes to the server infrastructure. We can use Morning
development server to test the sol
ution and

to

host the demo site
s
.
Flash CMS should

use

the

Morning CMS administration interface.
A p
ossibility of changes with the
infrastructure should be considered to a certain limit.

Because PHP (Hypertext
Preprocessor) is mainly used at Morning Digita
l Design, it is a n
atural choice

as server
-
side development language

for the

Morning Flash CMS
.

Flash CMS server
-
side
infrastructure

can be summarized as follows:




UNIX based operating
-
system



Apache server



PHP



SQL Database (MySQL)



Morning CMS


26

4.2 Data Int
egration
Plan


We want to get the

page

content from the database to
a

F
lash web site. We also need a
way to specify what content we want from the database.
Morning CMS a
dministration
interface
can be

used to manage the

content in the database
. Still a data

integration
solution is needed to get the data from the database to the Flash web site. The main
conclusions are thus as follows:


1.

Content is stored into a database.

2.

Morning CMS administrative interface is used to manage the content.

3.

We need to get the co
ntent from the database to
a

Flash movie.


As noted earlier in chapter 3 t
here are three possible data integration
technologies
available for Flash
: XML, web services and Flash
Remoting. All of the three
technologies

work with Flash MX 2004 (Player 7). Fla
sh MX (Player 6) supports only
XML and Flash Remoting

as noted in figure 4
. We can also consider using
loadVariables()
or
LoadVars
class for integrating Flash web site with M
orning
CMS
components like Form Mailer.

It has been already pointed out above (3.1
.1) that f
or the
data integration solution

load

variables
functions are too limited.

We need to consider
following factors when while choosing the data integration technology for Morning
Flash C
ontent
M
anagement
S
ystem
:




Scalability



Performance



Deployment



Support


Scalability and performance are somewhat related. With scalability there are two related
variables that we need to consider. How often we
want

to request the server and the
amount of data we need to send with each request. These variables are dire
ctly related to
the performance and the scalability of the system
.

Deployment of the data integration
solutions must be considered in contrast to the server side infrastructure. Other
27

important factors are learning time and support

for the technology
.

We c
an now proceed
to examine the

pros and cons of the

available

data integration technologies
.


4.2.1 Extensible Markup Language


From the three

Flash

data integration technologies XML is the oldest
.
The p
roblem with
XML is that the packet size is large and i
t needs to be parsed at

the

both ends. This will
increase server load and drain limited CPU resources
on

the client side.
The b
iggest
advantage is its popularity among

the

Flash developers at Morning Digital Design

Oy
.
The m
ost
used

solution
is

to load

all

the

XML

da
ta at the same time to the Flash
application
. This will work just fine when we are talking about smaller web sites and
applications. With larger sites, XML file size will grow too large and parsing it will take
too much resources.

Ano
ther choice

is to make multiple requests to the server. This will
increase the amount of requests but the packet size will be much smaller. Flash
Remoting and
w
eb services

will perform much better when we want to reques
t pages
separately.


4.2.2 Web Services


Web ser
vice
s

was introduced
in

Flash MX 2004 and it will not work with the older
versions of Flash. Web services is a

web

standards based data integration solution
providing "a standard means of interoperating between different software applications,
running on a

variety of platforms and/or frameworks." [28]

As discussed earlier many

large
commercial Content Management Systems

do

support web services and SOAP.

The p
roblem with Flash web service components is that "large sets of data that are
passed through a web s
ervice cannot be processed as quickly as other technologies that
are directly supported within Flash Player, such as Flash Remoting." [20] There are also
other sources supporting Flash
R
emoting. "Due to its superior speed, you should use
Flash Remoting whe
n handling and sending large amounts of data ... Remoting
bypasses the need for placing a cross
-
domain policy file on the remote server." [26, p.4]

28

4.2.3 Flash Remoting


Flash Remoting seems to be an excellent scalable high
-
performance data integration
sol
ution

for the Morning Flash CMS
. "The combination of increased performance; the
ability to invoke methods on middleware business objects deployed in their native form
into an enterprise application server; and the proliferation of surrounding technologies
that provide a transparent object mapping between client and server with fine
-
grained
control over application server security make Flash Remoting a strong technology
candidate for enterprise
-
grade applications where scalability, performance, and security
are key drivers." [20] Flash MX 2004 does

n
o
t support Flash Remoting out of the box.
Flash
Remoting components
can

be downloaded from Macromedias web site and
installed to the Flash

authoring environment
. Other problem with Flash Remoting is that
Macromedi
a supports only ColdFusion, ASP .NET and Java Flash Remoting gateways.
From

the

technical point of
view
Flash Remoting is the best solution available for
en
terprise level data integration
.

The p
roblem is that Macromedia Flash Remoting does

no
t support PHP
(Hypertext Preprocessor).


4.2.4 Flash Remoting for PHP


So far we have assumed that Flash Remoting does not work with PHP. However, o
pen
-
source community has developed AMFPHP (Flash remoting for PHP) gateway.

"Flash
remoting for PHP enables objects in PH
P to become objects in actionscript, ...
AMFPHP takes care of all the data
-
type conversions, serialization, and other client
-
server details." [27] This means that

the

developer can write a function with PHP and
call it from Flash through the AMFPHP gateway
. If the function returns any data, the
AMFPHP serializes
the data
to AMF format, and sends it to the Flash Player. Flash
Player deserializes the data to a native Flash format.
A f
lash developer can catch the
response from the PHP function with Action Scri
pt. Catching the response has been
implemented as events. Flash
R
emoting for PHP seems to be a good
candidate

for the
Morning

Flash CMS data integration
.


29


Figure 8: Morning Flash CMS technology stack


4.3 Choosing Between MX and MX04


The
plan is

to u
s
e Flash Remoting and AMFPHP as

the Morning Flash

CMS data
integration solution.

F
igure 8 summarizes the technology plan.

As we can see from the
F
igure 4 at
S
ection
3.1, our plan

leaves us two choices
:

Flash Player 6 and Flash Player
7. Flash MX 2004 author
ing environment is able to publish movies for both players.
Flash Remoting component uses Action

Script 1.0 but it works with Action Script 1.0
and Action Script 2.0 scripts. It is also possible to support

development for

both

Flash

MX and

Flash MX 2004 wi
th Flash Remoting.


As discussed earlier in
S
ection 2.3.2 about ten percent of all WWW

users

in Europe

do
not

have Flash Player 7 installed. Flash Player 6 has over 97

percent

penetration.
The
p
ercentage of users in Europe who
do not

have Flash plug
-
in ins
talled at all is about two
percents. This means that if we publish a Flash Movie for Flash Player 7 about one tenth
30

of the users cannot
use the application
. Usually users without appropriate Flash

Player
are
directed to a HTML backup web site

so this is no
t necessarily a problem
.
In
addition,
Flash is developing all the time so users are forced to update their Flash plug
-
in at some point.
The b
est solution would be to write the Flash CMS Action Script so
that it works with both players. It also means that w
e have to use Action Script 1.0 for
the morning Flash CMS page

request

and template models.


4.4
Page Request and Template Model


With Morning Flash CMS we want to be able to define templates for different pages. At
this point

a

page is just a set of data
stored into a database.
The e
asiest solution would
be to use

an

existing Morning CMS HTML
-
template model. We will call this solution
Model A [Figure 9]. In Model A, each HTML
-
template has a SWF template embedded.
All the pages on the CMS site use one of th
ese templates and one template can be used
multiple times. When the user requests a page from the database, we have also the
information which template CMS should use to render the content. Finally, the resulting
HTML
-
pages are

stored to cache

to improve t
he

server performance.



Figure 9: Template Model A


31

Downside

with the template model A

is that we need to have the necessary Action

Script (AS) scripts in all

of

the SWF files.
This will increase the file size and

make it
harder for developer to manage

the AS scripts.
In addition,

every time user changes a
page we will have to load a new SWF file
. By loading a new SWF we lose all the

loaded graphic
s,

components

and variables
. It will also make unnecessarily hard to
transfer variables between

the

templat
es. In contrast to the benefits, this will limit the
options Flash offers too much.


Template Model B [Figure 10] offers a completely different approach to the problem. In
Model B we have only one HTML file with a master SWF file. The master SWF loads
exte
rnal SWF templates or

uses the templates

already

loaded to

the master SWF. The
master

SWF

fi
le can be

used to centralize the data communication
, page storage

and

AS

scripts for all

the templates. M
odel

B is

more flexible and it leaves more options
availabl
e for the

Flash

developer.




Figure 10: Template Model B


For Model B we need to develop a reusable master SWF file that can load external
SWF
templates.
In Flash
LoadMovies class could be used to load SWF files as templates to
the master SWF as MovieC
lip instances. We can also include the page request model to
the master SWF.

This will also make managing the Flash site easier.

Problem with
both

32

model
s

is that we need to inform the master
about

the structure of the

Flash

site so it can
build the
dynamic

navigation. We can also define templates, static content and other
configuration data with the structure
data. The structure can be also static if we do not
need to create new pages for the Flash front
-
end
.

Still the text content can be edited with
the CM
S. This gives more freedom to

the developer because it is not necessary to build
dynamic navigation elements and hierarchical structure for the

Flash application
.



It is also possible to combine models A and B

at the same time

by deploying multiple
maste
r

SWF files as Morning CMS HTML
templates.

Example of a Morning CMS
HTML template has been included as
A
ppendix C.


4.5 Requirements


Finally, we need to defin
e the functional specifications
fo
r Morning Flash CMS:





Uses MCMS administration



Text content can

be changed



Multilingual support



Template model


Optional features that we might want to implement later on:




Dynamic navigation



Image management



Limited HTML support



Limited CSS support



Time based publishing



Search


33

5 Content Management Solution


In the
p
revious
C
hapter

4.

we

defined
the M
orning Flash CMS infrastructure
. At this
point it may be useful to summarize th
e major points that have emerged so far
. Th
ey can
be summarized as follows:




LAMP
a
rchitecture



AMFPHP



Flash Remoting



ActionScript 1.0



Flash P
layers 6 and 7


The f
irst step
was

to install the
Flash Remoting for PHP gateway

to the development
server. When I
had

the AMFPHP available, I wrote the page request service wit
h PHP.
At the same time I
start
ed writing a

page request model for Flash MX wit
h Action
Script

so I could test the PHP code
. When I had
both
the page request model

and the
AMFPHP

working, I concentrated on the template model. For the template model I
needed a clean Morning CMS instance to the server.
Finally, I made a simple Flash an
d
XHTML demo web sites that used the Morning Flash CMS
.

Flash CMS
i
mplementation
p
lan

can be summarized as follows:


1.

Deploy
AMFPHP gateway

2.

Write the AMFPHP

service
s

3.

Write the page request code

4.

Create

new M
orning
CMS

instance

5.

Write the template model

6.

Make a

demo

web site

(Demo 2005)



34

5.1
Deployment and Services


Coding part of this thesis started by deploying the AMFPHP to the development server.
I chose

to use

AMFPHP version 5.1 because it
was the most

stable

version available at
the time
. AMFPHP version
1.0 was still under development. The Flash Remoting for
PHP installation
went as planned. The whole AMFPHP package was uploaded to the
doc root

of the

Demo 2005

web site. All the

Flash Remoting

requests are

handled by the
gateway. AMFPHP

gateway maps the P
HP functions for the Flash. It can also contain
text descriptions about the services for the Flash authoring environment.
Morning Flash
CMS
AMFPHP architecture is displayed in

F
igure 11.



Figure 11:
Morning Flash CMS AMFPHP architecture


Flash Remoting M
CMS service is the soul

and brains

of the

Morning

Flash CMS
solution. It processes the page requests, queries the MySQL database and returns the
content to the Flash front
-
end.

Flash Remoting service can also handle other
functionalities with PHP like char
acter encoding and limiting the access to the content.
A g
ood example of the content access control is the t
ime based p
ublishing and hiding

of

35

the

documents
.
Moving the important parts of the code from the Flash application to the
server
will

also

consider
ably improve the security of the system.


5.2 Page Request

and Template

Models


As noted earlier, Morning Flash CMS page request model uses the AMFPHP gateway
to communicate with the server.

Let us look first at the implemented page request
solution.
U
ser

navigate
s

a Flash
application

by clicking

the

button objects

in the
application

with the pointer. Clicking a navigation object will generate a
n

event.
Let us

call the event in this case a
MCMS
content request. Flow chart in Figure 1
2

visualizes
the conten
t request process. First of all we want to know i
f

the requested content

is

static content or M
orning
CMS content. Static content is content that cannot be
managed with the Morning CMS. If the request is M
orning
CMS request the page might
be already loaded

to the SWF. If we already have

stored

the content in
to

the cache we
can show it straight away. If we do

no
t have the content in the cache we need to request
it from the M
orning
CMS Flash Remoting gateway. AMFPHP returns either a
n

error
string or the conte
nt from the M
orning
CMS database. If the
response

was error it
should be handled gracefully. If content was returned we can store it locally to the
cache. From the cache we can return the content
quickly

i
f the page is requested again.
Content request proc
edure discussed abo
ve can be summarized as follows.


Example of

a

typical
Morning Flash CMS page request procedure
:


1.

Users' actions trigger a page request event.

2.

Proceed if event is a CMS content request. If not, show static content.

3.

Do we have the content

already stored into the cache? If no, proceed.

4.

Request content through the AMFPHP gateway.

5.

If we

received a CMS page object

store it to the cache.

6.

Combine the content and the template.

7.

Finally, show the requested page to the user.



36


Figure 12: FlashCMS

page request flow chart


For the template model we need to map the SW
F templates with the CMS pages. D
emo

2005

web site

maps the

conte
nt ids and templates

in a
n

XML

file. This XML file also
contains the structure of the site.
An e
xample of

the

XML file

ca
n be found
in

the

A
ppendix B. I used LoadMovies class to load the requested templates to the master
SWF. Master

file development model has been

introduced in
S
ection 4.4. and Figure 10.
Combining the template and the content is also handled in the master

S
WF

file.


37

5.
3

Security


With
Flash Remoting

Flash application

can be made

as secure as
possible
. In theory,
anyone can request content from the MCMS service but only published content is
available
. Action Script code is always insecure. Decompilers can sho
w the

contents of
any SWF file including the scripts. Security sensitive

parts of the code should

always

reside
at

the

server
-
side
code
.


5.
4

Demo 2005

Web Site


Finally, I used the ready Morning Flash CMS architecture

to create a demo Flash web
site.
Fig
ure 13 contains a screen
-
shot of the Flash application I used t
o develop and test
the solution. It can be used to request pages by id from the Demo 2005 CMS database.

As we can see from
F
igure

13 the

Morning
CMS

multilingual character support works
also
wi
th
Flash applications.



Figure 13: Morning Flash CMS Demo 2005 Flash front
-
end

38

The demo

2005 Flash site has also a XHTML backup site

[Figure 14]

with the same
content than Flash. Content is
loaded from the same CMS database to

the

both front
-
ends

so edit
ing a page with the CMS changes the content in both site
s
.
The a
uthors
are

able to manage the content with Mornin
g CMS administrative interface.



Figure 14: Morning Flash CMS Demo 2005 XHTML front
-
end


39

6 Conclusions


Morning Flash Content Management pro
ject was a success. All the main requirements
for the final solution were fulfilled. Demo 2005 Flash site has a working
page request
and template model. All the text content can be edited w
ith the Morning CMS as
planned

in
C
hapter 4
.

Time based publishing
and limited HTML support was developed
from the optional features.
With the developed Flash components, a developer can
easily implement the Morning Flash CMS functionality to a new CMS project.


With Flash MX 2004 and Action Script 2.0 Flash has reached a

completely new level.
The m
ain improvement
s

are

its improved

Action Script performance and better

standards support. Data integration with content management system
s is now possible
with web services
.

Web services and SOAP is a

W3C standard [28] as mentio
ned above

(3.1.4.)
.

Flash Remoting and XML support has been av
ailable since Flash MX. For
the
Morning Flash CMS Flash Remoting is

the best solution

available
. Flash Remoting
fulfills all the requirements we set for the data inte
gration solution in S
ection
4.2.


As noted in
S
ection 2.3.1. p
roblem with

the

Flash

CMS

development is the flexibility
Flash offers and the lack of standards in Rich Internet Application (RIA) development.
Flexibility is

often

a problem because Flash supports so wide variety of diffe
rent
development styles making
managing and reusing

the

Flash

applications

hard
.
Some of
the p
roblems with

the

Flash

CMS

development could be solved by standardizing the
development by using component
-
oriented
approach
. Components can standardize the
devel
opment without restricting the flexibility Flash offers. Action Script 2.0
components and Object Oriented Programming

might be a

very powerful solution.


In general,
Flash content management is a relatively new area. There is not many Flash
content manage
ment systems available thou
gh

many content management systems do
offer a data integration channel that can be used with Flash.
An i
nteresting idea is to
create

also

the administration side of the CMS with Flash.
The m
ain benefit with this is
that

the

user
can see all the changes straight away in the Flash application.
The u
ser
40

might be even able to edit the content straight to the RIA.
A g
ood example of this kind
of solution is EGO7 CMSMX

WADI

(2.5.1.)

interface
.

C
omaTool v2.0 has a more
traditional approac
h by mixing HTML and Flash in the administration interface.


As noted before

the

m
ost efficient data integration solution available for Flash is

the

Flash Remoting. It is fast, secure and scalable, and its service
-
oriented architecture
makes development e
asier to divide between different departments and people. Server
-
side programmers can define services

without any knowledge about the Action Script.
A F
lash developer

can concentrate on the presentation tier and only need
s

to know
where
the service gateway

is located.

Support for the Flash CMS solution at the
Morning Digital Design is still uncertain. Programmers do not easily change the way
they are used to work. Many developers

at Morning

prefer to use XML over the other
solutions because they are used to

working with it. Flash development also needs a
certain amount of freedom. Management level support may be needed with the
transition to the Flash Remoting and AMFPHP.


Flash Remoting for PHP (AMFPHP) is an interesting open
-
source project. It enables an
efficient Action Media Format (AMF) communication between Flash and PHP.
In other
words, by using AMFPHP we can call PHP functions with the Action Script from Flash
application.
Macromedia has allowed the development of the AMFPHP and other open
-
source Fla
sh Remoting projects.

Adobe Systems Incorporated announced

April 18, 2005

a definitive a
greement to acquire Macromedia.
With the recent a
cquisition of the
Macromedia by
Adobe

[33]

there
is

a certain amount of uncertainty concerning the
development

of the
M
acromedia
Flash

8

and

F
lash Remoting.

Best

Flash Remoting

alternative

for AMFPHP

gateway is the Cold

Fusion.

During the development of the
Morning Flash CMS and this thesis AMFPHP version 1
.0 was still under development.

41

References


[1] Morning Digital De
sign


The morning Story
. WWW
-
document.

http://www.morning.fi/en/story/. 9 February 2005


[2] Tech Listings. Content management. WWW
-
document.
http://www.techlistings.net/xlist/tech/IT/content/conman?id=1.
5 April 2005


[3] Rinnetmäki Samuel. 2000.
Romeo
-

WWW
-
palvelujen kehitys
-

ja julkaisuympäristö.


[4] Heinonen Jarkko.
2002. Morning CMS. PPT
-
document. 9 February 2005


[5] Flashmagazine.
The Flash History.

WWW
-
document.
http://www.flashmagazine.com/html/413.htm. 4 April 2005


[6] Macromedia. Flash MX 200
4. WWW
-
document.
http://www.macromedia.com/software/flash/productinfo/overview/. 9 February 2005


[7] Nielsen Jakob. 25 November 2002
. Flash 99% Bad.

WWW
-
document.

http://www.useit.com/alertbox/20001029.html. 6 April 2005


[8] Macromedia. 2002.
Macromedia
and usability guru Jakob Nielsen work together to
improve web usability.

Press relese. WWW
-
document.

http://www.macromedia.com/macromedia/proom/pr/2002/macromedia_nielsen.html.

9 February 2005


[9] EGO7. CMSMX. EGO7_CMSMX_White_Paper.pdf. WWW
-
document.
htt
p://www.ego7.com. 6 September 2004


[10] EGO7. WADI. EGO7_WADI_White_Paper.pdf. WWW
-
document.
http://www.ego7.com. 6 September 2004

42

[11] comaTool. CMS. WWW
-
document. http://www.comatool.com/. 8 April 2005


[12] Macromedia Livedocs. 2005.
Using Flash Remoti
ng MX.

WWW
-
document.
http://livedocs.macromedia.com/flashremoting/mx/Using_Flash_Remoting_MX/.

29 March 2005


[13] Macromedia. Web publishing. WWW
-
document.

http://www.macromedia.com/software/webpublishingsystem/. 5 April 2005


[14] Tech encyclopedia. Dat
a Integration. WWW
-
document.

http://www.tech
-
encyclopedia.com/term/data_integration/. 6 April 2005


[15] Flash MX 2004. Help. ActionScript Dictionary.


[16] Hunter David. 2001.
Beginning XML, 2nd edition.
What is XML.


[17] Sun Microsystems.
Guidelines, Pa
tterns, and code for end
-
to
-
end Java
applications.
WWW
-
document. http://java.sun.com/blueprints/patterns/index.html. 8
April 2005


[18] W3C. Web Services. WWW
-
document. http://www.w3.org/2002/ws/. 8 April 2005


[19] W3C. Architecture. Web Services Architec
ture. WWW
-
document.


http://www.w3.org/TR/2004/NOTE
-
ws
-
arch
-
20040211/#SOAP. 9 April 2005


[20] Webster Steven. 4 November 2003. Macromedia.
Choosing Between XML, Web
Services, and Remoting for Rich Internet Applications.

WWW
-
document.

http://www.macromedia
.com/devnet/mx/flash/articles/ria_dataservices.html.

9 February 2005


43

[21] Worldwide Survey. Macromedia Flash Player penetration. WWW
-
document.
http://www.macromedia.com/software/player_census/flashplayer/version_penetration.ht
ml. 8 April 2005


[22] Macro
media. Jonathan Gay. WWW
-
document.
http://www.macromedia.com/macromedia/events/john_gay/. 9 April 2005


[23] Macromedia. Mobile & Devices Developer Center. WWW
-
document.
http://www.macromedia.com/devnet/devices/ 9 April 2005


[24] AMFPHP.
AMF Format Docume
ntation
. WWW
-
document.

http://www.amfphp.org/?g=amf_format. 29 March 2005


[25] Macromedia.
Data Integration Learning Guide.

WWW
-
document.

http://www.macromedia.com/devnet/mx/flash/data_integration/data_integration.html.

9 April 2005


[26] Fleischer Vera.

Getting a Handle on Web Services in Macromedia Flash MX
Professional 2004.

WWW
-
document.

http://www.macromedia.com/devnet/mx/flash/articles/flmxpro_webservices_04.html. 9
April 2005.


[27] AMFPHP. WWW
-
document. http://www.amfphp.org/. 17 April 2005


[28]
W3C.
Web Services Activity Statement
. WWW
-
document.
http://www.w3.org/2002/ws/Activity. 17 April 2005


[29] free
-
flash
-
template. WWW
-
document. http://www.free
-
flash
-
template.com/solutions.php. 24 April 2005


[30] SCMSflash. WWW
-
document. http://www.free
-
fl
ash
-
template.com/solutions.php.

24 April 2005

44

[31] Beaver82. WWW
-
document. http://cms.beaver82.com/. 24 April 2005


[32] Helsingin Sanomat. WWW
-
document. http://www.helsinginsanomat.fi/. 30 April
2005


[33] Adobe. Adobe and Macromedia
.

WWW
-
document.
http:
//www.adobe.com/aboutadobe/invrelations/adobeandmacromedia.html
. 1 May
2005
45

Appendix A


Screen
-
capture of

the

Future Splash Animator (Macromedia Flash 1.0) GUI.






"If you ever think Flash is difficult to use, you should try drawing with a joystick on
an
Apple II before the concept of undo was invented. That will test your patience."

-

Jonathan Gay, Creator of Flash
46

Appendix B


<
xml
>


<
config
>



<
template
>
frontpage.swf
</
template
>




<
template
>
default_content.swf
</
template
>



<
template
>
feedback.swf
<
/
template
>



<
variable name
="
intro
">
false
</
variable
>




<
variable name
="
fadespeed
">
1000
</
variable
>



</
config
>


<
mcms
>


<
page
>



<
id
>
1
</
id
>




<
name
>
MCMS Flash Demo
</
name
>




<
template
>
frontpage.swf
</
template
>




</
page
>


<
dir id
="
1
">


<
page
>



<
id
>
2
</
id
>




<
name
>
Features
</
name
>




<
template
>
default_content.swf
</
template
>




</
page
>


<
page
>



<
id
>
5
</
id
>




<
name
>
Page two
</
name
>




<
template
>
default_content.swf
</
template
>




</
page
>


<
page
>



<
id
>
4
</
id
>




<
name
>
Page three
</
name
>




<
template
>
default_content.swf
</
template
>




</
page
>



</
dir
>


<
dir id
="
2
">


<
page
>



<
id
>
8
</
id
>




<
name
>
Page One
</
name
>




<
template
>
default_content.swf
</
template
>




</
page
>



</
dir
>


<
page
>



<
id
>
11
</
id
>




<
name
>
Page Two
</
name
>




<
template
>
feedback.swf
</
template
>




</
page
>


</
mcms
>

</
xml
>



47

Appendix C


<!DOCTYPE html PUBLIC "
-
//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1
-
transitional.dtd"
>


<html>

<head>

<title>Demo 2005</title>

<meta http
-
equiv="Content
-
Type" content="text/html; charset=ISO
-
8859
-
1" />


<style type="text/css">

* { margin:0px; padding:0px; }

body { background
-
color: #D7D7E2; color: #000; text
-
align: center; }

#topArea { hei
ght: 50px; background
-
color: #B7B7CB; }

#container { margin: 0 auto; width: 750px; text
-
align: left; }

#title { float: left; width: 503px; height: 163px; background:
url(/images/demo2005_bg2.jpg); border: 3px solid #fff; }

#title h1 { font
-
family: Verdana,

Geneva, Arial, Helvetica, sans
-
serif; color:
000; margin
-
left: 20px; margin
-
top: 20px; }

#image { float: left; text
-
align: center; width: 220px; height: 163px; border
-
top: 3px solid #fff; border
-
right: 3px solid #fff; border
-
bottom: 3px solid
#fff; }

#ima
ge img { margin
-
top: 60px; }

#main { background
-
color: #fff; float: left; clear: left; width: 503px;
border
-
left: 3px solid #fff; border
-
right: 3px solid #fff; border
-
bottom: 3px
solid #fff; }

#main * { font
-
family: Verdana, Geneva, Arial, Helvetica, sans
-
serif; font
-
size: small; }

#main p { margin
-
bottom: 10px; padding
-
bottom: 10px; }

#footer { background
-
color: #D7D7E2; padding: 6px; font
-
family: Verdana,
Geneva, Arial, Helvetica, sans
-
serif; font
-
size: 10px; }

#navigation { float: left; width: 220px; bor
der
-
right: 3px solid #fff; border
-
bottom: 0px solid #fff;}

#navigation a { display: block; text
-
decoration: none; color: #000; }

#navigation ul { list
-
style: none outside none; }

#sideNavi { float: left; margin
-
left: 10px; margin
-
top: 40px; }

ul li.level1
{ font
-
family: Verdana, Geneva, Arial, Helvetica, sans
-
serif;
font
-
size: 12px; font
-
weight: Bold; border
-
bottom: 3px solid #fff; padding:
6px; }

ul li.level2 { font
-
family: Verdana, Geneva, Arial, Helvetica, sans
-
serif;
font
-
size: 11px; font
-
weight: Bold;
border
-
bottom: 3px solid #fff; padding:
3px; padding
-
left: 16px; }

48

.padding { padding: 16px; }

</style>


</head>


<body>


<div id="topArea"> </div>


<div id="container">


<div id="title"><h1>Demo 2005</h1></div>


<div id="image"><img src="/images/logo01.gi
f" width="155" height="40"
alt="Morning" /></div>


<div id="main">



<div class="padding">


<h1><!
--

#BeginEditable "page_heading"
--
>


page_heading<!
--

#EndEditable
--
></h1>


<!
--

#BeginEditable "page_text"
--
>page_text<!
--

#EndEditable
-
-
>


</div>


<div id="footer">


Copyright &copy;2005 Morning Digital Design Oy


</div>

</div>


<div id="navigation">


<!
--

#BeginEditable "eval(navigation.php)"
--
>


<!
--

#EndEditable
--
>

</div>


<div id="sideNavi"><a href="/files/news/newsl
etter.html"><img
src="/images/morning_news.jpg" width="200" height="50" border="0" alt="Morning
News" /></a></div>


</div> <!
--

/conteiner
--
>


</body>

</html>

49

Appendix D


cross
-
domain.xml


<?xml version="1.0"?><!DOCTYPE cross
-
domain
-
policy SYSTEM
"http:/
/www.macromedia.com/xml/dtds/cross
-
domain
-
policy.dtd">

<cross
-
domain
-
policy>


<allow
-
access
-
from domain="www.morning.fi" />


<allow
-
access
-
from domain="morning.fi" />


<allow
-
access
-
from domain="*.morning.fi" />


<allow
-
access
-
from domain="shodan.e
vtek.fi" />


<allow
-
access
-
from domain="evtek.fi" />

</cross
-
domain
-
policy>