Posts

Mongo DB - NoSQL

Image
What is Mongo DB MongoDB is an open-source document database and leading NoSQL database. MongoDB is written in C++. MongoDB is a  cross-platform ,  document-oriented  database that provides,  high performance, high availability, and easy scalability . MongoDB works on the concept of collection and document. Database The database is a physical container for collections Collection A collection is a group of MongoDB documents. It is the equivalent of an RDBMS table Document A document is a set of key-value pairs. Documents have a dynamic schema. Documents in the same collection do not need to have the same set of fields or structure, and common fields in a collection's documents may hold different types of data. _id Field of a Document _id is a 12 bytes hexadecimal number which assures the uniqueness of every document. You can provide _id while inserting the document. If you don’t provide then MongoDB provides a unique id for every document. These ...

JAVA Spring-Boot Framework

Image
Essential Features of Spring Boot  What is Spring Boot Create stand-alone Java applications, which contains an embedded tomcat server. It is a Spring-based production-ready project initializer. It reduces the requirement to write a lot of configuration and boilerplate code. 1. AutoConfiguration In a modern-day Spring application, which uses Java-based configuration, you need to add the following two methods into your Configuration class @Bean  public JdbcTemplate jdbcTempalte(DateSource ds){       return new JdbcTempalte(ds);  }  @Bean  public DataSource dataSource(){   return new EmbeddedDatabaseBuilder()  .setType(EmbeddedDatabaseType.H2)   .addScripts('ddl.sql', 'data.sql')  .build();  }              But, more importantly, this is a piece of code which many of us have written irrespective of our application. I mean, this code is not unique and every sin...

My Question on StackOverflow - "Error:java: invalid source release: 11"

Image
https://stackoverflow.com/questions/56085797/i-cant-identify-the-errorjava-invalid-source-release-11-please-help-me

Learning RESTFUL Web Services

Image
What is Restful Web Service? REST  stands for  REpresentational State Transfer This  is used to build Web services that are lightweight, maintainable, and scalable in nature. A service which is built on the REST architecture is called a  RESTful  service. The underlying  protocol  for REST is  HTTP , which is the basic web protocol.  It revolves around resource where every component is a resource and a resource is accessed by a common interface using HTTP standard methods. REST  is a way to access resources which are contained in a particular environment. For example, you could have a server that could be hosting important documents or images or videos. All of these are sort of resources. If a client, say a web browser needs any of these resources, it should request from the server to access these resources. Now REST defines a way on how these resources can be accessed. The key points of a RESTful implementation are...

MAVEN Build Tool

Image
What is Maven Maven is a build automation tool used primarily for Java projects. Maven addresses two aspects of building software:   It describes how software is built  It describes its dependencies Also justified as a project management tool used by developers. It is a global repository which provides you with dependencies. Here dependency means the external libraries required to build a project. It provides plug-n-play stuff for maintaining the projects. Maven allows the developer to focus on developing the functionality and support them by providing the necessary libraries which will be mentioned in “pom.xml”. Pom.xml Project Object Model (POM) is an XML file that contains information about the project and configuration details used by Maven to build the project. When executing a task, Maven looks for the POM in the current directory. It reads the POM file, gets the needed configuration information, then executes the goal. POM includes a depende...

Creating a REACT component

Image
Every React app is built out of components You may have one single component in a simple app or a number of components in something more complex. Simple React components can just render a static (hardcoded) HTML markup can be dynamically rendered based on a locally saved JSON data can be nested into each other to create a more complex app layout can be rendered based on a data  provided by a parent component  The simplest React component just renders a bit of HTML markup Complex React components A more complex React components might have more logic inside of them, but at the end of the day, they are also just rendering a bit of HTML markup on the page. can include advanced logic that defines what the returned HTML will look like can contain its own state  can contain lifecycle methods  can include custom methods that will be executed when a user clicks on a button for example Stateless components vs Class components Simple (stateless)...

How Javascript is working-Mechanisms

Image
     Contents   Create a JavaScript variable Create a JavaScript function Assign JavaScript function as a variable Create a JSON Object Understand about the scope and get the idea about the “this” keyword The difference between bind and call How to create a JavaScript class and way of using the prototype     What is closure and behavior of closure Create a JavaScript variable There are no variable types like int, String in JavaScript. The way that creating JavaScript variables is given below. There are three keywords used when declaring a variable in Javascript, namely, var , let and const . var age=15; let age=15; cons age=15; var Method This was the only way to declare a variable before ES6. Here you can declare the same variables more than one time and can be updated. var myFriend = 'Kevin' ; var myFriend = 'Dayana' ; console . log ( myFriend ); // 'Dayana' If you declare variable inside ...