Browsed by
Category: Software Engineering

The Unstated React Service Pattern

The Unstated React Service Pattern

This guide demonstrates a React Pattern for sharing global state, without requiring any of the following: 😒 Prop-Drilling 🔥 Redux 💲 MobX 🏀 Apollo Link State (The above emojis were auto-selected by Emoj) The Context API Recently I found myself at an Advanced React Training with Michael Jackson(no… not the King of Pop, the King of React Router 😉). We spent a good deal of the time working through Higher Order components and the new React Context API. Being so new to The React Way, (yet so familiar with…

Read More Read More

DIY React state manager

DIY React state manager

This is a tutorial aim to demystify what libraries like react-redux does under the hood and learn about the new context apis Why even bother I think there are a couple of reasons why you should be interested in how state management works. If you know how it works under the hood, a lot of problems that you might have will be more simple to debug, especially if you’re moving away from a consolidated library to a new library which is…

Read More Read More

You Might Not Need Redux

You Might Not Need Redux

People often choose Redux before they need it. “What if our app doesn’t scale without it?” Later, developers frown at the indirection Redux introduced to their code. “Why do I have to touch three files to get a simple feature working?” Why indeed! People blame Redux, React, functional programming, immutability, and many other things for their woes, and I understand them. It is natural to compare Redux to an approach that doesn’t require “boilerplate” code to update the state, and to…

Read More Read More

ASP.NET MVC 5: Using a Simple Repository Pattern for Performing Database Operations

ASP.NET MVC 5: Using a Simple Repository Pattern for Performing Database Operations

Abstract: The Repository pattern decouples your ASP.NET MVC application and shields it from changes by creating a boundary between your data access code and the other parts of your application. Recently a client of mine asked for a solution to isolate the direct dependency of the Data Access Layer with the rest of the layers of the application. In this article we will discuss one of the concepts I suggested to him for an ASP.NET MVC application. Typically in multi-layer applications,…

Read More Read More

How to Implement the Repository Pattern in ASP.NET MVC Application

How to Implement the Repository Pattern in ASP.NET MVC Application

The Repository Pattern is one of the most popular patterns to create an enterprise level application. It restricts us to work directly with the data in the application and creates new layers for database operations, business logic, and the application’s UI. If an application does not follow the Repository Pattern, it may have the following problems: Duplicate database operations codes Need of UI to unit test database operations and business logic Need of External dependencies to unit test business logic…

Read More Read More

Batch: An API to bundle multiple PayPal REST operations

Batch: An API to bundle multiple PayPal REST operations

REST APIs are vital business tools that allow merchants, partners and developers to consume and build on top of the various payment capabilities that PayPal provides. Whether it is checkout, recurring payments, vaulting or identity operations there are multiple end to end API interactions involved in each of those business flows. These APIs are also a critical part of the internal Service Oriented Architecture (SOA) at PayPal. Different domains expose various internal capabilities and operations via REST interfaces using which the…

Read More Read More

async/await – What You Should Know

async/await – What You Should Know

Introduction Sometimes, we use new technologies while we are not aware of the bottlenecks and weird parts of that technology which eventually might trap us in bad situations like deadlocks which may be really hard to track. What exactly happens in Task-based Asynchronous Pattern (TAP), what are the improvements since .NET 4.0, how may we introduce a deadlock and how to prevent it? Consider somewhere in your code, you need to do something asynchronous, what are the different ways to do…

Read More Read More