Final Exam Flashcards
Explain What is DevOps?
DevOps is a newly emerging term in the IT field, which is nothing but a practice that emphasizes the collaboration and communication of both software developers and other information technology (IT) professionals. It focuses on delivering software products faster and lowering the failure rate of releases.
Which software-development methodology would be best if an organization needed to develop a software tool for a small group of users in the marketing department? Why?
Rapid application development (RAD) is a software-development (or systems-development) methodology that focuses on quickly building a working model of the software. This methodology is much better suited for smaller projects than SDLC and has the added advantage of giving users the ability to provide feedback throughout the process.
Software Development: What is the difference between a library and a framework
A library provides a set of helper functions/objects/modules which your application code calls for specific functionality. Libraries typically focus on a narrow scope. A Framework has defined open or unimplemented functions or objects which the developer uses to create a custom application. Framework provides structure and it has a wider scope than a library.
What is CORS?
CORS, abbreviation for Cross-Origin Resource Sharing, is a process used to gain the authority of different web resources on different domains. With the help of CORS, the integration of web scripts can be implemented more freely with the external content of the original domain.
What is a REST API?
Application programming interfaces (APIs) provide the platform and medium for applications to talk to and understand each other. APIs specify the way information passed across platforms is structured so that applications can exchange data and information.
REST is an API architecture style. It stands for representational state transfer. REST specifies how data is presented to a client in a format that is convenient for the client. Data exchanges happen either in JSON or XML format. However, many APIs today return JSON data.
The key elements of the REST API paradigm are
* a client or software that runs on a user’s computer or smartphone and initiates communication;
* a server that offers an API as a means of access to its data or features; and
* a resource, which is any piece of content that the server can provide to the client (for example, a video or a text file).
To get access to a resource, the client sends an HTTP request. In return, the server generates an HTTP response with encoded data on the resource. Both types of REST messages are self-descriptive, meaning they contain information on how to interpret and process them.
What is the REST request structure?
Any REST request includes four essential parts: an HTTP method, an endpoint, headers, and a body.
An HTTP method describes what is to be done with a resource. There are four basic methods also named CRUD operations:
POST to Create a resource, GET to Retrieve a resource, PUT to Update a resource, and DELETE to Delete a resource. An endpoint contains a Uniform Resource Identifier (URI) indicating where and how to find the resource on the Internet. The most common type of URI is a Unique Resource Location (URL), serving as a complete web address.
Headers store information relevant to both the client and server. Mainly, headers provide authentication data — such as an API key, the name or IP address of the computer where the server is installed, and the information about the response format.
A body is used to convey additional information to the server. For instance, it may be a piece of data you want to add or replace.
Key differences between GET and POST?
GET request is simple and used to fetch a resource on the server (read). POST method is used so that resources are created on the server. POST request has a body.
Question. What are the latest trends in Full Stack Web Development?
Ans – The rise of Vue JS Functional, real-time web apps, progressive apps, and mobile web development. Programming benefits from JavaScript improvements The emergence of more compatible extensions.
What are the latest trends in Full Stack Web Development?
The rise of Vue JS Functional, real-time web apps, progressive apps, and mobile web development. Programming benefits from JavaScript improvements The emergence of more compatible extensions.
Describe front-end and backend in general terms
Frontend refers to the client-side of an application. Backend refers to the server-side of an application. Frontend is the part of a web application that users can see/view and interact with. Backend constitutes everything that happens behind the scenes. Frontend typically includes everything that attributes to the UI/visual aspects of a web application. Backend generally includes a (web) server that communicates with a DB to serve requests. HTML, CSS, JavaScript, are some of the essentials of frontend development. Java, PHP and, JavaScript are some of the backend development technologies.
What Is Node.js?
Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside of a web browser. Is is sometimes also referred to as a web framework.
Explain what is the NodeJS Event Loop.
NodeJS is single threaded. Event loop is an endless loop, which waits for tasks, executes them and then sleeps until it receives more tasks. The event loop executes tasks from a queue of events. Because of the event loop we can use callbacks and promises.
How can you share code between files in NodeJS?
This depends on the JavaScript environment.
On the server (Node.js) each file is treated as a module and it can export variables and functions by attaching them to the module.exports object. This follows CommonJS.
What is the most loved language of a full stack developer and why?
Full Stack Developers work with a multitude of languages. Ideally, a full-stack developer must have a few languages that he loves, preferably, some with which he can design the front end and others with which he can take care of the back end. A fullstack developer should be able to demonstrate that well and remember to include the basic most used ones like HTML, CSS, Python, JavaScript etc.
What’s the difference between Git and GitHub?
While Git is a tool that’s used to manage multiple versions of source code edits that are then transferred to files in a Git repository, GitHub serves as a location for uploading copies of a Git repository.
What is a Git repository?
Git repository refers to a place where all the Git files are stored. These files can either be stored on the local repository or on the remote repository. It tracks and saves the history of all changes made to the files in a Git project. It saves this data in a directory called .git, also known as the repository folder.
Name a few Git commands with their function
Git config - Configure the username and email address
Git add - Add one or more files to the staging area
Git diff - View the changes made to the file
Git init - Initialize an empty Git repository
Git commit - Commit changes to head but not to the remote repository
What does the git push command do?
The Git push command is used to push the content in a local repository to a remote repository. After a local repository has been modified, a push is executed to share the modifications with remote team members.
What are some of the advantages of MongoDB?
MongoDB supports field, range-based, string pattern matching type queries for searching the data in the database
MongoDB support primary and secondary index on any fields
MongoDB basically uses JavaScript objects in place of procedures
MongoDB uses a dynamic database schema
MongoDB is very easy to scale up or down
MongoDB has inbuilt support for data partitioning (Sharding)
What is a Document in MongoDB?
A Document in MongoDB is an ordered set of keys with associated values. It is represented by a map, hash, or dictionary. In JavaScript, documents are represented as objects: {“greeting” : “Hello world!”}
Complex documents will contain multiple key/value pairs: {“greeting” : “Hello world!”, “views” : 3}
What is a Collection in MongoDB?
A collection in MongoDB is a group of documents. If a document is the MongoDB analog of a row in a relational database, then a collection can be thought of as the analog to a table. Documents within a single collection can have any number of different “shapes.”, i.e. collections have dynamic schemas. For example, both of the following documents could be stored in a single collection:
{“greeting” : “Hello world!”, “views”: 3} {“signoff”: “Good bye”}
What are Databases in MongoDB?
MongoDB groups collections into databases. MongoDB can host several databases, each grouping together collections. Some reserved database names are as follows:
admin
local
config
What is the MongoDB Shell?
The MongoDB Shell, mongosh, is a fully functional JavaScript and Node.js 14.x REPL environment for interacting with MongoDB deployments. You can use the MongoDB Shell to test queries and operations directly with your database.
You can use the mongo shell to query and update data as well as perform administrative operations.
To start the shell, run the mongosh executable:
$ mongosh
The MongoDB shell is a full-featured JavaScript interpreter, capable of running arbitrary JavaScript programs. Even basic math works on this:
> x = 100;
200
> x / 5;
20
How to add data in MongoDB?
The basic method for adding data to MongoDB is “inserts”. To insert a single document, use the collection’s insertOne method:
> db.books.insertOne({“title” : “Start With Why”})
For inserting multiple documents into a collection, we use insertMany. This method enables passing an array of documents to the database.
How to perform queries in MongoDB?
The find method is used to perform queries in MongoDB. Querying returns a subset of documents in a collection, from no documents at all to the entire collection. Which documents get returned is determined by the first argument to find, which is a document specifying the query criteria.
Example: > db.users.find({“age” : 24})
What are the basic data types in MongoDB?
MongoDB supports a wide range of data types as values in documents. Documents in MongoDB are similar to objects in JavaScript. Along with JSON’s essential key/value–pair nature, MongoDB adds support for a number of additional data types.
The common data types in MongoDB are:-
Null {“x” : null}
Boolean {“x” : true}
Number {“x” : 4}
String {“x” : “foobar”}
Date {“x” : new Date()}
Regular expression {“x” : /foobar/i}
Array {“x” : [“a”, “b”, “c”]}
Embedded document {“x” : {“foo” : “bar”}}
Object ID {“x” : ObjectId()}
When to use MongoDB?
You should use MongoDB when you are building internet and business applications that need to evolve quickly and scale elegantly. MongoDB is popular with developers of all kinds who are building scalable applications using agile methodologies. MongoDB is a great choice if one needs to:
Support a rapid iterative development.
Scale to high levels of read and write traffic - MongoDB supports horizontal scaling through Sharding, distributing data across several machines, and facilitating high throughput operations with large sets of data.
Scale your data repository to a massive size.
Evolve the type of deployment as the business changes.
Store, manage and search data with text, geospatial, or time-series dimensions.