#01 – Introduction – TypeScript

What is TypeScript? TypeScript is a typed super-set of JavaScript It means that any JavaScript code is a legal TypeScript codeAlso we can write any JavaScript code in a Typescript file (.ts) without any errorIt add rules about how different type of values can be usedIt preserves the run-time behavior of JavaScript code, which means that TypeScript will not throw any "type" errors on run-timeTypeScript is a static type checker for JavaScriptDetecting errors in code without running is known as static checkingDetermining the nature or type of error based on the type of values is known as static type checkingSo...
forward

#00 – Concepts and Notes – JavaScript

Following is a list of core JavaScript concepts: HistoryDeveloped in 1995 by Brendan EichInitially named as LiveScriptAlso known as ECMAScriptJS has no concept of input or outputIt runs in an hosted environment like Node Server or BrowsersOverviewJS is a multi-paradigm, dynamic languageSyntax is similar to Java and C languagesIt supports object oriented approach using objects prototypes instead of classesIt also supports functional programmingTypesNumberStringBooleanSymbolObjectFunctionInner FunctionsArrayDateRegExpNullUndefinedVariablesLetConstVarOperatorsNumbericPlus (+)ComparisonBitwiseControl Structuresif-elsewhile loopdo-while loopfor loopfor-of loopfor-in loopswitch References: https://developer.mozilla.org/en-US/docs/Learnhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript...
forward

#01 – Introduction – Learn GraphQL

In this post, we have discussed what is GraphQL, the differences between REST API's and GraphQL API development architectures, and an example scenario to elaborate on the differences between the two approaches. What is GraphQL? It is a new API development standardIt is a query language for API'sIt provides declarative syntax to fetch data from multiple data sourcesIt's an alternate to REST API development architectureUnlike REST, it exposes only a single endpoint to respond to queriesIt solves the problem of over-fetching and under-fetching the dataIt speeds up the development because we don't need to adjust API every time the front-end...
forward

#02 – Data Fetching – Learn Next.js

Next.js provides three functions to fetch data for pre-rendered pages: getStaticProps(): Used for static generation (pre-rendering technique)Fetches data at build-timeWhen an async function getStaticProps() is called from the page component, the next.js will pre-render this page at build time using the props returned by that function (see Examples)The context parameter used as an argument of getStaticProps() function is an object containing following parameters (see details here):paramspreviewpreviewDatalocalelocalsdefaultLocalegetStaticProps() function returns an object with following parameters (see details here):props (required)revalidatenotFoundredirectImports used inside the getStaticProps() function are not bundled for the client sideServer side code can be written inside the getStaticProps() function e.g. to...
forward

#01 Introduction – Learn Next.js

Next.js is a framework used to develop production ready React applications. Next.js provides many useful features e.g. pre-rendering, smart bundling, dynamic file-based routing, route pre-fetching and many more. In this blog post, we have discussed the prerequisites, how to create next.js application, next.js pages, and pre-rendering techniques.

forward

WordPress Security Checklist

Following are some general recommendations to enhance security of a WordPress website. Use a security plugin e.g. Wordfence (if not already installed) and make sure that it’s updated to the latest version. Following is a short summary of recommended Wordfence settings:Make sure that the “Enabled and Protecting” mode is enabled after the “Learning” period is ended.In “Protection Level”, make sure to optimize the Wordfence firewall by enabling the Extended Protection mode.Upgrade the plugin to the premium version to enable the “Real Time IP Blacklist” feature to protect the website from malicious activities using the updated and latest database.The other default...
forward

NPM Commands Not Working in Integrated Terminal of VSCode

Visual Studio Code (VSCode) provides an integrated terminal to run commands inside the current directory. Recently, I installed VSCode and tried to run the NPM commands and it shows following errors:

forward

Common PHP Warnings/ Errors and their Solutions

Recently, we have updated our PHP version to the latest stable version (7.4.9) for our WordPress website. After the update we started getting PHP warnings. We have listed some of the warnings with their possible solutions in this blog post.

forward