Friday, February 15, 2019

Tutorial 01


PROGRAMMING APPLICATIONS AND FRAMEWORKS                                              
Tutorial 01


1. Compare and contrast declarative and imperative paradigms
           In this point you will be heard about imperative programming and declarative programming.
                        
              Declarative paradigms

                  Imperative paradigms

  • Is like how you do something

  • Is  like what you do, or something

  • That is concerned higher levels of abstraction.

  • That is concerned lower levels of abstraction. 


               
2. Discuss the difference between procedural programming and functional programming.
    
Procedural programming uses a list of instructions to tell the computer what to do step by step.
Functional programming is an approach to problem solving that treats every computation as a                                                           mathematical function.


                     Procedural
                         Functional

  • The output of a routine does not always have a direct correlation with the input

  • Always returns the same output for a given input.

  • Everything is done in a specific order

  • Order of evaluation is usually undefined

  • Execution of a routine may have side effects.

  •  Must be stateless. i.e. No operation can have side effects

  • Tends to emphasize implementing solutions in a linear fashion

  • Tends to emphasize a divide and conquer approach




3. Explain the Lambda calculus and Lambda expressions in functional programming.
      
      Lambda calculus is a Framework. It is developed by Alonzo church in 1930, to study computations based on function abstraction and application using variable binding and substitution.The essence of functional programming is that programs are a combination of expressions. Expressions include concrete values, variables and also functions. Functional programming languages are all based    on the lambda calculus.


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

"NO Side-effects" : Function can execute anytime, and it will always return same output for a given input.
"Referential transparency" : Referential transparency is the ability to replace an expression with its calculated values.

5. Discuss the key features of Object Oriented Programming.

  • Objects                : Object is a representation of a single instance and part of data  and a program execution.
  • Classes                : A class is a description of properties which are common of an object.  A class could be said as a section of a System application and can create subclass.
  • Abstraction       :To deal with objects since their important features and ignore all other details.
  • Encapsulation  :Hide unnecessary details in Classes and deliver a simple and clear interface for working
  • Inheritance       :New data types (classes) can be defined as extensions to previously defined types. Parent Class (Super Class) Child Class (Sub Class) Subclass inherits properties from the parent class. Parent Child
  • Polymorphism :Ploymorphism is ability to process objects differently depending on their data type or class.There are two types of polymorphism, Compile time polymorphism(method overloading) and runtime ploymorphism(method Overriding)



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

"Event-Driven programming" :

  •  Is a programming paradigm in which the flow of the program is determined by events such as user actions ,messages from other programs or threads
  • event-driven program is an approuch rather than a type of programming language and it can be practiced with any programming language.
  • Mostly related to the systems with GUIs, where the users can interact with the GUI elements.
  • Can be seen as inversing the control to the event machine, The event machine calls your code as the events trigger 


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

    Compiled languages
     Scripting languages
     Markup languages


  • Programming languages are those that their end results are compiled.
  • Most certainly use IDEs to make use of these languages.
  • Programming languages are, 
            Java
            Visual basic
            C
            C++
            C#



  • Scripting languages are languages that are not compiled, more like interpreted at run time.
  • A scripting language is a subset of programming language that is used to produce scripts, which are sets of instructions that automate tasks that would otherwise be performed manually by a human.
  • scripting languages are,
                 JavaScript
                 VB Script
                 Perl
                 Python
                 Php




  • 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
  • Markup languages are,
           HTML
           XHTML
           XML
            CSS


8. Discuss the role of the virtual runtime machines.
     
virtual machine that provide execution of java program as well as programs with other languages. This function enables you to create multiple independent virtual machines on one physical machine by virtualizing resources such as the CPU, memory, network and disk that are installed on a physical machine.


9. Find how the JS code is executed (What is the runtime? where do you find the interpreter?)
Order of execution in JavaScript is dependent on the following and working together to pass
and order information
  • The Callstack
  • The Event Loop
  • The Task Queue
  • WebAPIs/External Resources


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

Step 1: Start with content. As a starting point, we’ll write up raw text content and see what browsers do with it.

Step 2: Give the document structure. You’ll learn about HTML element syntax and the elements that give a document its structure.

Step 3: Identify text elements. You’ll describe the content using the appropriate text elements and learn about the proper way to use HTML.

Step 4: Add an image. By adding an image to the page, you’ll learn about attributes and empty elements.


Step 5: Change the page appearance with a style sheet. This exercise gives you a taste of formatting content with Cascading Style Sheets


11. Identify different types of CASE tools, Workbenches, and Environments for different types of software systems (web-based systems, mobile systems, IoT systems, etc.).
Computer Aided Software Engineering (CASE) tools are used throughout the engineering life cycle of the software systems

  • Requirements
  • Designing
  • Development
  • Testing
  • Implementation
  • Maintenance

Case software types,

  • Individual tools :Simply those are software applications which we are used to automating the Software Development Life Cycle. We can divide Case tools into the main three categories, based on the use of the software in SDLC
  • workbenches : Those are set of integrated tools, that used in specific software life cycle stage. CASE tools used widely in the globe to support analysis & design, programming and testing.
  • environments :combines many tools to support many activities throughout the SDLC


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


          Framework
            Library
            Plugin

  • Framework is a collection of patterns and libraries to help with building an application.
  • At runtime, The framework will call your code (inverse of control)
  • Examples for frameworks are  .NET, JQuery,Bootstrap






  • A library is a collection of functions that serves one particular purpose.
  • At runtime, The library will be called by the code
  • Use of appropriate libraries, API and framework can simplify development,   SDK


  • A plugin is a way for a third party to extend the functionality of an application. 
  • Plugin example,
        java virtual machine for running applets



-------------------------------------------------------------------------------------------------------------------------

                                                               Lab 01



1. What is the difference between JDK and JRE? 

JRE :-The JRE is the Java Runtime Environment. It is a package of everything necessary to run a compiled Java program, including the Java Virtual Machine

JDK :-The JDK is the Java Development Kit, the full-featured SDK for Java.










No comments:

Post a Comment

Tutorial 10 – Client-side development 2 - RiWAs

PROGRAMMING APPLICATIONS AND FRAMEWORKS                                                  Tutorial 10 Distinguish the term “Rich Internet...