Thursday, April 25, 2019

ReactJS

React JS
           

  • Suitable for large web application which use the data change  over the time without load the entire page.
  • There is the thing called react native use for mobile applications.
  • Speed ,simplicity and scalability are the main reasonse for use it.Severs as the view MVC architecture.
  • Data flow from parent component to child component and action flow from child component to parent component.
Component life cycle
React component extend from React.There are set of method in react component.

1.constructor
      Declare state and bind context to life cycle events.
      Always call super to bind
      Do not call setState.

2.render
     Called evereytime state or props are getting changed.
     Rendering the component.

3.componentDidMount
     Can interact with DOM.
     Ajex calls and update the state.

4.getDerivedStateFromProps
    Use to update state from props.
    Recommends to not to use this.
 
5.shouldComponentUpdate
     Use to decide the component update or not.
     If is required can use fro performance enhncement.

6.componentDidUpdate
    After component got update.
    when it return fslse this method not run.
    Use this to interact with Dom after a Component update.

7.componentWillUnmount
     Before removing the component
     should not call setState.
     Clean up tasks.

8.getDerivedStateFromError/componentDidCatch
     get error related the stste.
 
 Babel
  •    most popular JavaScript transpiler.convert JavaScript se6 features to compatible version.supports to JSX and FLOW.

webpack
  •  most famous module bundler.Supports commonJS and AMD
  •  Not only that support fro build system as well as module bundling.

parcel
  •  fastest module bundler. on version over configurations.
  •  support for JSX,SCSS,LESS,SVG,TypeScript etc.
  •  Plugins available for extension and plugins are automatically detected.

  ReactJS use for develop and maintained facebook and instergram.

Thursday, April 11, 2019

NoSql & MongoDB

 NoSql & MongoDB
NoSql 

    NoSql is stands for "not only SQL". It is distributed and open source. NoSql database is used for working with large number of data sets.It is not required relational schemas as the traditional database applications.As the example google and also Amazon use this database because the importance of the data consistency.

   Document database means data stored as the documentation format.Developers can update the programs without referring the master schema.Documented database use with JavaScript, JavaScript object notation(JSON),XML and other data formats can use as well.Document database used for content management and also mobile application data handling.CouchDB, DocumentDB,MongoDB are the examples for document databases.
  
MongoDB
  • MongoDB is open source document database.written in C++.It provides high performance,high availability and easy scalability.Use spiderMonkey JavaScript engine for MongoDB.
  • A single MongoDB server has multiple databases.
  • There is something called Collection.it is a group of MongoDB documents like as tables of RDBMS.collection appear a single database.
  • Not only that there is something called as document.it has dynamic schema.it means in the same collection do not need to have same set of fields.Common fields in the collection's document can hold different data types. 

Relationship between RDBMS and MongoDB

RDBMS                                MongoDB
Database                               Database
Table                                      Collection
Tuple/Row                              Document
column                                   Field
Table Join                               Embedded Documents
Primary Key                           Primary Key (Default key _id provided by MongoDB itself)
  

Database Server and Client
Mysqld/Oracle                      mongod
mysql/sqlplus                        mongo

Advantages of MongoDB over RDBMS
Schema less,easy to scale,no complex joins and not need to mapping of application
objects to database objects etc.
Where to use MongoDB
 big data,content management and delivery,Data Hub,User data management,Mobile and social Infrastructure.