Microservices are architectural paradigms that address the limitations and drawbacks of legacy applications.

To understand microservices we need to under the history of software architecture design.

Monolithic Software Architecture

Monolithic software architecture is a single codebase encapsulating data storage and access, business logic and user interfaces.

Monolithic architecture has a drawback of poor scalability. At scale monolithic architecture is difficult to maintain and evolve.

Multitier Software Architecture

Multitier architecture is the solution to monolithic architecture. Multitier architecture application components are separated into layers based on technical function. Common model has three tiers.

Three tiers of Multitier software architecture are:

  • Presentation layer
  • Logic layer
  • Data layer

Challenges of Applications and Systems

Application complexity has constantly been growing.

Complex apps are extremely hard to maintain, evolve, and scale. A software like Amazon or Google Search requires microservices.

The best way to tackle complexity is deconstructing it into manageable chunks.

A mobile or web application that requires data from multiple APIs is using microservice architecture.

An app can use a user profile microservice, a payment processing microservice, a products microservice and many more microservices to make a complex application.

For cost reduction, efficiency improvement, operational optimization most organizations limit team choices to a set of approved tools infrastructure providers and programming languages.

As applications continue evolving and growing the number of microservices inside an organization could expand to hundreds or even thousands.

Complexity creep happens with thousands of microservices. A failed microservice can generate a cascade of outages.

Highly distributed microservice based systems require maintenance tools like containerization.

Microservice Tools

Docker containers are self contained runtimes.

Containerization deploys microservices in minimalist self contained runtimes.

Kubernetes pipelines is a container orchestration system that manages container life cycles.

Pipeline automation is a CI/CD (continuous integration & deployment).

Asynchronous messaging further couples microservices.

Kafka provides message Brokers and queues applications performance monitoring tools to track microservice.

Prometheus monitoring tool alerting. Operates a pull model scraping HTTP metrics.

Datadog correlates metrics, traces, and logs.

Navigate to NextJS official website: https://nextjs.org/

Copy the create application command to your terminal.

npx create-next-app@latest
  • Typescript select No
  • ESLint select Yes
  • Tailwind CSS select No
  • src/ directory No
  • App Router? Yes
  • import alias? No

Change directory into your app.

Start the app, type the command: npm run dev

Open the project folder in your preferred text editor.

Client-side the visible content is generated & rendered on the client-side (by the client-side browser code)

The UI update is performed via client-side React code – the page is NOT reloaded or re-rendered on the server!

What is NextJS? And why would you use it?

NextJS is a React Framework it builds on top of React.

Why do we need another framework, isn’t React itself already a library?

It vastly simplifies the process of building fullstack applications with React.

Trend in last couple years build fullstack apps instead of SPAs (Single Page Applications).

With NextJS you get the best of both worlds: Highly interactive frontends, blending seamlessly with tightly connected backends.

React is becoming a hybrid library. React is adding more features to run react on the server and render components on the server.

Using these features without a framework is tricky & typically not all you need: Route Setup & Handling, Form Submission, Data Fetching, Authentication and much more.

NextJS handles route setup & config, handles requests and responses, handles data fetch & submission and more.

You need a solid React foundation to build NextJS applications.

NextJS allows you to take your React apps to the next level and to build fullstack applications with React.

Key Features & Benefits

Fullstack Apps

NextJS blends frontend + backend (in the same project). Advantage: Frontend and backend tasks are part of the same project.

NextJS enhances React by creating fullstack applications, one benefit of this is more secure data requests.

File-based Routing

NextJS has Filesystem-based Routing. NextJS uses files & folders to define routes. Only files & folders inside the “app” folder are considered apart of the Routing.

In a vanilla JavaScript app you would define your routes with code.

With NextJS you configure Routes via the filesystem (folders + files). Advantage is no extra code base conig or extra packages for routing are required.

Server-side Rendering

NextJS renders all visible content all pages and components on the server. The content that is sent to the client is already rendered on the server.

The advantage is that HTML page content is rendered, this is great for SEO.

Ever wondered what interview questions you’ll be asked for a Front End Develop ReactJS position.

Here are some common questions and answers to ReactJS interview questions.

What is JSX?

It stands for JavaScript and XML. It’s syntactically responsible for React createElement. React uses JSX to compile down into Elements.

Why is class className in React?

It’s because class is a reserved keyword in JavaScript, so when the JSX compiles down into Elements, it results in an error, so we use className in JSX.

Describe how data flow works in React.

All components in react have a parent child component relationship. Then data flows down. from above, flowing unidirectional. We pass information in the most basic way with props and state. Global state management can share data multiple layers deep. Context, global state and redux can prevent passing data unidirectional down from parent to child.

How would you delay an API call until a component is mounted?

Use componentDidMount, a component Lifecycle method. Another way is to use useEffect hook and pass an empty array as second argument, it mimics componentDidMount. When you pass certain variables to the useEffect second argument, useEffect will run when these variables change. Functional components with hooks are the most modern ReactJS development procedure.

Should you use Ternaries or && operator to conditionally render React components?

Sometimes if you check the length of a variable a 0 gets rendered to the page. Basically JavaScript knows that 0 zero and something is always going to be “falsey” so it doesn’t bother evaluating the right side of the expression. Ternaries are better to help avoid printing 0 zero to the screen.

More details regarding using Ternaries rather than && operators in JSX: https://kentcdodds.com/blog/use-ternaries-rather-than-and-and-in-jsx

This is a tutorial for Gigfiliate Commissions. You will learn how to create an upload-able PayPal file for PayPal Mass Payouts.

Step 1: Copy This Spreadsheet to Google Drive

To do: Provide sample spreadsheet.

Step 2: Export All Affiliates

Export a spreadsheet of all active affiliates.

WordPress Admin > Gigfiliate > Tools > Export All Affiliates

Step 3: Download Key Metrics

Then get the Key Metrics report from Gigfiliate API.

Gigfiliate API Admin > Reports > Key Metrics > Choose Month & Year > Export to CSV


Upload to Google Drive. I like to upload my .CSV to Google Drive for cloud storage backup.

Rename file to “{year}-{month} {month_name} Key Metrics by Period” and open as a Google Spreadsheet.

Filter the rows at the top. Filter by TA (Total Volume) Z-A.


  • Is this an unnecessary step?

Step 4: Process Payouts

Export the Gigfiliate Process Payouts for the selected period.

Gigfiliate API Admin > Process Payouts > Export to CSV


Upload to Google Drive and open as a Google Spreadsheet.

Filter the rows at the top. Filter by Amount Due Z-A.

Delete records with 0 Amount Due.

Step 5:

Copy Payouts values to Final Payouts file.

These 6 Laws Of Wealth from the book The Richest Man in Babylon by George Samuel Clason are timeless.

The First Law of Wealth

“Keep a part of all you earn. Save at least 10% of your income.” ~ The Richest Man in Babylon

The Second Law of Wealth

“Put your savings to work for you. Invest it so that it will multiply.” ~ The Richest Man in Babylon

Swan is the best way to accumulate Bitcoin with automatic recurring and instant buys using your bank account, or wires up to $10M. Join today to get $10 of free Bitcoin in your account.

Invest in Bitcoin with Swan Bitcoin

The Third Law of Wealth

On average Credit Cards cost you 15% annual interest. So if you have $1000 on your Credit Card you pay $150 extra, every year!

The Fourth Law of Wealth

“Don’t speculate in get-rich-quick schemes. Invest in solid businesses that you understand.” ~ The Richest Man in Babylon

So true, I remember when I was eighteen some older people I knew told me to put my money in some website that was suppose to turn a profit through travel ads or some bullshit. The site never did anything and I was down $400 USD. I didn’t understand that the only business model these people had was to take money from uneducated business kids like I was.

The Fifth Law of Wealth

“Invest in yourself. Gain knowledge and skills to increase your earning power.”~ The Richest Man in Babylon

If you between the ages of eighteen and twenty-eight your primary goal in life should be to absorb knowledge. Knowledge helps you recognize opportunities easier! Purchase books that other successful people recommend and take online courses that you can finish in a day. Check out my top three favorite sites for learning code.

The Sixth Law of Wealth

“Safeguard your growing fortune with diversification and insurance.”~ The Richest Man in Babylon

Gigfiliate for WordPress uses cookies to track affiliates and visits so referrals can be generated. This article explains why the cookies are important, and how you can see them in your browser when testing the system to check a visit has been created.

How they work

A cookie is a small piece of data which is stored in a user’s web browser when they visit a website. When a customer comes to your website via an affiliate referral link (i.e. yoursite.com/?ref=123), AffiliateWP stores two main browser cookies in order to track the referring affiliate, and the visit. Their names are:

  • gigfiliatewp_ref – this cookie stores the affiliate’s unique ID
  • gigfiliatewp_ref_username – this cookie stores the affiliate’s username
  • gigfiliatewp_ref_visit_id – this cookie stores the visit ID (the visit ID increments by 1, each time any referral link is used until the cookie expires or is deleted).

Gigfiliate for WordPress also stores a third cookie for affiliate campaign tracking, gigfiliatewp_campaign. This cookie will only be stored if an affiliate generates an affiliate referral URL with a campaign name from the Affiliate Area, and that link is clicked on by a customer.

When a customer clicks on an affiliate’s referral link, and these cookies are successfully generated, a visit will appear in Gigfiliate for WordPress’s Admin Visits screen. The cookies will then remain in the browser throughout the purchase or conversion process to track the correct affiliate so a referral can be generated for that affiliate. The cookies will also remain in the customer’s browser for a period of time specified by the site admin in the Gigfiliate WP » Settings » General » Referral Settings » Tracking Expiration setting, or until the customer clears their cookies (the default cookie expiration in the Gigfiliate WP » Settings » General » Referral Settings » Tracking Expiration setting is 30 days).

If these cookies are not visible in the browser when your site is visited via an affiliate referral link, a visit will not be generated (or, you may have enabled Fallback Referral Tracking). This is why it is important to test the system is working when you initially set up AffiliateWP.

Here’s how you can find the cookies in popular browsers to check if a visit has been stored correctly:


Follow these steps to view the Gigfiliate WP cookies in Firefox:

  1. Visit your product page or website via the affiliate referral link
  2. Go to the Tools menu in the top menu bar, scroll down to “Web Developer” » and click on “Developer Toolbar”. This will display a toolbar at the bottom of your browser window
  3. In the toolbar, type “cookie list” and press Enter/Return on your keyboard – this will display a list of the cookies on your website
  4. Look for the affiliate ID cookie (i.e. gigfiliatewp_ref=123) and the visit ID cookie (i.e. gigfiliatewp_ref_visit_id=1). If the affiliate has created a campaign, the affwp_campaign cookie will also be visible.


Follow these steps to view the AffiliateWP cookies in Chrome:

  1. Visit the product page or website page via the affiliate referral link
  2. Go to the View menu in the top menu bar
  3. Go to the Developer option
  4. Click on “Developer Tools”
  5. In the “Application” tab, click on the “Cookies” drop-down menu in the “Storage” section on the left and click on the name of your website – the gigfiliatewp_ref and gigfiliatewp_ref_visit_id cookies should be visible there. If the affiliate has created a campaign, the gigfiliatewp_campaign cookie will also be visible.


Follow these steps to view the AffiliateWP cookies in Safari:

  1. Visit the product page or website page via the affiliate referral link
  2. Go to the Develop option in the top menu bar
  3. Click on “Show Web Inspector”
  4. In the “Storage” tab click on Cookies in the left navigation menu – the gigfiliatewp_ref and gigfiliatewp_ref_visit_id cookies should be visible there. If the affiliate has created a campaign, the gigfiliatewp_campaign cookie will also be visible.

Alongside each cookie name is a “value”. For the gigfiliatewp_ref cookie this value is the affiliate’s unique ID (i.e. 123), and for the gigfiliatewp_ref_visit_id cookie this is the visit ID. For the gigfiliatewp_campaign cookie, the value is the name of the campaign the affiliate is tracking (i.e. a “twitter”, or “facebook” campaign, etc.). These values can help you identify which affiliate is being tracked, and show you how many visits have been made to your website through affiliate referral links in total (all affiliate referral link visits are counted as one total).

Testing Gigfiliate for WordPress and clearing cookies

When testing Gigfiliate WP, if you have enabled the Fallback Referral Tracking, this essentially bypasses JavaScript (to avoid any existing JavaScript errors on your website) and tracks the affiliate and the visit using an alternate method. We recommend not enabling this feature unless instructed by support.

Also, to ensure the system is working correctly, you may need to clear your cookies.

Email is one of the best ways to engage with your audience. Therefore it’s never to early to begin building your brand’s email list. However the tasks of creating emails that render correctly in your reader’s inbox, regardless of what email client they’re using is not a straight forward task, until now.

In this tutorial I will show you how to create simple responsive HTML emails which will work in every email client, including all new smartphone mail clients and apps.

Listen to me mispronounce MJML with MGML for 10 minutes.

  • 1:35 What is MJML?
  • 2:12 Getting Started
  • 3:31 Creating The Responsive Email
  • 5:12 Converting MJML Into HTML
  • 7:07 Uploading The Email Template
  • 8:05 Bonus: Adding MJML Components

What is MJML?

MJML (Mail Jet Markup Language) is an open source framework that abstracts away the complexity of responsive email. The idea behind it is pretty simple. MJML abstracts the low-level ‘hacks’ for responsive emails with an easy syntax. MJML is responsive by design! No longer are responsive emails only accessible to a handful of experts.

Getting Started with MJML

Official getting started documentation here. You can install MJML on OSX, Linux and Windows using npm. Open up your terminal and run the npm install command forOSX.

sudo npm install -g mjml

Awesome now you have MJML installed.

Creating The Responsive Email Template

Let’s get a boilerplate for our new email template so we can get up and running fast! Get your MJML official boilerplate here. Click on the boilerplate template you want. Then copy the markup code from the editor.

Open up your favorite desktop editor and paste the markup code into your favorite text editor. I use Sublime Text 3. So even though this MJML markup looks like HTML your text editor doesn’t recognize it’s syntax, so fortunately Sublime Text 3 has a MJML Syntax package.

On OSX in your Sublime Text 3 editor, click on the application name in the top left next to the Apple logo, click preferences and select Package Control. When Package Control pops up type ‘install’, select the install package and type MJML then select the MJML package.

Example MJML boilerplate template:

<mjml version="3.3.3">
    <mj-container background-color="#F4F4F4" color="#55575d" font-family="Arial, sans-serif">
      <mj-section background-color="#C1272D" background-repeat="repeat" padding="20px 0" text-align="center" vertical-align="top">
          <mj-image align="center" padding="10px 25px" src="http://gkq4.mjt.lu/img/gkq4/b/18rxz/1h3k4.png" width="128px"></mj-image>
      <mj-section background-color="#ffffff" background-repeat="repeat" padding="20px 0" text-align="center" vertical-align="top">
          <mj-image align="center" padding="10px 25px" src="http://gkq4.mjt.lu/img/gkq4/b/18rxz/1h3s5.gif" width="600px"></mj-image>
          <mj-image align="center" alt="Happy New Year!" container-background-color="#ffffff" padding="10px 25px" src="http://gkq4.mjt.lu/img/gkq4/b/18rxz/1hlvp.png" width="399px"></mj-image>
      <mj-section background-color="#ffffff" background-repeat="repeat" background-size="auto" padding="20px 0px 20px 0px" text-align="center" vertical-align="top">
          <mj-text align="center" color="#55575d" font-family="Arial, sans-serif" font-size="14px" line-height="28px" padding="0px 25px 0px 25px">
            New dreams, new hopes, new experiences and new joys, we wish you all the best for this New Year to come in 2018!
          <mj-image align="center" alt="Best wishes from all the Clothes Team!" padding="10px 25px" src="http://gkq4.mjt.lu/img/gkq4/b/18rxz/1hlv8.png" width="142px"></mj-image>
      <mj-section background-color="#C1272D" background-repeat="repeat" padding="20px 0" text-align="center" vertical-align="top">
          <mj-text align="center" color="#ffffff" font-family="Arial, sans-serif" font-size="13px" line-height="22px" padding="10px 25px">
            Simply created on <a style="color:#ffffff" href="http://www.mailjet.com"><b>Mailjet Passport</b></a> Application
      <mj-section background-repeat="repeat" background-size="auto" padding="20px 0px 20px 0px" text-align="center" vertical-align="top">
          <mj-text align="center" color="#55575d" font-family="Arial, sans-serif" font-size="11px" line-height="22px" padding="0px 20px">

Great so now you have MJML code in your editor. Save this file as email-template.mjml anywhere you’d like I would suggest creaeting a folder on your Desktop called Email-Templates so the file is easy to find.

Converting the MJML into HTML

We are almost finished creating our responsive email template, but right now our MJML is unusable, email clients don’t understand MJML and this MJML needs to be compiled into HTML, we convert MJML into HTML with a simple terminal command, run this command.

Navigate to your Email-Templates folder

cd ~/Desktop/Email-Templates

Convert MJML into HMTL

mjml -r email-template.mjml -o email-template.html

Awesome now you’ve created your email-template.html

Upload Your Template to Your Favorite Email Marketing Platform

Congratulations now you have an awesome responsive email template using the power of NPM & MJML! You can now upload this email-template.html file to your favorite marketing platform like MailChimp.

Login to MailChimp. Go to templates. Click Create Template. Click Import HTML. Select email-template.html give it a title and you’re good to go!

Bonus: Add Awesome Components

You can see all the amazing things you can do with MJML by checking out their documentation. For example you can add a awesome carousel that can scroll through multiple images! I have never before seen this in an email builder, so it’s really exciting. Below is the markup code for a carousel, just replace the src attribute values with the images links you want.

      <mj-carousel-image src="https://www.mailjet.com/wp-content/uploads/2016/11/ecommerce-guide.jpg" />
      <mj-carousel-image src="https://www.mailjet.com/wp-content/uploads/2016/09/3@1x.png" />
      <mj-carousel-image src="https://www.mailjet.com/wp-content/uploads/2016/09/1@1x.png" />

I hope you enjoyed this short tutorial on how to make awesome responsive emails, if there is anything I left out or anything else you’d like me to cover please leave a comment below! Thanks.