CO525 Dynamic Web

  1. What does AJAX stand for?
    Asynchronous Javascript and XML
  2. What does JSON stand for?
    Javascript Object Notation
  3. What does AJAX do?
    Contacts server without reloading page
  4. 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)
  5. What Act makes it illegal to use someone else's network without permission?
    Communications Act 2003
  6. What act makes phishing and spoofing illegal?
    Fraud Act 2006
  7. 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.
  8. 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.
  9. 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.
  10. What is an SQL injection?
    The user enters a statement that will confuse the SQL query and produce an unexpected but valid result.
  11. How do we remove the issue of SQL injections?
    • We can use placeholders.
    • Prepare and then execute the statement separately.
  12. What is session hijacking?
    Where another user finds out your session ID and uses it to access the site as you.
  13. What is the jQuery equivalent of Javascript's 'onClick' event?

    Example: 
    <input class="name" onclick="..."/>
    • $('input.name').bind('click', function() {
    •     //Javascript statements
    • }
  14. When does the 'focus' event fire?
    When an element gets the keyboard focus
  15. When does the 'blur' event fire?
    When an element loses the keyboard focus
  16. When does the 'change' event fire?
    When a user changes the state of a form element.
  17. 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)
  18. In jQuery, how does the .hover() method work?
    It takes two parameters: 

    .hover(<mouseover>, <mouseout>)
  19. 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.
  20. 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
  21. 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.
  22. 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.
  23. 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.
  24. When using AJAX, what three response formats are common?
    • HTML
    • JSON
    • XML
  25. In AJAX, explain the Same-Origin policy
    AJAX requests have to be made to the same server as the page containing the script.
  26. 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.
  27. 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.
  28. 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.
  29. How do you write JavaScript Object Notation (JSON)?




    A) {"name":"Ian", "number":"07514615166"}

    (Must use double quotes and curly brackets)
  30. 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.
  31. What does MVC stand for?
    Model - View - Controller
  32. In the MVC framework, what does the model represent?
    Code that accesses the data and processes it in any way
  33. In the MVC framework, what does the View represent?
    Any HTML / XSLT
  34. 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
  35. CakePHP makes use of naming conventions. Table names must be named...

    a) Singular
    b) Plural
    b) Plural
  36. CakePHP makes use of naming conventions. Foreign Key columns must be...

    a) Singular
    b) Plural
    a) Singular

    • Example:
    • vehicle_id
Author
ianholden
ID
215510
Card Set
CO525 Dynamic Web
Description
Revision cards for CO525 Dynamic Web
Updated