0% found this document useful (0 votes)
14 views7 pages

Advance

The document contains questions and answers related to Node.js, MongoDB, Express.js, Angular, Flutter and Dart. In Node.js questions, it discusses creating a "Hello World" program and different types of modules in Node.js like core, local and third party modules. MongoDB questions cover what MongoDB is, its features like indexing, replication and schema-less structure. Other questions discuss features of Express.js like middleware, Angular concepts like two-way data binding and NgFor directive, properties of NgModules in Angular, features of cross-platform framework Flutter and rules to define variables and functions in Dart programming language.

Uploaded by

atulnawab10
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)
14 views7 pages

Advance

The document contains questions and answers related to Node.js, MongoDB, Express.js, Angular, Flutter and Dart. In Node.js questions, it discusses creating a "Hello World" program and different types of modules in Node.js like core, local and third party modules. MongoDB questions cover what MongoDB is, its features like indexing, replication and schema-less structure. Other questions discuss features of Express.js like middleware, Angular concepts like two-way data binding and NgFor directive, properties of NgModules in Angular, features of cross-platform framework Flutter and rules to define variables and functions in Dart programming language.

Uploaded by

atulnawab10
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/ 7

UNIT 1

Q1.Write a program to display “Hello World” in Node.js Application.


var http = require('http');

http.createServer(function (req, res) {


res.write('Hello World!');
res.end();
}).listen(5000);

console.log('Server running at 5000');


]
Q2.What is Node.js Module?Explain its different types.

•Modules are encapsulated code blocks that communicate with an external


application.
•These can be a single file or a collection of multiple files/folders.
•These are reusable, hence they are widely used.
Types of Modules in Nodejs:
There are three types of modules
1) Core Modules
2) local Modules
3) Third-party Modules

1. Core Modules:

Built-in modules of node.js that are part of nodejs and come with the
Node.js installation process are known as core modules.

To load/include this module in our program, we use the require function.


let module = require('module_name')
2. Nodejs Local Modules:

•Local modules are created by us locally in our Node.js application.

•These modules are included in our program in the same way as we include
the built in module.

exports.add=function(n,m){
return n+m;
};
3. Nodejs Third Party Modules:

•Modules that are available online and are installed using the npm are
called third party modules.

•Examples of third party modules are express, mongoose, etc.


Q3.What is mongo db? Give various features of mongoDB.

-MongoDB is an open-source document database that provides high


performance, high availability, and automatic scaling.

-In simple words, you can say that - Mongo DB is a document-oriented


database.

-It is an open source product, developed and supported by a company


named 10gen.

various features of mongoDB.

1.Indexing

You can index any field in a document.

2. Replication

MongoDB supports Master Slave replication.

3. Duplication of data

MongoDB can run over multiple servers.

4.Uses JavaScript instead of Procedures.

5. It is a schema-less database written in C++.

6. Provides high performance.

7. Easy to administer in the case of failures.


Q4.What is Node.js?Give various features of node.js.
-Node.js is a cross-platform runtime environment that allows you to
create server-side and networking applications.
-Node.js apps are written in JavaScript and run on OS X, Microsoft
Windows, and Linux utilizing the Node.js runtime.
various features of node.js

 Single Page Applications

 Data-Intensive Real-time Applications

 I/O bound Applications

 JSON APIs based Applications

 Data Streaming Applications

UNIT 2

Q1.What is middleware in Express.js?

-Express.js is a routing and Middleware framework for handling the


different routing of the webpage and it works between the request and
response cycle.

-Middleware gets executed after the server receives the request and before
the controller actions send the response.

Middleware has the access to the request object, responses object, and next,
it can process the request before the server send a response.

An Express-based application is a series of middleware function calls.


Q2.Explain Two-way Data Binding in Angular.

-Two-way binding means that changes made to our model in the


component are propagated to the view and that any changes made in the
view are immediately updated in the underlying component

-Two-way binding is useful in data entry forms. Whenever a user makes


changes to a form field, we would like to update our model. Similarly, when
we update the model with new data, we would like to update the view as
well

-The two-way binding uses the special syntax known as a banana in a box
[()] <someElement [(someProperty)]="value"></someElement>.

- you can use it using the two-way binding syntax as shown below

<input type="text" name="value" [(ngModel)]="value">

Q3.What is use of NgForOf directive in Angular.

-The ngIf Directive in Angular10 is used to remove or recreate a portion of


HTML element based on an expression. If the expression inside it is false
then the element is removed and if it is true then the element is added to
the DOM.

-A shorthand form of the directive, *ngIf="condition", is generally used,


provided as an attribute of the anchor element for the inserted template. –

-Angular expands this into a more explicit version, in which the anchor
element is contained in an <ng-template> element.

-The ngForOf directive is generally used in the shorthand form *ngFor.

-NgFor is used as a structural directive that renders each element for the
given collection each element can be displayed on the page.

Q4.Explain any five properties of NgModules.

declarations

The components, directives, and pipes that belong to this NgModule.

exports

The subset of declarations that should be visible and usable in the


component templates of other NgModules.
imports

Other modules whose exported classes are needed by component templates


declared in this NgModule.

Schemas –
Defines a schema that will allow any non-Angular elements and properties.

Id – The Id used to identify the modules in getModuleFactory. If left undefined,


the NgModule will not be registered with getModuleFactory.

UNIT 3
Q1.What is Flutter? Explain features of Flutter.
-Flutter is a UI toolkit for creating fast, beautiful, natively compiled applications
for mobile, web, and desktop with one programing language and single
codebase.
-The cross-platform development framework has the ability to write one code
and can deploy on the various platform (Android, iOS, and Desktop).

features of Flutter:-
Open-Source: Flutter is a free and open-source framework for
developing mobile applications.
Cross-platform: This feature allows Flutter to write the code
once, maintain, and can run on different platforms.
Hot Reload: Whenever the developer makes changes in the
code, then these changes can be seen instantaneously with Hot Reload.
Accessible Native Features and SDKs: This feature allows the app
development process easy and delightful through Flutter's native code, third-
party integration, and platform APIs.
Minimal code: Flutter app is developed by Dart programming language, which
uses JIT and AOT compilation to improve the overall start-up time, functioning
and accelerates the performance.

Q2.Write the rules to create a variable in Dart.


-Creating a variable with a proper name is an essential task in any programming
language.
-The Dart has some rules to define a variable.
These rules are given below.
o The variable cannot contain special characters such as whitespace,
mathematical symbol, runes, Unicode character, and keywords.
o The first character of the variable should be an alphabet([A to Z],[a to z]).
Digits are not allowed as the first character.
o Variables are case sensitive. For example, - variable age and AGE are treated
differently.
o The special character such as #, @, ^, &, * are not allowed expect the
underscore(_) and the dollar sign($).
o The variable name should be retable to the program and readable.

Q3.Explain dart function with an example.


-A function can be defined by providing the name of the function with the
appropriate parameter and return type.
-A function contains a set of statements which are called function body.
The syntax is given below.
Syntax:
return_type func_name (parameter_list):
{
//statement(s)
return value;
}
Example -
int mul(int a, int b){
int c;
c = a+b;
print("The sum is:${c}");
}

Q4.Explain Dart for..in loop statements with an example.

- For…in loop in Dart takes an expression or object as an iterator.


-The loop will execute until no element left in the iterator.
The syntax is given below.

for (var in expression) {


//statement(s)
}

Example :

void main()

{
var list1 = [10,20,30,40,50];

for(var i in list1)

print(i); //to print the number

}}

Output:

10

20

30

40

50

You might also like