[go: up one dir, main page]

0% found this document useful (0 votes)
58 views20 pages

FSD Unit 1 FSD

Uploaded by

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

FSD Unit 1 FSD

Uploaded by

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

lOMoARcPSD|50864966

FSD unit - 1 - FSD

Full stack development (Jeppiaar Engineering College)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Suraj kumar Singh (surajre04@gmail.com)
lOMoARcPSD|50864966

SYLLABUS
Full Stack Web Development- (IT3501)
UNIT I BASICS OF FULL STACK
Understandingthe Basic Web Development Framework- User - Browser
-Webserver --Backend
Services - MVC Architecture - UnderStandingthe diferent stacks -The role of
-Node -Mongo DB -React. (Chapter- 1) Express Angular
UNIT II NODE JS
Basics of Node JS - Installation- Working with Node packages- Using Node package
manaoer
Creatingasimple Nodejs application- UsingEvents -Listeners- Timers - Callbacks -
Data I/0 - ImplementingHTTP servicesin Node.js. (Chapter- 2) Handling
UNIT III MONGO DB

UnderstandingNoSQL and MongoDB -BuildingMongoDB Environment-User accounts-


Access control- Administeringdatabases- Managingcollections- Connectingto MongoDB from
Nodejs -simple applications.(Chapter-3)
UNIT IV EXPRESS AND ANGULAR
ImplementíngExpress in Node.js -Configuringroutes -Using Request and Response objects-
Angular - Typescript - Angular Components - Expressions - Data bindíng - Built-in directives.
(Chapter-4)
UNIT V REACT
MERN STACK - Basic React applícations- React Components- React State - Express REST
APls - Modularizztion and Webpack - Routing with React Router - Server-side rendering
(Chapter-5)

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


lOMoARcPSD|50864966

TABLE OF CONTENTS
UNIT I
Chapter-1 Basics of Full Stack (1 - 1) to (1 - 14)
11 Understandingthe Basic Web DeveloprmentFramework. 1-2

1.2 User 1-3

1.3 Browser 1-3

1.4 Web Server.. 1-5

14.1 Apache.. .1 -5
1.4.2 IIS. .. 1 -6

1.5 Backend Services 1-6

1.6 MVC Architecture. 1-7


1.6.1 MVC in Practical .1-8
1.7 Understandingthe Different Stacks. 1-8
1.7.1 Express. ..... 1-9
1.7.2 Angular. ..1-9
1.7.3 Node. .1-10
1.7.4 MongoDB ... 1-10
1.7.5 React 1-11
1.8 Two Marks Questionswith Answers .......1 - 12
UNIT II

Chapter - 2 NODE JS (2- 1) to (2 - 48)


2.1 Basics of NodeJS.. 2-2
2.2 Installation. .2 -2
2.3 Working with Node Packages. ... 2-5
2.4 Using Node Package Manager. 2-5
2.4.1 Installing Node Packages Modules. .2 -7
2.4.2 Using packagejson(Useof npm init). ..2 - 8

()

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


lOMoARcPSD|50864966

2.4.3 Node./s Built in Modules.


Node.js Application. .2-9
2.5 Creatinga Simple
2.6 Using Events . . 2-11
2.6.1 Conceptof Event Loop.. .....22-13-16
Listeners
2.7

2.8 Timers. . ...22-18-21


2.9 Callbacks.
.. 2-24
2.10 Handling Data l/0.
..2 -25
2.10.1 Buffers.
2.10.2 Streams
.2-25
2.10.3 File System
.2-26
.2-30
2.11 ImplementingHTTP Services in Node.js.
2.11.1 URL Object....
.2-34
....2-34
2.11.2 Query String and Form Parameters
2.11.3 Request, Response and Server Object
.2-35
.2-36
2.11.3.1The http.ClientRequest Objec.
..2-37
2.11.3.2 The ServerResponseObject
.2-39
2.11.3.3 The incomingMessage Object.. ..2- 43
2.11.3.4 The http.Server Object.. .2- 45
2.12 Two Marks Questionswith Answers ..2 - 45
UNIT III

Chapter-3 MONGO DB (3 - 1) to (3- 52)


3.1 UnderstandingNoSQL and MongoDB. 3-2
3.1.1 NoSQL. .3-2
3.1.2 MongoDB .3-2
3.2 Building MongoDB Environment. 3-4
3.3 User Accounts. .... 3-13
3.3.1 Listing Users .3-13
3.3.2 Create User Accounts. ...3 - 14
3.3.3 Remove Users ....3-17

(vi)

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


lOMoARcPSD|50864966

3.4 Access Control 3-17

3.4.1 Creating a User AdministratorAccount .3-17


3.4.2 Creating Database AdministratorAccount .3-19
3.5 Data Types in MongoDB 3- 19

3.6 Administering Databases.. 3-20

3.7 Managing Collections. 3-22

3-29
3.8 Connectingto MongoDB from Node.js.
3.9 Understandingthe Objects Used in MongoDB Node.js Driver 3-30

3.10 Simple Applications. 3-31

3.11 Advanced MongoDB. 3- 41

3.11.1 lndexing. ..3 - 41


..... 3 - 44
3.11.2 Aggregation.
3-46
3.11.3 Map Reduce ....
... 3 - 48
3.12 Two Marks Questionswith Answers
UNIT IV

Chapter - 4 Express and Angular (4- 1) to (4 -66)


4-2
4.1 ImplementingExpress in Node.js.
4.1.1 Installing Express..... ..4 - 2
4-4
4.2 ConfiguringRoutes
Using Request and Response Objects 4 -6
4.3
4 -9
4.4 Introductionto TypeScript
4-11
4.4.1 Installation.
4.4.2 How to Write TypeScript Program ? .4 - 13
4-16
4.5 Type Annotations
4-16
4.6 Variables and Constants..
Understanding Interfaces.. 4- 18
4.7
4-22
4.8 ImplementingClasses.
4-24
4.9 ImplementingModules
4-27
4.10 UnderstandingFunctions
4- 29
4.11 Basics of Angular
(vii)

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


lOMoARcPSD|50864966

4.12 AngularCLI...
4.13 CreatingFirst Applicationin
Angular....
.4-30
4.13.1 Angular Lifecycle . .4-31
4.13.2 Understandingand Using
ngModule
. .4-33
4.14 Angular Architecture ....44-35-34
4.15 Angular Components..
4.16 Expressions....
....4-37
.4 -42
4.16.1 Pipes.
....4 -43
4.17 Data Binding
4.18 Built-in Directives...
.4- 44
4.18.1 Structural Directives. ,4-52
4.18.1.1 nglf Directive... ...4-52
...4-52
4.18.1.2 ngfor Directive
4.18.1.3 ngSwitch Directive
....4-55
..4-57
4.18.2 Attribute Directives. .4 -58
4.19 Two Marks Questionswith Answers .... 4-62
UNIT V

Chapter-5 React (5 - 1) to (5 - 40)


5.1 MERN Stack .5-2
5.2 Basic React Applications. .5-3
5.3 React Components .5-6
5.4 Inter Components Communication. .5-10
5.5 The props... 5-12
5.6 React State. 5-12
5.7 Express REST APIs .. 5 - 15
5.8 Modularizationand Webpack. 5-26
5.9 Routing with React Router 5-32

5.10 Server-sideRendering .5-36


5.11 Two Marks Questionswith Answers... .5-38

Solved Model Question Paper (M-1) to (M -2)


(vii)
Downloaded by Suraj kumar Singh (surajre04@gmail.com)
lOMoARcPSD|50864966

UNIT I

1 Basics of Full Stack

Syllabus
Understandingthe Basic Web Development Framework - User - Browser - Webserver - Backend
Services - MVC Architecture- Understandingthe diferentstacks - The role of Express - Angular -
Node - Mongo DB - React

Contents
1.1 Understandingthe Basic Web DevelopmentFramework
1.2 User

1.3 Browser

1.4 Web Server

1.5 Backend Services


1.6 MVC Architecture
1.7 Understandingthe DifferentStacks
1.8 Two Marks Questions with Answers

(1-1)

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


lOMoARcPSD|50864966

Web Development
1-2
Basics of FullStack
Full Stack

Web DevelopmentFramework
1.1 Understandingthe Basic
Frameworkis ?a platformfor developingapplications which
What isFramework provides a foundation
applicationscan be built. The front
end frameworks are the
which software
packagesthatprovide-
software
The reusablecode modules,
technologiesand
o Standardizedfront end
blocks for making the front end development
o Ready made interface faster and
simple.
Basic concept : A web development framework is a collection of tools, libraries and
technologiesthat are used to create web applicationsand websites. It provides a basic structure and
quickly and efficiently.
set of conventionsfor developersto build web applications
use web frameworke
Followingare some importantreason which indicatewhy do we
web framework is that it saves time and
1. Saves time : The most striking feature of
in developing any app because the developer doesn't need to worry about session energy
handling,eror handling and authenticationlogic. These functions are taken care of by
web frameworks.
2. Well organizedapp : The web framework itselftakes care of managing directoriesand
files. This makes the completeapplication wellorganized.
3. Flexibility and customizable : Add-ons, themes, plugins, widgets enable rapid
customization on the web application. This brings out a lot of flexibility in code
development.
4. Code reusability:Frameworkalso promotesthe reuse of code.
5. Security : Framework makes developers sure that the application uses good security
measurementsbecause the framework itself takes care of it.

The componentsof web developmentframework are -


1. User 2. Browser 3. Webserver 4.Backend services

TECHNICAL PUBLICATIONS-an up-thrust for knowledge


Downloaded by Suraj kumar Singh (surajre04@gmail.com)
lOMoARcPSD|50864966

Eull Stack Web Development 1-3 Basics of Full Stack

The componentsof web developmentframeworkare as shown


below -
Backend services

Database
Browser Webserver

Server-side MySQL
Request
Interacts Javascript) (XML) scripts Oracle
HTML CSS
Files
Response
User

Other
services

Fig. 1.1.1 Components of web developmentframework

Let us discuss them one by one -

1.2 User
" User is an importantpart of web developmentframework.
" Users expectations from a website define the requirements for developing a good
website.

Normally an efficientand easy to use website is preferredby the user. They also expect
that the same website must behave closer to the applications installed on their
computers and mobile devices.
" User interacts with the browser by using input devices such as mouse, keyboard on
PC or swipes and taps on mobile devices. The web framework processesthe user input
and provides the required visual output.

1.3 Browser
Browser is an applicationfor accessingwebsites. User interactswith the browser in the
web developmentframework.
" The browser plays three roles in web framework-
1. It provides communicationto and from the web server.
2. It interpretsthe data from the server and displays the visual output.
3. The browser handles user interaction through the keyboard, mouse, touchscreen or
other input device and takes the appropriateaction.

TECHNICAL PUBLICATIONS®-an up-thrust for knowledge

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


lOMoARcPSD|50864966

1-4
Full Stack Web Development
communication:
Basics of Full Statl
" Browser to web server
webserver, the browser makes use
o For communicating with the of
HTTPS protocols. HTTP and
o HTTP stands for HyperText Transfer Protocol. This protocol
is
communication between browser and web server. It is a used for
HTTP also defines what type of requests that can be made by the request/response
user. protoco
HTTP protocoldefinesthe format of those requestsand responses.
o HTTPS protocol is similar to HTTP protocol but it adds an
Similarly the
layer so that the user can decide whetherto accept the connectionadditional
There are three types of requeststo the server -
Or not. Security
i) GET:The GET requestis typically used to retrieve data from the
can be in the .html files or images. server. This,data
ii) POST: The POST request is used for sendingthe data to the seserver,
Credit card details while performingonline shopping. For example -
ii) AJAX: AJAX stands for Asynchronous JavaScript and
Language. In AJAX, the GET or POST request is done Extensible Markup
running in the browser. directly by JavaScript
" Difference between GET and POST requests : When
a user submits his
the GET method then the URL string displays the request using
request submitted by the user. But if
the POST method is used then URL string does not show
the submittedcontents.
" The common browsers are Internet
Explorer, Mozilla Firefox, Google Chrome, Safari.
Renderingthe bowser view :
o The browser reads data from initial
URL and then renders the HTML document to
build the Document Object Model (DOM).
o The DOM is a tree structured object. The
browser interprets each DOM element
and renders it to user's screen to build a
webpage view.
o Browsers get different types of data from
multiple web server requests to build the
webpage.
o Followingare various types of files that are displayed by the
browser -
HTML files : The HTML files representthe static
data.
CSS files : These files define how the
elements on the page are lo
styled using fonts, colors, borders and so on.
" Client side script : Normally these
scripts are in JavaScript files. Thes
scripts provide additional functionalities to the .webpage,
facilitate ne
TECHNICAL PUBLICATIONS®, an
up-thrustfor knowledge
Downloaded by Suraj kumar Singh (surajre04@gmail.com)
lOMoARcPSD|50864966

Full Stack Web Development 1-5 Basics of Full Stack

interactivityof user with the web page and provide any necessary logie
required to display the page and provide the functionality.
Media files : These are the files that contain images, videos and audio.
These files can be rendered as webpages.
Data : Any data such as XML, JSON or raw text can be provided to the
web server as a response to an AJAX request.
. HTTP headers : The HTTP headers define the type of data in the request
as well as the type of data expected to be returned back to the browser.
" User interaction: User interactswith the browserwith the help of input devices such as
mouse clicks, keyboards,touchscreens.The browser has an event system that captures
the user events and then takes appropriateaction. This action can be loading the web
page obtainedfrom the server as a response or displayingthe pop-up menu.

1.4 Web Server


Web server is a special type of server to which the web browser submits the request of a web
page which is desired by the client. There are some popularlyused web servers such as Apache and
IS from Microsoft.
Functions of web server
Various functionsof web server are -

1. The web servers accept the requests from the web browserS.
2. The user request is processedby the web server.
3 The web servers respond to the users by providing the services which they demand for
over the web browsers.
4. The web servers serve the web based applications.
5. The DNS translatesthe domain names into the IP addresses.
6. The servers verify given address exists, find necessary files, run appropriate scripts,
exchangecookies if necessaryand return back to the browser.
7. Some servers actively participatein session handling techniques.

1.4.1 Apache
" It is an excellent server because of its two important features: Reliability and
Effciency.
Secondly it is more popular because it is an open source software. That means it is
freely available to anybody. Apache web server is best suitable for UNIX Systems but it

TECHNICAL PUBLICATIONS an up-thrust for knowledge

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


lOMoARcPSD|50864966

FullStack Web
Development
1-6

The apache web


server can
be
Basics of Full Stan,
can also be used
on Windows box.
httpd.conf. This file is present in configured as per he
the
requirementsusing the file
package.
Apache software
1.4.2|IS
services or internet information server is a kind of
The internet information
providedby Microsoft.This serveris most
popularon the Windows platform web server
Apache and IIS servers
Followingare some differencesbetween
Apache web server IISweb server
Sr. No.
IIS web server is used on
Apache web server is useful on both unix windows
based systems and on windows platform. platform.
It is a vendor
2 It is an open source product. specificproductand can he
used on windows products only.
3 The Apache web server can be controlled For the IIS server, the behaviouris
byediting theconfigurationfile htpd.conf controlledby modifyingthe window:
based managementprograms called IIS
snap in. We can access IIS snap-in
through the Control-Panel
>AdministrativeTools.

1.5 Backend Services


Backend services are the services that run behind the web server. These services provide the
data to the web server which is requested by the web browser.
The most commonly used backend service is a database that stores the information.
When a browser requests some data to the web server, the web server connects to the database
(backend service) or some other backend service retrieves the information, formats it and then
sends it back to the browser.

Similarly, when the data comes browser to the web server in the form of request, then the web
server connects to the database and updates the data.

Review Question

1. Explain web developmentframework with suitable block diagram.Also


componentsof it.
explain lhe

TECHNICAL PUBLICATIONS® -an up-thrustfor


knowiedge
Downloaded by Suraj kumar Singh (surajre04@gmail.com)
lOMoARcPSD|50864966

Gull Stack Web Development 1-7 Basics of Full Stack


1.6 MVC Architecture
The MVC stands for Model, View and Controller. It is a
framework.
pattern for the architectural

It consistsof three parts -


1. Model : This part of the architecture is responsible for managing the
application data.
This module responds to the request made from view. The model gives instructionsto the
controllerto update when the response is made.
2. View: This part takes care of the presentation of data. The data is presented in desired
format with the help of view. This is a script based system using JSP, ASP, PHP and so
on.

3. Controller: The controller receives input, validates it and then performs business
operations that modify the state of the data model. The controllerbasicallyresponds to
user requests and performs interactionwith the model. Refer Fig. 1.6.1.

alerts Controller
updates
about event model

User interacts Notifies change


View Model
takes model data
(V and updates view

Fig. 1.6.1 MVC architecture


Model representsthe data.
" View is the user Interface.
Controlleris the request handler.
Features of MVC framework
1. Separation of logic : There is a separation of application tasks such as input logic,
business logic and UI logic. This makes testing and debugging easy. Modificationin one
componentdoes not affect the other.
2. Ability to provide multiple views : In MVC model, we can create multiple views.
3. Faster development process : MVC supports rapid and parallel development. If an
MVC model is used to develop any particularweb applicationthen it is possible that one
programmer can work on the view while the other can work on the controller to create
the business logic of the web application.

TECHNICAL PUBLICATIONS-an up-thrust for knowledge

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


lOMoARcPSD|50864966

1-8 DasicS of
Web Development Full
FullStack
formatting : MVC
pattern returns data without Stack
4. Returns
data without
formatting. Hence, the
same components can be used
and
called for ap lyinwigth aannyy
use

5. interface.
Customization: It is an extensibleand pluggable framework. MVC framewoTk are
componentscan be casilyreplacedor customized
designedso that the

1.6.1 MVC in Practical example


understandthe analogyof MVC letus take a real life
In order to
restaurant.
Let's take the exampleof a
waiter presents you with a menu. You view the menu
When you visit a restaurant,the and
the waiter your order. The waiter notes down the order and passes it to thee chef,in the k th¹n
tell
The chef usesthe raw materials fromthe
refrigeratorand cooks the dish. The waiter
meal
kitchen.
thhen takes
the
dish from the kitchen and then presents it to you, after which you can enjoy your
Here the menuand the food come under the view component.
The waiter acts as a controller.
The chef and the refrigeratorcan be thought of as the model.

Review Questions

1. Explain MVC architecturewith a suitablediagram.


2. Enlist thefeaturesof MVCframework.
1.7 Understandingthe DifferentStacks
The stack developmentrefers to the end to end applicationsoftware development.The Nodeis
to angularstack consists of - MongoDB, express,angular,Node,js.
The basic block diagram of how the Node.js to angular fits into the web framework model is as
shown below -

TECHNICAL PUBLICATIONS-an up-thrust for knowledge


Downloaded by Suraj kumar Singh (surajre04@gmail.com)
lOMoARcPSD|50864966

FullSlack
Web Development 1-9 Basics of Full Stack
Backend services

Database
Browser Webserver

Angular Node.js
Request MongoDB
Interacts (Javascript) (JSON
XML
Express
webserver
HTML SS Server-side)
scripts
Response
User Files

Other
services

Fig. 1.7.1 Full stack web developmentframework

1.7.1 Express
Express is used for server side developmentin full stack. As it is running in Node.js, it is easy
to configure,implementand control the web application.
Followingare the reasons why express is a great frameworkto start from -
1) Routing : Express JS provides a routing mechanism so that it is possible to reach to
differentweb pages using the URLs.
2) Error handling: Express providesbuilt-inerror handling for documents.
3) Easy integration: Express server can easily be implementedbehind an existing reverse
proxy system. This allowsit to be easily integratedinto your existingsecured system.
4) Cookies : Express provides easy cookie management.
5) Session and cache management:Express has session management and cache
managementfacility.

1.7.2 Angular
Angular is aclient side framework developed by Google. It is written in TypeSeript. angular
provides all the functionalitiesneeded to handle user input in the browser, manipulatedata on the
client side. It also controls how elements are di_played in the browser window.

TECHNICAL PUBLICATIONS-an up-thrustfor knowledge

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


lOMoARcPSD|50864966

Full Stack Web Development


1- 10

frameworkto start from


Basi c s of Full
- Sta,
why angularis a great
Followingarethe reasons
Using angularthe developercan develop clean and logical code.
1) Clean: extend almost every aspect of
allows to the
Extensibility: The angular
2)
providethe custom
implementation.
Using angularthe reusablecode can be
written
\anguage
3) Reusable Code:
HTML.
Data binding : Using angular the data can be bound to elements using the
4)
mechanism. scope
is developed by Google, there exists a
5) Support :As the angularframework great support
for developingthe web applications.
is
Compatibility: Angular is based on TypeScript. Hence it easy to
6)
into the working environment.
integrate angular
1.7.3 Node
The Node,js is a development framework that uses Google's V8 JavaScript engine. The
meaning of V8 JavaScript engine is that it parses and executesthe JavaScript code. The Node.js
code is written in JavaScriptand then compiled.
Followingare the reasons why Node.js is a great framework to start from -
1) Easy to use : Node.js is very much easy to set up. Developingthe web applicationsusinr
Node.js is also very easy.
2) Extensibility:New modules that are required to extend the Node.js functionalitycan he
developedat any time.
3) Event driven scalability: In Nodejs, the web requests are processedon the same thread
using a basic event model. Node.js uses a single thread model with event looping.
Similarly the non blocking response of Node,js makes it highly scalable to serve large
number of requests.
4) Efficient : The Node.js is built on V8 JavaScript engine and it is very fast in code
execution.
5) Use of JavaScript, end-to-end : The one of the important reasons of using Node.js 15
that it allows to write both server and client side scripts in JavaScript. This makes easier
to work for client side developersas well as for server side
developers.
1.7.4 MongoDB
MongoDB is apart of backendservices.Itis basically ascalable NoSQL database. The datais
stored in the form of a JSON object.

TECHNICAL PUBLICATIONS® an up-thrustfor knowledge

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


lOMoARcPSD|50864966

Development
EullStack Web 1-11 Basics of Full Stack

Eollowingare the reasons why MongoDB is a great frameworkto start from -


1) Document orientation: The data is stored in the document form in the MongoDB.
) High performance: It is the highest
performingdatabase.
3) High scalability : The MongoDB allows horizontal scalability by
sharing data across
multipleservers.
4) High availability: MongoDB provides high availabilityand redundancywith the help of
replication.That means it creates multiple copies of the data and sends these copies to a
different server so that if one server fails, then the data is retrieved from another server.

1.7.5 React
ReactJS is an open source, component-based front end JavaScript library maintained by
facebook. This library is responsible only for the view layer of the application. That means this
JavaScriptis for buildinguser interfaces.
e Followingare the reasons why MongoDB is a great frameworkto start from -
) Virtual DOM : DOM stands for Document Object Model. It also provides a way to
update the content, structure and style of the document. Virtual DOM is a representation
of the original DOM. When a user updates something on the web application,DOM gets
updated. Updating the DOM is very slow, most of the JavaScript frameworks update the
whole DOM which makes it slower. But actually there is no need to update the whole
DOM, instead, these frameworks should update only the part of DOM that is required to
update. This is what the virtual DOM does. This is why ReactJS's DOM manipulationis
much faster than other frameworks. Due to this property, whenever any change is made
in the web application,then those changes are reflected on the web page within no time.
2) Comnponents : This feature allows the web developer to create custom elements which
can be reused in HTML.
3) JSX: JSX is an extension of JavaScriptsyntax. JSX can be seen as a
combination of
javascript and XML. The syntax of JSX is very simple that makes writing components
very easy.
4) One way data binding : The ReactJS is designed in such a
way that it follows,
unidirectional one way data binding. That means, data is allowed to flow in one
or
direction at a time. This helps in achieving greater control over the
application. This
makes helps in increasingthe efficiencyof an application.

TECHNICAL PUBLICATIONS-an up-thrust for knowledge

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


Developmel
lOMoARcPSD|50864966

FullStackWeb

ReviewQuestions
sackdevelopment.
ofNodejsinfull
1. Eyplaintheuse MongoDB.
noteon- frameworks?
2. Writeshort in
useful web
Ghe thereasons- Whyis express
framework.
3. ofreactin web
4. Eyplaintherole
Questionswith Answers
1.8 Two Marks
developmentframework?
Q.1 What is web

" A web developmentframework is a collection of tools, libraries and technologies that are
Ans. :

and websites.
used to ereate web applications
structure and set of conventionsfor developers to build web
" It provides a basic
quicklyand efficiently.
applications
framework ? Give any two reasons.
Q.2 Why do we use web
Ans. :
1. Saves time : The most striking feature of web framework is that it saves time and energy in
developing any app becausethe developer doesn't need to worry about session handling.
hu
error handling and authentication logic. These functions are taken care of
frameworks.
2. Flexibility and customizable : Add-ons, themes, plugins, widgets enable ranid
customization on the web application. This brings out a lot of flexibility in oda
development
Q.3 What are the componentsof web developmentframework ?
Ans.: The components of web developmentframework are
(1) User (2) Browser (3) Web Server (4) Backend services
Q.4 Give the importanceof browser
Ans.: The browser plays three roles in web framework-
1. It providescommunicationto and from the web server.
2. It interpretsthe data from the server and displays the visual output.

3. The browser handles user interaction through the keyboard, mouse, touchscreen or other
input device and takes the appropriateaction.

TECHNICAL PUBLICATIONSB - an up-thrustfor knowledge


Downloaded by Suraj kumar Singh (surajre04@gmail.com)
lOMoARcPSD|50864966

Ell Stack Web Development


1- 13
Basics of Full Stack
Q.5 What is GET and POSTrequest ?
Ans. :

) GET: The GET request is


typically used to retrieve data from the server. This data can be in
the html files or images.
i) POST :The POST request is used for
sending the data to the server. For example - Credit
carddetails while performingonline shopping.
o.6 What is web server ?
Ans. : Web server is a special type of server to which the web browser
submits the request of a
web page which is desired by the client.
0.7 Enlist the functions of web server
Ans.: Various functions of web server are -
1. The web servers accept the requests from the web
browsers.
2. The user request is processedby the web server.
3. The web servers respond to the users by providing the services which they demand for over
the web browsers.
4. The web servers serve the web based applications.
O.8 What do you mean by backend services
Ans. :

1) Backend services are the services that run behind the web server. These services
provide the
data to the web server which is requestedby the web browser.
2) The most comnmonlyused backend service is a database that stores the information.
Q.9 What is MVC?
Ans. :

1. Model : This part of the architectureis responsible for managing the applicationdata. This
module responds to the request made from view. The model gives instructions to the
controllerto update when the response is made.
2. View: This part takes care of the presentation of data. The data is
presented in desired
format with the help of view. This is a script based system using JSP, ASP, PHP and so on.
3. Controller: The controllerreceives input, validatesit and then
performs business operations
that modifythe state of the data model. The controllerbasically responds to
user requests
and performs interactionwith the model.

TECHNICAL PUBLCATIONS-an up-thrust for knowledge

Downloaded by Suraj kumar Singh (surajre04@gmail.com)


lOMoARcPSD|50864966

1-14
Full Stack Web Development Basics of Full Star,
Q.10 What is full stack ?

stack development is developmentof both front end and back end


Ans. : Full of
application.
any web
2. Express 3. AngularJS 4. Node.js
Thefull stack consists of - 1. MongoDB 5.
Reactjs

TECHNICALPUBLICATIONS-an up-thrustfor knowledge


Downloaded by Suraj kumar Singh (surajre04@gmail.com)

You might also like