Archive

Archive for the ‘Programming’ Category

Resit for WDFB level 5 or level 6

July 21st, 2014 No comments

Note for current students: remember that the paper last year had a different structure, the points here are still valid for this years paper.

Revision for the resit exam
The majority of students resiting this module will take a exam. This will be in the same style as the original paper, with two sections, where you have to answer all the questions in part one, and two from the four available in part two.

As with the original paper, you should attempt the revision pack which contains questions which have been carefully selected to represent the content and style of material that may occur. Dan and I will have variable attendance over the summer, so the best way to get a response is to email us your answers as a word document, which we will then comment on and email back.

Feedback on the scripts
Comments here are on the paper that was sat in May/June and are not a guarantee that similar questions will occur in the resit.

Short answer questions
It was surprising how many students couldn’t read a form correctly to write a response page in PHP. This was done many times in semester one, in the coursework and in many of the sample questions in the revision pack. You need to read the form and look at the post/get attribute, then have a collection of lines that extract the values. These should then be printed out. Sometimes these questions require If/switch statements, to catch cancel buttons or to transform the output before printing. A more complex form question is a form that checks itself for inputs in each field – there is an example of this in the revision pack.

Database style questions require you to know how to use the MySQL interaction functions. It’s not particularly difficult to memorise this as there are only 4/5, but if the question requires multiple outputs, then the loop structure is important. This is in the notes, exercises and in the revision pack. We don’t expect students to remember the names of the functions in the exam as they are normally supplied. You do need to know how to use them.

Many students couldn’t articulate the basics of what an object/class/abstraction is and the bare bones of how to express this in PHP. You should take a class description of a thing (for example a Person) and know how to write it out in PHP. Make sure you can explain what each line does.

Dan covered the basic types of diagrams in UML – for example class and state diagrams. Many students failed to draw these correctly (it is important that they use the correct shapes, lines and arrows). You should have a couple of examples of these in your head that you can reproduce and explain. Being able to do this may also help in part b.

Long answer questions
Some students only attempted one long answer question which makes passing the exam very difficult. Remember that the first 10 marks of a question will probably be easier than the last 10 marks, so it’s always worthwhile having a go, even if it’s just an attempt at defining the terms in the question.

It’s difficult to say how long an answer should be, but we would normally expect an answer to be 2/3 sides in the exam booklet. If it’s the kind of question that allows you to draw a picture (or many pictures) then draw them down the page and write explanations next to them. This should help structure your answer.

Questions in part (b) could be on areas such as

The use of sessions
Using functions to help structure PHP
Defining or explaining the use of objects in PHP
Defining or explaining object-oriented design principles

There are many examples of the types of questions that you could see in the pack.

The most common missing component in answers came from missing examples (where the question asked for it). You be able to reproduce some small examples in PHP and be able to explain how it works.

Categories: Programming Tags:

Web Scripting coursework results 11/12

January 16th, 2012 No comments

The (unmoderated) coursework results are available. As they are unmoderated it is possible (but unlikely) that they may be changed slightly either by the moderator or by the exam board. This rarely happens but it is possible…

This grid has the coursework results by kuid number BB2006 Web Scripting – CSWK Marks 1112

This (large) PDF file has the feedback sheets for the coursework – open the file in your PDF reader and search for your ku ID number (some of them are kxxxxx whilst some are Kxxxxx) – no names are included in the sheet BB2006 Web Scripting ALL

Categories: Programming Tags: ,

Using the SMARTY system for MVC

January 6th, 2012 No comments

Lecture Slides

MVC lecture

Lab Exercise

SMARTY is a templating system that allows for the separation of a PHP project into Model, View and Controller subparts. This exercise takes you through the steps required to create a small SMARTY application.

PHP exercise – MVC

These are the base zip files required to get the SMARTY application started lab11

These are the supplementary files needed for the second half of the exercise lab 11 more files

These are the final versions of the files, should you not manage to get the versions/exercises working (note that you would still need to edit the class.EmpDB.php file to include your database server, database name, username and password) lab11 final

Categories: Programming Tags:

Web application development – processing select statements

April 4th, 2011 No comments

code for lab (zip file)

Categories: BIT, Programming Tags:

Web application development – Basic mySQL PHP

March 28th, 2011 No comments

Files containing markup and code for this session

SQL statement

$query=’insert into emp values (‘.$empno.’,”‘.$ename.'”,”‘.$job.'”,’.$mgr.’,”‘.$hiredate.'”,’.$salary.’,’.$comm.’,’.$dept.’);’;

Categories: Programming, Web Tags: ,

Web application development – PHP forms

March 21st, 2011 No comments

The emp form is used in the labs – it’s a compressed HTML file, so to use it you will need to extract the contents

Categories: Programming Tags:

Web application development – PHP basics

March 17th, 2011 No comments

An introduction to PHP programming, covering

  • How server side scripting works
  • PHP blocks
  • Language basics
  • Literals
  • Keywords
  • Variables and the lack of types

Slides (PDF)

Categories: Programming Tags:

Web Scripting for Applications Revision pack

December 10th, 2010 2 comments

All the previous exam paper questions are available in a Web Scripting for Applications Revision Pack.

Remember that this is the first year this module has run, so the paper has a different structure to any previous second year module (details in the document above).

A solution for one of the questions is in this web scripting solution (was covered in the micro revision sessions that took place in each lecture before christmas)

Categories: Programming Tags:

Web Scripting for Applications Week 10

December 10th, 2010 No comments

Slides for today: lecture 10 php 5

Sample code used in lab: lab10 code (zip file)

Completed (working code) for morning completedlab10

Class employee example class.Employee.php

Lab exercises

lecture notes on MVC

MVC Code examples used in the lecture notes

Categories: Programming Tags: ,

Correctly structuring and presenting a technical document

December 6th, 2010 No comments

This document explains the tips and techniques that can be used to structure and format a Word document so that it looks appropriate. It is expected that assignment work for Information Technology for Business (Level 4) and Web Scripting for Applications (Level 5), will use these techniques.

Correctly structuring and presenting a document

Referencing (which is mentioned on Page 7 of the handout), should use the appropriate referencing style, which for Kingston University is discussed in Harvard Referencing for Business students. This is a locally stored version – check the link for the latest version (login required).