Dip - Web Development
Dip - Web Development
1. MARKUP LANGUAGE
TAGS
In web Tags indicate what should be displayed on the screen when the page loads
Contains →opening part eg;- <p>
● <p> [p here is the tag name]
● <p colour =”red” size = “20”> [one or more attribute can be attached with tag name]
→content eg;- This is paragraph
● Can be any data
● Can even be sets of multiple tags be part of content
→closing part. Eg;- </p>
● Similar to opening part, only diff is they has a forward slash (/) before tag name
● No attributes can be attached to closing tags
● Opening and closing tag should be similar
HTML
● Hyper text Markup Language
● It is used to design web pages using Markup Languages
● Hyper text → link between web pages
Markup → text document within tags that defines the structure of web pages
● Not programming lang but a markup language
● Extension → .html or .htm
● Can be Written on notepad and executed in any web browser
● Predefined tags
Interchange Languages
Markup language which is used to carry or interchange data from one place to another.
XML
● Extensible Markup Language
● Like HTML but it was designed to describe the data
● Not predefined tags
● Uses DTD (Document type definition) or XML schema to describe data
● XML is designed to store and transport data
● XML is designed to be self-descriptive
● Users must require a piece of software to send, receive, store, or display it.
● XML makes web development User Friendly : Many computer systems contain data
in incompatible formats. Exchanging data between incompatible systems or
upgraded systems is a time-consuming task for web developers. Large amounts of
data must be converted, and incompatible data is often lost. XML stores data in plain
text format. This provides a software- and hardware-independent way of storing,
transporting, and sharing data.
● XML is Extensible: XML applications will work as expected even if data is edited i.e.
added or removed. Example :The above note is edited into a newer version by
adding date tag and hour tag , and by removing the heading tag.
● SYNTAX RULES: XML declaration
References
Tags and elements
Attributes
Text
XML STRUCTURE sttarts with root element. And these root elements has child elements
<product>
<item>
<name>Pen</name>
<price>20</price>
</item>
</product>
HTML XML
Its is static web page as the codes are fixed Its is dynamic web page as it displays
for each page so the information contained different content and provide user
in the page does not change and it looks interaction
like a printed page
Used for displaying the data Not for displaying data but for describing
,storing and transporting the data
Only displays does not carry data Carries data to and from database
JSON
● JSON stands for JavaScript Object Notation. It is a format for
structuring data. This format is used by different web applications to
communicate with each other.
● JSON is the replacement of the XML data exchange format in JSON.
● It is easy to structure the data compared to XML.
● It supports data structures like arrays and objects
● the JSON documents that are rapidly executed on the server.
● It is also a Language-Independent format that is derived from
JavaScript.
● The official media type for the JSON is application/json and to save
those file .json extensions.
Features of JSON:
● Easy to understand: JSON is easy to read and write.
● Format: It is text-based interchange format. It can store any kind of
data in an array of video, audio, and image anything that you require.
● Support: It is light-weighted and supported by almost every
language and OS. It has a wide range of support for the browsers
approx each browser supported by JSON.
● Dependency: It is an Independent language that is text-based. It is
much faster compared to other text-based structured data.
JSON Syntax Rules: Data is in name/value pairs and they are separated by
commas. It uses curly brackets to hold the objects and square brackets to
hold the arrays.
{
“Item”: [
{
“Name”: “Pen”,
“Price”: “20”,
},
{
“Name”: “Pencil”,
“Price”: “10”
}
]
}
Advantages of JSON:
● JSON stores all the data in an array so data transfer is easier. That’s
why JSON is the best for sharing data of any size, even audio, video,
etc.
● Its syntax is very easy to use. Its syntax is very small and
light-weighted; that's the reason that it executes and responds in a
faster way.
● JSON has a wide range for the browser to support compatibility with
the operating systems, it doesn’t require much effort to make it all
browser compatible.
● On the server-side parsing the most important part that developers
want, if the parsing will be fast on the server side then the user can
get the fast response, so in this case JSON server-side parsing is
the strong point compared to others.
Disadvantages of JSON:
● The main disadvantage for JSON is that there is no error handling in
JSON, if there was a slight mistake in the JSON script then you will
not get the structured data.
● JSON becomes quite dangerous when you use it with unauthorized
browsers. A JSON service returns a JSON file wrapped in a function
call that has to be executed by the browsers. If the browsers are
unauthorized then your data can be hacked.
● JSON has limited supported tools that we can use during JSON
development.
{"Geeks":[
{ "firstName":"Vivek",
"lastName":"Kothari" },
{ "firstName":"Suraj",
"lastName":"Kumar" },
{ "firstName":"John",
"lastName":"Smith" },
{ "firstName":"Peter",
"lastName":"Gregory" }
]}
<Geeks>
<Geek>
<firstName>Vivek</firstName>
<lastName>Kothari</lastName>
</Geek>
<Geek>
<firstName>Suraj</firstName>
<lastName>Kumar</lastName>
</Geek>
<Geek>
<firstName>John</firstName>
<lastName>Smith</lastName>
</Geek>
<Geek>
<firstName>Peter</firstName>
<lastName>Gregory</lastName>
</Geek>
</Geeks>
Both of these are self-describing and can be parsed and used by lots of
programming languages.
Below are few differences between JSON and XML:
JSON XML
It is based on JavaScript
It is derived from SGML.
language.
It is a way of representing It is a markup language and uses tag
objects. structure to represent data items.
Its files are very easy to read Its documents are comparatively difficult
as compared to XML. to read and interpret.
It doesn’t use the end tag. It has start and end tags.
YAML
YAML Ain't Markup Language is a data serialization language that matches user’s
expectations about data.
It is designed to be human friendly and works perfectly with other programming
languages.
It supports one direction processing.
Easy to implement and use.
It is useful to manage data and includes Unicode printable characters
Format
Consider the text shown below −
Note that YAML takes the value in string format and represents the output as
mentioned above.
Examples
Let us understand the formats in YAML with the help of the following examples −
Consider the following point number of “pi”, which has a value of 3.1415926. In
>>> yaml.load('3.1415926536')
3.1415926536
below −
eggs
ham
spam
French basil salmon terrine
When you load this into YAML, the values are taken in an array data structure which
>>> yaml.load('''
- eggs
- ham
- spam
- French basil salmon terrine
''')
['eggs', 'ham', 'spam', 'French basil salmon terrine']
Features
YAML includes a markup language with an important construct, to distinguish
data-oriented language with the document markup. The design goals and features
rules −
● YAML does not allow the use of tabs while creating YAML files; spaces
YAML JSON
Root nodes can be any of the valid data Root node must either be an
types. array or an object.
What is AJAX?
AJAX = Asynchronous JavaScript And XML.
● A browser built-in XMLHttpRequest object (to request data from a web server)
● JavaScript and HTML DOM (to display or use the data)
AJAX is a misleading name. AJAX applications might use XML to transport data, but it is equally
common to transport data as plain text or JSON text.
AJAX allows web pages to be updated asynchronously by exchanging data with a web
server behind the scenes. This means that it is possible to update parts of a web page,
without reloading the whole page.
HTTP
● HyperText Transfer Protocol (HTTP) is a protocol that allows you to
transfer hypertext over the Web.
● Due to its simplicity, http has been the most widely used protocol for
data transfer over the Web but the data (i.e. hypertext) exchanged using
http isn’t as secure as we would like it to be. In fact, hyper-text
exchanged using http goes as plain text i.e. anyone between the
browser and server can read it relatively easily if one intercepts this
exchange of data.
Features of HTTP
● Connectionless
● Media independent
● Stateless
HTTPS
Hypertext Transfer Protocol Secure: Used for any secure communication between 2
systems since the data is encrypted.
Encryption: By using algorithm we transfer the data into different format, (i.e adds an
extra layer of security) which can be difficult for hackers to modify our data
Difference between HTTP and HTTPs :
HTTP HTTPS
In HTTP, the URL begins with In HTTPs, the URL starts with
“http://”. “https://”.
HTTP uses port number 80 for HTTPs uses port number 443
communication. for communication.
HTTP is considered to be
HTTPs is considered secure.
insecure.
HTTPS works at Transport
HTTP works at Application Layer.
Layer.
SOAP
● SOAP is an acronym for Simple Object Access Protocol.
● It is an XML-based messaging protocol for exchanging information among
computers.
● SOAP is an application of the XML specification.
One of the web services: Web services are XML-based information exchange systems that use
the Internet for direct application-to-application interaction.
● Web template.
● JSON-RPC.
● JSON-WSP.
● Web Services Description Language (WSDL)
● Web Services Conversation Language (WSCL)
● Web Services Flow Language (WSFL)
Points to Note
● SOAP is a communication protocol designed to communicate via the Internet.
● SOAP can extend HTTP for XML messaging.
● SOAP provides data transport for Web services.
● SOAP can exchange complete documents or call a remote procedure.
● SOAP can be used for broadcasting a message.
● SOAP is platform- and language-independent.
● SOAP is the XML way of defining what information is sent and how.
● SOAP enables client applications to easily connect to remote services and
invoke remote methods.
Although SOAP can be used in a variety of messaging systems and can be delivered via a
variety of transport protocols, the initial focus of SOAP is remote procedure calls transported
via HTTP.
Other frameworks including CORBA, DCOM, and Java RMI provide similar functionality to
SOAP, but SOAP messages are written entirely in XML and are therefore uniquely platform-
and language-independent.
Interface description Language
An interface description language or interface definition language, is a generic term
for a language that lets a program or object written in one language
communicate with another program written in an unknown language.
WSDL
WSDL stands for Web Services Description Language. It is the standard format for
describing a web service. WSDL was developed jointly by Microsoft and IBM.
Features of WSDL
● WSDL is an XML-based protocol for information exchange in
decentralized and distributed environments.
● WSDL definitions describe how to access a web service and what
operations it will perform.
● WSDL is a language for describing how to interface with XML-based
services.
● WSDL is an integral part of Universal Description, Discovery, and
Integration (UDDI), an XML-based worldwide business registry.
● WSDL is the language that UDDI uses.
● WSDL is pronounced as 'wiz-dull' and spelled out as 'W-S-D-L'.
WSDL USAGE
WSDL is often used in combination with SOAP and XML Schema to provide web
services over the Internet.
A client program connecting to a web service can read the WSDL to determine what
functions are available on the server. Any special data types used are embedded in
the WSDL file in the form of XML Schema. The client can then use SOAP to actually
call one of the functions listed in the WSDL.
History of WSDL
WSDL 1.1 was submitted as a W3C Note by Ariba, IBM, and Microsoft for describing
services for the W3C XML Activity on XML Protocols in March 2001.
WSDL 1.1 has not been endorsed by the World Wide Web Consortium (W3C),
however it has just released a draft for version 2.0 that will be a recommendation (an
official standard), and thus endorsed by the W3C.
WSDL describes a web service. The wsdl document specifies the location of the
service, and the methods of the service, using these major elements:
Element Description
<types> Defines the (XML Schema) data types used by the web service
<binding> Defines the protocol and data format for each port type
THRIFT
An interface definition language and binary communication protocol used for defining and
creating services for numerous programming languages.
It is a lightweight, language-independent software stack with an associated code generation
mechanism.
It provides clean abstractions for data transport.
It was originally developed by Facebook for scalable cross language services development
and now it is open sourced as an Apache project.
What is XSL?
XSL is a language for expressing style sheets. An XSL style sheet is, like with CSS, a
file that describes how to display an XML document of a given type. XSL shares the
functionality and is compatible with CSS2 (although it uses a different syntax). It also
adds:
This XML file doesn't contain any presentation information, which is contained in the
stylesheet. Separating the document's content and the document's styling information
allows displaying the same document on different media (like screen, paper, cell phone),
and it also enables users to view the document according to their preferences and
abilities, just by modifying the style sheet.
2. CSS
It stands for cascading style sheets.
It is used to style an HTML document.
It describes how HTML elements should be displayed.
● Inline: Inline CSS contains the CSS property in the body section
attached with the element known as inline CSS.
● Internal or Embedded: The CSS ruleset should be within the HTML file
in the head section i.e the CSS is embedded within the HTML file.
● External: External CSS contains a separate CSS file that contains only
style property with the help of tag attributes.
What does CSS mean?
Tags for formatting a web page were never intended in HTML. HTML was
established to define a web page’s content. The addition of tags like <font> and color
attributes to HTML created a big problem for web developers. The creation of large
websites, where fonts and color information were added to each page, became a
time-consuming and costly procedure. CSS was established to address this issue.
CSS eliminated the HTML page’s style formatting.
Styling is an essential property for any website. It increases the standards and
overall look of the website that makes it easier for the user to interact with it. A
website can be made without CSS, as styling is MUST since no user would want to
interact with a dull and shabby website. So for knowing Web Development, learning
CSS is mandatory.
● Base for web development: HTML and CSS is the basic skill that every
web developer should know. It is the basic skill that is required for
building a website.
● Makes your website look attractive: A website that’s dull and plain will
not attract the user most probably, so adding some style would surely
make your website presentable to the user.
● Makes the design come live: A web developer is responsible for
making the design given to him as a live product. It is used for styling to
develop the design of the website.
● Increases user experience of the website: A website with a simple yet
beautiful UI would help the users to go through the website easily. It is
used to make the user interface better.
● More career opportunities: Since CSS is a basic requirement while
learning Web Development, therefor there are abundant career
opportunities for it. As a freelancer, you can land up to many projects.
The values of CSS are represented untyped, that is using String objects.
*Reference
https://web.dev/critical-rendering-path-constructing-the-object-model/
XSL Vs CSS
- XSL uses the XML notation that is helpful in writing the codes and the tools are
provided in greater extent, whereas CSS doesn’t use any of the XML notations but
has its own.
- XSL is having the formatting object tree setup differently from the source tree;
whereas CSS is having the source tree and the formatting object tree the same.
- XSL can’t provide the inheritance of the source tree using the formatting properties,
whereas CSS provides the inheritance of the formatting object that is related to the
source tree.
- XSL is not supported by many of the web browsers, whereas CSS can be read by
modern web browsers.
- XSL is not for the dynamic formatting that uses the content in the online document
using the multiple files.
- XSL provides lots of capabilities but with limits as it provides efficient and easy to
allow modifications.
- It provides content generation workflows and uses different tools to choose the
tasks and XSL files.
- XSL is used to serve the web page to customize the XML data into the XML
document and use the CSS for styling purposes.
Web 1.0: it was all about basic access and connectivity across static websites.
before the internet was just a static web, like one big wikipedia with hyper texts.
Read only
Web 2.0: refers to websites & apps that utilize user generated contents for end
users.
Focus on user connectivity and collaboration.
started getting more interactive. Since we were interactive , org started collecting data
for us to provide more content that will make us stay on their websites longer.then they
realized they can sell the collected data to the advertisers.This is the age of targeted
advertising and lack of privacy to its users.
Eg: contents on facebook feed is sorted according to users preference.
Web 3.0:
● It is the next evolution of the internet, considered to be a semantic web, it will
have a strong emphasis on decentralized applications and makes extensive use
of block chain based technologies,machine learning and AI (artificial intelligence)
and the tools of decentralization, to help empower more intelligent and adaptive
applications.
● Web 3 is considered to be structured with AI, semantic web and ubiquitous
properties in mind.
● In web 2.0 you were the product as you were browsing the social network. But in
web 3.0 you will be the owner of the content you post online. (if you post and it
can just stay there if you want it to . but if you decide to take it down you control it
and can take it down. I.e usually when something is on the internet it always
stays on the internet, you can't completely take it down. Coz it will be on
thousands of servers around the world)
CHAPTER - 02
REQUIREMENT ANALYSIS.
Process of gathering the software requirement from clients, analyze and document
them is know as Requirement Engineering (aka Requirement analysis)
Requirements analysis or requirements engineering is a process used to determine
the needs and expectations of a new product. It involves frequent communication
with the stakeholders and end-users of the product to define expectations, resolve
conflicts, and document all the key requirements.
A business requirements analysis involves a team effort of all the key stakeholders,
software developers, end-users, and customer managers to achieve a shared
understanding of what the product should do. This is always done in the early
phase of any project to ensure that the final product conforms to all the
requirements.
PROCESS
Requirement elicitation :
Process of gaining requirements by communicating with the customer.
Also the various ways to gain knowledge about the project domain and
requirement through customers and other stakeholders.
Formal models of requirement are not provided, instead it just broadens the
domain knowledge of the analyst and thus aids in input for the next stage.
Techniques: Brainstorming, prototyping, interviews, surveys, questionnaires.
Requirement modelling:
Analyzed requirement might be documented as use cases.
This activity produces a formal requirement model based on the elicitation
process.
All requirements including functional, non functional and constraints are specified
in these models.
Models: ER diagram, DFD (Data flow diagram), data dictionaries etc
Requirement Management:
The process of analyzing, documenting, tracking, agreeing on the requirement
and controlling the communication to relevant stakeholders.
This stage takes care of the changing nature of requirements. SRS should be
modifiable based on the changes incorporated by the end users at the later
stages
TECHNIQUES
1. Business process modeling notation (BPMN)
2. Unified Modeling Language (UML)
3. Flow chart technique
4. Data flow diagram (DFD)
5. Gantt chart
6. Gap analysis
TOOLS
1. Jama software
2. Pearl
3. Caliber
4. Modern requirements
5. Accompa
6. Orcanos
InVEST
InVEST is a suite of free, open-source software models used to map and value
the goods and services from nature that sustain and fulfill human life.
It helps explore how changes in ecosystems can lead to changes in the flows of
many different benefits to people.
If properly managed, ecosystems yield a flow of services that are vital to humanity,
including the production of goods (e.g., food), life-support processes (e.g., water
purification), and life-fulfilling conditions (e.g., beauty, opportunities for recreation),
and the conservation of options (e.g., genetic diversity for future use).
Agile INVEST
is an acronym that helps Agile team assess the quality of a user story.
2. Define →
● In this stage, the information gathered in stage one will be filtered to
get rid of the irrelevant data, and these filtered data will be elaborated
● Doing so will make everyone (internal and external parties) understand
the context of the project as well as understand the company’s financial
capabilities, its resources, logistics and market situation before
designing the project.
● The end of definition stage comes with corporate sign-off. Top
management will either accept or decline the project to move forward.
3. Develop →
● this stage is where design starts.
● Actual making of the solution to the problem defined in stage one and
two.
● Different department work together in order to speed up the problem
solving and design process
4. Deliver →
● This is the final stage of the DDM.
● It includes final testing of the product and official signing off of the
production and launching.
Together these stages work as a map, for designers to organize their thoughts in
order to improve the creative process
DIAGRAM of DDM
PROJECT MANAGEMENT
STAGES
1. Initiating:
● First stage/ starting point of any project.
● Turning the abstract ideas → Meaningful goals
● Project charter is created (charter doesn’t contain any technical details
that happens in the planning stage)
● Main activity: Pre-sale. (i.e the period in which service provider proves
the eligibility and ability of completing the project to the client and
eventually wins the business)
● Then detailed requirement gathering takes place .
● Requirements are gathered, analyzed and negotiation takes place to
change or remove certain requirements
● Project initiation stage ends with requirement sign-off
2. Planning:
● Most important stage, which lays the roads map of the project
● Primary task: Identifying the technical requirements.
● Project plan (project plan is derived addressing the project requirement
such as requirements, scope, budget and timeline) and project
schedule is derived.
● Based on the budget and schedule, resources are allocated.
3. Executing:
● All paper works are over by this stage, and the team does the actual
work in order to achieve project objectives.
● Many reporting activities will be done. Senior manager of the company
will require daily or weekly updates on the project progress
● Client too might want to track the progress of the project
● It is very important to track the effort and the cost of the project, to
determine whether the project is progressing in the right direction or not
5. Closure:
● The project closure stage indicates the end of the project
● Once the project requirements are achieved it's time to handover the
implemented system and close out the project.
● If the project deliveries are in par with the clients requirements, then it
is accepted and paid by the client.
● Then it's time to evaluate the entire project, the mistakes made by the
project team will be identified and will take necessary measures to
avoid them in the future.
● Most companies have reflection meetings in order to contemplate the
success and the failure of the project.
1. Kanban Tool
Kanban Tool is a good entry point to agile development. It allows you to visualize
your workflow and offers seamless time-tracking functionalities. It makes
collaboration and task tracking easy with notifications, reporting, and team
management features.
It provides features like reporting, document sharing, native mobile app, and more
which are ideal for medium and large businesses. Kanban tool also offers enterprise
users the ability to host the software onsite.
2. Trello
Trello is a leading online project management software with built-in collaboration
tools to work with your teams. It’s lightweight, simple, and straightforward to use. It
uses boards, lists, and cards to create tasks and stay organized. Users can
collaborate within the cards, share files, and leave comments
3. Asana
Asana is a flexible saas project management tool with a focus on collaboration.
There are workflows that automate recurring tasks. It is intuitive with different task
displays and supports custom fields and forms. You can even invite unlimited guest
users. There are also options to build custom rules and approval workflows.
4. Wrike
Wrike is a cloud-based project management tool that simplifies project planning,
helps track your team’s work, monitor deadlines, and collaborate easily with all
stakeholders. It offers a lot of advanced features like task management, Gantt
Charts, a real-time newsfeed, and more. You can prioritize tasks to push the crucial
tasks forward and make sure deadlines are met. There are also plenty of integration
options which makes it a powerful project management suite.
How it works: this isn’t just about taking something complicated and breaking it
down into smaller parts. Using the WBS technique, it’s easier to organize smaller
tasks into a workflow than larger ones.
Why it works: when breaking down a project into smaller bites, teams can see
which tasks depend on others and when to complete them. It’s also significantly
easier to estimate how much time and money to spend on each task.
2. Scrum
What it is: Scrum is the most common framework within the Agile methodology.
It defines the project goal over a series of short development cycles known as
“sprints.”
How it works: teams refine the high-level scope through iterations. At the start of
the sprint, teams figure out how many items they can commit to and create a
sprint backlog (a list of the tasks to perform during the sprint).
Why it works: these iterations improve the likelihood of delivering a product that
fully satisfies customer requirements. Plus they can deliver a viable product
earlier than in more traditional methodologies, which is important for businesses
where speed-to-market is crucial.
3. Kanban
What it is: in Kanban, a project’s workflow is broken down into smaller tasks.
These tasks are then organized and displayed, so everyone on the team is aware
of project progress.
How it works: often, tasks on a Kanban software are separated into columns. A
classic Kanban board shows 3 columns assigning tasks a status of:
To-do
Doing
Done
One popular addition is a ‘Stuck’ column, to show tasks that are in-progress but
not progressing for some reason.
Why it works: Kanban is great for projects with sequential workflows and limited
dependencies that allow team members to concentrate on their own tasks.
4. Gantt
For illustrating the project schedule.
Used to track utilization of resources in the project
Track overall project progression
Track individual tasks
What is it: a Gantt chart is a bar chart that allows you to visualize project
activities over time. It’s especially useful because it shows what work needs to
be completed on specific days.
5. PERT
Program Evaluation and Review Technique
Used to schedule, organize and map out tasks in the project. It provides visual
representation of a project’s timeline. It breaks down into individual tasks
What it is: PERT isn’t just focused on the critical path’s duration, but also the
relationships between project tasks.
PERT shows project tasks arranged more like a flowchart than sequential events.
How it works: this method improves the accuracy of task duration estimates by
using 3 possible inputs for the calculation:
1. Optimistic time
2. Pessimistic time
3. Most-likely time
Why it works: This can get pretty detailed so for more information, check out our
guide to PERT.
6. HISTOGRAM
Graph that shows the frequency of anything.
Has bar which represents the frequency of occurrence of data
X - axis → Event whose frequency is counted
Y - axis → Frequency
Different heights of the bar shows the different frequency of data occurrence.
Agile is the process that allows the team to efficiently manage a project by
breaking it down into several stages each of which allows consistent
collaboration with stakeholders and collects continuous feedback to promote
steady improvement at every stage.
Agile method attempts iteration method, in which within a short period of time,
a section of the work is developed and tested,
Each iteration is like the miniature of software project, that includes all tasks
necessary to release the mini increment of the next new functionality.
PRINCIPLES OF AGILE
1. Customer satisfaction
2. Consistent collaboration between businesses and developers
3. Frequent delivery
4. Early and continuous delivery
5. Face to face conversation
6. Embrace change
7. Motivated individual
8. Simplicity
9. Technical excellence
10. Functional products
11.Self organized teams
12. Regulation, reflection and adjustment
The Agile software development cycle can be broken down into six
steps:
1. concept,
2. inception,
3. iteration/construction,
4. release,
5. production
6. retirement.
The first step, concept, involves the identification of business opportunities in
each potential project as well as an estimation of the time and work that will be
required to complete the project. This information can then be used to
prioritize projects and discern which ones are worth pursuing based on
technical and economic feasibility.
During the second step, inception, team members are identified, funding is
established and the initial requirements are discussed with the customer. A
timeline should also be created that outlines the various responsibilities of
teams and clearly defines when work is expected to be completed for each
sprint. A sprint is a set period of time during which specific work has to be
completed and made ready for review.
Multiple iterations occur throughout the development cycle and they each
possess their own workflow. A typical iteration flow consists of:
The fourth step, release, involves final quality assurance testing, resolution of
any remaining defects, finalization of the system and user documentation and,
at the end, release of the final iteration into production.
After the release, the fifth step, production, focuses on the ongoing support
necessary to maintain the software. The development teams must keep the
software running smoothly while also teaching users exactly how to use it. The
production phase continues until the support has ended or the product is
planned for retirement.
The final step, retirement, incorporates all end-of-life activities, such as
notifying customers and final Migration. The system release must be removed
from production. This is usually done when a system needs to be replaced by
a new release or if the system becomes outdated, unnecessary or starts to go
against the business model.
AGILE METHODOLOGIES
1. Scrum
2. Kanban
3. Extreme programming
4. Lean software development
5. Crystal
SCRUM
Scrum is an agile methodology and sprint based project management system
that relies on incremental development.
It breaks down projects into sizable chuncks called sprints. Each iteration
consist of 2 to 4 weeks sprints, and the goal of each sprint is to develop the
most important features first and come up with the deliverable.
BENEFITS OF SCRUM
The greatest benefit of agile scrum methodology is its 1. flexibility and
adaptability. With the sprint-based model, the scrum team typically receives
feedback from stakeholders after each sprint. If there are any problems or
changes, the scrum team can easily and quickly adjust product goals during
future sprints to provide more valuable iterations thus leads to 2. Quality
improvement. This way, 3. customers are satisfied because they get
exactly what they want after being involved every step of the way.
KANBAN
Kanban system usually Starts with a board and visual cards that represents
items in your product backlog (user stories). On the board you place the cards
into the columns that represent their current status in the workflow ranging
from “to-do” to “done”.
The visual nature of the board makes it easier to find out what is already done,
what is in progress and what is going to be started.
As the work progresses the cards will move towards the right , (i.e from to-do,
doing and done) and keep delivering the features to your customer.
SCRUM vs KANBAN
In Scrum role is known as scrum master
In kanban role is known as agile coach
Both are pull systems: pull systems ensure that work gets from product
backlog to customer in the shortest possible time. Pull system also helps to
uncover bottlenecks in the process.
Scrum Kanban
There are sprints that keep track of the progress of They use task cards to keep track of the
any project. progress of any project.
The process does not get disturbed if a team The flow of work gets disturbed if a team
member leaves in between a sprint. member leaves in between.
Changes cant be made during a sprint. Not possible Changes can be incorporated any time. Items
to add items on the ongoing sprint. can be easily added
● Jira Software
● Jira Software
● Kanbanize
● Axosoft
● SwiftKanban
● VivifyScrum and more.
● Asana and more.
HDD
Notes on the esoft text book
WAD TEAM
FRAMEWORK ARCHITECTURE
1. MVC: notes on the book
2. MVVM bnmk
BENEFITS OF VCS
Cons
● The support for binary files is woeful! They are not great at
dealing with binary assets, especially large binary assets.
1. Perforce Subversion
Perforce solves some problems very well. It's fast, it deals well with
binary files and large projects. It allows files to be locked which
stops multiple people from editing binary files.
However there it also causes plenty of problems. Perforce is old,
their tools are complicated, slow and buggy. You'll have to
workaround various issues with your workflow and the maintenance
cost for keeping it working chews through time and resource.
Answers on how to solve problems with Perforce can be hard to
come by and although it's easy to get started with it is extremely
difficult and time-consuming to master.
Perforce offers a massive amount of control and flexibility, this is
good but to make use of it you'll have to deal with their commands
and APIs which can be inconsistent and difficult to work with. The
outputs of Perforce commands can be tricky to parse.
2. Subversion GIT
A widely used open-source/free traditional version control system.
It's quite mature and reasonably easy to get started with.
Its support for binary or large assets is ok.
It has a file locking system which can help when you want to
prevent multiple people working on the same file at the same time,
however this isn't really built into the process as you don't have to
check out a file before editing it. In many ways this is good because
you can modify files and SVN will figure out for you want have you
have changed, but it's bad for file locking because it makes it the
user's responsibility to check if a file is locked before changing it.
This makes room for user error and means multiple users can edit a
binary file, even when it is locked, when the users comes to submit
they will find that they must lose their changes if someone else
already has the file locked.
3. GIT
Git is a Distributed Version Control System (DVCS) used to
save different versions of a file (or set of files) so that any
version is retrievable at will.
In Git, there are three primary states (conditions) in which a
file can be: modified state, staged state, or committed
state.
Modified state
A file in the modified state is a revised — but uncommitted
(unrecorded) — file.
In other words, files in the modified state are files you have
modified but have not explicitly instructed Git to monitor.
Staged state
Files in the staged state are modified files that have been
selected — in their current state (version) — and are being
prepared to be saved (committed) into the .git repository
during the next commit snapshot.
Committed state
Files in the committed state are files successfully stored into
the .git repository.
Note: The state of a file determines the location where Git will
place it
ile locations
There are three key places versions of a file may reside while
version controlling with Git: the working directory, the
staging area, or the Git directory.
Working directory
The working directory is a local folder for a project's files. This
means that any folder created anywhere on a system is a
working directory.
Note:
Note:
Git directory
The .git directory is the folder (also called “repository”) that
Git creates inside the working directory you have instructed it
to track.
Also, the .git folder is where Git stores the object databases
and metadata of the file(s) you have instructed it to monitor.
Note:
GitHub
GitHub is an immense platform for code hosting. It supports
version controlling and collaboration.
It is an American company. It hosts the source code of your
project in the form of different programming languages and
keeps track of the various changes made by programmers.
GitHub is a web-based platform where users can host Git
repositories. It helps you facilitate easy sharing and
collaboration on projects with anyone at any time.
● Collaboration
● Project management
● Team management
● Code hosting
● Conversations
All in all
Git and GitHub are two different entities that help you
manage and host files. In other words, Git serves to control
file versions while GitHub is a platform for hosting Git
repositories.
GitHub Git
It is a cloud-based tool developed It is a distributed version control tool that is
around the Git tool. used to manage the programmer's source
code history.
It is an online service that is used to Git tool is installed on our local machine for
store code and push from the version controlling and interacting with
computer running Git. online Git service.
It provides a desktop interface called The desktop interface of Git is called Git
GitHub desktop GUI. GUI.
It has a built-in user management It does not provide any user management
feature. feature
It has a market place for tool It has a minimal tool configuration feature.
configuration.
GitLab
GitLab is a github like service that organizations can use to
provide internal management of git repositories. It is a self
hosted Git-repository management system that keeps the
user code private and can easily deploy the changes of the
code.
Features
● GitLab hosts your (private) software projects for free.
● GitLab is a platform for managing Git repositories.
● GitLab offers free public and private repositories,
issue-tracking and wikis.
● GitLab is a user friendly web interface layer on top of
Git, which increases the speed of working with Git.
● GitLab provides its own Continuous Integration (CI)
system for managing the projects and provides user
interface along with other features of GitLab.
● While pushing and pulling repositories, it is not as fast as
GitHub.
UNIT 5
TESTING AND EVALUATION
WTF IS TESTING?
Testing is the process of discovering / finding errors / bugs.
It is the process of identifying the correctness, completeness and the
quality of the developed software. It ensures that the system works
correctly and has met its technical requirements. It helps reduce errors
and bugs thus creating a satisfactory system.
Property-based tests are designed to test the aspects of a property that should
always be true. They allow for a range of inputs to be programmed and tested
within a single test, rather than having to write a different test for every value that you
want to test.
Benefits
They are numerous:
2. UNIT TESTING
1. Black box testing : covers the unit test for input, user interface and
output parts
2. White box testing : used in testing the functional behavior of the
system by giving the input and checking the functionality output
including the internal designs structure and codes of modules
3. Gray box testing : used in executing the relevant test cases, test
methods, test functions and analyzing the code performance for
the module.
HOW IT IS PERFORMED
Can be performed manually or automatically..
If manually then, this method may have a document made detailing each
step in the process..
However if automated, then it uses a testing framework to develop test
cases. These frameworks are also set to flag and report any failed test
cases while also providing a summary of test cases.
3. INTEGRATION TESTING
HOW IT IS PERFORMED
This testing method is performed using black box method. This method
implies that a testing team interacts with an app and its units via user
interface - by clicking on buttons, scrolling, swiping, etc.
They don't need to know how code works or consider the backend part
of the component.
4. End-to-end testing
End to end testing is a technique used to test whether the flow of an
application right from the start to end is behaving as expected.
It is of 2 types:
1. Vertical testing. →
● does not involve users
● It refers to testing in layers, meaning that tests happen in
a sequential, hierarchical order.
● Used to test critical components of a system.
● It would be used to test such as application program
interface/ SQL interface
● Closely aligns with whitebox testing.
2. Horizontal testing →
● Testing that involves the user.
● It confirms whether the user can navigate through the
system, if system works as expected, and if there are
any unexpected bugs
● It would be used for testing a sign into a profile on an
ecom website, use of search and browse functionalities
in it, add item to cart, save item for later, buy an item, log
shipping and credit card information, confirm purchase
and then sign out.
● Closely aligns with black box testing
HOW IT IS PERFORMED
5. Manual testing
● Software testing process where the test cases are executed
manually without using any automated tools.
● All these test cases are automated by the tester manually
according to the enduser’s perspective
● It is one of the most fundamental testing process as it can find
both hidden defects and visible defects. The developer will fix
these defects and hand it over to the tester for retesting.
● Requires great effort and time but guarantees a bug-free
software.
● Manual testing types are: white (done by the developer coz knowing
the code is essential),
black (done by the test engineer without knowing the code) and
grey box testing.(if the single person performs white box, as well as
black-box testing for the application, is known as Gray box testing.)
● All test cases are executed manually by using Black box testing
and white box testing.
6. Visual testing
7. Cross-functional testing
Cross-functional testing is verification of non-functional
requirements.
These requirements are such characteristics of system that cannot
be implemented like a normal feature.
Eg. Number of concurrent users supported by system, usability of
site etc.
Cross-functional testing is related to cross-functional
requirements.
Often business users do not specify cross-functional requirements
in the beginning. But they expect these when software is complete
and deployed to production.
It is always a good idea to ask business users about such
cross-functional expectations in the initial phase of the project
itself.
8. Load testing
Example
TDD PROCESS
TDD development starts with developing tests for each one of the
features/functions.
The test might fail as the tests are developed even before the
development of app.
Development team then develops and refactor the code to pass the test
1. Add a test → write a test case that describes the function
completely. (to develop test cases, developer must understand the
requirements and features using user stories and use cases)
2. Run all the test and see if new test case fails.
3. Write code that passes the test cases
4. Run the test cases
5. Refactor the code → done to remove duplication of code
6. Repeat the above mentioned steps again and again
TDD Motto
1. Red – Create a test case and make it fail
2. Green – Make the test case pass by any means.
3. Refactor – Change the code to remove duplicate/redundancy.
TDD PROS AND CONS
PROS
1. You only write code that is needed → Following the principles,
you’ve got to prevent writing production code when all of your tests
pass. If your project needs another feature, you would like a test to
drive the implementation of the feature. The code you write is the
simplest code possible. So, all the code ending up within the
product is really needed to implement the features.
2. Easier to maintain → as different part of your application are
decoupled from one another and have clear interfaces, the code
become easier to take care of. Also quality of design increases
which further helps in proper maintenance
3. Easier to refactor
4. High test coverage → as there is a test for each feature.
5. Test document the code → The test code shows you ways your
code is supposed to be used. As such, it documents your code.
The test code is a sample code that shows what the code does
and the way the interface has got to be used.
6. Less debugging
7. TDD act as safety net against bugs → there fore less to no
debugging thus prevents consuming loads of time trying to debug
8. Ensures that your app actually meets the requirement
9. TDD has very short development lifecycle
CONS
1. NO silver bullet → test help to seek out bugs but they cannot find
bugs that you simply introduce within your test code and in
implementation code. If you haven’t understood the matter you
would like to unravel, writing tests most likely doesn’t help.
2. Slow process → If you begin TDD, you’ll get the sensation that
you simply need an extended duration of your time for
straightforward implementations. you would like to believe the
interfaces, write the test code, and run the tests before you’ll finally
start writing the code.
3. All members of a team got to do it → As TDD influences the
planning of code, it’s recommended that either all the members of
a team use TDD or nobody in the least. Additionally, to the present,
it’s sometimes difficult to justify TDD to the management because
they often have the sensation that the implementation of latest
features takes longer if developers write code that will not find
themselves within the product half the time. It helps if the entire
team agrees on the importance of unit tests.
4. Tests get to be maintained when requirements change →
Probably, the strongest argument against TDD is that the tests
need to be maintained because the code has got to. Whenever
requirements change, you would like to vary the code and tests.
But you’re working with TDD. This suggests that you simply have
to change the tests first then make the tests pass. So, actually, this
disadvantage is the same as before when writing code that
apparently takes an extended time it takes a long time.
Example:
Scenario: Login
Given User has its Email
And Password
The client and service provider have a conversation about what they
need.
Then the client,developer and tester elaborate on the requirements
together.
Then requirements are defined in structured scenarios
This will help the development and act as automated tests,
These scenarios are used by the tester as the basis of tests.
Some of the tools used are Some of the tools used are
Cucumber, Dave, JBehave, JBehave, JDave, Cucumber,
10.
Spec Flow, Concordian, Spec Flow, BeanSpec,
BeanSpec etc. FitNesse etc.
Benefits of BDD :
Greater clarity on business goals and customer requirements.
Reaches a larger customer set as it uses non-technical languages.
Helps in defining acceptance criteria before development.
Focuses on the system’s behavior from the client’s and developer’s point
of view.
Helps in avoiding unnecessary features and includes important features.
Reduces effort for post-modification and post-deployment defects.
Avoids misinterpretations during the development process.
Disadvantage of BDD :
Because communications between the user and the developer are essential, if
the user is not available, it will be difficult to work past ambiguities and
questions generated by the user stories.
TESTING FRAMEWORKS
A testing framework is a set of guidelines or rules used for creating and
designing test cases.
A framework is a combination of practices and tools that are designed to
help QA professionals test more efficiently.
These guidelines could include coding standards, test data handling
methods, object repositories, processes for storing test results, or
information on how to access external resources
These aren't mandatory rules that should be done by testers but by
using as organized framework, provides additional benefits.
1. Cucumber →
● It is a BDD tool used to develop the test cases for the
behavior of software’s functionality. (to develop test cases for
testing the software’s behavior)
● Plays a vital role in development of acceptance test cases for
the automation testing.
● Mainly used to write acceptance test cases for web app as
per the behavior of their functionalities by following the BDD
framework to observe the behavior of the software
functionalities.
● Test cases are written in simple english so that anybody can
understand, regardless of technical knowledge
● Originally written in ‘Ruby’, now supports varieties of
languages
2. Selenium →
● It open source and portal automation testing tool for
testing web applications
● Has the capability to operate across different browsers
and operating systems. Also its scripts are written in
various languages i.e python, java, C# etc…
● It could run the test directly on the target browser, drive
the interaction on the required web page and rerun
them without any manual input.
● Has 4 major components.
1. Selenium IDE
2. Selenium RC
3. Selenium web driver
4. Selenium GRID
3. Bugzilla →
● It is an open source bug tracking tool that tracks bugs
and issues of projects or software.
● It helps developers and stakeholders to keep track of
the outstanding problems with the product
● It is written in Perl language and uses MySQL
database
● Although it is a bug tracking tool, it can also be used as
a test management tool, because it can be linked with
the other test case management tools such as Quality
Center, ALM, Testlink
HOW IT IS USED?
4. JIRA
● It is an open source testing tool developed by an australian
company called Atlassian
● It is a bug tracking tool used to track issues and bugs related
to your software and mobile apps.
● Used : used mainly for issue tracking, bugs tracking and
project management
● Inherited from the japanese word gojira which means
Godzilla.
● Jira dashboard consist of many useful functions and features
which makes handling of issues easy.
5.JMeter
● JMeter also known as Apache JMeter
● It is an open source, 100% java based application with a
graphical interface.
● It has a simple, user friendly and an intercative GUI
● It is designed to analyze and measure the performance and
load functional behavior of web app and variety of services
● You can perform various testing like performance, load,
stress, regression and functional testing in order to get
accurate performance metrics against your web server.
● It is not a browser and doesnt render html pages like any
other browsers, rather it works on protocol level.
● JMeter is written and developed using java, so it can run on
any environment / workstation that accepts a Java virtual
machine, for example - Windows, Linux, Mac, etc.
● JMeter can simulate multiple users by using virtual users or
unique users in order to generate heavy load against web
application under test.
Working of JMeter
WEB ANALYTICS
JAVA SCRIPT
JS is a high level, interpreted, programming language used to make web
pages more interactive.
It is a very powerful client side scripting language which makes your web
page more lively and interactive.
It is used by programmers across the world to create dynamic and
interactive web contents like applications and browsers.
USES OF JAVASCRIPT
1. Convert static web page to dynamic web page. i.e adding
interactive behavior to the web pages.
It allows user to interact with the web page, and to add special
effects to the web pages that is not achieved by just html and css.
Eg: Show or hide more information with the click of a button
Change the color of a button when the mouse hovers over it
Zooming in or zooming out on an image
Playing audio and video in a web page
Using a drop-down menu.
Provides drag and drop options
2. To create web and mobile apps.
Developers use various JS frameworks for developing web
and mobile apps. The React Native is widely used JS
framework for creating mobile apps. Angular.js and Vue.js are
popular JS frameworks for creating web apps. Eg: LinkedIn,
Netflix and Uber
3. Game development
To create browser games as it has various libraries and
frameworks for creating games. The game can be either 2D or
3D.
6. User Notifications
You can use Javascript to raise dynamic pop-ups on the webpages to
give different types of notifications to your website visitors.
8. Server Applications
A large number of web applications have a server-side to them.
JavaScript is used to generate content and handle HTTP requests.
The Node.js provides an environment containing the necessary tools
required for JavaScript to run on servers.
STATEMENTS
A computer program is a set of instructions to be executed.
In programming languages, these instructions are called statements.
A JS program is a set of programming statements.
These statements consist of values, operators, expressions, keywords
and comments.
let x, y, z; // Statement 1
x = 5; // Statement 2
y = 6; // Statement 3
z = x + y; // Statement 4
EXPRESSIONS
An expression is any valid unit of code that resolves to a value and can
be evaluated.
● Arithmetic expressions.
● String expressions.
● Primary expressions.
● Array and object initializers expressions.
● Logical expressions.
● Left-hand-side expressions.
● Property access expressions.
IDENTIFIERS
These are javaScript names.
An identifier is a name given to entities like variables, functions, class
etc..
Rules: should start with either letters, underscore or dollar sign.
Should never start with numbers or other symbols.
It is case sensitive
Keywords cant be used as identifier names
//valid
const a = 'hello';
const _a = 'hello';
const $a = 'hello';
//invalid
const 1a = 'hello'; // this gives an error
const y = "hi";
const Y = 5;
console.log(y); // hi
console.log(Y); // 5
KEYWORDS
They are part of syntax in programming language.
Can never be used as identifiers
const a = 'hello';
VALUES
● Primitive values
● Reference values
while reference values are objects that might consist of multiple values.
and BigInt)
console.log(person);
Code language: JavaScript (javascript)
Output:
OBJECTS
Objects are variables too but objects can contain many values
Eg: const car = {type: “flat” , model: “500” , color: “white”};
PROPERTIES
Properties are values associated with JS objects.
Objects are collections of unordered properties.
These properties can usually be changed, added and deleted. But some
are read only.
What are properties in JavaScript?
A JavaScript property is a characteristic of an object, often describing
attributes associated with a data structure.
OPERATORS
Operators are special symbols used to perform operations on the
operands (values/variables)
Eg: 2+3; //5
Here + is an operator that performs addition, and 2 and 3 are operands.
Types of operators
= Assignment operator a = 7; // 7
+= Addition assignment a += 5; // a = a + 5
-= Subtraction Assignment a -= 2; // a = a - 2
*= Multiplication Assignment a *= 3; // a = a * 3
/= Division Assignment a /= 2; // a = a / 2
%= Remainder Assignment a %= 2; // a = a % 2
+ Addition x + y
- Subtraction x - y
* Multiplication x * y
/ Division x / y
% Remainder x % y
Operator Description
| Bitwise OR
^ Bitwise XOR
~ Bitwise NOT
CONDITIONALS
Conditional statements are used to perform different actions based on
different conditions.
Those statements are:
1. If → specify block of code to be executed, if the specified
condition is true
if (hour < 18) {
greeting = "Good day";
}
2. Else → specify block of code to be executed, if the same
specified conditions is false
if (hour < 18) {
greeting = "Good day";
} else {
greeting = "Good evening";
}
LOOPS
Loops are used to repeat a block of code a number of times. each
time with a different value.
For example, if you want to show a message 100 times, then you can use a
loop. It's just a simple example; you can achieve much more with loops.
For loops → loops through a block of code number of times. Loop repeats
until a specified condition evaluates to false.
for (let i = 0; i < 5; i++) {
text += "The number is " + i + "<br>";
}
FUNCTIONS
It is a block of code that is designed to perform a specific task. It is
executed when “something” invokes it (calls it)
Defined using function keyword followed by function name and
parentheses
Function names can contain letters, digits, underscores, and
dollar signs (same rules as variables).
The parentheses may include parameter names separated by commas:
Functions often compute a return value. The return value is "returned" back
to the "caller":
Why Functions?
You can reuse code: Define the code once, and use it many
times.
You can use the same code many times with different arguments,
to produce different results.
Local Variables
Variables declared within a JavaScript function, become LOCAL to
the function.
EXCEPTION HANDLING
Types of Errors
2. Runtime Error: When an error occurs during the execution of the program,
such an error is known as Runtime error. The codes which create runtime
errors are known as Exceptions. Thus, exception handlers are used for
handling runtime errors.
3. Logical Error: An error which occurs when there is any logical mistake in the
program that may not produce the desired output, and may terminate
abnormally. Such an error is known as Logical error.
Exception is an abnormal code that breaks the normal flow of the code.
Such exceptions require specialized programming constructs for its
execution. Happens during execution of the program (run time error).
● throw statements
● try…catch statements
● try…catch…finally statements.
Throw statements are used for throwing user defined errors. (users can
defined and throw their custom errors)
When a throw statement is executed, the statement present after it will not
execute. The control will directly pass to the catch block.
The thrown exception is handled by wrapping the code into the try…catch
block. If an error is present, the catch block will execute, else only the try
block statements will get executed.
ARRAYS
Array is a special kind of variable that stores more than one value.
Eg: const car = [“volvo” , “BMW” , “Benz”];
Arrays can hold multiple values under a single name, and you can access
the values by referring to an index number.
REGULAR EXPRESSIONS
Syntax:
Const regex = /search text here/
You can use regex with RegExp() methods: test() and exec()
RegEx allows you to check for patterns in text strings such as trying to
match a valid email address or password.
One of the greatest superpowers of regex is being able to define your
own search criteria for patterns to fit your needs, and it is like a language
of its own.
HTML EVENTS
When a user visit your website, they do things like click on text and
images and given links, hover over things etc. These are examples of
what JavaScript calls events.
An event is something the browser does or user does.
Html events are things that happens to HTML elements.
When JS is used in the HTML pages, JS can react on these events.
Eg: when a user clicks over the browser, add js code, which will execute
the task to be performed on the event.
CSS preprocessor
1. SASS →
● Abbre: Syntactically awesome style sheets
● It is an open source pre-processor, coded in Ruby.
● It is considered the oldest css preprocessor
● It is a superset of CSS, which means it contains all the
features of CSS and based on javascript.
● Adds dynamic functionality to the CSS code
● It is an extension of CSS that enables you to use things like
variables, nested rules, inline imports and more.
● It helps to organize and allow you to create style sheets
faster.
● Sass is compatible with all css versions.
● Only requirement needed is to install Ruby to use it
2. LESS →
● Abbr: Leaner style sheet
● Less is a dynamic style sheet language that extends the
compatibility of CSS and it is cross browser friendly.
● It is a dynamic style sheet that can be compiled into CSS and
run on the client-side or server-side.
● It is open source
● First version was written in Ruby, however later versions were
replaced by Javascript.
● Many of the features of Sass such as variables, nesting,
mixins are also present in LESS
● Main difference between less and other preprocessors is
that less allows real time compilation via less.js by the
browser.
● LESS supports creating cleaner, cross-browser friendly CSS
faster and easier.
● We can define styles and it can be reused throughout the
code.
● LESS is based on JavaScript and is a superset of CSS.
● LESS is an agile tool that sorts out the problem of code
redundancy.
3. STYLUS:
● An expressive, robust, feature-rich CSS language built for
nodejs. (node.js based css pre processor)
● Written in NodeJS so easily intergrated to node projects
● braces, semicolons and more can be omit in your code, keep
clean and less (they are all optional)
● It provides JavaScript API so that preprocessing can be
further customized
● Syntax is completely space based.
● The powerful logical abilities of Sass and straightforward
setup of the LESS are combined in Stylus.
NOTE:**
Sass has looping and logical abilities, and you can create custom functions using
Sass; it can be considered a programming language. It has a very popular
community and also a huge ecosystem. Many popular frontend frameworks use
Sass.
Whereas in the case of Stylus, it is essential to integrate it with the projects made
of Node. We also learned that there are only a few logic-based features in LESS
compared to Sass and Stylus.
LESS is considered the best on the serverless architecture because it can easily be
compiled on the frontend frameworks and provides good built-in functions.
To create the front end, engineers use the combination of HTML (for basic page
structure and content), CSS (for visual editing), and JavaScript (for making websites
interactive).
On the other hand, the back end is everything that happens, well, backstage. It contains
servers where your web pages are located and the underlying logic that governs the
website’s functions and processes. We have an in-depth description of the inner
workings of web applications if you want to check it out.
The back end is built using a different set of technologies, including Java, PHP, Ruby,
C#, and sometimes JavaScript
● HyperText is the way by which we travel across the web by clicking hyperlinks –
specific texts taking you to other pages. Hyper means it’s non-linear, which allows
for moving to any other place, as there is no predefined order to do so.
● Markup determines the qualities that HTML tags apply to the text inside them.
Tags mark it as a particular type of text.
● As a Language, it holds code words and syntax like any other language.
How CSS works. CSS interacts with HTML elements, the components of a web page.
● To communicate with HTML, CSS uses selectors. A selector is the part of CSS
code defining which HTML piece the CSS styling will impact.
● A declaration contains properties and values that are employed by the selector.
● Properties define font size, color, and margins. Values are the settings for these
properties.
How DOM works. Consider a web page as a document that can be either presented in
the browser window or as the HTML source code. The Document Object Model (DOM)
represents this document so it can be modified. The DOM is an object-oriented
representation of the web page, which can be altered with a scripting language like
JavaScript.
The DOM must adhere to W3C and WHATWG standards that are executed in most
current browsers. The modern DOM is built using multiple APIs that work together. The
core DOM specifies the objects that entirely explain a document and the objects within it.
So, JavaScript frameworks are complete sets of tools to form and arrange a
website or web application.
Libraries are sets of prewritten code snippets used and reused to implement
core features of JavaScript. The snippet can be easily integrated into an existing
project code when necessary.
So, libraries are specialized tools for particular coding needs, not an all-purpose
machine for grooming the whole existing project.
It is developed to structure client side applications that run in web browsers. Acts
like the backbone for your project and helps organize your code.
LIBRARY VS FRAMEWORK
Library is a set of code that was previously written, that can be called upon
when building your own.
(essentially collection of code packed together that can be used over and over
again.)
Frequently used codes and functions can be put together and built a library.
We can achieve reusability.
Frame work is a supporting structure where your own code defines the “meat”
of the operations by filling out the structure.
It essentially provides a scaffold on which to build software and allows the
programmer to avoid wrtting any boilerplate codes and merely fill in the
blanks, leaving the framework to decide what it is appropriate to execute any
business logic.
Differences
Library is like a tool to that helps you build systems, but framework is a
supporting structure. (i.e frameworks dictate how your project will be structure
where as library is the tool that can be used any where.)
A framework may use libraries but it doesnt actually need a library inorder to
operate.
Frameworks: 1. Rails
2. Angular: open source front end framework that specializes
in building rich single page applications. Typescript based framework for
building user interfaces. It was developed at google in 2016 as the sequel to
angular.js. When you generate your initial app it comes pre-configured with
routing, a testing framework and a style preprocessors. It uses components
just like react. It is written in Type script. Supports mobile browsers
3. AngularJS: it is a javascript based framework for web
development. It was built to ease the development and
testing of applications. It uses MVC framework. Written in
JS. doesnt support mobile browsers. It can be added to
HTML page with <script> tag. AnglarJs extends attributes
with ng directives, and binds data to HTML with
expressions
4. Django: backend framework that uses python for web
development. It is used by google, youtube and instagram
5. Express: backend dev framework that is very minimal and
fast.
Angular is open source front end framework that specializes in building rich
single page applications. It powered by Google as the sequel to angular.js that
is compatible with most of the common code editors. Angular is intended to
create dynamic, single-page web applications (SPAs), and progressive web-apps.
Upon its initial release, the framework was most appreciated for its ability to
convert HTML-based documents into dynamic content. It is written in Type script
for building UI. Supports mobile browsers
Typescript based framework for building user interfaces. When you generate
your initial app it comes pre-configured with routing, a testing framework and a
style preprocessors. It uses components just like react.
2. Django
Highlevel web dev framework based on python programming language
that provide rapid development and SEO optimized.
Makes it easier to built web apps more quickly and with less code
Comes with handful of tools that makes development process much
faster and easier. It helps developers avoid many common security
mistakes. It is highly scalable
Apps built: Mozilla, National geographic, instagram.
3. Flask
It is a micro framework based on python programming lang, delivers
minimal no. of tools to developers and requires them to configure
everything manually.
It comes handy to teams that want to retain full flexibility in choosing
their tooling and have full control over every element of their app.
If your project architecture is based on micro services then flask is a
good choice. Among the important features of flask are a built in web
server and debugger, unit testing support, RESTful request dispatching,
secure cookies and provide good documentation.
Popular app: pinterest, LinkedIn
Communication between front end and back end
The front end doesn’t exist in isolation from the back end, or the server that
actually provides data. Let’s have a look at the concepts in terms of
client-server messaging.
Asynchronous operations
In the 2010s, one of the main concepts describing the way the web worked
was AJAX. The term stands for Asynchronous JavaScript and XML. Basically,
it’s a complex of techniques to create websites and web applications. Let’s
look at the key components that make up AJAX.
Asynchronous – the fundamental aspect of the whole toolkit. The crucial role
of the approach is to renew web content… asynchronously. It means that a
user’s web browser doesn’t have to reload a whole web page when a small
part of the content on the page requires some change, e.g. you don’t have to
reload the entire eCommerce products page to apply an additional filter to
search results. You just need these results to be updated.
XML (or Extensible Markup Language) allows for transmitting data put on
the page to the browsers that view it. That’s important for specific computer
systems that often can’t interact with data formatted by a different system. In
this case, XML allows for avoiding incompatibility while saving data in plain
text format between XML tags. This way, XML suggests a means of storing,
moving, and sharing data that doesn’t rely on a singular software or hardware
system. Since XML is getting older, freeing the way to newer data formats,
you can run AJAX with JSON, which is shorter and easier for humans to read.
How asynchronous updates work. Let’s say, a user clicks a button. The client
sends a request to a server-side script with XML/JSON in the background as a
user keeps viewing the page. The server side obtains the data from
JavaScript, reaches the database if required, and processes the data. With
XML/JSON anew, it sends the data back to the initial client-side page that
executed the entry. A callback, performed by JavaScript, captures the data
and refreshes the web page component that needed changes.
For example, a developer has to build a web app that shows all social media
friends in a particular order. A front-ender can create requests to Facebook’s
RESTful API to view the friends list and pass that data back. Any service
using RESTful APIs resembles this general process, different only are data
retrieved and returned. REST is a plain collection of guidelines and practices
that establish rules to interact with a web service.
The main idea behind REST is that the server doesn’t care what happens to
the client. Instead, REST messages contain all the needed information for a
server to return the needed data and forget about this operation. To learn
more about different messaging formats and an older SOAP standard, check
the dedicated article.
Responsive design
As increasingly more people access the Internet from their mobile devices
rather than from desktops, responsiveness is a must. Responsive design
means that the web layout (including functionality and content) adjusts to the
screen size and hardware.
For instance, when a website is visited from a desktop computer with a big
monitor, a user gets numerous columns, heavy graphics, and UI designed
particularly for mouse and keyboard. On mobiles, the same website appears
as a single column adjusted for touch interaction, but with the same base
data. Have a look at our article on responsiveness to get a better idea.
JQUERY
Most popular JS library.
It has a simple API to control events and design animation in browsers. Aside
from that, jQuery is applied to manipulate the Document Object Model (DOM)
and serves as a plugin development tool as well. It also comes with a lighter
cross-browser library, jQuery UI for a mobile framework jQuery Mobile and for
graphic interface construction.
Jquery provides a single API to handle the edge cases across multiple
browsers.
With Jquery we can use dollar sign ($) to grab all the list items in the HTML
and then call the first to get the first one.
Jquery doesn't have a data layer to worry about, you can just start with an
object and chain methods to it and let the state manage itself.
Challenge: we have users all around the world but no servers all
around the world. It can take users who are further away from the
server longer to load the content to be delivered to their web
browser. To avoid this issue and to make all the users access the
website within very short time no matter where they live, CDN
comes into the play
How is it done??
These places the CDN endpoints in as many locations around the
world as possible.
Now when users far away from the server try to access some
content, first it is retrieved by the content delivery network service
and then distributed around the world. Therefore those users can
retrieve the content directly from their closest geographic location
which will reduce the amount of time it takes to retrieve the content.
Indirect benefits:
● reduces the load that will be received by the main server
● The main server environment may also see an increase in the
uptime.
● As the users are not directly communicating with the main
server, you have the benefit of increase in security through
obscurity.
Eg: $(document).ready(function(){
cosole.log(“ready!”);
})
SELECTORS
All the different visitors' actions that a web page can respond to are called
events.
Examples:
The term "fires/fired" is often used with events. Example: "The keypress
event is fired, the moment you press a key".
$("p").click();
The next step is to define what should happen when the event fires. You
must pass a function to the event:
$("p").click(function(){
// action goes here!!
});
Commonly used Jquery event methods
$(document).ready()
click()
dbclick()
mouseenter()
mouseleave()
mouseup()
mousedown()
hover()
focus()
blur()
COOKIES
● It only stores at maximum capacity of 4kb per domain.
● Supported by the browser which implements the HTML4 and
HTML 5 standards
● Cookies are accesible from any windows (tab) currenly
opened on the browser.
● Expiration date for data stored as cookies are manually set.
If no expiration date is set, then it lives as long as the browser
is installed.
● By default Cookies are stored on the client/browser and
server. They are used to perform authentication between
client and browser.
SESSION STORAGE
● Stores at maximum capacity of 5 mb
● Supported by the browser which implements the HTML 5 only
● Sessions are accessible from the same tab that is currently
opened on the browser
● Data is expired once the tab is closed
● By default it stores only on the client/browser. can also be
added to the payload sent to the server.
LOCAL STORAGE
● Stores maximum capacity of 10mb
● Supported by browser which implements the HTML 5 alone
● Accesible from any tab/window currently open on the
browser.
● Data never expires. Data in the local storage remains as long as
the browser remains installed. You have to manually clear data
stored in Local storage
● By default stores data on the client/browser only. can also
be added to the payload sent to the server.
Schema:
SQL → Has a fixed or static pre defined schema
the data is stored and manipulated using SQL. this is an extremely
powerful language which is versatile and widely used. But this
language can be restrictive thus it requires you to use a pre-defined
schema to determine the structure of your data. Also all the data
must follow the same structure and this can be both difficult and
disruptive
Scalability:
SQL → in all situations SQL database are vertically scalable.
Which means you can increase the load single server by increasing
the RAM, CPU or SSD
Structure:
SQL → are table based. Stored data in forms of rows and column
. which makes SQL database preferred choice for multi row
transactions such as accounting system or for legacy systmmes
that were built for relationl structure.
NoSQL → NoSQL databases are either key value pairs, document
based, column based or graph based.
Property Followed:
SQL → follows the ACID (atomicity, consistency, isolation,
durability) properties
NoSQL → Follows the Brewer’s CAP (consistency, availability,
partition tolerance) theorem
Example:
SQL → MySQL, Oracle, Microsoft SQL
NoSQL → MongoDB, CouchDB, GrapgQL, Cassandra, HBase
2. Key-Value Stores:
● Also known as key-value database
● They are database types which allows data to be stored
in a “key value” structure, where a key can be
represented as a unique identifier/ unique path to a
value.
● The data is fetched by a unique key/ number of unique
keys to retrieve the associated value with each key.
These value are simple data types (like strings and
numbers or complex objects)
● Every data element in the database is stored as a key
value pair consisting of an attribute name (or "key") and
a value. In a sense, a key-value store is like a relational
database with only two columns: the key or attribute
name (such as "state") and the value (such as "Alaska").
● Use cases includes shopping carts, user preferences
and user profiles
Unfortunately, there is no free lunch, which means that while columnar databases
are great for analytics, the way in which they write data makes it very difficult for
them to be strongly consistent as writes of all the columns require multiple write
events on disk. Relational databases don't suffer from this problem as row data is
written contiguously to disk.
A graph database is a database that stores data in nodes and edges—nodes for
information about an entity and edges for information about the relationship or
actions between nodes. This data model allows graph databases to prioritize
relationships between the data, which makes searching for connections and patterns
in the data easier than it is with traditional databases.
Graph databases fulfill a need that traditional databases have left unmet: They
prioritize relationships between entities. This makes graph databases incredibly
efficient for looking for patterns, making predictions, and finding solutions.
Very few real-world business systems can survive solely on graph queries. As a
result graph databases are usually run alongside other more traditional databases.
Use cases include fraud detection, social networks, and knowledge graphs.
Example
Let's walk through how data is stored in a graph database. Let's say you want to
store air travel information.
Each airport would be represented by a node, and information about the airports
would be stored in the nodes' properties. For example, you could create a node for
Auckland Airport in New Zealand with properties such as airport_code: AKL and
country: New-Zealand.
A flight between two airports—that is, the relationship between two nodes—is
represented by an edge. The edge's properties contain information about the flight.
In this example, you could create an edge between the nodes for Auckland Airport
and Brisbane Airport. The edge could have properties like airplane: 73H 388
and airline: Qantas.
● Detecting fraud. Graph databases are commonly used for the detection of
money laundering, credit card fraud, insurance fraud, tax fraud, and other
criminal activity. In recent years, criminals have become increasingly
sophisticated in their schemes. Rather than working from a single point or
account, they create a fraud ring of smaller schemes that are much more
likely to go undetected. Graph databases allow analysts to look at the
connections between the data to find patterns of fraud.
● Building recommendation engines. Modern businesses want to provide
intelligent recommendations to their customers as a strategic way to increase
revenue. Graph databases allow an application to analyze previous purchase
data to determine what the customer may want to purchase next.
● Managing IT networks. Graph databases can help IT specialists model and
manage networks, IT infrastructure, and IoT devices. Because these entities
are physically connected in the real world, they map naturally to graphs.
Graph databases can enable organizations to easily perform impact analysis
and plan for outages.
● Computing graph algorithms. When you need to efficiently perform
calculations on the connections between data, graph databases are a great
option. They are used extensively for computing graph algorithms such as
shortest path and PageRank. These algorithms are used in everything from
finding the cheapest flight between two locations to determining influence in
social networks.
In the case of HTTP push the connection is not broken after the initial
request, meaning the client initiates a request to the server and after the
server responds the connection is kept in place. Using this established
connection, the server can send any new updates down to the client as
soon as they are available. The client does not need to repeatedly request
for updates from the server, the updates are sent as soon as they are
available. This helps to reduce the load on the network with the advantage
that the updates are received in a timely manner. A drawback to this style is
that the server has to maintain connection to the client which creates
certain overhead on the server.
What is an ORM?
An object-relational mapping provides an object-oriented layer between relational
databases and object-oriented programming languages without having to write SQL
queries. It standardizes interfaces reducing boilerplate and speeding development time.