Professional Documents
Culture Documents
Chapter 4
Chapter 4
Web APIs
Web browsers
Whether it’s on-premises or in the cloud, an application platform can be thought of as comprising
three parts:
● A foundation: Nearly every application uses some platform software on the machine it
runs on. This typically includes various support functions, such as standard libraries and
storage, and a base operating system.
● A group of infrastructure services: In a modern distributed environment, applications
frequently use basic services provided on other computers. It’s common to provide
remote storage, for example, integration services, an identity service, and more.
● A set of application services: As more and more applications become service-oriented,
the functions they offer become accessible to new applications. Even though these
applications exist primarily to provide services to end users, this also makes them part of
the application platform. (It might seem odd to think of other applications as part of the
platform, but in a service-oriented world, they certainly are.)
And while they’re not shown in Figure, development tools are another important part of this
story. Modern tools can help developers build applications using all three parts of an application
platform.
Top 5 Cloud Platforms and Solutions to Choose From
● Amazon Web Services: Amazon Web Services (AWS) is a subsidiary of Amazon (a leading
company in ecommerce).
● Google Cloud Platform: Google offers its public cloud computing solutions with the name of
Google Cloud Platform.
● Microsoft Azure.
● IBM Bluemix.
● Alibaba:
Features:
● Most functionality
● Largest community of customers and partners
● Most Secure
● Fastest pace of innovation
● Most proven operational expertise
Google Cloud Platform
Google Cloud Platform is a suite of public cloud computing services offered by Google. The
platform includes a range of hosted services for compute, storage and application development
that run on Google hardware. Google Cloud Platform services can be accessed by software
developers, cloud administrators and other enterprise IT professionals over the public internet
or through a dedicated network connection.
Microsoft Azure
Microsoft Azure was previously known as “Windows Azure”. It is a so-called “cloud”
computing service, which was created by Microsoft company for being used in the testing,
building, managing and deploying the different applications as well as services through a global
network of Microsoft-managed data centres. Microsoft Azure provides infrastructure as a
service, software as a service and platform as a service, supporting many different languages,
which are all used in programming. It also supports the frameworks and tools, including both
third-party software and systems and Microsoft-specific ones.
● documenting Azure services.
IBM Bluemix
IBM Bluemix has been renamed to IBM Cloud. However, you might see some references to IBM
Bluemix in this course.
IBM® Cloud® is an open-standard, cloud platform that provides both Infrastructure as a Service
(IaaS) and Platform as a Service (PaaS) capabilities for building, running, and managing
applications. With IBM Cloud, developers can focus on building excellent user experiences with
flexible compute options, choice of DevOps tooling, and a powerful set of IBM and third-party
APIs and services.
Defining Alibaba
Alibaba is China’s — and by some measures, the world’s — biggest online commerce company.
Its three main sites — Taobao, Tmall and Alibaba.com — have hundreds of millions of users,
and host millions of merchants and businesses. Alibaba handles more business than any other
e-commerce company.
E-COMMERCE
Alibaba is the most popular destination for online shopping, in the world's fastest growing
e-commerce market. Transactions on its online sites totaled $248 billion last year, more than
those of eBay and Amazon.com combined.
● Single Page Applications (SPA): Modern, efficient applications are designed to only
request the most necessary elements of content and information to generate an intuitive
and interactive user experience. Single page web applications interact with the user in a
more dynamic fashion by providing updated content within the current page, rather than
loading entirely new pages from the server with each action from the user. This helps
prevent interruptions in the user experience, transforming the behavior of the application
such that it resembles a traditional desktop application. The most heavyweight player is
AJAX, short for Asynchronous JavaScript and XML, which is the foundation for page
communications making SPAs possible.
Modern application architecture works better on multiple platforms and multiple devices. This is
a result of a well-developed architecture that is the foundation of a successful operability.
In essence, a healthy Web Application Architecture must be easy to use, solve problems, offer a
fast response time, use the latest and most secure standards, avoid failures with self-healing
capabilities, allow growth, and ultimately, provide an effortless user experience.
WAF: Basics
WAF
• What WAF provides:
– Libraries for database access
– Templating frameworks
– Session management
– <promotes code reuse>
• Components: Three components
– A web browser (client);
– A web application server; and
– A Database server
WAF: Components
• A web browser (client)
• A web application server; and
• A database server
1. Ruby on Rails
2. Django
Django is another framework that helps in building quality web applications. It was invented to
meet fast-moving newsroom deadlines, while satisfying the tough requirements of experienced
Web developers. Django developers say the applications are its ridiculously fast, secure, scalable
and versatile.
Angular is a framework by Google (originally developed by Misko Hevery and Adam Abrons)
which helps us in building powerful Web Apps. It is a framework to build large scale and high
performance web application while keeping them as easy-to-maintain. There are a huge number
of web apps that are built with Angular and can be found
here https://www.madewithangular.com
4. ASP.NET
5. METEOR
Meteor or MeteorJS is another framework which gives one a radically simpler way to build
realtime mobile and web apps. It allows for rapid prototyping and produces cross-platform (Web,
Android, iOS) code. Its cloud platform, Galaxy, greatly simplifies deployment, scaling, and
monitoring.
6. Laravel
Laravel is a framework created by Taylor Otwell in 2011 and like all other modern frameworks,
it also follows the MVC architectural pattern. Laravel values Elegance, Simplicity, and
Readability. One can rightaway start learning and developing Laravel with Laracasts which has
hundreds of tutorials in it.
7. Express
Express or Expressjs is a minimal and flexible framework that provides a robust set of features
for web and mobile applications. It is relatively minimal meaning many features are available as
plugins. Express facilitates rapid development of Node.js based Web applications. Express is also
one major component of the MEAN software bundle.
8. Spring
Spring, developed by Pivotal Software, is the most popular application development framework
for enterprise Java. Myriads of developers around the globe use spring to create high
performance and robust Web apps. Spring helps in creating simple, portable, fast and flexible
JVM-based systems and applications.
9. PLAY
Play is one of the modern web application frameworks written in Java and Scala. It follows the
MVC architecture and aims to optimize developer productivity by using convention over
configuration, hot code reloading and display of errors in the browser. Play quotes itself as “The
High Velocity Web Framework”
10. CodeIgniter
Although front end has evolved, it’s first and foremost job is to display an interface, and without
app logic any UI/UX is irrelevant. That’s why server-side frameworks are important.
● Symfony (PHP)
● Django (Python)
● Express (Node.js/JavaScript)
● Ruby on Rails (Ruby)
● ASP.NET (C#)
By using either of these server-side web application frameworks, you let it handle HTTP
requests, database control and management, as well as URL mapping. You can also render view
data with a server, like in the Web 1.0 era, but consider using client-side frameworks instead to
introduce more user-engaging features and responsiveness.
In the previous article on web app architecture, we discussed the Single-Page Web App concept,
where one of the main components of the architecture is a JavaScript client layer. To properly set
it up, you need client-side frameworks, such as:
● Bootstrap
● React.js
● Angular.js
● Backbone
● Semantic-UI.
While with server-side frameworks your choice mainly depends on the language you feel
comfortable to develop in, here you should mind specific capabilities of different client-side
frameworks. Since they vary in the scope of functionality supported, look for the one that fits the
needs of your future web app.
AJAX Framework is a cross browser framework that allows developers to quickly develop
web pages that can call web services, web pages and other types of content through JavaScript
without having to submit the current page. The AJAX Framework is: Easy to use. Works well
with other existing frameworks.
Django is a free and open source web application framework written in Python. A framework is
nothing more than a collection of modules that make development easier. They are grouped
together, and allow you to create applications or websites from an existing source, instead of
from scratch.
Summary
If you want to develop a web app, a web application framework isn’t a must. Yet, it can
significantly speed up and simplify your work, as well as help you create a responsive and more
engaging web app. Since many web frameworks are now based on the MVC principle, you can
enjoy the perks of this architecture pattern and have double the advantage. Carefully assess your
skills, revise the goals of your project, and choose you server-side and/or client-side frameworks
wisely.
Web hosting service
A web hosting service is a type of Internet hosting service that allows individuals and
organizations to make their website accessible via the World Wide Web. Web hosts are
companies that provide space on a server owned or leased for use by clients, as well as
providing Internet connectivity, typically in a data center. Web hosts can also provide data
center space and connectivity to the Internet for other servers located in their data center,
called colocation.
• Web hosting is a service that allows organizations and individuals to post a website or a
webpage on to the internet
• A web host, or web hosting service provider is a business that provides technologies and
servers needed for the website or webpage to be viewed in the internet. Websites are
hosted, or stored on ‘servers’
Web hosting: Purpose
Web hosting is a service mainly for the purpose of:
• Building a website
You get a domain name, then you get hosting, then you build a website /create email addresses
Components
• Web space:
– Website files, HTML codes, images and everything else is stored in this space.
The heavier your website, the more is the space you require to store its content
• Bandwidth:
– bandwidth refers to the amount of data that can be transferred to and from a
server or a website. It is the allotted internet bandwidth that makes a website
accessible to everyone online.
Types of Hosting
• Shared Hosting:
– multiple accounts are hosted on the same server and the resources are also shared
among them.
– It is best for small businesses, whose websites have low to moderate traffic
• Dedicated Server:
– the owner has the complete server and all the resources exclusively. Very
expensive
– because of virtual or software partition, each user is given much more privacy and
security as compared to the shared hosting
So hosting commences…
• Registering a Domain Name
– A domain name is a humanly memorable name that people use to identify and
access websites
– Domain names are administered by domain name registrars, who sell this service
online to the public
– Domain name registration sites are accredited and overseen by the Internet
Corporation for Assigned Names and Numbers (ICANN).
• ICANN also oversees a registration database that lists all registrars for all registered
domain names.
• The TLD is the highest level of the domain name system (DNS) on the Internet.
• TLDs are the same thing as Internet address suffixes like .com, .net, or .org.
• When you register a domain name, you have the option to register email accounts
associated with that domain name
• godaddy.com is useful for both domain name registration and web hosting
• Web hosting companies - they function somewhat like an agent: they provide a
location—a space—on the web where your website exists.
• The size and complexity of a website is a central factor - in hosting that site.
• When you purchase web hosting, email is a service that the ISP will provide as part of the
hosting package.
• When a user accesses your website, the Service Provider downloads your site from its
server to the user’s browser.
• Once you purchase web hosting, you need to set up your web hosting account.
• Essentially, this means creating a username and password for you to use as the
administrator of the website
• Once you set up your administration account, you’ll have an account management page
that you can use to manage all areas and functions of your website.
• In the process of exporting a file, you will be given the option to name the exported files.
• As a standard procedure for exporting layouts for the web, name the export file index
• If a web page has images, the HTML file contains code that references each image on the
page by its filename.
• This code tells the browser where to go to look for those images
• When you use files exported to create a website, the browser once again accesses the
HTML file, but the HTML file then references the indexed file for all page layout
information
• When you use the built-in FTP utility, you can’t simply upload an entire folder.
• You must create the index_Resources folder yourself then upload the sound and video
files to that folder
• In addition to placed images, the exported file contains all other functionality you have
programmed for the site, including:
• Animation
• Hyperlinks
• Buttons
Site Control
• Customers manage products and billing
Technical Support
Classification
Free web hosting service is offered by different companies with limited services, sometimes
supported by advertisements, and often limited when compared to paid hosting.
Single page hosting is generally sufficient for personal web pages. Personal web site hosting is
typically free, advertisement-sponsored, or inexpensive. Business web site hosting often has a
higher expense depending upon the size and type of the site.
A complex site calls for a more comprehensive package that provides database support and
application development platforms (e.g. ASP.NET, ColdFusion, Java
EE, Perl/Plack, PHP or Ruby on Rails). These facilities allow customers to write or install scripts
for applications like forums and content management. Also, Secure Sockets Layer (SSL) is
typically used for websites that wish to keep the data transmitted more secure.
Web APIs
A Web API is an application programming interface for either a web server or a web browser. It
is a web development concept, usually limited to a web application's client-side (including
any web frameworks being used), and thus usually does not include web server or browser
implementation details such as SAPIs or APIs unless publicly accessible by a remote web
application.
To put it in simple terms, API is some kind of interface which has a set of functions that allow
programmers to access specific features or data of an application, operating system or other
services.
Web API as the name suggests, is an API over the web which can be accessed using HTTP
protocol. It is a concept and not a technology. We can build Web API using different
technologies such as Java, .NET etc. For example, Twitter's REST APIsprovide programmatic
access to read and write data using which we can integrate twitter's capabilities into our own
application.
The ASP.NET Web API is an extensible framework for building HTTP based services that can
be accessed in different applications on different platforms such as web, windows, mobile etc. It
works more or less the same way as ASP.NET MVC web application except that it sends data as
a response instead of html view. It is like a webservice or WCF service but the exception is that it
only supports HTTP protocol.
Web API
• ASP.NET Web API can be used with MVC for any type of application. Hence, .NET web
APIs is very important for ASP.NET web application development.
Where Web APIs is used?
• The ASP.NET Web API is an extensible framework for building HTTP based services
that can be accessed in different applications on different platforms such as web,
windows, mobile etc.
• It works more or less the same way as ASP.NET MVC web application except that it
sends data as a response instead of html view.
• The server examines that request to figure out what the user wants, and then returns data
in some format (like a page) that the client then examines to get what it wants.
API Creator
API Creator. is a low-code solution to creating APIs and micro services. You can create APIs and
services that are secure, cost efficient, and easy to maintain through iterative development. You
can use to integrate data across disparate cloud-based or on-premise data sources.
● API: Create the default API by connecting to your database. Access tables using GET,
POST, PUT, and DELETE. Access views and stored procedures using GET and POST.
You can create nested document RESTful resources, or endpoints.
● Data integration: You can combine data from multiple sources (SQL, Mongo, and
RESTful), including updates between them, by defining resources.
● Security: Enforces endpoint access and row/column security.
API creation is more than providing a simple interface. The API Creator interface is only
the tip of the iceberg. The following image illustrates how API Creator provides a fully
functional application backend:
• It allows different messaging formats, such as HTML, JSON, XML, and plain text,
while SOAP only allows XML.
RESTful API
• A RESTful API is an application program interface (API) that uses HTTP requests to
GET, PUT, POST and DELETE data.
• HTTP is the main and the best example of a REST style implementation
• Components of the network (user agents and origin servers) communicate via a
standardized interface (e.g., HTTP)
• Any number of connectors (e.g., clients, servers, caches, tunnels, etc.) can
mediate the request, but each does so without being concern about anything but its
own request
• an application can interact with a resource by knowing two things: the identifier
of the resource and the action required
• no need to know whether there are caches, proxies, gateways, firewalls, tunnels,
or anything else between it and resource
– Separation of concerns
– Networking
• Clients are not concerned with data storage, which remains internal to
each server, so that the portability of client code is improved. Servers are
not concerned with the user interface or user state, so that servers can be
simpler and more scalable.
– Independent evolution
• Stateless communication
– Scalability, reliability
• Uniform Interface
• Caching
– Efficiency, scalability
As on the World Wide Web, clients are able to cache responses. Responses must therefore,
implicitly or explicitly, define themselves as cacheable or not, to prevent clients reusing stale or
inappropriate data in response to further requests.
• Code-on-demand
Summary
• A RESTful Web service is:
– Interlinked.
– Machine-oriented.
N.B: WS-* stands for a variety of specifications related to SOAP-based Web Services
• A SOAP service (WS-★) has a single endpoint that handles all the operations – therefore
it has to have an application-specific interface.
• A RESTful service has a number of resources (the collection, each entry), so the
operations can be distributed onto the resources and mapped to a small uniform set of
operations.
Browsers don't get talked about much. A lot of people simply click on the "icon" on our
computers that take us to the Internet—and that's as far as it goes. And in a way, that's enough.
Most of us simply get in a car and turn the key...we don't know what kind of engine we have or
what features it has...it takes us where we want to go. That's why when it comes to computers:
● There are some computer users that can't name more than one or two browsers
● Many of them don't know they can switch to another browser for free
● There are some who go to Google's webpage to "google" a topic and think that Google is
their browser.
Let's play word association, just like when a psychologist asks you what comes to mind when
you hear certain words: What do you think when you hear the words "Opera. Safari. Chrome.
Firefox."
If you think of the Broadway play version of "The Lion King," maybe it is time to see a
psychologist. However, if you said, "Internet browsers," you're spot on. That's because the
leading Internet Browsers are:
● Google Chrome
● Mozilla Firefox
● Apple Safari
● Microsoft Internet Explorer
● Microsoft Edge
● Opera
● Maxthon
And that order pretty much lines up with how they're ranked in terms of market share and
popularity...today. Browsers come and go. Ten years ago Netscape Navigator was a well-known
browser: Netscape is long gone today. Another, called Mosaic is considered the first modern
browser—it was discontinued in 1997.
Browsers translate web pages and websites delivered using Hypertext Transfer Protocol (HTTP)
into human-readable content. They also have the ability to display other protocols and prefixes,
such as secure HTTP (HTTPS), File Transfer Protocol (FTP), email handling (mailto:), and files
(file:).
A web browser is not the same thing as a search engine, though the two are often confused. For a
user, a search engine is just a website, such as Google Search, Bing, or DuckDuckGo, that stores
searchable data about other websites. However, to connect to a website's server and display its
web pages, a user must have a web browser installed
HTTP is Hypertext transfer protocol. Simply put - Rules to sending and receiving text-based
messages. As we all know, computers work in a language of 1's and 0's i.e. Binary language.
Therefore, potentially every set of 1's and 0's construct something, it could be a word.
Hyper Text Transfer Protocol Secure (HTTPS) is the secure version of HTTP, the protocol over
which data is sent between your browser and the website that you are connected to. The 'S' at the
end of HTTPS stands for 'Secure'. It means all communications between your browser and the
website are encrypted. HTTPS is often used to protect highly confidential online transactions like
online banking and online shopping order forms.
There are various types of cloud migrations an enterprise can perform. One common model is the
transfer of data and applications from a local, on-premises data center to the public cloud.
However, a cloud migration could also entail moving data and applications from one cloud
platform or provider to another -- a model known as cloud-to-cloud migration. A third type of
migration is to uncloud -- also known as a reverse cloud migration or declouding -- where data or
applications are moved off of the cloud and back to a local data center.
For example, many organizations perform the migration of on-premises applications and data
from their local data center to public cloud infrastructure to take advantage of benefits, such as
greater elasticity, self-service provisioning, redundancy and a flexible, pay-per-use model.
Public cloud providers also offer tools to help an enterprise plan and track the progress of a
migration. These tools, for example, might collect information about an enterprise's on-premises
environment, such as system dependencies, to help the company make a more informed
migration plan.
It is best to first iterate through the Seven-Step model process for optimizing and migration is
both comprehensive and robust. The seven stages of migration are outlined below.
● Assess
Assessment is the first step of a seven-step model of cloud migration and also it is the most
important of all the other steps. It includes assessment of issues and reasons related to migration
and understanding the need to shift your technology and software on the cloud platform. This
migration can be of application, design, code and architecture level.
This is the most important and as migration starts with an assessment of the issues and strategies
related to the migration. The assessment can be of tools being used, test cases as well as
functionalities and configurations. The assessment can also be about the cost of migration and
ROI (Return on Investment) that can be achieved in the case of the production version.
● Isolate
In the second step of migration into the cloud environment, there is the isolation of all
environmental and systematic dependencies of an enterprise application within the captive data
center. The dependencies include the library, application and architectural.
This step helps in better understanding of the complexity of the cloud migration. This step helps
in isolation of run-time environment, applications dependencies, libraries dependencies and
much more. Isolation of all the components is necessary to make the system more reliable and
atomic.
● Mapping
After complete isolation, the third step is to generate the mapping constructs between what data
shall remain in the local captive data centers and what shall be shifted to the cloud. It is very
important to first understand what exactly you need to shift on the cloud platform as there is no
sense of shifting all the data and applications on the cloud environment.
● Re-architect
This is the fourth step in cloud migration which includes understanding which part of the
application is generally needed to be sifted and what not.
● Augment
Augmentation of cloud computing application is done in this application. In this, we leverage the
intrinsic features of services of a cloud to augment our enterprise application in its own ways.
● Test
After augmentation is complete, the applications needed to be tested and validated. This is done
using a test suite for the applications on the cloud. The test results can be both positive and
negative. In this step of cloud migration, new test cases due to augmentation and
proofs-of-concept are also tested.
In this last step of cloud migration, we iterate and optimize as appropriate. After several other
optimizing iterations, the migration process is successful. It is best to first iterate the seven-step
model process for optimizing and ensuring that cloud migration is both robust and
comprehensive.
This seven-step model of cloud migration is used by small business for migrating their resources
and applications to the cloud platform.