Sei sulla pagina 1di 4

ZNZNZ Programming Test – Part 2

1. The purpose of this programming test is for you to demonstrate your programming abilities, your
ability to use various website technologies, and your ability to learn and understand instructions in
English. Obviously this test will not be comprehensive to show all of your skills, but should allow
you to demonstrate some of your skills.

2. This programming test will require you to be set up for development in a PHP environment,
including PHP5 and a test server.

3. For this project we are using the Zoop Framework. (http://www.zoopframework.com/ ) The Zoop
Framework is a rather elegant MVC framework for developing PHP systems. Go to the
zoopframework page and the “Getting Started” column. Click on Download Zoop. On new page
click on Download until you get to the SourceForge.Net page. Download both zoop-1.5.0.zip and
skeleton.zip. You will NOT need the PEAR libraries for this programming test. Unzip and install as
per the instructions on the page.

4. Skeleton.zip is a sample zoop application. After you install zoop and skeleton, you should be able
to see the sample page. It should look something like this. Do not move forward on the
programming test until you know the skeleton is working correctly. (If you need help installing
Zoop, see the instructions in the “Read the Beginners Guider.” In this programming test, you will
modify the skeleton and submit your application.

5. Next, you need to understand the basics of the zoop framework. Click on “Read the Beginners
Guide” and read through the pages. You should read and work through at least the following
sections. You may want to do more sections, and that is okay.
a. What is a Framework?
b. Why is Zoop Special?
c. Installing the Zoop PHP Framework – Be sure to update config.php with the path to zoop.
d. Zones: The Zoop Controller
e. Your First Application (Hello World) – be sure you understand Zoop flow, then do tutorial
f. GUI: The Zoop View (powered by Smarty)
g. Zone Creation
h. Guicontrols

6. Before you begin this programming test, you should understand the basic processing flow of how
an application works under Zoop. Zoop makes appropriate calls to the pages and functions in the
application based on a very strict zone/page directory name and heirarchy. Please look at the
/skeleton/ code to see how it works. Look at zones/default.php and templates/default/default.tpl to
understand the flow. The UML activity diagram below should help you understand the flow.

Skeleton (Application) Zoop

http://d omain/a pplicatio nDir/in dex.php/zo neName/pageName zon eName is na me.ph p


pageNa me is pag eName within
H name.php file.

index.ph p: zoo p->run()


Zo op checks URL:
in clude “includes.php”
TL D/skeleton/ind ex.php/zone Name/p ageName
include “config.php”

zon eName.p hp is in zon es directo ry


if pageName == null then pag eName = “default”
name.tp l is in if zone Na me == nu ll the n zoneName = “de fau lt”
te mpla tes/zoneName/ directory or
te mpla tes/zoneName/page Name d ir

1. go to initP age ( ) within zon eName.php


2. go to to p ageName within zon eName.php
2 -a. g ui -> d isplay (n ame.tpl) — S marty file.
A S marty .tpl file contains
html tags + S marty variables
an d control logic.

(S marty finds name .tpl an d conve rts to name.html)


templates/zon eName/pageName/name.tpl -> n ame.h tml

serve name.html with .css an d image s

H
7. For this programming test, you will need to modify the skeleton application to build a web page.
You should use the same technique as you learned in the Hello World application you did when you
were learning Zoop.

8. Using the Zoop Skeleton that you have already installed, create the ZNZNZ page shown below.
Your page does not have to look exactly like this page, but it should be fairly close. To build the
page using the Zoop Skeleton please use the following:
a. Using the Zoop Framework
i. Put your main PHP logic in the pageDefault ( ) function of default.php as shown in the
tutorial to display the GUIcontrols template.
ii. Use CSS style sheets to style your page. Put your style sheet in
../zoop_skeleton/public/resources/css/yourStyleSheet.css as shown in the Zoop Skeleton
example that you downloaded.
iii. Format your static page using Smarty templates as shown in the example. Put your template
in ../skeleton/templates/default/yourHTMLTemplate.tpl as shown in the Zoop Skeleton
example that you downloaded and the GUIcontrols tutorial you completed.

9. When your code is ready, send an email to Sharkrit Impat <sharkrit@msn.com> with CC to Dr.
Jackson <rbj2020@msn.com> . Attach a zip file that contains.
a. Your default.php
b. Your templates/default/--.tpl files,
c. Your public/resources/css/--.css files
d. Your public/resources/images/--.png files

10. Please also include a file (yourname.txt) showing the amount of time you spent on each of the
following. Also in that file you may make any comments or suggestions that you may have. I am
just curious to see about how much time it required to do this exercise.
a. Learning how Zoop works -- ________hours
b. Creating your graphics -- ___________hours
c. Creating the CSS sheets -- ____________hours
d. Creating the template pages -- ____________hours
e. Coding PHP5 -- __________hours
f. Testing and debugging -- ___________hours

Potrebbero piacerti anche