Studydroid is shutting down on January 1st, 2019
Cloned from: Web programming



keywords:
Bookmark and Share



Front Back
URI
Uniform Resource Identifier is a string of characters used to identify or name a resource on the Internet.
Types of URIs
Uniform Resource Name (URN) is like ISBN or SKU Uniform Resource Locator (URL) is a URI that describes its network location.
Statement
A complete command
Function
A collection of statements with a name and definition, eg "def hello():
Parameter
Name in parenthesis after the function which can be filled in with a variable to customize the result.
Module (script)
Text file saved on a disk so it can be recalled and used again and again
Naming functions in modules
Name of module, period, name of function, eg chaos.main()
Variable
Name given to value so it can be used again and again, eg "x=input" or "for i in range(10):"
Requirements for identifiers (names)
Start with letter or _ and case-sensitive; not reserved words
Expression
Fragment of code which produce or calculate new numbers
Expression types
Literal (x = 5) Calculated (+ - * / ** %)
Range()
Produces list of numbers that starts with 0 and goes up to but not including
Counted loop
For in range
Control structure
New item, check, if yes continue, if no, do something else (like end or stop for human input)
Data types
String vs Num Within num, int vs float
Library
A module containing useful definitions
Import math
Imports math library with pi, e, trig functions, logs, ceil(x), floor(x)
range function
range(n)produces a list of numbers starting with 0 and continuing up to,but not including, n
IDE
Integrated Development Environment
Function
A block of code that performs a task. They have parenthesis following their names. Ex: main()
Variable
the only type of memory Location whose contents can change while a program is running. Ex: double raise = 0.0; int age = 0; float rate = float(3.5) bool insured = false; char grade = ; string company = "";
Data types
Control the type of data the memory location can store
Fundamental data types
Basic data types built into the C++ language which must be typed using lowercase letters
Boolean values
true or false
Forms of range()
range(n) range(start,n) range(start,step,n)
Initialization
Initial assignment of a value, eg in an accumulator
String literal
Sequence of characters in quotes, eg str1 = "hello"
raw_input() function
firstName = raw_input() No need for user to type in quotes
String operators
+ concatenation * repetition [] indexing len() length [:] slicing
ASCII and unicode
American Standard Code for Information Interchange has 0-127 + control codes Unicode supports characters of all written languages
String library
"import string" provides string functions like string.split
Eval function
eval() evaluates any string as if it were a Python expression. Input evaluates what user types; eval evaluates whatever string it is given.
Open a file for output
outfile = open("mydata.out","w")
object
Combines both data and operations together. Know stuff (data) and do stuff (operations). Operations (methods) are invoked using dot notation, eg infile.read() or myString.split()
SOAP
Simple Object Access Protocol: specification for exchanging structured info in Web Services using XML message format. SOAP can form foundation layer of web services protocol stack, providing basic messaging framework on which web services can be built.
XML
Extensible Markup Language is set of specs for creating custom markup languages. Extensible = allows user to define mark-up elements. XML helps share structured data via Internet.
schema
Abstract collection of metadata with element, attribute and type declarations/definitions. XML Schema Documents usually have extension ".xsd"
REST
Representational State Transfer. Network architecture principles which outline how resources are defined and addressed. Used to describe any interface which transmits domain-specific data over HTTP without an additional messaging layer such as SOAP or session tracking via HTTP cookies.
JSON
JavaScript Object Notation is a lightweight data-interchange format. Built on * collection of name/value pairs * ordered list of values Main application is in Ajax web application programming, where it is an alternative to the XML format.
HTTP verbs
HTTP defines eight methods ("verbs") indicating desired action to be performed on a resource. GET Requests representation of specified resource. POST Submits data to be processed (eg from an HTML form) to a resource.
API
Set of routines, data structures, object classes and/or protocols provided by libraries and/or operating system services to support the building of applications
binding
A WSDL object. Specifies the port type, defines the SOAP binding style (RPC/Document) and transport (SOAP Protocol). The binding section also defines the operations.
WSDL
Web Services Description Language (wiz-dəl) - an XML-based language that provides a model for describing Web services.
Port types (WSDL)
Abstract collections of supported operations
Messages (WSDL)
Abstract collections of supported operations
Web services
Collections of network endpoints, or ports. In WSDL, the abstract definition of ports and messages are separated from their concrete use or instance, allowing the reuse of these definitions.
Port (WSDL)
Network address paired with a reusable binding.
ontology
Agreement on what things mean. A formal representation of concepts within a domain and the relationships between the concepts. Or the study of the nature of reality, its categories and their relations.
OWL
Web Ontology Language. Family of knowledge representation languages for authoring ontologies. "Axioms" place constraints on "classes."
RDFS
Resource Description Framework Schema. Extensible knowledge representation language with elements for describing ontologies (RDF vocabularies). Many RDFS components are included in OWL.
x of y cards Next >|