🫡 Web Development Flashcards
WD
Differences Between HTML / XML
XML Questions
- HTML is for format/display, while XML is representing and transfering data.
- Tags, HTML has pre-defined tags whilst, XML requires creation of custom tags normally following a XML Schema or DTD.
WD
www.example.com/index.php/sports/tennis/rackets
Codeigniter Questions
- www.example.com = domain
- index.php = framework
- sports = controller / class
- tennis = function
- racket parameter
- /ci/ would be the framework folder / where it is installed.
WD
$(document).ready()
jQuery Questions
- $(document) = jQuerty method used to execute javascript code as soon as DOM of a web page is ready to be manipulated
- .ready() specifies the code inside
- $(function() is abbrevation
WD
$.get()
jQuery Questions
- jQuery method that uses AJAX request to server and retrieve data from it
WD
?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE MessageList [ <!ELEMENT MessageList (Message*)> <!ELEMENT Message (To, From, Body)> <!ELEMENT To (#PCDATA)> <!ELEMENT From (#PCDATA)> <!ELEMENT Body (#PCDATA)> ]>
XML Question
<?xml version = "1.0" encoding = "UTF-8"?> <MessageList> <Message> <To> John </To> <From> Jane </From> <Body> Example message, hi john </Body> </Message> </MessageList>
WD
MVC
codeigniter Question
- Model, View, Controller
- model = data and buisness logic, defines data structure, provides method to access data / manipulate.
- view = rendering the model data, presents to user, defines layout and appearance for UI.
- controller = recieves user inputs / updates model according to updates etc.
WD
Sessions
codeigniter Question: give an example what could use it for
- used as http doesn’t hold data after that page is left that session
- can assign a username, password that data can be held within that session assiocated with them
- can be used for authentication and to keep data in forms yet to be submitted.
WD
onCreate()
Android Questions
- first method that is called when an app is launched. app initalizes it user interfact and other resources.
WD
onStart()
Android Life Cycle Question
- called when app becomes visible to the user, but be actually running
- at this point, app is still partially obscured by other apps / home screen.
WD
onResume()
Android Life Cycle Question
- called when app is brought to the foreground and becomes the active app it is where the app begins to interact with the user and updates it’s UI.
WD
onPause()
Android Life Cycle Question
- called when the app loses focus either because the user has switched to another app or because system dialog or notification has appeared.
- this is where the app should release any resources it no longer needs.
WD
onStop()
Android Life Cycle Question
- called when no longer visible to the user
- at this point app is still running in the background, but may be killed by system if it needs to free up resources.
WD
onDestroy()
Android Life Cycle Question
- called when the app is about to be completely destroyed and removed from the memory. it is where the app should release any remaining resources, save any data that needs to be persisted.
WD
Android Architecture (5)
Android Life Cycle Question
- 5) Android Runtime = libraries core, Dalvik VM
- 4) Applications = home, contacts, phone, browser
- 3) Application Framework = Activity, Package, Telephone, Location, notification managers.
- 2) Libaries = media framework, SSL, SGL, WebKit
- 1) Linux Kernal = all the drivers, display, camera drivers.
WD
Android Application Framework
Android Life Cycle Question
Views = UI elements
Content Providers = enable data sharing between applications
Resource Manager = provides access to non-code resources
Notification Manager = enables applications to display alerts, status messages.