Summer Training Project Report (Report Part) PDF
Summer Training Project Report (Report Part) PDF
INTRODUCTION
1
CHAPTER - 1
INTRODUCTION
URL shortening is a technique on the World Wide Web in which a Uniform Resource Locator (URL) may be
made substantially shorter and still direct to the required page. This is achieved by using a redirect which links
to the web page that has a long URL. For example, the URL
"https://example.com/assets/category_B/subcategory_C/Foo/" can be shortened to "https://example.com/Foo",
can be shortened to "https://w.wiki/U". Often the redirect domain name is shorter than the original one. A
friendly URL may be desired for messaging technologies that limit the number of characters in a message (for
example SMS), for reducing the amount of typing required if the reader is copying a URL from a print source,
for making it easier for a person to remember, or for the intention of a permalink. In November 2009, the
shortened links of the URL shortening service Bitly were accessed 2.1 billion times.
Other uses of URL shortening are to "beautify" a link, track clicks, or disguise the underlying address.
Although disguising of the underlying address may be desired for legitimate business or personal reasons, it is
open to abuse. Some URL shortening service providers have found themselves on spam blacklists, because of
the use of their redirect services by sites trying to bypass those very same blacklists. Some websites prevent
short, redirected URLs from being posted.
There are several reasons to use URL shortening. Often regular unshortened links may be
aesthetically unpleasing. Many web developers pass descriptive attributes in the URL to
represent data hierarchies, command structures, transaction paths or session information. This
can result in URLs that are hundreds of characters long and that contain complex character
patterns. Such URLs are difficult to memorize, type out or distribute. As a result, long URLs
must be copied and pasted for reliability. Thus, short URLs may be more convenient for websites
or hard copy publications (e.g. a printed magazine or a book), the latter often requiring that very
2
long strings be broken into multiple lines (as is the case with some e-mail software or internet
forums) or truncated.
On Twitter and some instant messaging services, there is a limit to the number of characters a
message can carry – however, Twitter now shortens links automatically using its own URL
shortening service, t.co, so there is no need to use a separate URL shortening service just to
shorten URLs in a tweet. On other such services, using a URL shortener can allow linking to
web pages which would otherwise violate this constraint. Some shortening services, such as
Smol can generate URLs that are human-readable, although the resulting strings are longer than
those generated by a length-optimized service. Finally, URL shortening sites provide detailed
information on the clicks a link receives, which can be simpler than setting up an equally
powerful server-side analytics engine, and unlike the latter, does not require any access to the
server.
URLs encoded in two dimensional barcodes such as QR code are often shortened by a URL
shortener in order to reduce the printed area of the code, or allow printing at lower density in
order to improve scanning reliability.
With the advancement in web based systems ,security is one of the major aspect coming in
through any form. The spamming of URL by making a bot attack a website can cause the
website to crash.So there should be a check on which URLs are allowed to be shortened ,for eg.
there should not be a URL which is invalid but is in our DB as a shortened URL since the URL
is not valid it should not be shortened. The websites returning status code like 400,401,402 etc
should not be shortened.
3
1.3 Project Goals
● URL Input - The project should allow the user to enter a URL. The URL should be
a valid URL and the request to shorten the URL should not be possible unless and
until the user enters a valid URL based on semantics.
● Check - If the entered URL is correct , on sending the shortened request, the backend
services should first verify the status code that is being returned by the URL . If the status
code is either 102 or is starting from 404 , the request should not be made possible, since
that would mean that it is probably just a scam and would add another useless row to our
shortened URLs table.
● Visit Tracker - This is one of the most interesting feature in this project. The shortened
URLs should be equipped with an ability to store the number of visits the user is getting
through the shortened URL. This can help company track the best sources of
advertisement so that they can better spend their marketing resources.
4
CHAPTER - 2
SOFTWARE REQUIREMENT
SPECIFICATION
5
2.1 Technology Used
2.1.1 JavaScript
JavaScript was first known as Live-Script, but Netscape changed its name to JavaScript,
possibly because of the excitement being generated by Java. JavaScript made its first appearance
in Netscape 2.0 in 1995 with the name Live-Script. The general-purpose core of the language
has been embedded in Netscape, Internet Explorer, and other web browsers.
The ECMA-262 Specification defines a standard version of the core JavaScript language.
Client-side JavaScript is the most common form of language. The script should be included in or
referenced by an HTML document for the code to be interpreted by the browser.
It means that a web page need not be a static HTML, but can include programs that interact with
the user, control the browser, and dynamically create HTML content.
6
The JavaScript client-side mechanism provides many advantages over traditional CGI
server-side scripts. For example, you might use JavaScript to check if the user has entered a valid
Email address in a form field.
The JavaScript code is executed when the user submits the form, and only if all the entries are
valid, they would be submitted to the Web Server.
JavaScript can be used to trap user-initiated events such as button clicks, link navigation, and
other actions that the user initiates explicitly or implicitly.
● Less server interaction − You can validate user input before sending the page off to the
server. This saves server traffic, which means less load on your server.
● Immediate feedback to the visitors − They don't have to wait for a page reload to see if
they have forgotten to enter something.
● Increased interactivity − You can create interfaces that react when the user hovers over
them with a mouse or activates them via the keyboard.
● Richer interfaces − You can use JavaScript to include such items as drag-and-drop
components and sliders to give a Rich Interface to your site visitors.
● Client-side JavaScript does not allow the reading or writing of files. This has been kept
for security reasons.
7
● JavaScript cannot be used for networking applications because there is no such support
available.
Once again, JavaScript is a lightweight, interpreted programming language that allows you to
build interactivity into otherwise static HTML pages.
One of the major strengths of JavaScript is that it does not require expensive development tools. You
can start with a simple text editor such as Notepad. Since it is an interpreted language inside the
context of a web browser, you don't even need to buy a compiler.
To make our life simpler, various vendors have come up with very nice JavaScript editing tools.
Some of them are listed here −
8
● Microsoft FrontPage − Microsoft has developed a popular HTML editor called
FrontPage. FrontPage also provides web developers with a number of JavaScript tools to
assist in the creation of interactive websites.
2.1.2 Node.js
A common task for a web server can be to open a file on the server and return the content to the
client.
9
2. Waits while the file system opens and reads the file.
3. When the file system has opened and read the file, the server returns the content to the
client.
Node.js eliminates the waiting, and simply continues with the next request.
● Node.js can create, open, read, write, delete, and close files on the server
10
● Node.js files must be initiated on the server before having any effect
Node.js files must be initiated in the "Command Line Interface" program of your computer.
How to open the command line interface on your computer depends on the operating system. For
Windows users, press the start button and look for "Command Prompt", or simply write "cmd" in
the search field.
Navigate to the folder that contains the file "myfirst.js", the command line interface window
should look something like this:
C:\Users\Your Name>_
● Node.js offers an Easy Scalability - One of the key advantages of Node.js is that
developers find it easy to scale the applications in horizontal as well as vertical directions.
The applications can be scaled in horizontal manner by the addition of additional nodes to
11
the existing system. Moreover, Node.js also offers you the option of adding extra
resources to the single nodes during the vertical scaling of the application. So, it is highly
scalable and provides better option than other JavaScript servers.
● Easy to Learn-Since JavaScript is one of the most popular programming languages, most
of the front-end developers have a good grasp over it.It becomes much easier for them to
start using the Node.js at the backend. It is easier to learn Node.js and consumes less time
to work with it.. Node.js is used as a Single Programming LanguageNode.js offers the
developers the luxury of writing server-side applications in JavaScript. This allows the
Node.js developers to write both the front-end as well as back-end web application in
JavaScript using a runtime environment.And they don’t need to use any other server-side
programming language. It also makes the deployment of the web applications simpler
because almost all web browsers support JavaScript.
ode.js has been regarded as a full-stack JavaScript for
● The Benefit of Fullstack JS- N
serving both the client and the server-side applications.Therefore, the advantage is that
you don’t have to hire separate developers for backend as well as the front-end
development. It saves both your valuable money and time.
● Known for Offering High Performance-It has been mentioned earlier that Node.js
interprets the JavaScript code via Google’s V8 JavaScript engine. This engine compiles
the JavaScript code directly into the machine code. This makes it easier and faster to
implement the code in an effective manner.The speed of the code execution is also
enhanced by runtime environment as it supports the non-blocking I/O operations.
ode.js is blessed to have a large and
● The Support of Large and Active Community-N
active community of developers who keep on continuously contributing towards its
further development and improvement.In fact, the groups of developers are well
supported by the JavaScript programmers providing ready-made and easy solutions and
codes in GitHub. It is expected that the developers will initiate many further developers
in the future.
● The Advantage of Caching-T
he open-source runtime environment of the Node.js also
provides the facility of caching single modules. Whenever there is any request for the
12
first module, it gets cached in the application memory.The developers don’t have to
re-execute the codes as caching allows applications to load web pages faster and responds
more swiftly to the user.
nother advantage that Node.js offers to the
● Offers the Freedom to Develop Apps-A
developers is the freedom to develop the apps and software.This is one essential feature,
which remains absent in Ruby on Rails imposing certain guidelines. You can begin
everything from scratch while developing applications.
● Getting Support for Commonly Used Tools-With Node.js, the developers can get
extended support for the various commonly used tools. Let’s take an example. Suppose,
you want to test the source code of Node.js application; you can do so by using the
Jasmine and other such unit-testing tools.Similarly, if you want to identify and install the
project dependencies, you can make use of npm, a powerful package manager. You can
use grunt for task running of the project.
ince Node.js is providing the option of
● Handles the Requests Simultaneously-S
non-blocking I/O systems, it relatively helps you to process several requests
concurrently.The system can handle the concurrent request handling efficiently better
than others including Ruby or Python. The incoming requests get lined up and are
executed quickly and systematically.
● Node.js is Highly Extensible-The Node.js is known to be highly extensible, which means
that you can customize and further extend Node.js as per their requirements.You can also
make use of JSON to provide the scope for exchange of data between the web server and
the client. It also is facilitated with built-in APIs for developing HTTP, TCP, and DNS
etc. servers.
● Application Programming Interface (API) is Not Stable-One of the key problems that
most of the developers encounter is the Application Programming Interface (API) keeps on
changing at frequent intervals and does not remain stable.At times, a new API appears having
a number of backwards-incompatible changes. As a result the developers are forced to make
13
changes in the accessible code bases to match the compatibility with the latest version of the
Node.js API.
● Does not have a Strong Library Support System-The JavaScript does not have a well
equipped and robust library system in comparison to other programming languages.The
result is that the users are forced to take the support of common library for executing
various tasks such as Object-Relational Mapping (ORM), processing of the images,
handling database operations, and XML parsing etc.This makes it difficult for the
developers to implement the common programming tasks using Node.js.
● Asynchronous Programming Model-If you want to make the application more scalable,
the necessary requisite is adoption of the asynchronous programming model.However,
many developers may find this programming model to be more difficult in comparison to
the linear blocking I/O programming.Another con of the asynchronous programming is
the codes tend to become clumsy and the programmers have to depend on the nested
calls.
MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses. MySQL is
developed, marketed and supported by MySQL AB, which is a Swedish company[3] MySQL is
becoming so popular because of many good reasons −
● MySQL is released under an open-source license. So you have nothing to pay to use it.
● MySQL is a very powerful program in its own right. It handles a large subset of the functionality
of the most expensive and powerful database packages.
14
● MySQL works on many operating systems and with many languages including PHP, PERL, C,
C++, JAVA, etc.
● MySQL works very quickly and works well even with large data sets.
● MySQL is very friendly to PHP, the most appreciated language for web development.
● MySQL supports large databases, up to 50 million rows or more in a table. The default file size
limit for a table is 4GB, but you can increase this (if your operating system can handle it) to a
theoretical limit of 8 million terabytes (TB).
● MySQL is customizable. The open-source GPL license allows programmers to modify the
MySQL software to fit their own specific environments.
15
MongoDB is a free and open-source cross-platform document-oriented database program.
Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas.
MongoDB is developed by MongoDB Inc., and is published under a combination of the GNU
Affero General Public License and the Apache License.MySQL is released under an open-source
license. So you have nothing to pay to use it.[4]
16
Horizontal scale-out with data No Yes Partial: no controls over
locality controls data locality
2.1.5 HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed
to be displayed in a web browser. It can be assisted by technologies such as Cascading Style
Sheets (CSS) and scripting languages such as JavaScript.
Web browsers receive HTML documents from a web server or from local storage and render the
documents into multimedia web pages. HTML describes the structure of a web page
semantically and originally included cues for the appearance of the document.
HTML elements are the building blocks of HTML pages. With HTML constructs, images and
other objects such as interactive forms may be embedded into the rendered page. HTML
provides a means to create structured documents by denoting structural semantics for text such as
headings, paragraphs, lists, links, quotes and other items. HTML elements are delineated by tags,
written using angle brackets. Tags such as <img /> and <input /> directly introduce content into
the page. Other tags such as <p> surround and provide information about document text and may
include other tags as sub-elements. Browsers do not display the HTML tags, but use them to
interpret the content of the page.
HTML can embed programs written in a scripting language such as JavaScript, which affects the
behavior and content of web pages. Inclusion of CSS defines the look and layout of content. The
17
World Wide Web Consortium (W3C), former maintainer of the HTML and current maintainer of
the CSS standards, has encouraged the use of CSS over explicit presentational HTML since
1997.
2.1.6 CSS
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentaion of a
document written in a markup language such as HTML CSS is a cornerstone technology of the
World Wide Web, alongside HTML and Javascript
CSS is designed to enable the separation of presentation and content, including layout, colors,
and fonts. This separation can improve content accessibility, provide more flexibility and control
in the specification of presentation characteristics, enable multiple web pages to share formatting
by specifying the relevant CSS in a separate .css file which reduces complexity and repetition in
the structural content as well as enabling the .css file to be cached to improve the page load
speed between the pages that share the file and its formatting.
Separation of formatting and content also makes it feasible to present the same markup page in
different styles for different rendering methods, such as on-screen, in print, by voice (via
speech-based browser or screen reader), and on Braille-based tactile devices. CSS also has rules
for alternate formatting if the content is accessed on a mobile device.
The name cascading comes from the specified priority scheme to determine which style rule
applies if more than one rule matches a particular element. This cascading priority scheme is
predictable.
18
The CSS specifications are maintained by the World Wide Web Consortium (W3C). Internet
media type (MIME type) text/css is registered for use with CSS by RFC 2318 (March 1998). The
W3C operates a free CSS validation service for CSS documents.
In addition to HTML, other markup languages support the use of CSS including XHTML, plain
XML, SVG, and XUL.
19
CHAPTER - 3
DIAGRAMS
20
CHAPTER-3
DIAGRAMS
21
3.2 DATA-FLOW DIAGRAM
For each data flow, at least one of the endpoints (source and / or destination) must exist in a
process. The refined representation of a process can be done in another data-flow diagram, which
subdivides this process into sub-processes.The data-flow diagram is part of the
structured-analysis modelling tools. When using UML, the activity diagram typically takes over
the role of the data-flow diagram. A special form of data-flow plan is a site-oriented data-flow
plan.
22
3.3 USE-CASE DIAGRAM
While a use case itself might drill into a lot of details about every possibility, a use-case diagram
can help provide a higher-level view of the system. It has been said before that "Use case
diagrams are the blueprints for your system".They provide the simplified and graphical
representation of what the system must actually do. Due to their simplistic nature, use case
diagrams can be a good communication tool for stakeholders.
23
CHAPTER - 4
PROCESS SELECTION
24
CHAPTER - 4
PROCESS SELECTION
4.1 Definition
Process Selection refers to the way an organization chooses to produce its goods or services. It
takes into. account selection of technology, capacity planning, the layout of facilities, and design
of work systems. Process selection plays an important part in the overall design of production
and operations management systems. Process selection allows an organization to offer a safe and
reliable product and service through pragmatic design and effective capacity planning. With the
help of process selection, we can understand the different types of processing including manual,
rigid, and flexible as well as various automated approaches to processing. Process selection
allows an operations manager to better understand the need for the management of technology.
Together with capacity planning, it helps an organization to develop different approaches to meet
the irregular demand pattern of the customers.
● Requirement gathering and analysis - During this phase, all the relevant information is
collected from the customer to develop a product as per their expectations. Any
ambiguities must be resolved in this phase only. Once the requirement gathering is done,
an analysis is done to check the feasibility of the development of a product. In case of any
ambiguity, a call is set up for further discussion.
● Design - In this phase, the requirements gathered in the SRS document is used as an input
and software architecture that is used for implementing system development is derived.
● Implementation or coding - Implementation/Coding starts once the developer gets the
Design document. The Software design is translated into source code. All the components
of the software are implemented in this phase.
25
● Testing - Testing starts once the coding is complete and the modules are released for
testing. In this phase, the developed software is tested thoroughly and any defects found
are assigned to developers to get them fixed.
● Deployment - Once the product is tested, it is deployed in the production environment or
first UAT (User Acceptance testing) is done depending on the customer's expectation.
● Maintenance - After the deployment of a product on the production environment,
maintenance of the product i.e. if any issue comes up and needs to be fixed or any
enhancement is to be done is taken care of by the developers.
4. Create APIs: Coordinate with the project manager and provide the APIs according to the
requirements.Optimize the APIs to reduce response time.
26
5. Integrate backend APIs: Coordinate with the backend developer to understand the
structure of the APIs, check swagger api docs and then analyze them to integrate into the
app.
6. Manual testing: Test the features for any kind of bugs and fix them.
7. Enhancements: Check for the network calls and the components of the application. If
there’s a requirement for any improvement, do it.
8. Staging release: Deploy the application on the development server to test it manually.
9. Production release: Discussion with team and presentation of product given by the team
lead to the co-founder.
27
CHAPTER - 5
RESULTS
28
CHAPTER - 5
RESULTS
29
Fig 5.2 URL Input Field
30
Fig 5.3 success message
31
Fig 5.4 Shortened URL and visit tracker
32
CHAPTER - 6
COMPARISONS AND
ANALYSIS
33
CHAPTER - 6
The project aims to provide tools to the brands for efficient market research while also being a
platform for brands to run contests for their employees. These contests are efficient for both
salesperson as well as distributors so that the salesperson can have a healthy competition and
brands can learn more about the reception of their product in the market.These not only help
brands to collect appropriate data but also allow retailers to give orders and hence act as a sales
platform for the brands.
The goal of the company when started was to be able to create the following in 2 weeks of time
span:
● A URL service which can tell the user to enter the right URL on the basis of semantics of
a URL .
● A backend URL check to check if the URL entered is actually a website and not just
some random gibberish through status codes .
● A visit tracker which can track the amount of visits on your websites through a particular
shortened URL.
● Ability for users to create multiple shortened URL for same website , so that the user can
have better analytics.
At the end of the 2 weeks time span I was successfully able to achieve all the above mentioned
goals.
34
A sensitivity analysis tells which parameters are the most important and most likely to affect
system behavior and/or predictions of the model. Following a sensitivity analysis, values of
critical parameters can be refined while parameters that have little effect can be simplified or
ignored.
The sensitive analysis validation of our project exposed the following parameters which had
wide range of effect from negligible to critical:
● The DB model was made according to the features which will be implemented in 6
month’s time which will lead to less changes in DB so less stall time for everyone.
Verification and validation of computer simulation models is conducted during the development
of a simulation model with the ultimate goal of producing an accurate and credible model.
"Simulation models are increasingly being used to solve problems and to aid in decision-making.
The analysis was done on the project model and an adaptive model which will cater to our user
base.The idea behind the model was to keep it simple but highly efficient. The balance of
efficiency v/s simplicity was maintained.
35
CHAPTER - 7
CONCLUSION AND
FUTURE SCOPE
36
Chapter-7
7.1 Conclusion:
● There are several reasons to use URL shortening. Often regular unshortened links may be aesthetically
unpleasing. Many web developers pass descriptive attributes in the URL to represent data hierarchies,
command structures, transaction paths or session information. This can result in URLs that are
hundreds of characters long and that contain complex character patterns. Such URLs are difficult to
memorize, type out or distribute. As a result, long URLs must be copied and pasted for reliability.
Thus, short URLs may be more convenient for websites or hard copy publications (e.g. a printed
magazine or a book), the latter often requiring that very long strings be broken into multiple lines (as
is the case with some e-mail software or internet forums) or truncated.
● On Twitter and some instant messaging services, there is a limit to the number of characters a message
can carry – however, Twitter now shortens links automatically using its own URL shortening service,
t.co, so there is no need to use a separate URL shortening service just to shorten URLs in a tweet. On
other such services, using a URL shortener can allow linking to web pages which would otherwise
violate this constraint. Some shortening services, such as smol can generate URLs that are
human-readable, although the resulting strings are longer than those generated by a length-optimized
service. Finally, URL shortening sites provide detailed information on the clicks a link receives, which
can be simpler than setting up an equally powerful server-side analytics engine, and unlike the latter,
does not require any access to the server.
● URLs encoded in two dimensional barcodes such as QR code are often shortened by a URL shortener
in order to reduce the printed area of the code, or allow printing at lower density in order to improve
scanning reliability.
37
7.2 Future Scope
● Security: The security of the URL shortner can be increased by adding a timeout
function if there are multiple request coming in very short amount of time through same
IP.
● Improved Visit Tracker: There can be a better visit tracker model which only increases
the number of visits when there is a new request from a new IP.
● Custom URL services: There can be an authentication system which saves URLs which
are only visible to those who created it .
The project was made so that anyone can have access to a URL shortener service without having
to login or pay them the amount to shorten a simple URL for some basic personal use . The
URL shortener was made so that the marketing teams can also track the amount of visits coming
from a particular place .
The short URL was created keeping in mind the probable number of users using it . A custom
library was used to achieve this . The library used alphabets and numbers to create a random
string of at max 9 characters which can be redirected to the complete full URL.The URL then
was saved in MongoDB which was hosted at MLabs.After entering the full URL the user can
access the shortened URL at the bottom of the all shortened URL table .
38
CHAPTER - 8
BIBLIOGRAPHY
39
CHAPTER-8
BIBLIOGRAPHY
[1] https://en.wikipedia.org/wiki/Automation
[2] Flanagan, David (2011). JavaScript: The Definitive Guide (6th ed.). O'Reilly & Associates.
ISBN 978-0-596-80552-4.
[3] https://www.markupbox.com/blog/advantages-of-javascript/
[4] The Node Ahead: JavaScript leaps from the browser into future, The Register, 1 March 2011
[5] "Sun Microsystems Announces Completion of MySQL Acquisition; Paves Way for Secure,
Open Source Platform to Power the Network Economy" (Press release). Sun Microsystems. 26
February 2008. Archived from the original on 28 February 2008. Retrieved 17 September 2012..
[6] "State of MongoDB March, 2010". DB-Engines. Archived from the original on September
18, 2017. Retrieved July 5, 2017.
[7] "MongoDB switches up its open-source license". TechCrunch. Archived from the original on
October 16, 2018. Retrieved October 16, 2018.
40