Programming Applications & Frameworks


1. Compare and contrast declarative and imperative paradigms.

Declarative programming is a programming paradigm that expresses the logic of a computation without describing its control flow.
Imperative programming is a programming paradigm that uses statements that change a program’s state.


2. Discuss the difference between procedural programming and functional programming.

In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast with the procedural programming style that emphasizes changes in state.


3. Explain the Lambda calculus and Lambda expressions in functional programming.

Lambda calculus is a framework developed by Alonzo Church in 1930s to study computations with functions.
Function creation − Church introduced the notation λx.E to denote a function in which ‘x’ is a formal argument and ‘E’ is the functional body. These functions can be of without names and single arguments.
Function application − Church used the notation E1.E2 to denote the application of function E1 to actual argument E2. And all the functions are on single argument.
Lambda calculus is a framework developed by Alonzo Church in 1930s to study computations with functions. Function creation − Church introduced the notation λx.E to denote a function in which 'x' is a formal argument and 'E' is the functional body. These functions can be of without names and single arguments.


4. What is meant by “no side-effects” and “referential transparency” in functional programming

Referential transparency and referential opacity are properties of parts of computer programs. An expression is called referentially transparent if it can be replaced with its corresponding value without changing the program's behavior. Some programming languages provide means to guarantee referential transparency.


5. Discuss the key features of Object Oriented Programming.

There are four major features in object-oriented programming: abstraction, encapsulation, inheritance and polymorphism.

Abstraction - An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries, relative to perspective of the viewer.

Encapsulation - Encapsulation is the process of compartmentalizing the elements of an abstraction that constitute its structure and behavior; encapsulation serves to separate the contractual interface of an abstraction and its implementation.

Inheritance – Child class is a type of parent class. Used to showcase reusable elements in the class diagram. Child classes “inherit” the attributes and methods defined in the parent class.

Polymorphism - Ability to assign a different meaning or usage to something in different contexts.
Specifically, to allow an entity such as a variable, a function, or an object to have more than one form


6. How the event-driven programming is different from other programming paradigms?

In computer programming, event-driven programming is a programming paradigm in which the flow of the program is determined by events such as user actions (mouse clicks, key presses), sensor outputs, or messages from other programs or threads. Event-driven programming is the dominant paradigm used in graphical user interfaces and other applications (e.g. - JavaScript web applications) that are centered on performing certain actions in response to user input. This is also true of programming for device drivers (e.g. - P in USB device driver stacks).

In an event-driven application, there is generally a main loop that listens for events, and then triggers a callback function when one of those events is detected. In embedded systems, the same may be achieved using hardware interrupts instead of a constantly running main loop. Event-driven programs can be written in any programming language, although the task is easier in languages that provide high-level abstractions, such as await and closures.


7. Compare and contrast the Compiled languages, Scripting languages, and Markup languages.

Programming languages are those that their end results are compiled. You most certainly use IDEs (Integrated Development Environments) to make use of these languages. If u think about it their examples are as follows: Java, visual basic, C, C++, C#, etc.

Markup languages are languages that are not in any way executed or used to perform actions but they are used to structure data, identify data or present data as the case may be. Examples are HTML (defines web content), XHTML (same with html but with some differences), XML (for structuring data, in some cases for defining UI structure as its used in Android app development), etc.

Scripting languages are languages that are not compiled, more like interpreted at run-time. It's like a file containing instructions for a computer to follow to carry out a task. Think of it like this. If you were to feature in a movie, u will definitely be given a script to read, memorize and follow. Hence the script becomes your guide to perform your roles in that movie. It’s as simple as that. Example of scripting languages are JavaScript, VB script, Perl, python, PHP, she'll script, etc.


8. Discuss the role of the virtual runtime machines.

In computing, a virtual machine (VM) is an emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination.

There are different kinds of virtual machines, each with different functions:

System virtual machines (also termed full virtualization VMs) provide a substitute for a real machine. They provide functionality needed to execute entire operating systems. A hypervisor uses native execution to share and manage hardware, allowing for multiple environments which are isolated from one another, yet exist on the same physical machine. Modern hypervisors use hardware-assisted virtualization, virtualization-specific hardware, primarily from the host CPUs.

Process virtual machines are designed to execute computer programs in a platform-independent environment.

Some virtual machines, such as QEMU, are designed to also emulate different architectures and allow execution of software applications and operating systems written for another CPU or architecture. Operating-system-level virtualization allows the resources of a computer to be partitioned via the kernel. The terms are not universally interchangeable.


9. Find how the JS code is executed (What is the runtime? where do you find the interpreter?)

• Runtime describes software/instructions that are executed while your program is running, especially those instructions that you did not write explicitly, but are necessary for the proper execution of your code.

Low-level languages like C have very small (if any) runtime. More complex languages like Objective-C, which allows for dynamic message passing, have a much more extensive runtime.
You are correct that runtime code is library code, but library code is a more general term, describing the code produced by any library. Runtime code is specifically the code required to implement the features of the language itself.

• An interpreter is a computer program that is used to directly execute program instructions written using one of the many high-level programming languages. The interpreter transforms the high-level program into an intermediate language that it then executes, or it could parse the high-level source code and then performs the commands directly, which is done line by line or statement by statement.


10. Explain how the output of an HTML document is rendered, indicating the tools used to display the output.

• The main function of a browser is to present the web resource you choose, by requesting it from the server and displaying it in the browser window. The resource is usually an HTML document, but may also be a PDF, image, or some other type of content. The location of the resource is specified by the user using a URI (Uniform Resource Identifier).

• The way the browser interprets and displays HTML files is specified in the HTML and CSS specifications. These specifications are maintained by the W3C (World Wide Web Consortium) organization, which is the standards organization for the web. For years’ browsers conformed to only a part of the specifications and developed their own extensions. That caused serious compatibility issues for web authors. Today most of the browsers more or less conform to the specifications.

• Browser user interfaces have a lot in common with each other. Among the common user interface elements are:
· Address bar for inserting a URI
· Back and forward buttons
· Bookmarking options
· Refresh and stop buttons for refreshing or stopping the loading of current documents
· Home button that takes you to your home page

• Strangely enough, the browser's user interface is not specified in any formal specification, it just comes from good practices shaped over years of experience and by browsers imitating each other.

The HTML5 specification doesn't define UI elements a browser must have, but lists some common elements. Among those are the address bar, status bar and tool bar. There are, of course, features unique to a specific browser like Firefox's downloads manager.

11. Identify different types of CASE tools, Workbenches, and Environments for different types of software systems (web-based systems, mobile systems, IoT systems, etc.).

 Types of CASE tools

Classic CASE tools - established software development support tools (e.g. interactive debuggers, compilers, etc.)
Real CASE tools - can be separated into three different categories, depending on where in the development process they are most involved in:
      Upper - support analysis and design phases
      Lower - support coding phase
      Integrated - also known as I-CASE support analysis, design and coding phases
         Upper and lower CASE tools are named as such because of where the phases they support are             in the Waterfall Model.

 Types of Workbenches

1. Table Workbench
A bench could be simply a hardwood tabletop (or metal tabletop) with sturdy wooden or metal legs to hold it up. These types of workbenches are typically used for heavy duty projects because of its ability to handle heavy objects and some relatively hard hits and bangs. They are also easy to replace and install.

This table doesn’t do well in regards for storage. Having this type of workbench assumes you have other means of storing tools and materials.

2. Cabinet Style Workbench
If you are the type of handyman who has a large collection of equipment, tools, and materials and also like them to be within easy reach as you work on your project, a cabinet style workbench will work well. Drawers will be either underneath the table, on top, or both. This type of workbench will often have a pegboard alongside the wall, convenient for hanging tools for easy access.

3. Portable and Multipurpose Workbench
The portable workbench will be small, collapsible, and relatively light. They are ideal for the handy-person who has various types of work to do in multiple places.

4. Power Strip Workbench
This type of workbench will have multiple power outlets mounted at strategic and convenient positions around the bench as well as heavy duty power cords. This is for the power tool maniac.

5. Woodworking Workbenches
Specialized workbenches can be designed for making furniture, cabinets, trimming, or hobby carving. These types of workbenches will have a dog ear or planning stop, which is a small piece of metal or wooden peg that the work is pressed against. The tabletop may also have hard-points, which are simply nuts embedded into the wood, which make it easier to bolt a tool or jig to for making disassembling and reassembly easy.

6. Metalworking Workbenches
These types of benches will be hardcore and able to handle the harshness of forging, casting, grinding, and welding. A vise will often be mounted at the tabletop.

7. Jeweler and Watchmaker Workbench
This is a specialized workbench that will have a small wooden surface that sticks out, close to the worker for close detailed work on small objects. There will also be a surface underneath to easily catch fallen stones or pieces that wouldn’t be found well on the floor.

8. Gardening Workbenches
These types of benches will be built to handle the constant exposure to dirt and moisture. The wood will be treated to prevent rotting and mold growth.

9. Art and Sculpture Workbenches
These types of benches will often be round so that the work can be accessed from all sides. Sculptures, carvers of wood and stone, pottery makers, and other artists use this type of workbench.

10. Laboratory Workbenches
These are the more delicate type of workbenches. Harsh power tools won’t be beating the tabletops. They will serve the biological and chemical scientists. They will be found in hospitals and science labs. Water and gas sources will be fixed in convenient spots and the tabletop will be a smooth slate. It will be made out of metal for easy cleaning and the most efficient management of infectious or toxic contaminants.

 Types of Environments for different types of software systems

The Systems Development Life Cycle (SDLC) is a software engineering framework that is used to describe the various phases used to develop an information system. These phases include planning, analysis, design, development, testing and implementation. SDLC environments describe the activities and tools required to perform a particular process within the SDLC. They are also defined as controlled points where software engineers can carry out activities related to development, testing, installation, and configuration. These environments are associated with the different phases that make up the SDLC. The main SDLC environments include:
     The Analysis and Design Environment
     The Development Environment
     The Common Build Environment
     The Testing Environment: This has two components:
     The Systems Integration Testing Environment
     The User Acceptance Testing Environment
     The Production Environment

12. Discuss the difference between framework, library, and plugin, giving some examples.

The key difference between a library and a framework is "Inversion of Control". When you call a method from a library, you are in control. But with a framework, the control is inverted: the framework calls you. A library is just a collection of class definitions.

A library performs specific, well-defined operations.

A framework is a skeleton where the application defines the "meat" of the operation by filling out the skeleton. The skeleton still has code to link up the parts but the most important work is done by the application.

Examples of libraries: Network protocols, compression, image manipulation, string utilities, regular expression evaluation, math. Operations are self-contained.

Examples of frameworks: Web application system, Plug-in manager, GUI system. The framework defines the concept but the application defines the fundamental functionality that end-users care about.

Comments

Popular posts from this blog