0% found this document useful (0 votes)
41 views80 pages

Mcad2233 Open-Source Technologies

Uploaded by

Vinu Varshith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views80 pages

Mcad2233 Open-Source Technologies

Uploaded by

Vinu Varshith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 80

MASTER OF COMPUTER

APPLICATIONS

MCAD2233
OPEN SOURCE

TECHNOLOGIES Third

Semester

DIRECTORATE OF DISTANCE EDUCATION


SRM Institute of Science and Technology,
Potheri, Chengalpattu District 603203,
Tamil Nadu, India.
Phone: 044 – 27417040 / 41
Website: www.srmist.edu.in / Email:office.dde@srmist.edu.in
EXPERT COMMITTEE
S. NAME DESIGNATION INSTITUTION
No.

1 Dr.R. Rajagopal Advisor DDE - SRMIST

2 Dr.S. Albert Antony Raj Prof & HoD, CSH - SRMIST


Computer
Applications,
Deputy Dean -CSH

3 Dr.A. Thirumurthi Raja HOD(i/c) – DDE - SRMIST


Computer
Applications

4 Mr.S. Chandran Assistant Professor -SME DDE - SRMIST

5 Dr.R. Jayashree Associate Professor - SME CSH - SRMIST

6 Dr.G. Venugopalan Academic Coordinator DDE - SRMIST

Course Writer(s): Ms. M. RAMLA

Information contained in this book has been obtained by its Author(s) from sources believed to
be reliable and are correct to the best of their knowledge. However Publishers and the Author(s)
shall inno event be liable for any errors, omissions or damages arising out of this information
and specifically disclaim any implied warranties or merchantability or fitness for any
particular.

DIRECTORATE OF DISTANCE EDUCATION


SRM Institute of Science and Technology,
Potheri, Chengalpattu District 603203, Tamil Nadu, India
Phone: 044 – 27417040 / 42
Website: www.srmist.edu.in
Email:office.dde@srmist.edu.in
Course Code Course Title L T P Total C
LTP

MCAD2233 OPEN-SOURCE TECHNOLOGIES 3 1 4 8 6

INSTRUCTIONAL OBJECTIVES Student Outcomes


At the end of this course the learner is expected:

1. To understand the basics and advantages of open source a

2. To learn the open source software Angular JS b

3. To develop the programming skill in Mongo DB c e

UNIT-1 Introduction
Open Source, Need and Principles of OSS, Open-Source Standards, Requirements for Software,
OSS success, Free Software, Examples, Licensing, Free Vs. Proprietary Software, Free Software
Vs. Open-Source Software, Public Domain. History of free software, Proprietary Vs Open-Source
Licensing Model, use of Open- Source Software, FOSS does not mean no cost. History: BSD, The
Free Software Foundation and the GNU Project.

Unit-2 Open-Source Eco System


Open-Source Operating Systems: GNU/Linux, Android, Free BSD, Open Solaris. Open-Source
Hardware, Virtualization Technologies, Containerization Technologies: Docker, Development
tools, IDEs, Debuggers, Programming languages, LAMP, Open-Source Database technologies
Case Studies: Example Projects: Apache Web server, BSD, GNU/Linux, Android, Mozilla (Firefox),
Wikipedia, Drupal, WordPress, Git, GCC, GDB, GitHub, Open Office, LibreOffice

Unit 3- Angular JS
Introduction and Agenda - Prerequisites - What are SPA's - Introduction to AngularJS - Features
of AngularJS - MVC Architecture - Versions and Transitions - Environmental Setup - Angular JS
IDE's - Introduction to Visual studio code - Angular app fundamentals - Simple AngularJS App -
Companies using Angular JS - Advantages of Angular JS.

Unit 4-Mongo DB
Introduction to Mongodb- Installing Mongo DB in Windows, Linux and Mac Operating Systems -
Installing and Working with MongoDB interfaces: i)Mongo Shell, ii)Mongo Compass - Mongodb
Datatypes: i)Integer ii)Boolean iii)Double iv)String v)Arrays vi)Object vii)Null viii)Regular
expression ix)Timestamp x)Date xi)Object ID - Introduction to entities of MongoDB: i)Databases
i)Collections and iii)Documents - Database: i)createDatabase()method with example,
ii)dropDatabase() method with example - Collections: i)createCollection() method with example
ii)dropCollection() method with example

Unit 5 – Mongo DB
Indexes: Properties of Index, i)Unique Indexes, ii)Partial Indexes, iii)Sparse Indexes, iv)TTL
Indexes - Aggregation in Mongodb: i)aggregate() method - Aggregate expressions: i) $sum ii)
$avg iii) $min iv) $max v) $push vi) $addToSet vii) $first viii) $last - Mongodb Backup:
Export/Import data backup using shell - i)mongodump, ii)mongorestore - Mongodb Backup:
Export/Import data backup using Mongo Compass - Monitoring Deployment using Mongodb:
i)mongostat, mongotop, iii)serverStatus, dbStats, collStats

TEXTBOOK:
James Lee and Brent Ware, “Open-Source Web Development with LAMP using Linux, Apache,
MySQL, Perl and PHP”.
Learning AngularJS, Free eBook created from Stack Overflow contributors.
MongoDB: The Definitive Guide, Book by Kristina Chodorow and Michael Dirolf

WEB REFERENCES
www.w3schools.com, www.php.net, www.phpclasses.org www.tizag.com,
www.tutorialspoint.com, www.perl.org, www.oracle.com

Course Nature: Theory-Cum-Practical

Assessment Method(Maximum marks)

In Assessment Practical exercises -I Practical exercises -II Total


Semester Tool Theory Practical Theory Practical

10 5 10 5

Total 15 15 30

End Marks Theory Practical 70


Semester 40 30

Total 100

MCAD 2233 NOTES - Open Source Technologies Unit-1 Introduction

STRUCTURE

1.1 Open Source


1.2 Need and Principles of OSS

1.3 Open-Source Standards

1.4 Requirements for Software, OSS success

1.5 Free Software, Examples, Licensing

1.6 Free Vs. Proprietary Software

1.7 Free Software vs. Open-Source Software

1.8 Public Domain

1.9 Proprietary Vs Open-Source Licensing Model

1.10 Use of Open- Source Software

1.11 History: BSD, the Free Software Foundation and the GNU Project.

1 | SRMIST DDE MCA Self Instructional Material


1.1 OPEN SOURCE

Open source refers to a program in which the source code is available


to the general public for use and/or modification from its original
design free of charge, i.e., open. Open source code is typically created
as a collaborative effort in which programmers improve upon the code
and share the changes within the community.
Open-source software (OSS) is computer software with its source code
made available with a license in which the copyright holder provides
the rights to study, change, and distribute the software to anyone and
for any purpose. Open-source software may be developed in a
collaborative public manner.

Open source software is software with source code that anyone can
inspect, modify, and enhance. "Source code" is the part of software that
most computer users don't ever see; it's the code computer
programmers can manipulate to change how a piece of software—a
"program" or "application"—works. Programmers who have access to
a computer program's source code can improve that program by adding
features to it or fixing parts that don't always work correctly.

1.2 NEED AND PRINCIPLES OF OSS

The main principles of open source software are collaboration,


transparency, and freedom. Open source software is a collaborative effort,
with developers from all over the world contributing to the code. This
collaboration allows for rapid innovation and helps to ensure that the software
is of high quality.

Transparency is another key principle of open source software. The


source code is available for anyone to view, so anyone can see how the
software works and how it is being developed. This transparency helps to
build trust between users and developers.

2 SRMIST DDE MCA Self Instructional Material


Freedom is another important principle of open consensus driven process. "Open Standards"
source software. Users are free to use the facilitate interoperability and data exchange
software for any purpose, and to modify it to suit among different products or services and are
their needs. This freedom allows users to create intended for widespread adoption.
custom solutions that fit their specific needs.
An open standard is a standard that is freely
1.3 OPEN SOURCE STANDARDS available for adoption, implementation and
updates. A few famous examples of open
"Open Standards" are standards made available standards are XML, SQL and HTML.
to the general public and are developed (or
approved) and maintained via a collaborative and Other elements of "Open Standards" include, but
are not limited to:
▪ Collaborative process – voluntary and market
essential to implement the standard to be
licensed to all applicants on a worldwide, non
driven development (or approval) following a
discriminatory basis, either (1) for free and under
transparent consensus driven process that is
other reasonable terms and conditions or (2) on
reasonably open to all interested parties.
reasonable terms and conditions (which may
include monetary compensation). Negotiations
▪ Reasonably balanced – ensures that the
are left to the parties concerned and are
process is not dominated by any one interest
performed outside the SDO.
group.

▪ Quality and level of detail – sufficient to


▪ Due process - includes consideration of and
permit the development of a variety of
response to comments by interested parties.
competing implementations of interoperable
products or
▪ Intellectual property rights (IPRs) – IPRs
NOTES
3 | SRMIST DDE MCA Self Instructional Material
services. Standardized interfaces are not hidden, or controlled other
than by the SDO promulgating the standard.

▪ Publicly available – easily available for implementation and use, at a


reasonable price. Publication of the text of a standard by others is
permitted only with the prior approval of the SDO.

▪ On-going support – maintained and supported over a long period of


time.

1.4 REQUIREMENTS OF SOFTWARE, OSS

SUCCESS 1.4.1 Free Redistribution

The license shall not restrict any party from selling or giving away the
software as a component of an aggregate software distribution containing
programs from several different sources. The license shall not require a royalty
or other fee for such sale.

1.4.2. Source Code

The program must include source code, and must allow distribution in source
code as well as compiled form. Where some form of a product is not
distributed with source code, there must be a well-publicized means of
obtaining the source code for no more than a reasonable reproduction cost,
preferably downloading via the Internet without charge.

1.4.3. Derived Works

The license must allow modifications and derived works, and must allow them
to be distributed under the same terms as the license of the original software.

1.4.4. Integrity of the Author’s Source Code

The license may restrict source-code from being distributed in modified form
only if the license allows the distribution of “patch files” with the source code
for the purpose of modifying the program at build time. The license must
explicitly permit distribution of software built from modified source code. The
4 SRMIST DDE MCA Self Instructional Material
license may require derived works to carry a The rights attached to the program must not
different name or version number from the depend on the program’s being part of a
original software. particular software distribution. If the program is
extracted from that distribution and used or
1.4.5. No Discrimination against Persons or
Groups distributed within the terms of the program’s
license, all parties to whom the program is
The license must not discriminate against any redistributed should have the same rights as
those that are granted in conjunction with the
person or group of persons. 1.4.6. No
original software distribution.
Discrimination against Fields of Endeavor
1.4.9. License Must Not Restrict Other
The license must not restrict anyone from Software
making use of the program in a specific field of
The license must not place restrictions on other
endeavour. For example, it may not restrict the
software that is distributed along with the
program from being used in a business, or from
licensed software. For example, the license must
being used for genetic research.
not insist that all other programs distributed on

1.4.7. Distribution of License the same medium must be open-source software.

The rights attached to the program must apply to 1.4.10. License Must Be Technology-Neutral
all to whom the program is redistributed without
No provision of the license may be predicated on
the need for execution of an additional license by
any individual technology or style of interface.
those parties.
1.5 FREE SOFTWARE, EXAMPLES
1.4.8. License Must Not Be Specific to a
Product NOTES
5 | SRMIST DDE MCA Self Instructional Material
1.5.1 FREE SOFTWARE

“Free software” means software that respects users' freedom and community.
Roughly, it means that the users have the freedom to run, copy, distribute,
study, change and improve the software. Thus, “free software” is a matter of
liberty, not price.

1.5.1.2 The four essential freedoms

A program is free software if the program's users have the four essential
freedoms:

▪ The freedom to run the program as you wish, for any purpose (freedom
0).

▪ The freedom to study how the program works, and change it so it does
your computing as you wish (freedom 1). Access to the source code is
a precondition for this.

▪ The freedom to redistribute copies so you can help others (freedom 2).

▪ The freedom to distribute copies of your modified versions to others


(freedom 3). By doing this you can give the whole community a
chance to benefit from your changes. Access to the source code is a
precondition for this.

1.5.2 EXAMPLES

Few examples for Free software are listed below and are not limited to this.

GIMP, Python, Mozilla Firefox, PyTorch, GNU, VLC Media Player,


Audacity,WordPress,Bittorent, PHP, Brave Browser, Blender, MYSQL,
Linux, Ruby on Rails, FileZilla, Inkspace, Zimbra, LibreOffice, 7-Zip, etc.

1.6 FREE Vs. PROPRIETARY SOFTWARE


S.No Free Software Proprietary Software

1 Open-source software is Proprietary software is


6 SRMIST DDE MCA Self Instructional Material

computer. computer without a


computer software whose computer software where the
license.
source code is available source codes are publicly not
openly on the internet and 5 the Users
available only do not need to have
company Users need to have
programmers can modify which has any authenticated
created can license and authenticated lic
it to add new features and modify it. to use this software. use this software.
capabilities without any
6 Open-source software is Proprietary softwar
cost.
managed by an open managed by a closed t

2 Here the software is Here the source community


software is of individuals or group

developed and tested developers.


developed and tested by the developed it.

through open individual or organization by


7 It is more flexible and It is not much flexi
collaboration. which it is owned not by the
provides more freedom there is a very
public.
which encourages innovation scope w
innovation. restrictions.
3 In open-source software In proprietary software, the
the source code is public. source code is protected.
8 Users can get open Users must have to pay

4 Open-source software can Proprietary software cannot


be installed on any be installed into any
NOTES
7 | SRMIST DDE MCA Self Instructional Material

software free of charge. the proprietary software.

9 In open-source software In proprietary software, the


faster fixes of bugs and vendor is completely
better security are availed responsible for fixing
due to the community. malfunctions.

10 Limited Intellectual Full Intellectual Property


Property Protections Protections

11 Usually Developed and Usually Developed and


Maintained by non-profit Maintained by for-profit
organizations. entities.

12 Examples are Android, Examples are Windows,


Linux, Firefox, Open macOS, Internet Explorer,
Office, GIMP, VLC Google Earth, Microsoft
Media player, etc. Office, Adobe Flash Player,
Skype, etc

1.7 FREE SOFTWARE Vs. OPEN SOURCE

The difference between open source and free software comes into play
when you distribute software based on FOSS code. The biggest proponent of
free software is the Free Software Foundation, which has published several
widely used licenses. They’re called GNU licenses, after the GNU family of
software products. The GNU General Public License (GPL) is the archetype
for free software licenses.

The key point of the GPL is that it’s “sticky.” If you use GPL-licensed
software in a modified form or incorporate it into your product, you have to
make it available under the same terms. You can sell the software, but you
also have to make its source code freely available. Free software advocates
call granting rights this way “copyleft.”
8 SRMIST DDE MCA Self Instructional Material
Open source licenses generally don’t impose this restriction. They may place other requirements
on the code, such as clearly identifying modified different benefits and drawbacks, depending on
versions. the developer’s purpose. These are some of the
best known.
1.8 PUBLIC DOMAIN
1.9.2 Open source licenses
The public domain (PD) consists of all the
creative work to which no exclusive intellectual ∙ MIT License: A very brief open source license
property rights apply. Those rights may have that doesn’t require an MIT degree to
expired, been forfeited, expressly waived, or mayunderstand it. The only requirement is to include
be inapplicable. Because no one holds the the license and copyright notice when
exclusive rights, anyone can legally use or distributing copies.
reference those works without permission.
∙ BSD License: A short, simple set of licenses.
In India, copyright generally lasts for sixty years
The two-clause license is nearly equivalent to
after the death of the author or sixty years after
the MIT License, except that it requires
the publication of the work, depending on the
distributing the license with any copies. The
nature of the content. As a result, when the term
three-clause license adds a restriction on using
expires, the content is released into the public
the licensor’s name for publicity.
domain.
∙ Creative Commons licenses: A family of
1.9 PROPRIETARY VS OPEN-SOURCE
licenses placing different restrictions. Software
LICENSING MODEL 1.9.1 LICENSING creators can choose the conditions they prefer for

Many licenses are available, and each one has NOTES


9 | SRMIST DDE MCA Self Instructional Material
attribution, commercial use, and modification. There is even a license
which places the work in the public domain. These licenses aren’t
specifically intended for software and are often used with other
creative works.

∙ Apache License: A widely used open source license from the Apache
Software Foundation. It licenses patents to the extent possible, requires
notice of any modifications that are distributed, and includes various
legal disclaimers.

1.9.3 Free software licenses

∙ GNU General Public License: As already discussed, the best known of


the free software licenses. It requires publication of the source code
and extends to any published software which includes GNU-licensed
code.

∙ GNU Lesser General Public License: A variant of the GPL which


doesn’t extend its requirements to software that incorporates it. The
Free Software Foundation makes it available with great reluctance, but
it can be a good choice for software libraries intended for use within
applications.

∙ GNU Affero General Public License: The AGPL is even stickier than
the GPL. Its stickiness extends to code which runs on servers, even if
it’s never published. The rise of cloud services has made this a
common situation.

▪ Mozilla Public License: A free software license from the Mozilla


Software Foundation. It stakes out a position between open source
licenses and the GPL. If you create an application that incorporates
MPL-licensed code, you need to make only the licensed files available.
This includes any modifications you have made but doesn’t include
code which is original with you.

01.10 USE OF OPEN-SOURCE SOFTWARE


10 SRMIST DDE MCA Self Instructional Material
1. Lesser hardware costs you can effectively address all these
Since Linux and open source solutions are easily disadvantages.
portable and compressed, it takes lesser 4. Integrated management
hardware power to carry out the same tasks By using open source software, you can benefit
when compared to the hardware power it takes from integrated management. Open source
on servers, such as, Solaris, Windows or software uses technologies, such as, common
workstations. With this less hardware power information model (CIM) and web based
advantage, you can even use cheaper or older enterprise management (WBEM). These high-
hardware and still get end technologies enable you to integrate and
the desired results. combine server, application, service and
2. High-quality software workstation management. This integration
Open source software is mostly high-quality would result in efficient administration.
software. When you use the open source 5. Simple license management
software, the source code is available. Most open When you use open source software, you would
source software are well-designed. Open source no longer need to worry about licenses. Open
software can also be efficiently used in coding. source software enables you to install it several
These reasons make open source software an times and also use it from any location. You will
ideal choice for organizations. be free from monitoring, tracking or counting
3. No vendor lock-in license Compliance.
IT managers in organizations face constant 6. Lower software costs
frustration when dealing with vendor lock- Using open source software can help you
ins'. Lack of portability, expensive license minimize your expenses. You can save on
fees and inability to customize software are licensing fees and maintenance fees. The only
some of the other disadvantages. Using open
NOTES
source software gives you more freedom and
11 | SRMIST DDE MCA Self Instructional Material
expenses that you would encounter would be expenditure for
documentation, media and support.
7. Abundant support
You will get ample support when you use open source software. Open
source support is mostly freely available and can be easily accessed
through online communities. There are also many software companies
that provide free online help and also varied levels of paid support.
Most organization who create open source software solutions also
provide maintenance and support.
8. Scaling and consolidating
Linux and open source software can be easily scaled. With varied
options for clustering, load balancing and open source applications,
such as email and database, you can enable your organization to either
scale up and achieve higher growth or consolidate and achieve more
with less.
Disadvantages of Open Source Software’s
1. More in line with the developers wish rather than end users
wish. 2. Vulnerable to malicious users.
3. Less extensive support available when things go wrong
4.. Might not be as user-friendly as commercial versions.
5. Less attention is paid to UI
1.11 HISTORY: BSD, the FREE SOFTWARE FOUNDATION AND
THE GNU PROJECT

The history of the Berkeley Software Distribution (BSD) operating


systems is a rich and influential one in the world of computer science and
open-source software. BSD originated at the University of California,
Berkeley, and has had a significant impact on the development of modern
Unix-like operating systems.

▪ Early Unix and AT&T:

Unix, developed at AT&T's Bell Labs in the late 1960s


and early 1970s, was one of the earliest operating systems. The
source code for Unix was initially distributed with a license that
allowed academic institutions to access and modify it.
12 SRMIST DDE MCA Self Instructional Material
the widespread adoption of Unix in the
▪ BSD 1:
emerging field of computer networking.
In the late 1970s, Ken Thompson and Dennis
Ritchie at Bell Labs released the Unix source ▪ Legal Battles and the Birth of FreeBSD:
code to the Computer Systems Research Group In the mid-1980s, legal disputes over the
(CSRG) at UC Berkeley. In 1977, the CSRG ownership of Unix source code led to
started working on their version of Unix, known restrictions on the distribution of BSD Unix. To
as Berkeley Unix, or BSD. work around these issues, the Berkeley Software
Distribution (BSD) Networking Release 1
▪ BSD 2-4:
(Net/1) was released in 1989. It included only
BSD Unix continued to evolve at UC Berkeley,
the networking code, which was considered the
with notable releases including BSD 2, BSD 3,
most valuable part of the system. The Net/2
and BSD 4 in the late 1970s and early 1980s.
release in 1991 allowed the integration of other
These versions introduced many innovations
Unix-like components, leading to the
and improvements to the Unix system, including
development of FreeBSD, an open
the virtual memory system, networking
source Unix-like operating system.
enhancements, and the implementation of the C
shell. ▪ Other BSD Variants:

▪ BSD Networking and TCP/IP: In addition to FreeBSD, various other BSD-


derived operating systems emerged, including
BSD 4.2, released in 1983, was a milestone for
NetBSD and Open BSD, each with its own focus
BSD as it included the implementation of the
and development community. NetBSD aimed for
TCP/IP networking protocols. This integration
portability across
of networking support laid the foundation for
NOTES
13 | SRMIST DDE MCA Self Instructional Material
different hardware platforms. OpenBSD focused on security and code
correctness.

▪ Modern BSD Systems:

Today, these BSD variants continue to be actively developed


and maintained. They are known for their stability, security,
and scalability, making them popular choices for servers and
embedded systems.
The GNU PROJECT
The GNU operating system is a complete free software system, upward
compatible with Unix. GNU stands for “GNU's Not Unix.” It is pronounced as
one syllable with a hard g. Richard Stallman made the Initial Announcement
of the GNU Project in September 1983. A longer version called the GNU
Manifesto was published in March 1985. It has been translated into several
other languages.
The project to develop the GNU system is called the “GNU Project.” The
GNU Project was conceived in 1983 as a way of bringing back the cooperative
spirit that prevailed in the computing community in earlier days—to make
cooperation possible once again by removing the obstacles to cooperation
imposed by the owners of proprietary software.

In 1971, when Richard Stallman started his career at MIT, he worked in a


group which used free software exclusively. Even computer companies often
distributed free software. Programmers were free to cooperate with each other,
and often did.

By the 1980s, almost all software was proprietary, which means that it had
owners who forbid and prevent cooperation by users. This made the GNU
Project necessary.

Every computer user needs an operating system; if there is no free operating


system, then you can't even get started using a computer without resorting to
proprietary software. So the first item on the free software agenda obviously
had to be a free operating system.

14 SRMIST DDE MCA Self Instructional Material


A Unix-like operating system includes a kernel, libre.
compilers, editors, text formatters, mail
However, the GNU Project is not limited to the
software, graphical interfaces, libraries, games
core operating system. They aim to provide a
and many other things. Thus, writing a whole
whole spectrum of software, whatever many
operating system is a very large job. We started
users want to have. This includes application
in January 1984. The Free Software Foundation
software. See the Free Software Directory for a
was founded in October 1985, initially to raise
catalogue of free software application programs.
funds to help develop GNU.

They also wanted to provide software for users


By 1990 they had either found or written all the
who are not computer experts. Therefore we
major components except one—the kernel. Then
developed a graphical desktop (called GNOME)
Linux, a Unix-like kernel, was developed by
to help beginners use the GNU system.
Linus Torvalds in 1991 and made free software
in 1992. Combining Linux with the almost-
complete GNU system resulted in a complete
operating system: the GNU/Linux system.
References
Estimates are that tens of millions of people now
use GNU/Linux systems, typically via [1] https://www.freecodecamp.org/
GNU/Linux distributions. The principal version
[2] https://www.javatpoint.com/
of Linux now contains nonfree firmware
“blobs”; free software activists now maintain a [3] https://www.geeksforgeeks.org
modified free version of Linux, called Linux- NOTES
15 | SRMIST DDE MCA Self Instructional Material
MCAD 2233- Open Source Technologies

Unit-2 Open Source Eco System

STRUCTURE

2.1 Open Source Operating Systems

2.2 Open Source Hardware

2.3 Virtualization Technologies

2.4 Containerization Technologies

2.5 Development Tools

2.6 IDEs, Debuggers

2.7 Programming Languages

2.8 LAMP

2.9 Open Source Database technologies

2.10 Case Studies & Example Projects

16 SRMIST DDE MCA Self Instructional Material


NOTES
2.1 OPEN SOURCE OPERATING SYSTEMS

The term "Open source" refers to computer software or applications where


the owners or copyright holders enable the users or third parties to use, see,
and edit the product's source code. The source code of an open-source OS is
publicly visible and editable. The usually operating systems such as Apple's
iOS, Microsoft's Windows, and Apple's Mac OS are closed operating systems.
Open-Source Software is licensed in such a way that it is permissible to
produce as many copies as you want and to use them wherever you like. It
generally uses fewer resources than its commercial counterpart because it
lacks any code for licensing, promoting other products, authentication,
attaching advertisements, etc.

The open-source operating system allows the use of code that is freely
distributed and available to anyone and for commercial purposes. Being an
open-source application or program, the program source code of an open
source OS is available. The user may modify or change those codes and
develop new applications according to the user requirement. Some basic
examples of the open-source operating systems are Linux, Open Solaris,
Free RTOS, Open BDS, Free BSD, Minix, etc.

Most of the open-source operating systems are Linux based. Some of the best
open-source operating systems are as follows:

1. Linux Kernel

Linux kernel was developed by Linus Torvalds. It offers the essential


functions required for an operating system, such as data cancellation, memory
17 | SRMIST DDE MCA Self Instructional Material
processing, and interactions with computer hardware. It is open-source
software, and many developers researched the source code and produced a
plethora of helpful plug-ins and operating systems to meet their requirements.

2. Linux Lite

Linux Lite is another free and open-source operating system that can
run on lower-end hardware. It is a lightweight operating system designed to
help users who are unfamiliar with Linux-based operating systems. The
operating system includes all of the required programs, capabilities, tools, and
desktops. It has a minimal interface and is entirely based on the Ubuntu
system.

3. Linux mint

Linux Mint is a powerful Linux-based operating system that exudes


modernity and power. It is simple to use and includes complete multimedia
capabilities, making it a user-friendly open-source operating system. It is an
Ubuntu-based distribution that is popular among both beginners and experts. It
is built on the Debian platform and includes one of the most powerful software
managers. It is more stable and has better visual aesthetics than

Ubuntu. 4. Fedora

Fedora is another popular Linux-based operating system, and it is


widely considered the best open-source operating system after Ubuntu. It is an
RPM-based general-purpose operating system that is supported by Red Hat
and built by the Fedora Project community. Its purpose is to develop and share
cutting-edge open-source technology for free. As a result, Fedora developers
prefer to make upstream improvements rather than create fixes specifically for
Fedora. Fedora developers' updates are available to all Linux distributions.

It has a GNOME-based desktop that may be customized. Fedora comes


with a customizable GNOME-based desktop. Its Fedora Spins feature allows
you to customize and run several user interfaces and desktop environments.

18 SRMIST DDE MCA Self Instructional Material


5. React OS developer-focused.

ReactOS is another free and open-source 6. Solus


operating system that has nearly 1 million
downloads in over 100 countries. This Solus is a free and open-source operating system

community-based OS may run Windows apps, for your desktop computer. It's a new operating
making it an excellent alternative to the system from the Linux family, released in 2012.

Windows operating system. Although ReactOS More than 6000 registered users are currently
is still growing, users, who love highly using the software. VLC, XChat, Transmission,

customizable operating systems, can select Thunderbird, OpenShot Video Editor, Firefox,

ReactOS. However, the operating system is Budgie desktop environment, and LibreOffice
Suite are all included with Solus. The most 2.2 OPEN SOURCE HARDWARE
recent version of Solus, Solus 3, was released in
"Open hardware," or "open source hardware,"
August 2017.
refers to the design specifications of a physical
7. Chrome OS object which are licensed in such a way that said
object can be studied, modified, created, and
Chrome OS is a partly open-source operating distributed by anyone.
system with various attractive features. It's a
part of the Chromium and Linux families, with "Open hardware" is a set of design principles and
features including better security, compatibility legal practices, not a specific type of object. The
for supported Android and Chrome apps, Aura term can therefore refer to any number of objects
windows manager, Google cloud print, — like automobiles, chairs, computers, robots, or
integrated media player, virtual desktop access, even houses.
and cloud-based management. The only issue
NOTES
with the operating system is that it only supports
Nexus devices or its hardware.
19 | SRMIST DDE MCA Self Instructional Material

▪ Like open source software, the "source code" for open hardware—
schematics, blueprints, logic designs, Computer Aided Design (CAD)
drawings or files, etc.—is available for modification or enhancement
by anyone under permissive licenses.

▪ Users with access to the tools that can read and manipulate these source
files can update and improve the code that underlies the physical
device. They can add features or fix bugs in the software. They can
even modify the physical design of the object itself and, if they wish,
proceed to share such modifications.

▪ Open hardware's source code should be readily accessible, and its


components are preferably easy for anyone to obtain.

▪ Essentially, open hardware eliminates common roadblocks to the design


and manufacture of physical goods; it provides as many people as
possible the ability to construct, remix, and share their knowledge of
hardware design and function.

2.3 VIRTUALIZATION TECHNOLOGIES

Virtualization is a process that allows for more efficient utilization of physical


computer hardware and is the foundation of cloud computing.

Virtualization uses software to create an abstraction layer over computer


hardware that allows the hardware elements of a single computer—processors,
memory, storage and more—to be divided into multiple virtual computers,
commonly called virtual machines (VMs).

Each VM runs its own operating system (OS) and behaves like an independent
computer, even though it is running on just a portion of the actual underlying
computer hardware.
20 SRMIST DDE MCA Self Instructional Material

NOTES 2.4

CONTAINERIZATION TECHNOLOGIES
2.4.1 What is a Containerization technology?

Containerization technology, by default, comes from the improvements of


virtualization. It is also commonly described as OS-level virtualization.

Containerization is all about packaging the requirements of an application


under development in the form of a base image. This image can run in an
isolated space (containers) on different systems. It is crucial to remember that
these containers share the same OS. Most IT leaders are intrigued by this
technology because it is often used for deploying and running a distributed app
without having to use a Virtual Machine (VM).

VMs had the problem of error-prone coding while transferring application


infrastructure from one computing environment to another. For example, most
enterprises found it impossible to build apps when one developer shared a
development file from a Linux to a Windows-based OS.

In 2013, Docker was introduced, eliminating the said problem by disrupting


the software development processes. It allowed Linux-based codes to run

21 | SRMIST DDE MCA Self Instructional Material


efficiently on Windows-based systems via Docker. Though it was theoretical
back then, Microsoft was the first to make this possible in 2016.
Ever since, many websites and leading tech giants such as Shopify, Pinterest,
Riot Games, and more have been using containerization technology. It has
been used widely to take advantage of DevOps.

2.4.2 Types of Containers

Today, there are a couple of choices to choose from regarding container


technology. Docker is one of the containers that may ring some bells.

In 2015, given the rising popularity of this technology, Open Container


Initiative (OCI) decided to keep the standards and specifications of container
technology minimal to ensure companies have broader choices to pick from
the open-sourced and wide variety of container engines that exist today. Some
of the prominent ones are as follows,

Docker
An open-sourced containerized platform that combines the source code of an
app with the existing OS and its respective libraries and dependencies. It lets
the said code run on any computing environment.

LXC
An OS-based container that allows an app to run on multiple Linux systems on
a virtual level, given it has a single Linux kernel that serves as the host OS.

CRI-O
It is a Container Runtime Interface (CRI) for Kubernetes, a container cluster
management platform. It is a CRI to ensure that it follows the OCI compatible
runtimes. As a result, this tool serves as a replacement for Docker with
Kubernetes.

22 SRMIST DDE MCA Self Instructional Material


rkt the security improvements that earlier versions
An application-based container engine known as of Docker were known to have. It is best used
Rocket is used for building modern cloud-native with necessary technologies or as specific
apps. It uses CoreOS, which functions based on components of a Docker-based system.
2.4.3 Advantages 2.5 DEVELOPMENT TOOLS

∙ Reduction in infrastructure cost since many Open source development tools are software

containers can run on a single machine or even a applications and resources that are freely
Virtual Machine (VM). available for developers to use, modify, and
distribute under open source licenses. These
∙ Monolithic or legacy applications could be
tools are essential for open source software
containerized using microservice architecture,
development and are widely used in various
making room for future scaling.
stages of the development process. Here are
∙ Improves application security since the app will some popular open source development tools
be stored in separate containers on different across different categories:

systems and isolated from the host. ∙ Containers


2.5.1 Integrated Development Environments
are not dependent on any particular OS and can (IDEs):
run on any OS, given the container engine runs
Visual Studio Code: A highly customizable and
on a host OS.
feature-rich code editor developed by Microsoft.
∙ Containers are lightweight and faster as they
It supports a wide range of programming
prove to be ready for computation under languages and offers a vibrant extension
seconds.
ecosystem.

NOTES
23 | SRMIST DDE MCA Self Instructional Material
Eclipse: An open source IDE primarily used for Java development but
extensible to support other languages through plugins.

NetBeans: An IDE that supports multiple programming languages,


including Java, PHP, and HTML5.

2.5.2 Version Control Systems:

Git: The most widely used distributed version control system. Git is the
foundation of platforms like GitHub, GitLab, and Bitbucket.

Mercurial: A distributed version control system designed for simplicity


and ease of use.

Subversion (SVN): A centralized version control system that tracks


changes to files and directories over time.

2.5.3 Build and Automation Tools:

Apache Maven: A build automation tool used primarily for Java


projects. It manages dependencies, compiles code, and generates project
reports.

Gradle: A versatile build automation tool that supports multiple


languages and platforms. It uses a Groovy-based DSL for build configuration.

Make: A classic build automation tool commonly used in Unix-like


systems to manage the build process.

Continuous Integration and Continuous Deployment (CI/CD):

Jenkins: An automation server that facilitates building, testing, and


deploying code. It supports a wide range of plugins for various tasks.

Travis CI: A cloud-based CI/CD platform that automates the testing


and deployment of code.

24 SRMIST DDE MCA Self Instructional Material


CircleCI: A CI/CD platform that integrates Emacs: A highly customizable text editor with a
seamlessly with popular version control systems rich ecosystem of extensions for various
and cloud providers. programming languages and tasks.

2.5.4 Package Managers: 2.5.6 Testing Frameworks:

npm (Node Package Manager): A package JUnit: A widely used testing framework for Java
manager for JavaScript and Node.js. It allows applications.

developers to manage project dependencies and


Selenium: A web application testing framework
share code modules.
that supports automated testing of web
applications across different browsers.
Composer: A dependency manager for PHP that
simplifies the process of including third-party
2.5.7 Bug Tracking and Project Management:
libraries in projects.
Bugzilla: An open source bug tracking system
pip: The package installer for Python, which
that helps teams manage and track software
makes it easy to install and manage Python
defects.
packages.
Redmine: A flexible project management and
2.5.5 Text Editors and Code Editors:
issue tracking web application that supports
multiple projects and plugins.
Vim: A highly configurable, text-based code
editor known for its efficiency and extensibility. NOTES
25 | SRMIST DDE MCA Self Instructional Material
2.5.8 Documentation Generators:

Sphinx: A tool for generating documentation for Python projects. It


supports multiple output formats, including HTML and PDF.

Doxygen: A documentation generator primarily used for C++, C, and


other programming languages.

2.5.9 Containerization and Orchestration:

Docker: A platform for developing, shipping, and running applications


in containers.

Kubernetes: An open source container orchestration platform for


automating the deployment, scaling, and management of containerized
applications.

These open source development tools empower developers to build,


test, and maintain software efficiently while benefiting from the collaborative
nature of open source communities.

2.6 IDEs and Debuggers

Open source integrated development environments (IDEs) are software


applications that provide a complete development environment for
programmers and developers. These open source IDEs are freely
available for users to download, use, modify, and distribute under open
source licenses.

Some popular IDE are:

2.6.1 Visual Studio Code (VS Code):

Visual Studio Code is a lightweight but powerful source code editor


which runs on your desktop and is available for Windows, macOS and
Linux. It comes with built-in support for JavaScript, TypeScript and

26 SRMIST DDE MCA Self Instructional Material


Node.js and has a rich ecosystem of extensions for other languages and runtimes (such as C++,
C#, Java, Python, PHP, Go, .NET). foundation for the Eclipse IDE is composed of
plug-ins and is designed to be extensible using
Language Support: Extensible support for a wide additional plug-ins. Developed using Java, the
range of programming languages. Eclipse platform can be used to develop rich
client applications, integrated development
Features: Highly customizable, code debugging,
environments and other tools. Eclipse can be
integrated terminal, Git integration, and a rich
used as an IDE for any programming language
extension ecosystem.
for which a plug-in is available.

Description: Visual Studio Code is one of the


Language Support: Primarily used for Java
most popular and versatile open source code
development, but supports other languages
editors available. It's known for its speed, ease
through plugins.
of use, and extensive library of extensions,
making it suitable for a variety of development Features: Rich plugin ecosystem, integrated
tasks. development tools, and support for multiple
project types.
2.6.2 Eclipse:
Description: Eclipse is a robust and extensible
Eclipse is an integrated development
IDE that has a long history in the software
environment (IDE) for developing applications
development community. It's commonly used
using the Java programming language and other
for Java development but can be adapted for
programming languages such as C/C++, Python,
other languages as well.
PERL, Ruby etc.
NOTES
The Eclipse platform which provides the
27 | SRMIST DDE MCA Self Instructional Material
2.6.3 NetBeans:

NetBeans is a popular and widely-used IDE for developing Java applications -


favored by millions of developers around the world.
The NetBeans IDE is free, open source, cross-platform, feature-rich, easy to
use and as powerful as Eclipse IDE. It is widely used in schools, universities,
enterprises and large organizations like NASA and NATO, with a vibrant
community.

Besides Java, NetBeans also supports development for other languages


like PHP, C/C++, HTML5, Javascript… with different bundles for
different languages. Therefore, you can use NetBeans for full-stack
development, as stated in its tagline: “Quickly and easily develop
desktop, mobile and web applications with Java, JavaScript, HTML5,
PHP, C/C++ and more.”

Language Support: Supports multiple languages, including Java, PHP,


and HTML5.

Features: Code templates, project management, smart code editing, and


an intuitive user interface.

Description: NetBeans is an open source IDE with a focus on


developer productivity. It provides a range of features to streamline the
development process.

2.6.4 IntelliJ IDEA Community Edition:

IntelliJ is one of the most powerful and popular Integrated


Development Environments (IDE) for Java. It is developed and
maintained by JetBrains and available as community and ultimate
edition. This feature rich IDE enables rapid development and helps in
improving code quality.

Features:

28 SRMIST DDE MCA Self Instructional Material


∙ Integration with useful tools like compiler, powerful features for Java developers. There is
also an Ultimate Edition with additional features
debugger, version control system, build tools,
available for purchase.
various frameworks, application profilers and so
on.
2.6.5 Code::Blocks:
∙ Supports code navigation, code completion,
code refactoring and code generation features Language Support: C, C++, and Fortran.

which boosts development process. ∙ Supports Features: Cross-platform support, multiple


unit testing, integration testing and code compiler support, and customizable interface.
coverage via plug-ins.
Description: Code::Blocks is an open source IDE
∙ Provides rich set of plug-ins to enhance IDE
suitable for C, C++, and Fortran development. It

functionality further. Language Support: offers a simple and user-friendly interface.

Primarily designed for Java development. 2.6.6 Geany:

Language Support: Supports various


Features: Code analysis, intelligent code
programming languages.
completion, version control integration, and a
variety of productivity tools. Features: Lightweight, customizable, built-in
terminal, and support for plugins.
Description: The Community Edition of IntelliJ
IDEA is an open source IDE that offers NOTES
29 | SRMIST DDE MCA Self Instructional Material
Description: Geany is a lightweight and fast open source IDE that is
well-suited for general-purpose programming tasks.

2.6.7 PyCharm Community Edition:

PyCharm is the most popular IDE used for Python scripting language. This
chapter will give you an introduction to PyCharm and explains its features.

PyCharm offers some of the best features to its users and developers in the
following aspects −

∙ Code completion and inspection

∙ Advanced debugging

∙ Support for web programming and frameworks such as Django and


Flask

Features of PyCharm

Besides, a developer will find PyCharm comfortable to work with because of


the features mentioned below −

Code Completion

PyCharm enables smoother code completion whether it is for built in or for an


external package.

SQLAlchemy as Debugger

You can set a breakpoint, pause in the debugger and can see the SQL
representation of the user expression for SQL Language code.

Git Visualization in Editor

When coding in Python, queries are normal for a developer. You can check
the last commit easily in PyCharm as it has the blue sections that can define
the difference between the last commit and the current one.
30 SRMIST DDE MCA Self Instructional Material
Code Coverage in Editor more files at a time and PyCharm includes
various shortcuts for a smooth refactoring
You can run .py files outside PyCharm Editor as process.
well marking it as code coverage details
elsewhere in the project tree, in the summary
section etc.
Language Support: Primarily designed for
Python development.
Package Management

Features: Python-specific tools, code completion,


All the installed packages are displayed with
debugging, and support for web development.
proper visual representation. This includes list
of installed packages and the ability to search
Description: The Community Edition of
and add new packages.
PyCharm is a free and open source IDE tailored
for Python developers. The Professional Edition
Local History
with more advanced features is available for
Local History is always keeping track of the purchase
changes in a way that complements like Git.
2.6.2 Debuggers
Local history in PyCharm gives complete details
of what is needed to rollback and what is to be 2.6.2.1 Testsigma : Testsigma is a leading open-
added. source test automation platform with a unified,
fully customizable platform that works out of the
Refactoring
box.

Refactoring is the process of renaming one or NOTES


31 | SRMIST DDE MCA Self Instructional Material
It allows you to build end-to-end tests 5X faster for web, mobile apps, & APIs
with English scripts that self-heal, enabling maintenance-free testing.

o A codeless test automation approach makes it easier for an individual to


create quality programs.
o The NLP-based approach helps you to create and maintain test cases
especially needed for fast-paced continuous testing.
o Auto-heals failing test cases with Testsigma’s engine finding a probable
solution/fix to an issue
o Customize your test attributes as per the need and gather only the details
which are required.
o An open-source unified platform for Android, iOS apps, websites etc. o
Offers end-to-end automation including UI, API, DB etc. o Enterprise-level
capabilities and data management efficiency, not just restricted to excel
sheets.

2.6.2.2Airbrake

Airbrake is a bug-reporting solution which is ideally suited for small and


midsize business requirements. It is primarily cloud-based, and a developer
centric tool that can be integrated with the applications as well.

One of the reasons to choose Airbrake is that it can be installed in a matter of


few minutes in multiple languages such as JAVA, Python, Ruby etc. It enables
a simple error-monitoring system that makes it very easy to spot all project
issues and errors. There are flexible usage-based pricing with Monthly or
Yearly plans based on your requirements.

o Real-time error alerts. You can discover errors right down to the lines of
code.
o Easy installation.
o Low maintenance.

2.6.2.3 Chrome DevTools

32 SRMIST DDE MCA Self Instructional Material


Being the number one web browser, Google Chrome is the 1st choice for any user. Chrome
DevTools, are debugging tools built right into o It offers tools for database development,
the browser. With these tools, you can edit administration, and SQL query tools. With
pages and debug the problems quickly in dbForge, you can easily access and hunt for data
minimal time, which in turn helps you work and in multiple databases.
deploy better websites faster. o A terrific built-in debugger of stored
procedures and triggers. o Quickly create a
o Gives you powerful tools for inspecting and database schema
editing your code. o Allows you to measure the
o Trace, recreate, and troubleshoot problems in
performance of your pages with the help of MySQL
performance panels.
o Analyze and review how your pages perform 2.6.2.5 ReSharper

on different browsers and devices.


ReSharper is a Microsoft Visual Studio
productivity plugin for developers. The majority
2.6.2.4 dbForge SQL Tools
of what can be automated in your coding
dbForge SQL tools offer a comprehensive toolkit procedures is automated by it. As you type, it
to the users with different features which looks for compiler problems, runtime errors,
include – redundancies, and code, and suggests intelligent
fixes.
o Version controlling of databases with
comprehensive scripts o Record database It provides continuous code quality analysis and
commits detects errors and problems, before you even
o Improve the efficiency and productivity of compile, it right in the code editor.
SQL coding twice o Speed tasks with continuous NOTES
integration
33 | SRMIST DDE MCA Self Instructional Material
ReSharper provides continuous code quality analysis, and detects errors and
problems, before you even compile, right in the code editor.

A separate pricing model exists for individual customers and for


organizations. There are quite a bit offers and discounts as well for startups,
educational organizations etc.

o Symbol Completion & Smart Completion


o Smartly distinguish aspects in code via syntax highlighting.
o Support for different code templates

2.6.2.6 Memfault

Memfault if a cloud-based platform that helps to streamline software


development allowing a user to monitor their devices, debug etc. Companies
build IoT products across different industries, such as smart homes, industrial
automation, healthcare, etc.

Memfault is modular and can work with Android or any real-time operating
system, allowing you to scale the devices and build better and smarter IoT
devices.

o More scalable and sustainable strategy to transform your device o


Resolve all the issues on the cloud even before it affects the end-user

2.6.2.7 GDB

For UNIX systems and several programming languages, including C and C++,
GDB, or GNU Project Debugger is an open-source debugging tool. It has a
command line interface where the developer can perform various tasks, call
functions independently and monitor different internal variables, also allowing
you to debug remotely.

2.6.2.8 Progress Telerik Fiddler

34 SRMIST DDE MCA Self Instructional Material


Progress Telerik Fiddler is all about the straightforward debugging and troubleshooting
approach. With Fiddler, the user’s pain points areo Get real-time feedback and detect common
addressed and resolved effectively in the longer mistakes.
run. By collecting the network traffic between o Can be easily integrated with the existing IDE

the internet and test systems, this tool can aid in


workflow. 2.6.9.10 IBM Rational Software
the debugging of online applications. To track
requests and responses, you may easily keep an Analyzer
eye on both incoming and outgoing data.
A rational software analyzer is a software
o It gives you visibility into cookies, headers & debugging tool that can help you identify bugs
cache
and issues early on in the software development
o Easy interface to debug APIs
cycle.

2.6.2.9 SonarLint
The IBM Rational Software Analyzer also
SonarLint is an IDE extension that makes sure provides seamless integrations with third-party
that your coding is error free and of the highest tools.
calibre possible. From the moment you begin
o Higher focus on coding and product
coding, it helps in identifying bugs and development
correcting defects and security-related problems.
o Useful when the investment on QA is high
The flaws are displayed similarly to a spell
o Allows you to do the fixings early on in the
checker so they can be rectified before the code SDC
commits. SonarQube is a different tool, however,
SonarLint is favoured since it provides 2.7 PROGRAMMING LANGUAGES

immediate feedback.
20. Erlang
NOTES
35 | SRMIST DDE MCA Self Instructional Material
One of the latest programming languages to be introduced to the world of
software engineering is Erlang. Already gaining traction in the computer
software market, Erlang is designed for general-purpose programming with
run-time, distributive, and hot-swapping features.

19. Elixir

Another runoff language program built on the core design principles of Erlang
is Elixir. Elixir has high-impact capabilities that use the same run-time
features (BEAM) like Erlang. It supports advanced functions like
polymorphism, macros, and metaprogramming.

18. Haskell

Haskell is a relatively new entrant, but it is worthy of its place on our list due
to its increasing popularity among software developers. Named after Haskell
Curry, its original developer, this language program is based on Miranda’s
lazy approach functionality. Haskell started gaining wide recognition after
Facebook built its anti-spam mechanism with it.

17 Perl

Perl used to be one of the most popular language programs in the past but fell
behind the competition in later years; however, it has still remained relevant
against all the odds. Originally intended for general-purpose programming for
text manipulation, users gradually implemented it for web and network
development in systems.

16. Scala

Thanks to the innovative features of Scala for both functional and objective
programming, Scala reduces system bugs during system designs and
development. Not as popular as the Pythons and Java’s of the software world,
but Scala is still holding its place among the list of top language programs in
use today.

15. Kotlin

36 SRMIST DDE MCA Self Instructional Material


Regarded by many as a perfect substitute to Java,Kotlin has enjoyed quite a following since it was
released to the public. Designed by JetBrains, it 12. Ruby
uses a similar paradigm like Java, which is the
Ruby was created by a Japanese named Yukihiro
Java Virtual Machine (JVM). It can also be
Matsumoto and released in 1995. The developer
translated to Java Code.
created a mix of some of his favorite languages
for users to enjoy. RUBY is very easy to use and
14. Rust
is also quite efficient due to its adaptability.
Designed as a general-purpose language for Since its release, it has remained relevant in
developing system applications, Rust is a software engineering and is still highly sought
language sponsored by Mozilla and is one after because developers can modify the program
program open-source developers have come to with ease to suit their needs.
rely on to solve system safety defects. Some
prominent users of Rust include Azure, Firefox, 11. R Programming Language
Tor.S, Microsoft, and Holochain.
Another program to make our list of language
programs for Open-source languages is R. This
13. SQL
language program is still ranked highly for its
SQL is one of the oldest Open-source language efficiency at analyzing large data and evolving
programs to make our list, and it is still widely ad hoc issues. R can also be used for mining
used today. Developers of traditional software projects too.
will find SQL feasible and can handle a lot of
data used by a significant portion of modern 10. C
applications. NOTES
37 | SRMIST DDE MCA Self Instructional Material
Developed in 1972 by Dennis Ritchie, it is still a wonder why this program
has remained popular even after all these years. In light of the numerous open
source programs being released on a yearly basis, one would have thought that
C would have lost relevance, but this is not the case. C was initially designed
as a general-purpose language for computer programs and hardware. Over the
years, however, it has become a root program for several popular languages
known to man today. Some languages that have their root in C include PHP,
Java, and JavaScript.

9. TypeScript

Another open-source language widely used by developers is TypeScript. This


language program was developed and is maintained by Microsoft. TypeScript
is also one of the fastest-growing languages today as many are beginning to
turn to the language to write or modify their codes. When compared to
JavaScript, it has a similar semantic and syntax, but the difference is that
TypeScript is packed with very strong features for large-scale apps. Included
in the language program is the Visual Studio Code (a free code editor by
Microsoft). While some developers may not rate TypeScript too highly for
enterprise-based projects, it ranks high for open-source software development.

8. Swift

No list will be complete without Apple’s Swift for iOS-based Open-source


projects. Swift offers convenience when developing advanced open-source
applications and is specially designed for iOS applications. Although Swift is
relatively new, its popularity is showing no signs of waning any time soon.

7. Shell

Not many may know about Shell if they have never worked on Open source
projects or rarely do, but this language program is very popular among IT
companies. Shell is a highly resourceful language that allows the developer to
directly write codes that dictate to the computer system what to do. Some
actions Shell can be used for include files copying, data backup, installing, and
uninstalling programs directly or remotely.

38 SRMIST DDE MCA Self Instructional Material

NOTES 6. C++ Dating as far back as 1979, C++ was created by Bjarne Stroustrup for his Ph.D.
thesis. This language program was designed using C as a background program. With C being
an open-source program, he simply added new features to create C++. Some programs that use
C++ today include computer games, web browsers, and operating systems.

5. C#

Pronounced as C-Sharp, C# was developed by a team headed by Anders


Hejlsberg for Microsoft. With marked similarities to Java, C# is used in
enterprise software, games, and general mobile applications.

4. PHP

This open-source program is meant for the creation of interactive web pages
and for general web development. Large concerns like Yahoo and Facebook
also use it to operate their databases. Originally called Hypertext Preprocessor,
PHP is not without its critics, but it still remains relevant and widely used by
both freelance developers and large corporations.

3. Java

There was no way Java wasn’t going to make the top ten list since it is one of
the most popular language programs in the world today. Now owned by
Oracle, Java was initially developed in 1995 by Sun Microsystems. Today, it
is used by some of the largest companies you can think of like Netflix and
Twitter, to mention a few. In fact, Java has become a standard language
program for large organizations that work with big platforms that process a lot
of data. With Java, you can create database software, web applications, and
mobile applications. Another thing that makes Java a dynamic program is
down to the fact that you can switch from C# to C++ languages at any time
since it was developed using C as its root program.

2. Python

39 | SRMIST DDE MCA Self Instructional Material


Regarded as one of the most popular language programs in the world, you may
never find a list without Python on it. Python has a very large developer
community where developers exchange codes and ideas. It is also the number
one programming language for data science and artificial intelligence
applications. According to analysts, one of the reasons behind its continued
relevance is that it is very easy to use and highly adaptive.

1. JavaScript

The number one programming language on our list for open-source projects is
JavaScript. Javascript is used to build web pages and ensures that websites are
highly interactive. It is flexible but yet powerful for improving the interaction
between single or multiple users. That is not to say that JavaScript is only used
for websites. Developers also use it to build games too.

2.8 LAMP

2.8.1 What is a LAMP stack?

A LAMP stack is a bundle of four different software technologies that


developers use to build websites and web applications. LAMP is an acronym
for the operating system, Linux; the web server, Apache; the database server,
MySQL; and the programming language, PHP. All four of these technologies
are open source, which means they are community maintained and freely
available for anyone to use. Developers use LAMP stacks to create, host, and
maintain web content. It is a popular solution that powers many of the
websites you commonly use today.

2.8.2 Why is a LAMP stack important?

Web developers choose a LAMP stack to build web applications for the
following reasons.

Cost

All LAMP technologies are open source, which means that any developer or
company can use them without having to pay licensing fees. Instead of
purchasing proprietary stack components, you can download the operating

40 SRMIST DDE MCA Self Instructional Material


system, web server, database, and scripting Setting up a new web development stack requires
language for free. This lowers the cost of rigorous testing of different frameworks,
building web applications. modules, libraries, and tools. On the other hand,
a LAMP stack is a tried-and-tested web
Efficiency
development solution. Web developers can
prioritize and speed up application development Flexibility
to focus on what they are building instead of A LAMP stack gives both reliability and
how they are building it. flexibility to web developers. While the LAMP
architecture specifies the software components
Maintenance
for each layer, developers can replace them as
Software experts from around the globe
they see fit. For example, they can use another
contribute to the development of LAMP stack
operating system besides Linux as the stack
technologies by changing, commenting on, and
foundation.
reviewing the publicly available source codes.
They regularly maintain and update the 2.8.3 What is a LAMP stack used for?

technologies so that they remain relevant and A LAMP stack is used for backend or server-side
secure. development. A backend application is software
that runs in an environment that’s hidden from
Support
end users. Backend applications consist of the
Popular open-source technologies, such as following:
LAMP stacks, have the support of a large,
global IT community. Hence, LAMP stack users ∙ Data processing software
can more easily find information on public IT
∙ Database components
forums. Web developers can refer to example
codes or use tested plugins created by the open- NOTES
source community.
41 | SRMIST DDE MCA Self Instructional Material
∙ Business logic in code

∙ API for communicating with other applications

The webpage that shows up on your browser is called the frontend application.
When you interact with the page, such as by clicking on a button, your
browser communicates with the backend application to retrieve the required
information.

Developers use a LAMP stack to create both static and dynamic web content.

Static webpages

Static webpage information from the web server is the same for all users. For
example, the address on a company's website is static content. Web developers
create static webpages with HTML and CSS programming languages and store
them as files in the web server application.

Dynamic webpages

Dynamic webpages contain information that changes depending on the user


viewing the webpage or web application. For example, a website message that
changes based on your location is dynamic content. The web server delivers
dynamic websites by processing business logic or retrieving data from a
database.

2.8.4 What is the LAMP architecture?

A software stack is a set of layered tools, libraries, programming languages,


and technologies used for building, managing, and running an application. The
stack consists of software components that support the application in different
ways, such as visual presentation, database, networking, and security.

Similarly, the LAMP architecture consists of four software technologies that


work together behind the scenes to create a working web application. It
describes how each of these web development technologies interact with each

42 SRMIST DDE MCA Self Instructional Material


other in a computer server. The LAMP architecture consists of the following layers.
Linux MySQL is an open-source relational database

Linux is an open-source operating system that management system and is the third layer of the

you can install and configure to meet different LAMP stack. The LAMP model uses MySQL

application requirements. Linux sits at the first for storing, managing, and querying information

level of the LAMP stack and supports other in relational databases. For example, developers

components on the upper layers. store application data, such as customer records,
sales, and inventories. When a user searches for
Apache information, the web server queries the stored
Apache is an open-source web server that forms data in MySQL. Query refers to special
the second layer of the LAMP stack. The instructions for manipulating data in a relational
Apache module stores website files and database with the SQL language.
exchanges information with a browser using
PHP
HTTP, an internet protocol for transferring
website information in plain text. For example, PHP, which stands for PHP: Hypertext
when a browser requests a webpage, the Apache Preprocessor, is the fourth and final layer of the
HTTP server does the following: LAMP stack. It is a scripting language that
allows websites to run dynamic processes. A
1. Receives the request dynamic process involves information in

2. Processes the request and finds the required software that constantly changes. Web
page file developers embed the PHP programming
3. Sends the relevant information back to the language in HTML to show real-time or updated
browser information on websites. They use PHP

MySQL NOTES
43 | SRMIST DDE MCA Self Instructional Material
to allow the web server, database, and operating system to cohesively process
requests from browsers.

PHP started out as a small open source project that evolved as more and more
people found out how useful it was. Rasmus Lerdorf unleashed the first
version of PHP way back in 1994.

∙ PHP is a recursive acronym for "PHP: Hypertext Preprocessor". ∙ PHP is


a server side scripting language that is embedded in HTML. It is used to
manage dynamic content, databases, session tracking, even build entire
e-commerce sites.

∙ It is integrated with a number of popular databases, including MySQL,

PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server. ∙ PHP


is pleasingly zippy in its execution, especially when compiled as
an Apache module on the Unix side. The MySQL server, once started,
executes even very complex queries with huge result sets in record
setting time.

∙ PHP supports a large number of major protocols such as POP3, IMAP,


and LDAP. PHP4 added support for Java and distributed object
architectures (COM and CORBA), making n-tier development a
possibility for the first time.

∙ PHP is forgiving: PHP language tries to be as forgiving as possible. ∙


PHP Syntax is C-Like.

2.9 OPEN SOURCE DATABASE TECHNOLOGIES

2.9.1 Introduction

A database is backend storage for an application — like, for instance, a web


app (which is the primary app type we’ll reference throughout this piece). The
database itself will sit on your server, alongside the other backend elements
such as the core files of your site, any media you use, and the server
configuration files.

2.9.2 List of Popular Open Source Database technologies


44 SRMIST DDE MCA Self Instructional Material
2.9.2.1. MySQL: 2.9.2.3 SQLite:

Description: MySQL is one of the most well- Description: SQLite is a self-contained,


known open source relational database serverless, and zero-configuration SQL database
management systems (RDBMS). It is known for engine. It is widely used in embedded systems,
its speed, reliability, and ease of use. MySQL is mobile applications, and as a local storage
used in a wide range of applications, from simple solution due to its lightweight nature.
websites to complex data-driven applications.
License: Public Domain.
License: Dual-licensing model (GNU GPL or
commercial). 2.9.2.4 MongoDB:

2.9.2.2 PostgreSQL: Description: MongoDB is an open source


NoSQL database that uses a flexible document-
Description: PostgreSQL is a powerful open
based data model (JSON-like documents). It is
source RDBMS known for its extensibility,
known for its scalability, high performance, and
support for advanced data types, and robust
ability to handle unstructured or semi structured
features for data integrity and reliability. It is
data.
often the choice for complex and data-intensive
applications. License: Server Side Public License (SSPL).

License: PostgreSQL License (similar to the 2.9.2.5 Cassandra:


MIT License).
NOTES
45 | SRMIST DDE MCA Self Instructional Material
Description: Apache Cassandra is a highly scalable and distributed NoSQL
database designed for handling large volumes of data across multiple
commodity servers and data centers. It is suitable for real-time data analysis
and high availability.

License: Apache License 2.0.

2.9.2.6 Redis:

Description: Redis is an open source, in-memory data store often used as a


caching mechanism or as a message broker. It is known for its high
performance and support for various data structures.

License: BSD 3-Clause.

2.9.2.7 Elasticsearch:

Description: Elasticsearch is an open source, distributed search and analytics


engine. It is widely used for full-text search, log and event data analysis, and
other search-intensive applications.

License: Server Side Public License (SSPL).

2.9.2.8 MariaDB:

Description: MariaDB is a fork of MySQL developed by the original creators


of MySQL. It is fully compatible with MySQL and offers additional features
and improvements.

License: GNU GPL 2.0.

2.9.2.9 Neo4j:

Description: Neo4j is an open source graph database that specializes in storing


and querying graph data. It is widely used for applications involving complex
relationships and network data.

License: GNU GPL 3.0.


46 SRMIST DDE MCA Self Instructional Material
NOTES 2.9.2.10 InfluxDB:

Description: InfluxDB is an open source time-series database designed for


handling high volumes of time-stamped data. It is commonly used in
monitoring, IoT, and real-time analytics.

License: MIT License.

2.10 CASE STUDIES AND EXAMPLE PROJECTS

2.10.1 Present a case study of the development and maintenance of a major


OSS project, the Apache server.
2.10.2 Consider a case study of an open source project to illustrate the
principles and challenges of open source development. Ex: Mozilla Firefox.

References

[1] https://www.freecodecamp.org/

[2] https://www.javatpoint.com/

[3] https://www.geeksforgeeks.org

[4] https://www.simform.com/blog/containerization-technology/

47 | SRMIST DDE MCA Self Instructional Material


MCAD 2233- Open Source Technologies

Unit-3 ANGULAR JS

STRUCTURE

3.1 Introduction and Agenda,

Prerequisites 3.2 What are SPA’s

3.3 Introduction to AngularJS

3.4 Features of AngularJS

3.5 MVC Architecture

3.6 Versions and Transitions

3.7 Environmental Setup

3.8 AngularJS IDE

3.9 Introduction to VS Code


48 SRMIST DDE MCA Self Instructional Material
3.10 Angular App Fundamentals 3.1 INTRODUCTION, AGENDA AND

3.11 Simple Angular App PREREQUISITES 3.1 INTRODUCTION

3.12 Companies using Angular App, AngularJs is a JavaScript-based front-end


Advantages.
development framework, which is used to build
single-page applications in HTML, JavaScript,
and a superset of JavaScript called Typescript.
Compared to other JavaScript frameworks,
Angular provides various features like HTTP
service, materials, and animations which help the
developer to create large applications and save
time writing lengthy codes.

3.2 PREREQUISITES

▪ Knowledge of HTML, CSS, and JavaScript

▪ JavaScript functions, error handling, and


events
▪ Knowledge of Node JS and Node Package
▪ Basic knowledge of the Document Object
Manager(npm) ▪ Angular CLI
Model(DOM) ▪ Model-View-Controller(MVC)
NOTES
concepts
49 | SRMIST DDE MCA Self Instructional Material

▪ Libraries such as Rx and JS

▪ Error handling

System Requirements

▪ Windows 10 or similar Operating System

▪ At least 10GB of free storage space

▪ Minimum 4GB of RAM

▪ An editor like VSCode to write ad edit your codes

▪ Node JS version 8 or 10, pre-installed in your system.

You can check the Node.js version using the node -v


command

3.2 What are SPA’s ?

A Single Page Application (SPA) is a single web page, website, or web


application that works within a web browser and loads just a single
document. It does not need page reloading during its usage, and most
of its content remains the same while only some of it needs updating.
When the content needs to be updated, the SPA does it through
JavaScript APIs.

This way, users can view a website without loading the entire new
page and data from the server. As a result, performance increases, and
you feel like using a native application. It offers a more dynamic web
experience to the users. SPAs help users be in a single, uncomplicated
web space in easy, workable, and simple ways.

3.2.1 Examples of SPAs

Gmail, Facebook, Trello, Google Maps, etc., all are Single Page
Applications that offer an outstanding user experience in the browser
with no page reloading.
For instance, when you open your Gmail account, you can see nothing
changes much during navigation. Its header and sidebar are the same in
50 SRMIST DDE MCA Self Instructional Material
the inbox, and when a new email arrives, it Using a SPA, the server sends the HTML
reflects the change quickly by loading its document only for the first request, and for
content via JavaScript. subsequent requests, it sends JSON data. This
means a SPA will rewrite the current page’s
3.2.2 How SPA works? content and not reload the whole web page.
Hence, no need to wait extra for reloading and
The architecture of Single page applications is
faster performance. This capability makes a
simple. It involves client-side and server-side
SPA behave like a native application.
rendering technologies.
A Single Page Application is different from
multi-page applications (MPAs). The latter are
web apps with multiple pages reloaded when a
user requests new data.

Furthermore, SPAs can take a while to load at


Suppose you want to visit a specific web page. first but offer faster performance and smooth
When you enter its address to request access navigation after loading. MPAs can be
from your browser, the browser sends this comparatively slow and needs top-class internet,
request to a server and comes with an HTML especially with graphical elements. Examples of
document in return. MPAs can be Amazon and Google Docs.

NOTES
51 | SRMIST DDE MCA Self Instructional Material
3.2.3 Advantages of SPA

Most resources, like HTML, JavaScript, and CSS that SPA


needs, are loaded initially and don’t require reloading when in use.
Only data transmission can change, which makes it highly responsive.
Let’s find out what all benefits SPAs offer.

Better speed

Web applications must offer faster speed and not waste users’ time;
otherwise, users can find other efficient venues. SPAs provide shorter
response times as the entire page doesn’t have to reload and only the
data changes in the requested content parts. Thus, the web app’s speed
improves considerably.

Enhanced user experience

Better user experience is vital for the success of an application. Many


reports suggest that users leave web pages that are slower and not easy
to use. But with SPAs, users don’t have to wait again to reload the full
content only to gain a portion of it. Instead, they can gain the requested
information faster, which improves their experience using a SPA.

Efficient caching

A Single Page App can cache data efficiently as it sends a request to a


server for one time only and then updates the other data. This way, it
can use this data to function even when you are offline. If a user’s
connectivity breaks, it can synchronize the local data with the server
when the connection is established.

Simplified development

Developing a SPA is easier as the developers don’t need to spend more


time writing code and rendering the web pages on a server. Instead,
they can reuse the server-side code and decouple the SPA from the

52 SRMIST DDE MCA Self Instructional Material


frontend user interface. It implies that frontend and backend teams can concentrate on their jobs
without worries. Easy to Debug

But how? Debugging an application is vital to ensure


nothing can stop it from performing optimally
The frontend development becomes effortless in by detecting and removing bugs and errors that
SPAs due to their decoupled architecture, where can slow down its performance.
frontend display separates from backend
services. As a business’s critical backend Single Page Applications are easy to debug with
functionalities don’t change much, your Google Chrome as they are built using popular
customers can have a consistent experience using frameworks like React, Angular, Vue.js, etc.
your application, registering by filling a form, You can easily monitor and investigate page
etc. You can keep the same content as well, but elements, data, and network operations.
change how it looks.
In addition, debugging in SPA is easier than
When the backend logic and data decouples from MPAs because SPAs have their own developer
how it is presented, you turn the app into tools for Chrome. Developers can examine the
service, enabling the developers to create JS code rendering from the browser and debug
multiple frontend ways and show that service. It SPAs instead of going through hundreds and
also lets developers build, experiment, and thousands of lines of code. The Chrome
deploy the frontend without worrying about the debugging tools also view page elements, data
backend technology. requests from the server, and data caching.

NOTES
53 | SRMIST DDE MCA Self Instructional Material
Less resource consumption
Single Page Apps consume less bandwidth as they load the pages just
once. They also work in areas with a slower internet connection, hence,
convenient to use for everyone. Besides, they work offline, saving your
data, so you don’t have to supply them with consistent internet to
access and work on them, unlike MPAs like Google Docs.
Cross-platform compatibility

Developers can build applications that can run on any operating


system, device, and browser easily using a single codebase. Hence, it
adds to customer experience as well because they can use the SPA
anywhere they want. In addition, developers can also build feature-rich
apps quite effortlessly. For instance, they can include real
time analytics while developing a content editing

application. 3.2.3 Disadvantages of SPAs

Poor SEO performance

The SPAs architecture involves just a single page with a single URL. It
limits the SPAs’ ability to benefit from search engine optimization
(SEO). SEO techniques help improve your site’s ranking in the search
engine results, as there’s high competition out there.

As there is just a single URL with no changes or exceptional addresses,


optimizing it for SEO is tricky. It lacks indexation, good analytics,
unique links, metadata, etc. Such pages get tough luck to be scanned
by the search bots, so optimization becomes difficult.

Online threats

SPAs are more vulnerable to online threats such as cross-site scripting


(XSS) than MPAs. Attackers can utilize XSS to inject client-side
scripts into a web app and compromise it. In addition, access control is
not tight at the operational level. It can expose sensitive data and
functions if the developers don’t take precautions.
54 SRMIST DDE MCA Self Instructional Material
Initial load times Although SPAs are praised for showcasing great
performance and speed, it takes a while to load tool for the majority of Front-end web
the complete site. It may irritate some users who developers. Also, since we are talking about
may not open the app again. Angular.js, it needs to be noted that it is
different from Angular.
3.3 INTRODUCTION TO ANGULAR JS
3.3.2 History of Angular JS

3.3.1 What is AngularJs? The birth year of AngularJS was 2010. It was

AngularJS is a JavaScript framework used in originally developed by Miško Hevery at Brat

developing single-page web applications.It is Tech LLC. The framework was created as the

considered to be a preferred framework because software behind an online JSON storage service
it can be easily added to HTML pages with for easy-to-make applications for the enterprise.

simply a <script> tag. The creation of AngularJS actually started in the

It is also known for one of its exclusive features, year 2009, when Miško Hevery was working on
i.e. Angular.js converts the static HTML to a part-time project to simplify the web

dynamic HTML and also offers dynamic development process. He created the AngularJS

binding.It has consistently evolved and is framework so that there can be a static web

currently known for offering much more server that will help in building simple web

advanced ways to develop better web applications. Now, Adam Abrons, who was

applications. Miško Hevery’s friend, was also working on this


project. He named it Angular because it uses
Angular.js is an open-source front-end
HTML and HTML consists of angular brackets.
framework which is why it is also a preferred
NOTES
55 | SRMIST DDE MCA Self Instructional Material
Angular 1

AngularJS, sometimes known as Angular1, is a JavaScript front-end


framework created by Google. In contrast, Angular is a TypeScript
based open-source front-end web application platform managed by
Google's Angular Team. Let us attempt to comprehend it more
thoroughly.
Angular 2

∙ In 2016, it was released.

∙ Angular 1 has been completely rewritten.

∙ The typescript was used exclusively.


Angular 4

∙ It was released in 2017

∙ Modifications to the core library

∙ Angular 4 is essentially the next edition of Angular 2, with the same


basic principle and inheritance from the previous version.
Angular 5

∙ It was released on 1st November 2017

∙ Build optimizer: This tool aids in the removal of unwanted code from
your program.

∙ Angular Universal State Transfer API and DOM Support — With this
functionality, we can simply transfer the application's state between the
server and client sides.
Angular 6

∙ In April of 2018, it was released.

∙ This release focuses less on the underlying framework and more on the
toolchain and enables future angular development easier.

∙ There are no significant changes.

Angular7

∙ It was released in October of 2018.


∙ This major release affects the entire platform, including the core
framework, Angular Material, and the command-line interface.

56 SRMIST DDE MCA Self Instructional Material


Angular 8 ∙ TypeScript 4.0

∙ InMarch/April of this year, the film will be ∙ Webpack 5 Support


released.
∙ Migration to ESLint
∙ It will make Angular developers' lives easier by
Angular 12
being smaller, faster, and easier to use.
∙ TypeScript 4.2
∙ TypeScript 3.2 is now supported.
Angular 9 ∙ Webpack 5.37 Support

∙ Migrating from legacy i18n message IDs


∙ The default compiler is IVY.
Angular 13
∙ ng-update is dependable service.
∙ TypeScript 4.4
∙ Updates to the API extractor
Angular 10 ∙ Webpack 5.37 Support

∙ View Engine is no longer available


∙ Language Service

∙ Compiler Update

∙ New default browser configuration


Angular 11 3.4 FEATURES OF ANGULAR JS
NOTES
57 | SRMIST DDE MCA Self Instructional Material
3.4.1 Why Angular?

Angular is one of the most popular JavaScript-based web development


frameworks and is used by many software engineers to create web
applications. According to the Stack-Overflow developers survey from
2017, more than 44% of web designers and developers use Angular for
creating user interfaces. But why is Angular so popular? Well, below
are some of the reasons why is it so:

▪ Angular apps are built using the TypeScript language, which


eliminates the errors while writing the codes and ensures high
performance and security.

▪ Provides two-way binding that provides a seamless


synchronization between the modes and the view. It updates
these components in real-time, in case the data is modified.

▪ The time investment in Angular for the projects is less as


compared to other web dev elopment frameworks. The Angular
CLI tool allows the developers to create initial projects,
perform testing, and integrate features in the same.

▪ The Angular view engine takes templates you’ve written and


compiles them into HTML and JavaScript files so that the
browser can read them.

▪ Reduce development time as Angular uses HTML to define the


User-interface of an application, which is less complex as
compared to JavaScript.

3.4.2 When should you use Angular JS?

SPAs come with a lot of benefits but also drawbacks, as you saw in the
previous section. So, it’s not wise to say that it’s entirely good or bad.
It depends upon your requirements and goals to create an application.

▪ If you want to build a website with smaller data volumes and a


dynamic platform, you can use single-page applications.
58 SRMIST DDE MCA Self Instructional Material
▪ It’s also fruitful if you plan to build a mobile 1. Avoid Tiresome Work: When creating a new
app, you may skip rewriting the code. You can
application in the future, you can use the
simply copy and paste the code into the new
backend API for both your site and mobile app.
project to create a real component in Angular.
▪ SPAs architecture is also suitable to build
Most of the code is written by AngularJS,
social networks (for instance, Facebook), closed saving the user time and effort.
communities, and SaaS platforms as they don’t
2. High Performance: A big number of variables
need much SEO.
can help the developer/designer improve the
▪ If you wish to offer a seamless user interaction agility of their program.
in your application, go for a SPA. Single Page 3. Compatibility: Apps built with a framework
Apps like Google Maps use this approach to like Angular perform well on Android, iOS, and
provide live changes when users move from one other major mobile platforms.
place to another. 4. Data Binding: The Model-View-Controller
▪ SPAs are also great if you want to offer live approach of engineering was used to create
AngularJS. The system ties the Model and the
updates on your application for purposes like
View together. Changes will cascade the
data streaming, real-time charts, notifications,
application structure's objects and vice versa.
alerts, etc.
5. Scope: Apart from Directives, AngularJS also
▪ Choose SPAs if you want to offer a native-
has Scope, a handy feature. Scopes are items
like, consistent, and dynamic user experience that draw attention to the model. They link the
across different operating systems, browsers, display layer and the controller layer together.
and devices.
NOTES

Features of Angular JS
59 | SRMIST DDE MCA Self Instructional Material
6. The AngularJS Router: This framework's router serves a specific
purpose. It ignores the location.hash, unlike other frameworks. The
router monitors and checks for the location.hash in those frameworks,
then runs the function after the route matches. In AngularJS, it serves
as a server-side router.
7. User Interface with HTML: AngularJS uses User Interface with HTML
to construct the user interface, which sets it apart from other
frameworks. Angular makes using and executing short labels a breeze.
It provides a very improved interface without adding additional
expenditures.
8. Directives: This is one of AngularJS's standout features and
distinguishes it from competing frameworks. Directives are qualities
that begin with the letter ng- before the action, they perform. Mandates
allowed developers and design teams to segment practices into the
Document Object Model (DOM), allowing software architects to
create dynamic HTML components.

3.5 MVC ARCHITECTURE

3.5.1 INTRODUCTION

MVC is an architectural pattern which means it rules the whole


architecture of the applications. Even though often it is known as
design pattern but we may be wrong if we refer it only as a design
pattern because design patterns are used to solve a specific technical
problem, whereas architecture pattern is used for solving architectural
problems, so it affects the entire architecture of our application.

The Model-View-Controller (MVC) is an architectural pattern


that separates an application into three main logical components: the
model, the view, and the controller. Each of these components are built
to handle specific development aspects of an application. MVC is one
of the most frequently used industry-standard web development
framework to create scalable and extensible projects.

60 SRMIST DDE MCA Self Instructional Material


3.5.2 MVC COMPONENTS
3.5.2.2 View

The View component is used for all the UI logic


of the application. For example, the Customer
view will include all the UI components such as
text boxes, dropdowns, etc. that the final user
interacts with.

3.5.2.3 Controller

3.5.2.1 Model Controllers act as an interface between Model


and View components to process all the
The Model component corresponds to all the
business logic and incoming requests,
data-related logic that the user works with. This
manipulate data using the Model component and
can represent either the data that is being
interact with the Views to render the final
transferred between the View and Controller
output. For example, the Customer controller
components or any other business logic-related
will handle all the interactions and inputs from
data. For example, a Customer object will
the Customer View and update the database
retrieve the customer information from the
using the Customer Model. The same controller
database, manipulate it and update it data back
will be used to view the Customer data.
to the database or use it to render data.
NOTES
61 | SRMIST DDE MCA Self Instructional Material
Responsibilities

Model:
1. It is the domain-specific representation of the data on which the
application works.
2. When a model changes its state, domain notifies its associated views
so they can refresh.

View:
1. Renders the model into a form suitable for interaction, typically a
user interface element. Multiple views can exist for a single model for
different purposes.
2. In web applications where the view is the HTML or XHTML
generated by the app.

Controller:
1. Receives input and initiates a response by making calls on model
objects.
2. In web applications, the controller receives GET or POST input and
decides its own action.

3.6 VERSIONS AND TRANSISTIONS

Angular version numbers indicate the level of changes that are


introduced by the release. This use of semantic versioning helps
you understand the potential impact of updating to a new
version. Angular version numbers have three parts:
major.minor.patch. For example, version 7.2.11 indicates major
version 7, minor version 2, and patch level 11.

The version number is incremented based on the level of


change included in the release.

Level of Change Details

Major Release Contains significant new features, some but


62 SRMIST DDE MCA Self Instructional Material

Patch Release Low risk, bug fix release. No dev


minimal developer assistance is expected
assistance is expected during upd
during the update. When updating to a
new major release, you might need to run
update scripts, refactor code, run
3.7 ENVIRONMENTAL SETUP
additional tests, and learn new APIs.
Step-1: Installing Angular CLI
Minor Release Contains new smaller features. Minor
You can install Angular CLI using the
releases are fully backward-compatible;
console/terminal window by entering the
no developer assistance is expected
following command:
during update, but you can optionally
Npm install
modify your applications -g @angular/cli
and libraries to
begin using new The
APIs, features,
angular CLI isand
used to create library codes,
capabilities that were added
projects, in the
and applications and perform various
release. We update peer
tasks dependencies in
like testing, bundling, and deploying the
minor versions byapplications.
expanding the verify the version of your
You can
supported versions, but we doCLI
Angular not with
require
the ng –version command.
projects to update these dependencies.
Step-2: Create a workspace
NOTES
63 | SRMIST DDE MCA Self Instructional Material
An angular workspace contains the files, codes, libraries, and projects.
To create a new workspace, type in the following statement in the CLI
command:
ng new my-app

This command ng new installs all the necessary packages, files, and
dependencies and creates a workspace by the name ‘my-app.’ In this
workspace, the following project files are created:

∙ Root folder names my-app

∙ Skeleton project in the src directory

∙ End-to-end test project

∙ Other configuration files

The workspace contains the initial project with a welcome application. Now,
you’re ready to create your first Angular component and serve the application.

3.8 ANGULAR JS IDE

Over the years, AngularJS has become a staple of web development, whether
for web apps or pages. A big community has grown alongside it, providing a
lot of code snippets and other equally useful tools to help other developers
with common problems. Let’s take a look at some of the best AngularJS
development tools!

3.8.1 WebStorm

JetBrains has a long history of developing robust IDEs, with many


features that help developers in all stages of development. WebStorm is no
different, providing JavaScript developers with one of the smartest code
completion and analysis tools out there. If that alone isn’t enough to convince
you, it has several other enticing features, such as remote collaboration,
database tools, and embedded unit testing. If you want a certain feature that
you cannot find in the vanilla package, there’s always the plugin marketplace
to extend its core functionality.
64 SRMIST DDE MCA Self Instructional Material
NOTES
3.8.2 Aptana Studio

Aptana Studio was built from the ground up to be a web development


IDE, and it shows. It features lots of tools to help build web apps and pages,
but by far the most useful are its code assistant, which tells developers at a
glance which browsers support a certain element, and a deployment wizard to
quickly get the latest version of your project up and running in a live
environment.

3.8.3 Angular IDE

Angular IDE is an extension for the MyEclipse Java IDE that allows
developers to develop Angular projects natively. It features wizards to ease the
creation and set up of projects, but also of components, services and modules,
which speeds up development significantly. It also has a handy feature in the
form of CodeLive, a tool to inspect which elements and Angular Components
are being loaded on the web page.

3.8.4 Sublime Text

Sublime Text has long been considered a very lightweight and stable
code editor and has become even more so with its recent 4th version. With this
version, several useful features for Angular developers were introduced or
improved, namely GPU rendering, context-aware autocomplete and Support
for Javascript shipped by default. It also provides a Python API that allows for
the development of extensions, and its extension ecosystem has a vibrant
community.

3.8.5 Visual Studio Code

Visual Studio Code is Microsoft’s most recent and free IDE.


Streamlined but still powerful, it provides a solid working environment for
programming in most languages and has several extensions that help set up
other tools and modules for a given language or development environment.
Angular is no exception, and Visual Studio Code features dozens of extensions

65 | SRMIST DDE MCA Self Instructional Material


specifically for Angular, including AngularJS tools, UI elements, and other
snippets.

3.8.6 JSFiddle

Unlike other IDEs on this list, JSFiddle stands out by being a solid
online solution to develop and debug, providing separate windows for HTML,
CSS, JavaScript, and Angular all in one place for easy editing. Plus, it also
allows for real-time collaboration. It is extremely useful to develop small code
snippets or to test out new ideas.

3.9 INTRODUCTION TO VS CODE

3.9.1 Introduction

Visual Studio Code is a lightweight but powerful source code editor


which runs on your desktop and is available for Windows, macOS and
Linux. It comes with built-in support for JavaScript, TypeScript and
Node.js and has a rich ecosystem of extensions for other languages and
runtimes (such as C++, C#, Java, Python, PHP, Go, .NET)

3.9.2 TOP EXTENTIONS

Enable additional languages, themes, debuggers, commands, and more.


VS Code's growing community shares their secret sauce to improve
your workflow.

VS Code extensions let third parties add support for additional:

∙ Languages - C++, C#, Go, Java, Python

∙ Tools - ESLint, JSHint , PowerShell

66 SRMIST DDE MCA Self Instructional Material


∙ Debuggers - PHP XDebug. ∙ Keymaps- Vim, Sublime Text, IntelliJ, Emacs,
Atom, Brackets, Visual Studio, Eclipse
3.9.3 User Interface the number of outgoing changes when Git is
enabled.
VS Code comes with a simple and intuitive
layout that maximizes the space provided for the ∙ Panel - An additional space for views below the
editor while leaving ample room to browse and editor region. By default, it houses output,
access the full context of your folder or project. debug information, errors and warnings, and an
The UI is divided into five main areas: integrated terminal. Panel can also be moved to
the left or right for more vertical space.
∙ Editor - The main area to edit your files. You
can open as many editors as you like side by
side vertically and horizontally.

∙ Primary Side Bar - Contains different views like


the Explorer to assist you while working on your
project.

∙ Status Bar - Information about the opened


project and the files you edit.

∙ Activity Bar - Located on the far left-hand side,


3.10 ANGULAR APP FUNDAMENTALS
this lets you switch between views and gives NOTES
you additional context-specific indicators, like
67 | SRMIST DDE MCA Self Instructional Material
3.10.1 Angular JS expressions

Expressions in AngularJS are used to bind application data to HTML.


The expressions are resolved by AngularJS and the result is returned
back to where the expression is written. The expressions in AngularJS
are written in double braces: {{ expression }}. They behave similar to
ng-bind directives: ng-bind=”expression”.
Syntax:
{{ expression }}

3.10.2 Angular js Modules

The AngularJS module defines the functionality of the application


which is applied on the entire HTML page. It helps to link many components.
So it is just a group of related components. It is a container that consists of
different parts like controllers, services, and directives.
Note: These modules should be made in normal HTML files like index.html
and no need to create a new project in VisualStudio for this section. Creating a
Module in AngularJS:

var app = angular.module("Module-name", []);

In this [], we can add a list of components needed but we are not including any
components in this case. This created module is bound with any tag like div,
body, etc by adding it to the list of modules.

<div ng-app = "module-name">

The code in which the module is required.

</div>

Adding a Controller:

app.controller("Controller-name", function($scope) {

$scope.variable-name= "";

});

3.10.3 Directives
68 SRMIST DDE MCA Self Instructional Material
The ngModel directive is a directive that is used to bind the values of the HTML controls (input,
select, and textarea) or any custom form controls,time, the view is a projection of the model.
and stores the required user value in a variable Unlike React, angular supports two-way binding.
and we can use that variable whenever we In this way, we can make the code more loosely
require that value. It also is used during form coupled. Data binding can be categorized into 2
validations. The various form input types (text, types, ie., One-way Binding & Two-way
checkbox, radio, number, email, URL, date, Binding.
datetime-local time, month, week) can be used One-way Binding: This type of binding is
with the ngModel directive. This directive is unidirectional, i.e. this binds the data flow from
supported by <input>, <select> & <textarea>. either component to view(DOM) or from the
Syntax: view(DOM) to the component. There are
<element ng-model=""> various techniques through which the data flow
can be bind from component to view or vice-
Content...
versa. If the data flow from component to
</element>
view(DOM), then this task can be accomplished
3.10.4 Data Binding with the help of String Interpolation &
Property Binding.
Angular provides a function Data Binding which
3.10.5 Controllers
helps us to have an almost real-time reflection of
the input given by the user i.e. it creates a AngularJS controllers play a significant role in
connection between Model and View. Data AngularJS applications. All the AngularJS
Binding is a way to synchronize the data application mainly relies on the controllers to
between the model and view components control the flow of data in that application.
automatically. AngularJS implements data- Basically, it controls the data of AngularJS
binding that treats the model as the single-
NOTES
source-of-truth in your application & for all the
69 | SRMIST DDE MCA Self Instructional Material
applications and the controller is a Javascript object, created by a standard
JavaScript object constructor.
The ng-controller directive defines the application controller. In AngularJS, a
controller is defined by a Javascript construction function, which is used in
AngularJS scope and also the function $scope) is defined when the controller
is defining and it returns the concatenation of the $scope.firstname and
$scope.lastname.
Syntax:

<element ng-controller="expression">

Contents...

</element>

3.11 SIMPLE ANGULAR APP

3.11.1 Simple Program

<!DOCTYPE html>

<html>

<head>

<title>First AngularJS Application</title>

<script src= "~/Scripts/angular.js"></script>

</head>

<body ng-app >

<h1>First AngularJS Application</h1>

Enter Numbers to Multiply:

<input type="text" ng-model="Num1" /> x <input type="text"


ng-model="Num2" />

= <span>{{Num1 * Num2}}</span>

</body>

</html>

70 SRMIST DDE MCA Self Instructional Material


3.11.2 Simple Angular JS Application 1.3.14/angular.min.js"> </script>

An AngularJS application consists of following Step 2: Define AngularJS application using ng-
three important parts − app directive <div ng-app = "">
...
∙ ng-app − This directive defines and links an
</div>
AngularJS application to HTML.
Step 3: Define a model name using ng-model
∙ ng-model − This directive binds the values of directive
AngularJS application data to HTML input <p>Enter your Name: <input type = "text" ng-
controls. model = "name"></p>

∙ ng-bind − This directive binds the AngularJS Step 4: Bind the value of above model defined
Application data to HTML tags. using ng-bind directive <p>Hello <span ng-bind
= "name"></span>!</p>
Creating AngularJS Application
Executing AngularJS Application
Step 1: Load framework
Use the above-mentioned three steps in an
Being a pure JavaScript framework, it can be HTML page.
added using <Script> tag. <html>

<script
71 | SRMIST DDE MCA Self Instructional Material
src =
"https://ajax.googleapis.com/ajax/libs/angularjs/ NOTES
<head>
<title>AngularJS First Application</title>
</head>

<body>
<h1>Sample Application</h1>

<div ng-app = "">


<p>Enter your Name: <input type = "text" ng-model = "name"></p>
<p>Hello <span ng-bind = "name"></span>!</p>
</div>

<script src =
"https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/
angular.min.js"> </script>

</body>
</html>

Output

3.11.3 How AngularJS Integrates with HTML

∙ The ng-app directive indicates the start of AngularJS application.

72 SRMIST DDE MCA Self Instructional Material


∙ The ng-model directive creates a model variable slowly been brought into the limelight,
convincing big name companies, such as
named name, which can be used with the HTML
Deutsche Bank, PayPal, and Upwork of its
page and within the div having ng-app directive.
quality.
∙ The ng-bind then uses the name model to be

displayed in the HTML <span> tag whenever


Whether it’s a massive online payment system
user enters input in the text box.
like Paypal using AngularJS for their
∙ Closing</div>tag indicates the end of checkout/transaction portals, or Delta airlines
AngularJS application. deploying Angular to display real-time airfare
data, the number of diverse companies that use
3.12 COMPANIES USING ANGULAR Angular has increased exponentially over the
last decade.
Evidence shows that modern web frameworks
▪ Microsoft Office
like Angular are on the brink of overriding
traditional frameworks like jQuery. Although ▪ Deutsche Bank
it’s easy to get caught up in Angular’s popularity
trends and near decade-long history, you might ▪ Mixer
be wondering what drove Angular to be so
▪ Santander
popular and how top fortune 500 companies
leverage this front-end web framework to their ▪ Gmail
advantage.
▪ Forbes

With tech giants that like Microsoft and ▪ UpWork


Samsung using Angular, the platform has gained NOTES
a solid reputation. Over time, Angular has
73 | SRMIST DDE MCA Self Instructional Material

▪ PayPal

▪ Grasshopper

▪ Samsung

▪ Delta

▪ Overleaf

3.12.1 Advantages

1. MVC support

Several web development frameworks require programmers to split the


software code into three MVC components. Additionally, the programmers
need to write another separate code to glue these components. However,
AngularJS offers a facility that stitches these separated codes dynamically. As
a result, it saves a lot of time for developers.

2. Code reuse

Code reusability is crucial for developers as it allows them to use the


predefined templates and modify them as required. AngularJS uses HTML
templates, enabling the browser to parse it into DOM via the AngularJS
compiler. The templates can be readily used to develop responsive web apps
even by people with minimum programming skills as it involves less coding.
The practice saves time and money and enhances overall app performance.

3. Plug-and-play feature

AngularJS allows developers to add existing components to newly developed


web apps. The code can be directly copied to the component directory.
Moreover, the directory can be used to access all framework assets quickly
and efficiently.

4. Data binding feature

AngularJS supports one-way and two-way data binding features. It allows


developers to manipulate data in the model layer and update the view layer
simultaneously. Thanks to automatic data synchronization, data sharing and
74 SRMIST DDE MCA Self Instructional Material
updating are possible between the two MVC DI.
layers of the applications. Also, it reduces the
work of developers as they do not have to deal 7. Real-time testing

with codes of separate layers.


AngularJS supports both end-to-end testing and

5. Large community support unit testing. Testing features, in turn, maintain


the high code quality as codes remain bug-free.
AngularJS is managed by Google. It also garners Moreover, testing also aids in code
support from the open community as it is an documentation and resolves dependencies, if
open source framework. Being backed by any.
Google implies that the features will receive
regular updates and support. Moreover, open 8. Quick application prototyping

community members can share experiences,


AngularJS developers can develop interactive
address issues, and solve critical problems of
applications by writing less code. As a result,
fellow members.
the design to the final production timeline is

6. Support dependency injection (DI) reduced from months to days, saving


considerable time, effort, and resources
Dependency injection refers to the process of necessary for application implementation.
injecting dependent functionality into the
existing software modules at runtime. AngularJS 9. Enhanced server performance
has built-in support for DI. It allows code
The business operations of any organization
reusability, where developers can define a
depend on its network functionality and
specific service and utilize it across multiple
availability. That’s why optimizing server
modules. Applications are developed, tested,
performance and
and maintained efficiently with the support of
NOTES
75 | SRMIST DDE MCA Self Instructional Material
ensuring end-user satisfaction is crucial. AngularJS offers features like
caching that free up the server CPUs. As a result, the traffic to and from the
server is kept in check, which, in turn, increases the efficiency of data
processing on the server side.

10. Legal license

Several web development frameworks do not have a clear stand on whether


they have legal licenses to provide services of any kind. However, businesses
need to use applications that are legally premised. AngularJS is a framework
that is released under the MIT license. This implies it is open to the developer
community and businesses who intend to use it commercially.

11. Focus on UX

With time, user experience (UX) has become crucial for all businesses as it
builds trust and relationships with potential customers. AngularJS enables
organizations to design SPAs that allow users to access all the information
they need on one page. It not just suits the business needs but also gives a
great user experience.

References

[1] https://www.freecodecamp.org/

[2] https://www.javatpoint.com/

[3] https://www.geeksforgeeks.org
76 SRMIST DDE MCA Self Instructional Material

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy