Shallow equality is verified by iterating on the keys of the objects being compared and returning true when the values of a key in each object are strictly equal for all the keys.
React relies on shallow equality between current and next state/props to decide on whether to re-render or not. Shallow Compare is the negation of Shallow Equality. Render if shallowCompare returns true.
Shallow equality becomes dicey when the nestedness increases. I have created the mental model (cheat sheet) to remember the intricacies.
A lot happens during JVM Garbage Collection. GC logs would be the closest one who would have witnessed 😄 and record the events as it happens. By looking at these logs we would be able to understand how well our application behaves for a given scenario, configuration, and/or load.
Typical questions that would get answered are
Let's Learn to Talk to GC Logs in Java 9 by Poonam Bajaj Parhar
We will explore the GC logs using a simple Java program that covers three different…
Application development lifecycle period got shrink to few weeks or couple of months. Visible outcomes are expected in every iterations.
For a simple CRUD based applications, low code or no code platforms seems to be attractive. I will provide the basics of Metadata-Driven Development, which could be a mid-path between hand-crafted “effective” web application development and low-code development.
Let’s say we need to create a basic form which allows a business user to capture daily exchange rates (CRUD form) to be utilized by their business process.
“Event sourcing refers to a collection of patterns based on the idea of persisting the full history of a domain as sequence of events rather than persisting just the current state” — by Udi Dahan
Spoiler Alert:
Event sourcing may not see the light of day in regular Enterprise Application development. But they have their relevance in Source Code Control Systems (like Git, SVN), Database internals (like replications, backup and recovery) and in a small part of a complex Enterprise Application.
“Event sourcing is a good fit only if you are dealing with complicated and ever changing domain” — by Udi…
Performing I/O usually takes orders of magnitude longer than performing in-memory processing tasks on the data. Many coders concentrate on what their objects are doing to the data and pay little attention to the environmental issues involved in acquiring and storing that data.
I/O is often the limiting factor in application performance, not processing speed
- By Ron Hitchens in book “Java NIO”
Java NIO (Non-blocking I/O) is a collection of APIs for scalable I/O. Key features includes
NIO Buffers is the basic building block for the overall implementation of the non-blocking I/O. In this blog, I will cover the behavior of Buffers. In subsequent blogs, I will cover how File and Network I/O are effectively handled. …
React published a tutorial which creates “Tic-Tac-Toe” game for the purpose of learning by doing. I liked the way Dan Abramov explained basics of JavaScript in “Just JavaScript” series and React in “Tic-Tac-Toe” tutorial.
I have created the exact same “Tic-Tac-Toe” using Vue 3. Vue 3 code looks straight-forward than React, but I will leave the judgement to the readers 😄
The final React project created by Dan Abramov is available here
The final Vue 3 project created by me is available here
💡Codepen has lot many restrictions. So both React and Vue 3 code shared has squeeze all the components into a single JS…
Learning about JVM Garbage Collection and the mechanics behind each of the Collector Algorithms is as important as learning Java language features. High-level details of the algorithms give a perspective about the lifecycle of objects, the probable failures (like an out-of-memory exception, memory leaks etc.,) and how the failures can be averted.
Garbage Collection (GC) is a form of automatic memory management. The basic operations of any Garbage Collector are
Reactivity is a programming paradigm that allows us to adjust to changes in a declarative manner.
JavaScript variables are not reactive by default. JS Proxy provide the mechanism to achieve the reactiveness. Vue 3 adds the necessary abstraction on JS Proxy and makes it native and simple. Vue 3 Reactivity package is available as a standalone package.
reactive
andref
converts the regular values to reactive variables.
computed
andeffect
are high-order functions which are executed when the values in the reactive variables change.
ref
— Takes an inner value and returns a reactive and mutable ref object. The ref object has a single property .value
…Object-Oriented Design (OOD)
🙇 Practical Object-Oriented Design in Ruby by Sandi Metz
The purpose of the design is to allow you to design later and its primary goal is to reduce the cost of change
Practical design does not anticipate what will happen to your…
Vue implements a content distribution API inspired by the Web Components spec draft, using the <slot> element to serve as distribution outlets for content.
About