A Beginner’s Guide to Design Patterns

We use design patterns so that we don’t have to write repeated code again and again for same kind of problem. Design pattern is not a class or piece of code. Its a template which should be implemented based on the situation. Design patterns are divided into following categories:- Behavioral, Creational, Structural Behavioral pattern: As the name explain, Behavioral patterns describe how the objects behave … Continue reading A Beginner’s Guide to Design Patterns

React JS Lifecycle methods

Lifecycle methods of any React component can be divided into three phases. Mounting (i.e. Birth) Updating (i.e. Grow) Unmounting (i.e. Death) These phases can be further divided into following methods. Mounting (i.e. Birth) Initialization & Construction Pre-mounting with componentWillMount() Component render() Post-mount with componentDidMount() Updating (i.e. Grow) Updating and componentWillReceiveProps() Using shouldComponentUpdate() Tapping into componentWillUpdate() Post-Render with componentDidUpdate() Unmounting (i.e. Death) Using componentWillUnmount() Lets have these method in detail: – Initialization & Construction: … Continue reading React JS Lifecycle methods

@ComponentScan vs @EntityScan

@ComponentScan is used for scanning all your components those are marked as @Controller, @Service, @Repository, @Component etc… where @EntityScan is used to scan all your Entities those are marked @Entity for any configured JPA in your application. @ComponentScan: Configures component scanning directives for use with @Configuration classes. It is as same as writing Spring XML’s <context:component-scan> element. The  value()  attribute may be specified to define specific packages to scan. … Continue reading @ComponentScan vs @EntityScan

What’s new in ES6

ES6 is or ECMAScript6 or ECMAScript2015 is so far the latest release in JavaScript history. The brief history of JavaScript: 1995: JavaScript is born as LiveScript, 1997: ECMAScript standard is established, 1999: ES3 comes out and IE5 is all the rage, 2000–2005: XMLHttpRequest, a.k.a. AJAX,, 2009: ES5 comes out (this is what most of us use now) with forEach, Object.keys, Object.create (specially for Douglas Crockford), and standard JSON, 2015: ES6/ECMAScript2015 comes out; … Continue reading What’s new in ES6