Version controling system
•Version control software keeps track of every
modification to the source in a special kind of
database.
• If a mistake is made, compare earlier versions of the code to help fix the
mistake
Collaboration
With a VCS, everybody on the team is able to work absolutely
freely - on any file at any time. The VCS will later allow you to merge all the changes into a
common version.
Storing Versions
A version control system acknowledges that there is only one project.
Therefore, there's only the one version on your disk that you're currently working on.
Everything else are neatly packed up inside the VCS. When you need it, you can request
any version at any time and you'll have a snapshot of the complete project right at hand.
Restoring Previous Versions
If the changes you've made lately prove to be garbage,
you can simply undo them in a few clicks.
Understanding What Happened
Every time you save a new version of your project,
your VCS requires you to provide a short description of what was changed.
This helps you understand how your project evolved between versions.
Backup
Using a distributed VCS like Git can act as a backup.
every team member has a full-blown version of the project on his disk
including the project's complete history.
all we need for recovery is one of our teammates' local Git repository.
_______________________________________________________________________________________________
• Local version control systems
Everything is in our computer.
Cons
so it cannot be used for collaborative software development.
• Centralized version control systems
Everyone knows to a certain degree what others on the project are doing.
Administrators have finegrained control over who can do what.
Pros
Can be used for collaborative software development.
Cons
Most obvious is the single point of failure that the centralized server represents.
• Distributed Version Control Systems
Clients don’t just check out the latest snapshot of the files, they fully mirror the repository
Cons
* No single point of failure.
* If any server dies, and these systems were collaborating via it,
any of the client repositories can be copied back.
* Can collaborate with different groups of people in different ways
simultaneously within the same project.
_________________________________________________________________________________
Git
Git is a distributed version control system, a tool to manage our source code history.
We can commit, branch and tag all on our local machine without interacting with a server at all.
GitHub
Github is a social layer on top of Git.
It is a hosting service for Git repositories.
_________________________________________________________________________________
Git commands
commit
The action of storing a new snapshot of the project’s state in the
VCS history.
Command: git commit -m "Commit message"
This will commit changes to head (but not yet to the remote repository).
Command: git commit -a
This will commit any files you've added with git add, and also commit any files you've changed since then.
Push
Send changes to the master branch of your remote repository.
Command: git push origin master
_________________________________________________________________________________
Git directory
The Git directory is where Git stores the metadata and object database for your project.
This is the most important part of Git, and it is what is copied when you clone a repository from another computer.
The working directory is a single checkout of one version of the project.
These files are pulled out of the compressed database in the Git directory and placed on disk for you to use or modify.
Staging area
The staging area is a simple file, generally contained in your Git directory,
that stores information about what will go into your next commit.
It’s sometimes referred to as the index, but it’s becoming standard to refer to it as the staging area.
_________________________________________________________________________________
Benefits of Content Distribution Network
• Improving website load times
By distributing content closer to website visitors by using a nearby CDN server (among other
optimizations), visitors experience faster page loading times.
A CDN can reduce bounce rates and increase the amount of time that people spend
on the site.
• Reducing bandwidth costs
Through caching and other optimizations, CDNs are able to reduce the amount of data an origin
server must provide, thus reducing hosting costs for website owners.
• Increasing content availability and redundancy
Thanks to their distributed nature, a CDN can handle more traffic and withstand
hardware failure better than many origin servers.
• Improving website security
A CDN may improve security by providing DDoS mitigation, improvements to security certificates, and other optimizations.
_________________________________________________________________________________
Differences between CDN and Web hosting
• Web Hosting is used to host your website on a server and let users access it over the internet.
A content delivery network is about speeding up the access/delivery of your website’s assets to those users.
• raditional web hosting would deliver 100% of your content to the user. If they are located across the world,
the user still must wait for the data to be retrieved from where your web server is located.
A CDN takes a majority of your static and dynamic content and serves it from across the globe, decreasing download times.
Most times, the closer the CDN server is to the web visitor, the faster assets will load for them.
• Web Hosting normally refers to one server.
A content delivery network refers to a global network of edge servers which distributes your
content from a multi-host environment.
_________________________________________________________________________________
Free CDNs
• CloudFlare
• Incapsula
• Photon
• Swarmify
Commercial CDNs
• AWS Cloudfront
• Google Cloud CDN
• Microsoft Azure CDN
• Cloudinary
• Imgur
_________________________________________________________________________________
Levels of Virtualization
Hardware level
Implement by Virtual Machines, Emulators
• VMware
• VirtualBOx
OS level
Application level
implement by Runtimes , engines (games engines)
• JRE
• JVM
• .NET
Database virtualization
Network virtualization
_________________________________________________________________________________
Hypervisor
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.
The hypervisor drives the concept of virtualization by allowing the physical host machine to operate multiple virtual machines as guests to help maximize the effective use of computing resources such as memory, network bandwidth and CPU cycles.
_________________________________________________________________________________
Difference between Emulater and Virtual machine
The purpose of a virtual machine is to create an isolated environment.
Virtual machines make use of CPU self-virtualization, to whatever extent it exists, to provide a virtualized interface to the real hardware.
The purpose of an emulator is to accurately reproduce the behavior of some hardware.
Emulators emulate hardware without relying on the CPU being able to run code directly and redirect some operations to a hypervisor controlling the virtual container.
_________________________________________________________________________________
Friday, February 22, 2019
Friday, February 15, 2019
Introduction to the Frameworks
Declarative paradigm is a programming paradigm, that expresses the logic of a computation without describing it's control flow.
Logic, functional and domain-specific languages belong under declarative paradigms and they are not always universal programming languages. Examples would be HTML, XML, CSS and SQL.
Imperative paradigm is a programming paradigm that uses statements that change a program’s state.
Procedural and object-oriented programming belong under imperative paradigm that we know from languages like C, C++, C#, PHP and Java.
_________________________________________________________________________________
Procedural programming paradigm helps to
structure the code using blocks called
procedures, routines, sub-routines, functions,
methods. It provides modularity and code reuse. It is a imparitive programming paradigm.
Functional programming is a style of building the structure and elements of computer programs, that treats computation as the evaluation of mathematical functions and avoids changing state and mutable data. It is a declarative programming paradigm, which means programming is done with expressions or declarations instead of statements. Functional code is idempotent, the output value of a function depends only on the arguments that are passed to the function.
_____________________________________________________________
Lambda calculus is a framework developed by Alonzo Church in 1930s to study computations with functions.
Function creation
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
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 includes three different types of expressions, i.e.,
E :: = x(variables)
| E1 E2(function application)
| λx.E(function creation)
Where λx.E is called Lambda abstraction and E is known as λ-expressions.
_____________________________________________________________
No side-effect in Functional programming
The output of a function only depends on the inputs. Similar inputs always provide the same output. Execution of a function does not affect the global state of the system.
_____________________________________________________________
Key features of OOP
Encapsulation
Encapsulation refers to the creation of self-contained modules that bind processing functions to the data. These user-defined data types are called "classes," and one instance of a class is an "object".
Inheritance
Classes are created in hierarchies, and inheritance allows the structure and methods in one class to be passed down the hierarchy.
Polymorphism
Has the ability to process objects differently depending on their data type or class. for example , given a base class shape, polymorphism enables the programmer to define different area methods for any number of derived classes such as circles, rectangles and triangles.
_____________________________________________________________
Event-driven programming
Actions are defined on events which could be occurred by mouse click and moving or keyboard strokes. It is mainly focuses on selecting user interface.
_____________________________________________________________
Compiled languages
- End-results are compiled.
- Some executables can be directly run on the OS.
- Some executables use virtual runtime machines.
Scripting languages
- Source code is not compiled, it is directly executed.
- At the execution time, the code is interpreted by a runtime machine.
Markup languages
- Not compiled.
- No execution process.
- Interpreted at runtime.
_____________________________________________________________
Virtual runtime machine
The virtual machine function is a function for the realization of virtual machine environment. 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.
Plugins
provide specific tools for development
• At development time the plugin (source code files, modules, packages,
executables, etc.) is placed in the project.
• Apply some configurations using code
• At runtime the plug-in will be invoked via the configurations
Example :
Libraries
provide an API, the coder can use it to develop some features, when writing code
•At development time
Add the library to the project (source code files,
modules, packages, executables, etc.)
•Call the necessary functions/methods using the
given packages/module/classes
•At runtime the library will be called by the code.
Framework is a collection of libraries, tools, rules,
structures, and control, to build software systems.
At development time
Create the structure of the application
Place your code in necessary places
You may use the given libraries to write your code
You can include additional libraries and plugins
At runtime
The framework will call your code (inverse of control).
Subscribe to:
Comments (Atom)
Client - side Development II - RiWAs
Key features of RiWAs Direct interaction: In RiWAs, users can interact directly with page elements through editing or drag-and-drop too...
-
Key features of RiWAs Direct interaction: In RiWAs, users can interact directly with page elements through editing or drag-and-drop too...
-
Importance of maintaining the Code Quality Why Is Good Quality Code So Important? Good quality code is an essential property of a softwa...
-
Declarative paradigm is a programming paradigm, that expresses the logic of a computation without describing it's control flow. Log...