COP 4814 - Exam 2

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Why Flask?

- Simple to learn and extensively scalable - Since it isn't scaffolded, you can do whatever you can do whatever you want and however you want

JSON

A lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999.

What is Flask?

A micro web framework in Python that does not require particular tools or libraries

What is an API?

A program running on a server and from which another application (client) makes requests and retrieves data

What is XML?

A specification for storing information and describing its structure

Acceptance testing

Checks if software meets business requirements and if it is acceptable for delivery (user needs)

Integration testing

Checks robustness of interaction between integrated units. Exposes defects in the interfaces and components

System testing

Evaluates the software's compliance with the specified requirements

What does XSL stand for?

Extensible Stylesheet Language

What is the process of encoding JSON called?

It is called serialization

What is deserialization?

It is the reciprocal process of decoding data that has been stored or delivered in the JSON standard

What is serialization?

It is the transformation of data into a series of bytes to be stored or transmitted across a certain network

What does testing do?

It reports if the conditions the tester thought of are handled correctly

Interoperability

JSON has the same interoperability potential as XML

Openess

JSON is at least as open as XML

Readability

JSON is much easier for humans to read than XML (same for machines)

Simplicity

JSON is much simpler than XML because it has a much smaller grammar and maps more directly onto the data structures used in modern programming languages

Extensibility

JSON is not extensible because it is not a document markup language

Processability

JSON is processed more easily because its structured is simpler

Structure

JSON structures are based on arrays and records; XML structures are based on elements that has to be translated into a document structure

JSON stands for

Java Script Object Notation

What is the observer design pattern?

Pattern in which an object, called subject, maintains a list of it dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods

What does Python make JSON?

Python makes it easy to manipulate

What is testing?

The practice of writing code that invokes the code it tests to help determine if there are any errors

How can JSON and XML be fetched?

They can both be fetched with an XMLHttpRequest

What is the strategy design pattern?

Type of behavioral design pattern that encapsulates a "family" of interchangeable algorithms and selects one from the pool for use during runtime

Unit testing

Validates that each component of the software performs as designed

Serialization (Python to JSON)

dict = object list, tuple = array str = string int, long, float = number TRUE = TRUE FALSE = FALSE None = null

What does XML stand for?

eXtensible Markup Language

Deserialization (JSON to Python)

object = dict array = list string = str number (int) = int number (real) = float TRUE = TRUE FALSE = FALSE null = None

What is unit testing used for?

- Evaluate each code component - Find out how well it performs - Determine how well it reacts to valid or invalid input

Design principles

- Identify the aspects of your applications that vary and separate them from what stays the same - Keep things flexible - Program to an interface, not an implementation

Why testing?

- Makes sure your code works properly under a given set of conditions - Testing allows one to ensure that changes to the code did not break existing functionality - Testing forces one to think about the code under unusual conditions, possibly revealing logical errors - Requires modular, decoupled code, which is a hallmark of good system design

JSON was built in 2 structures

A collection of name/value pairs (dictionaries). An ordered list of values (array, list)

What is unit testing?

An essential part of software development and takes care of testing classes and functions in your application individually

JSON is used

By many APIs to transport data and to store data in a document database

Reusability

Both are powerful and there is a wide range of reusable software available

Exchangeability

Both can be used as an exchange format to enable users to move their data between similar applications

What does testing not do?

It does not prove that code is correct

What is XSL?

It is a family of languages used to transform and render XML documents

What is a design pattern in software engineering?

It is a general solution to a commonly occurring problem. A way to represent good practices in the object-oriented paradigm

Is XML quicker to read and write?

No, JSON is quicker to read and write

Is XML shorter?

No, JSON is shorter

Does XML have built-in tags

No, XML does not have built-in tags

Does JSON use end tags?

No, it does not use end tags

Similar formats to JSON

XML = Extensible Markup Language and YAML = YAML Ain't Markup Language

How are JSON and XML parsed?

XML has to be parsed with an XML parser while JSON can be parsed by a standard JavaScript function

XSL languages include

XSLT = Extensible Stylesheet Language Transformations XSL-FO = formats XML output to PDF XML Path Language (Xpath) = to identify nodes (elements, attributes) in the XML file

Can JSON use arrays?

Yes, it can use arrays

Can modern browsers read and display XML documents?

Yes, modern browsers can read and display XML documents

Are JSON and XML "self describing"?

Yes, they both are human readable

Are JSON and XML hierarchical?

Yes, they both have values within values

Can JSON and XML be parsed?

Yes, they can be parsed and used by lots of programming languages


Ensembles d'études connexes

Engage Fundamentals (Psychosocial Concepts for Nursing Practice): Human Growth and Development

View Set

Micro Test 3 (Chapter 6, 7, 8, 10)

View Set

Chapter 2 Quiz: Spring 2021 BIO-215-OL-A: Nutrition

View Set

Chapter 25 prep-u cardiac assessment

View Set

Literacy The Strategy Focus: Questioning Section 1

View Set

HEALTH ONLY_Chapter 6- Group Accident and Health Insurance

View Set

Prep-U Questions Chapter 38: Urinary Elimination

View Set