Application Development Flashcards

1
Q

How are applications are functionally split into?

A
  1. Frontend or Presentation Layer
  2. Middle or Application / Business Logic Layer
  3. Backend or Data Access Layer / Tier
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the architecture of Presentation Layer?

A

Model-View-Controller (MVC) architecture
. model: business logic
. view: presentation of data, depends on display device
. controller: receives events, executes actions, and returns a view to the user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does Business Logic Layer contain?

A
  1. Provides abstractions of entitites
  2. Enforce business rules for carrying out actions
  3. Supports workflows which define how a task involving multiple participants is to be carried out.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Object Relational Mapping?

A

Allows application code to be written on top of object-oriented data model, while
storing data in a traditional relational database.
Schema designer has to provide a mapping between object data and relational schema
Application opens a session, which connects to the database
* Objects can be created and saved to the database using session.save(object)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is HTML?

A

HyperText Markup
Language (HTML)
* HTML documents contain
◦ text along with font specifications, and other formatting instructions
◦ hypertext links to other documents, which can be associated with regions of the text
◦ forms, enabling users to enter data which can then be sent back to the Web server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is HTTP Protocol?

A

HyperText Transfer Protocol (HTTP) used for communication with the Web server

The HTTP protocol is connectionless
Information services need session information (using cookies).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a cookie?

A

A cookie is a small piece of text containing identifying information Sent by server to browser. Sent by browser to the server that created the cookie on further interactions. Server saves information about cookies it issued, and can use it when serving a
request. Cookies can be stored permanently or for a limited time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a web server?

A

A web server is software and underlying hardware that accepts requests via HTTP or its secure variant HTTPS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is CGI (Common Gateway Interface)?

A

Common Gateway Interface (CGI): a standard interface between web and application
server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Representation State Transfer (REST)

A

Representation State Transfer (REST): allows use of standard HTTP request to
a URL to execute a request and return data
. returned data is encoded either in XML, or in JavaScript Object Notation
(JSON)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are Big Web Services?

A

Big Web Services:
. uses XML representation for sending request data, as well as for returning results
. standard protocol layer built on top of HTTP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a Script?

A

A script is a list of (text) commands that are embedded in a web-page or in the server
* They are interpreted and executed by a certain program or scripting engine
* Scripts may be written for a variety of purposes such as for automating processes on a
local-computer or to generate web pages.
* The programming languages in which scripts are written are called scripting language
* Common scripting languages are VBScript, JavaScript, ASP, PHP, PERL, JSP etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is client side scripting?

A

Client-side scripting is responsible for interaction within a web page. The
client-side scripts are firstly downloaded at the client-end and then interpreted and
executed by the browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Server side Scripting?

A

Server-side scripting is responsible for the completion or carrying out a
task at the server-end and then sending the result to the client-end.

Numerous server-side scripting languages
◦ JSP, PHP
◦ General purpose scripting languages: VBScript, Perl, Python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is DOM?

A

document object
model (DOM) is tree representation of the displayed HTML text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are Servlets?

A

Java Servlet specification defines an API for communication between the Web /
application server and application program running in the server.
Application program (also called a servlet) is loaded into the server
◦ Each request spawns a new thread in the server
. thread is closed once the request is serviced

Servlet API supports handling of sessions

Store/retrieve attribute value pairs for a particular session

Servlets run inside application servers such as
◦ Apache Tomcat, Glassfish, JBoss
◦ BEA Weblogic, IBM WebSphere and Oracle Application Servers
* Application servers support
◦ deployment and monitoring of servlets
◦ Java 2 Enterprise Edition (J2EE) platform supporting objects, parallel processing
across multiple application servers, etc

17
Q

What is Java Server Pages (JSP)?

A

A JSP page with embedded Java code.
JSP is compiled into Java + Servlets
* JSP allows new tags to be defined, in tag libraries
JSP is platform independent and portable
JSP is a servlet but it is more convenient to write and to modify regular HTML
than to have a million println statements that generate the HTML.

18
Q

What are some of database connection frameworks?

A

Connectionist
. Open Database Connectivity (ODBC) works with C, C++, C#, VisualBasic, and Python. Other data APIs include
− OLEDB
− ADO.NET
. Java Database Connectivity (JDBC) works with Java

◦ Embedding
. Embedded SQL works with C, C++, Java, COBOL, FORTRAN and Pascal

19
Q

What is ODBC?

A

Open Database Connectivity (ODBC) is a standard API for accessing DBMS
* It aimed to be independent of database systems and operating systems
* An application written using ODBC can be ported to other platforms, both on the client and server side, with few changes to the data access code

ODBC is
◦ A standard for application program to communicate with a database server
◦ An application program interface (API) to
. Open a connection with a database
. Send queries and updates
. Get back results

20
Q

What is JDBC?

A

Java Database Connectivity (JDBC) is an API for the programming language Java,
which defines how a client may access a database.

Model for communicating with the database:
◦ Open a connection
◦ Create a “statement” object
◦ Execute queries using the Statement object to send queries and fetch results
◦ Exception mechanism to handle errors

21
Q

What is a Bridge?

A

A bridge is a special kind of driver that uses another driver-based technology
* This driver translates source function-calls into target function-calls
* Programmers usually use such a bridge when they lack a source driver for some database but have access to a target driver
* Common bridges are:
◦ ODBC-to-JDBC (ODBC-JDBC) bridges: An ODBC-JDBC bridge consists of an ODBC driver which uses the services of a JDBC driver to connect to a database. Examples: OpenLinkODBC-JDBC Bridge, SequeLink ODBC-JDBC Bridge

◦ JDBC-to-ODBC (JDBC-ODBC) bridges: A JDBC-ODBC bridge consists of a JDBC driver which employs an ODBC driver to connect to a target database. Examples: OpenLink JDBC-ODBC Bridge, SequeLink JDBC-ODBC Bridge

◦ OLE DB-to-ODBC bridges: An OLE DB-ODBC bridge consists of an OLE DB Provider which uses the services of an ODBC driver to connect to a target database. This provider translates OLE DB method calls into ODBC function calls. Examples: OpenLink OLEDB-ODBC Bridge,
SequeLink OLEDB-ODBC Bridge

◦ ADO.NET-to-ODBC bridges: An ADO.NET-ODBC bridge consists of an ADO.NET Provider which uses the services of an ODBC driver to connect to a target database. Examples: OpenLink ADO.NET-ODBC Bridge, SequeLink ADO.NET-ODBC Bridge

22
Q

What is Embedded SQL

A

A language to which SQL queries are embedded is referred to as a host language, and
the SQL structures permitted in the host language comprise embedded SQL

EXEC SQL (or similar alternate like #sql) statement is used to identify embedded SQL request to the pre-processor
EXEC SQL <embedded>;
Note: this varies by language:</embedded>

23
Q

Show an example of Embedded SQL

A

EXEC SQL
declare c cursor for
select ID, name
from student
where tot cred > :credit amount
END EXEC

EXEC SQL open c ;

EXEC SQL fetch c into :si, :sn END EXEC

EXEC SQL close c ;

24
Q

How to update using Embedded SQL?

A

EXEC SQL
declare c cursor for
select *
from instructor
where dept name = ‘Music’
for update

update instructor
set salary = salary + 1000
where current of c

25
Q

What are the Steps to access PostgresSQL from Python?

A

a) Create connection
connection=psycopg2.connect(database=”mydb”, user=”myuser”, password=”mypass”
host=”127.0.0.1”, port=”5432”)

b) Create cursor
cursor=connection.cursor()

c) Execute the query
cursor.execute(“insert into people values (%s,
%s)”, (who, age))

d) Commit/rollback
connection.commit()

e) Close the cursor
cursor.close()

f) Close the connection
connection.close()

26
Q

What are some of python frameworks?

A

Python offers several frameworks such as bottle.py, Flask, CherryPy, Pyramid, Django
and web2py for web development.
* Python offers many choices for web development
◦ Frameworks such as Django and Pyramid.
◦ Micro-frameworks such as Flask and Bottle.
◦ Advanced content management systems such as Plone and django CMS.

  • Python’s standard library supports many internet protocols
    ◦ HTML and XML
    ◦ JSON
    ◦ E-mail processing
    ◦ Support for FTP, IMAP, and other Internet protocols
    ◦ Easy-to-use socket interface
  • The package Index has more libraries
    ◦ Requests, a powerful HTTP client library.
    ◦ Beautiful Soup, an HTML parser that can handle all sorts of HTML.
    ◦ Feedparser for parsing RSS/Atom feeds.
    ◦ Paramiko, implementing the SSH2 protocol.
    ◦ Twisted Python, a framework for asynchronous network programming.
27
Q

What is Rapid Application Development (RAD)?

A

RAD Software is an agile model that focuses on fast prototyping and quick feedback in app development to ensure speedier delivery and an efficient result

◦ App development has 4 phases: business modeling, data modeling, process modeling, and testing & turnover: Defining the requirements, Prototyping, Receiving feedback and Finalizing the software

◦ With RAD, the time between prototypes and iterations is short, and integration occurs since inception.

28
Q

What are some of web application development frameworks?

A

◦ Java Server Faces (JSF)
. A set of APIs for representing UI components and managing their state, handling events and input validation, defining page navigation, and supporting internationalization and accessibility
. JSP custom tag library for expressing a JSF interface within a JSP page

◦ Ruby on Rails
. Allows easy creation of simple CRUD (create, read, update and delete) interfaces by code generation from database schema or object model

29
Q

Application performance - Caching

A

Caching techniques used to reduce cost of serving pages by exploiting commonalities between requests
◦ At the server site:
. Caching of JDBC connections between servlet requests
– a.k.a. connection pooling

. Caching results of database queries
– Cached results must be updated if underlying database changes

. Caching of generated HTML

◦ At the client’s network
. Caching of pages by Web proxy

30
Q

Types of Authentication to ensure application security?

A

Single factor authentication such as passwords too risky for critical applications
◦ guessing of passwords, sniffing of packets if passwords are not encrypted
◦ passwords reused by user across sites
◦ spyware which captures password

  • Two-factor authentication
    ◦ For example, password plus one-time password sent by SMS
    ◦ For example, password plus one-time password devices
    . device generates a new pseudo-random number every minute, and displays to user
    . user enters the current number as password
    . application server generates same sequence of pseudo-random numbers to check that the number is correct

More fine grained authentication is possible through “Views” in sql.

31
Q

What are some of the challenges in web application development?

A
  • User Interface and User Experience
  • Scalability
  • Performance
  • Knowledge of Framework and Platforms
  • Security
32
Q

What are the types of Mobile Apps?

A

Native Apps: Completely written in the native language of a platform
◦ iOS → Objective-C; Android → Java or C/C++
◦ Platform specific (heavily dependent on OS)

  • Web Apps: Run completely inside of a Web browser.
    ◦ Features interfaces built with HTML or CSS
    ◦ Powered via Web programming languages → Ruby on Rails, JavaScript, PHP, or
    Python
    ◦ Portable across any phone, tablet, or computer
  • Hybrid Apps: Combines attributes of both native and Web apps.
    ◦ Attempts to use redundant, common code that can be used across platforms, and
    ◦ Tailors required attributes to the native system