Friday, February 22, 2019

Tutorial 02

PROGRAMMING APPLICATIONS AND FRAMEWORKS                                              
Tutorial 02



01. What is the need for VCS? 

  • VCS needs to merge some Kind of programming codes. Category of software tools that help a software system manage changes to source code over time.
  • It is important to manage the source of different versions ta different stages.



02. Differentiate the three models of VCSs, stating their pros and cons 


  • Local Data Model : simplest variations of VCS and it requires that all developers have access to the same file system.
  • Client-Server Model : Using this model, developers use a single shared repository of files. it does not require that all developers have access to the repository via the internet of a local network.
  • Distributed Model : In this model , each developer works directly with their own local repository, and changes are shared between repositories as a separate step.


03. Git and GitHub, are they same or different? Discuss with facts. 




Git is a version control system, a tool to manage your small to very large projects with speed efficiency.
GitHub is a hosting service for Git repositories and a consequence of the existence of git and not the only hosting service
So they are not the same thing: Git is the toolGitHub is the service for projects that use Git. To get your code to GitHub
                              Git
                   GitHub


  •  Installed locally

  •  Hosted in the cloud

  •  First released in 2005

  •  Company launched in 2008

  •  Maintained by the Linux foundation

  •  Purchased in 2018 by Microsoft

  •  Focused on version control and code sharing

  •  Focused on centralized source code hosting

  •  Primarily a command-line tool

  •  Administered through the web

  •  Provides a desktop interface named git GUI

  •  Desktop interface named GitHub desktop

  •  No user management features

  •  Build-in user management

  •  Minimal external tool configuration features

  •  Active marketplace for tool integration

  •  Open source licensed

  •  Includes a free tier and pay-for-use tiers





04. Compare and contrast the Git commands, commit and push 

Commit - Savings changes to the local repository.
Push - Uploads the saved changes to the online repository.


05. Discuss the use of staging area and Git directory 

The staging area is best described as a preview of your next commit. Meaning, when you do a git commit, git will take the changes that are in the staging area and make the new commit out of those changes. One practical use of the staging area is that it allows you to fine-tune your commits. You can add and remove changes from staging area until you are satisfied with how your next commit will look like, at which point you can do  git commit. And after you commit your changes they go into directory where they are saved as commit, blob and tree objects

Git directory is wherever you have checkout the project. For example the directory within which you have checked out a branch of your project. Its is typically the folder that contains the .git folder. That is the working directory. When you make changes to files in your checked out branch you make changes to the working directory.

06. Explain the collaboration workflow of Git, with example 

·        step 1: Create a branch
·        Step 2: Add commits
·        Step 3: Open a Pull Request
·        Step 4: Discuss and review your code
·        Step 5: Deploy
·        Step 6: Merge



07. Discuss the benefits of CDNs 

Benefits of CDN are,

  • Your server Load will decrease : By distributing content closer to
    website visitors by using a nearby CDN server (among other
    optimizations), visitors experience faster page loading times. As visitors
    are more inclined to click away from a slow-loading site, a CDN can
    reduce bounce rates and increase the amount of time that people spend
    on the site. In other words, a faster a website means more visitors will
    stay and stick around longer.
  • Content delivery will become faster : Due to higher reliability, operators can deliver high-quality content with a high level of service, low network server loads, and thus, lower costs.
  • Segmenting your audience becomes easy :CDNs can deliver different content to different users depending on the kind of device requesting the content
  • Lower network latency and packet loss : End users experience less jitter and improved stream quality. CDN users can, therefore, deliver high definition content with high Quality of Service, low costs, and low network load.
  • Higher availability and better usage analytics :Large amounts of
    traffic or hardware failures can interrupt normal website function. Thanks
    to their distributed nature, a CDN can handle more traffic and withstand
    hardware failure better than many origin servers.
  • Storage and security : CDNs offer secure storage capacity for content such as videos for enterprises that it, as well as archiving and enhances data backup services. CDNs can secure content through digital rights management and limit access through user authentication.



08. How CDNs differ from web hosting servers? 

CDN is a geographically distributed network of proxy servers and their data centers.The goal is to provide high availability and high performance by distributing the service spatially relative to end-users. WebHosting is used to host your website on a serverand let users access it over the internet. ... WebHosting normally refers to one server. A content delivery network refers to a
global network of edgeservers which distributes your content from a multi-host environment


09. Identify free and commercial CDNs 


CloudFlare


Incapsula

Photon by jetpack 

Swarmify
 


10. Discuss the requirements for virtualization 

  • Processor that support Intel VT-X
  • Minimum 2GB Memory
  • Minimum 550MB Hard disk space
  • Minimum two ethernet cables
  • Supported NAS series



11. Discuss and compare the pros and cons of different virtualization techniques in different levels
Pros:

  • Using virtualization for efficient hardware utilization
  • Using Virtualization to Increase Availability
  • Using Virtualization to Increase Availability
  • Save Energy


Cons:
  • Extra Costs
  • Software Licensing
  • Software Licensing



12. Identify popular implementations and available tools for each level of visualization 

Tools:

  • sisense
  • Tableau
  • Tibco Spotfire
  • Quick view
  • Infogram



13. What is the hypervisor and what is the role of it? 

A hypervisor is a process that separates a computer’s operating system and applications from the underlying physical hardware. Usually done as software although embedded hypervisors can be created for things like mobile devices.
Role:
provide an environment identical to the physical environment
provide that environment with a minimal performance cost

Retain complete control of the system resource

14. How does the emulation is different from VMs? 
Virtual machines make use of CPU self-virtualization, to whatever exists to provide a virtualized interface to the real hardware.


Emulators emulate hardware without relying on the CPU being able to run the code directory and redirect some operations to a hypervisor controlling the virtual container.

15. Compare and contrast the VMs and containers/dockers, indicating their advantages and disadvantages 

virtual machine:
Emulation of the computer system. what appears to be many separate computers on hardware that is actually one computer. The operating systems and their applications share hardware resources from a single host server, or from a pool of host servers. Each VM requires its own underlying OS, and the hardware is virtualized. A hypervisor, or a virtual machine monitor, is software, firmware, or hardware that creates and runs VMs. Popular VM
Providers Examples:

  • VMware vSphere
  • Virtual Box
  • Hyper-V

Benefits of VM:

  • Better known security controls.
  • Established management tools.
  • Established security tools.


Container/dockers:

A container is  a standard unit of software that packages up the code and all its dependencies so the application runs quickly and reliably from one computing environment to another

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.










Tutorial 10 – Client-side development 2 - RiWAs

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