If a person causes a computer to perform any function with intent to secure access to any program or data held in any computer, what act have they broken according to law?
Computer Misuse Act (1990 Section 1)
What Act makes it illegal to use someone else's network without permission?
Communications Act 2003
What act makes phishing and spoofing illegal?
Fraud Act 2006
When a form is being submitted, why is it better to perform validation at the destination page also?
A user may have made up the $_GET or $_POST parameters.
Why is it important to verify a user's authenticity on all pages and not just the log in page?
Because a user can jump past the log in page and start from an internal page simply by typing in the correct URL.
On an E-commerce site that uses an intermediary (PayPal), what can go wrong with the returned referURL?
A user can find out what it is and visit it without paying for their goods, thus prompting the merchant to dispatch the order to this user.
What is an SQL injection?
The user enters a statement that will confuse the SQL query and produce an unexpected but valid result.
How do we remove the issue of SQL injections?
We can use placeholders.
Prepare and then execute the statement separately.
What is session hijacking?
Where another user finds out your session ID and uses it to access the site as you.
What is the jQuery equivalent of Javascript's 'onClick' event?
Example:
<input class="name" onclick="..."/>
$('input.name').bind('click', function() {
//Javascript statements
}
When does the 'focus' event fire?
When an element gets the keyboard focus
When does the 'blur' event fire?
When an element loses the keyboard focus
When does the 'change' event fire?
When a user changes the state of a form element.
Give the shorthand jQuery code that will signal the action to take when an event is fired without using the 'bind' method. Give the example for a click method.
.click(mymethod)
In jQuery, how does the .hover() method work?
It takes two parameters:
.hover(<mouseover>, <mouseout>)
In jQuery, how does the .toggle() method work?
It takes a minimum of two functions as parameters.
It cycles through these functions in order. If two parameters are used, it simply alternates between the two.
How does the DOM standard say that the browser should implement event propagation?
a) Capture then Bubbling
b) Bubbling then Capture
a) Capture then Bubbling
In event propagation, what is event bubbling?
Event bubbling is where the event handlers begin at the lowest level of the DOM hierarchy and then works its way towards the top.
In event propagation, what is event capturing?
Event capturing is where the event handlers begin at the highest level of the DOM hierarchy and then works its way towards the bottom.
What is event propagation in Javascript?
Event propagation is one of event capturing or event bubbling.
It is the order in which events are triggered when one event is linked to multiple event handlers.
When using AJAX, what three response formats are common?
HTML
JSON
XML
In AJAX, explain the Same-Origin policy
AJAX requests have to be made to the same server as the page containing the script.
In raw Javascript, how do we use Ajax?
Create an XMLHttpRequest object
Initialise its header and URL fields
Call its send() method to send it to the URL
Check that the request was successful and extract the response data from the object.
When using Ajax in Javascript, what is the difference between synchronous and asynchronous requests?
A synchronous request will wait for the server to respond before continuing execution of later JavaScript statements.
An asynchronous request will continue immediately with later JavaScript statements regardless of hearing a response.
Which two jQuery methods are very good for using Ajax.
$.load() - will fetch HTML from a url and insert it in the current page.
$.getJSON() - get JSON data and convert it into a JavaScript object.
How do you write JavaScript Object Notation (JSON)?
A) {"name":"Ian", "number":"07514615166"}
(Must use double quotes and curly brackets)
Give three benefits of MVC framework.
Separation of business logic and user interface
Reduced complexity
Increase Maintainability - Web designers edit the views, Database designers edit the models, Coders edit the controllers.
What does MVC stand for?
Model - View - Controller
In the MVC framework, what does the model represent?
Code that accesses the data and processes it in any way
In the MVC framework, what does the View represent?
Any HTML / XSLT
In the MVC framework, what does the Controller represent?
Takes user inputs
Gets data from database
Updates database
Sends a view back to the user
CakePHP makes use of naming conventions. Table names must be named...
a) Singular
b) Plural
b) Plural
CakePHP makes use of naming conventions. Foreign Key columns must be...