The Extras of React

React, The Extras.

Chris Berry Articles, Development Technologies & Tools, JavaScript, React, Tutorial 1 Comment

Weโ€™ve all seen and read the React tutorials. We know about classes and components and JSX and whatnot, but then there comes the time when you have to start doing things for real. โ€œRealโ€ you say? Yes. Like connecting to a database or navigating around something larger than โ€œHello World.โ€ Oh, then there’s that dreaded state thing. Well, letโ€™s have a quick talk about the โ€œExtrasโ€ that we can add into a React application.

In this blog, we will address adding routing using the React Router, adding data access using the JavaScript Fetch API, and creating a global state management feature using Reactโ€™s built-in Context API.

Expression Parser with Antlr4

An Antlr4-Based Expression Parser

Lou Mauget Articles, Development Technologies & Tools, Java, Programming, Python 1 Comment

In this blog, weโ€™ll present a simple arithmetic expression parser implemented through an Antlr4 parser generator. It will be able to take in an input string (such as 2+4+-4+-2*10%9*7) to produce the result (-12.0).

You may be thinking, “Great, but whatโ€™s the point?” Well, to answer your question, as simple as this example may seem, the principles involved actually extend to use cases such as DSLs, transpilation, and anything else expressible by grammar rules.

This post has two parts. In part 1, weโ€™ll discuss the background components of a parser. In part 2, weโ€™ll cover building the demo and running it. If you already understand grammar parsing, you could skip part one.

Progressive Web Apps: The Service Worker Demystified

Adrienne Gessler Articles, JavaScript 4 Comments

You canโ€™t read any technology trend news for the upcoming year without reading about Progressive Web Applications (PWA). PWA offers the ability to add native-like capabilities to your web application.

One of the core technologies of a PWA is the service worker, so I thought I would take us through a question and answer session on service workers. Service workers have been around for a while now, but the momentum in their use has picked up with the popularity of PWA. My goal here is for you to be able to understand what a service worker is, what you can do with it, and the limitations of a service worker.

Centralizing Configurations with Spring Cloud Config

Bing Liu Articles, Development Technologies & Tools, Microservices, Spring, Spring Boot Leave a Comment

When the Microservices approach became popular a few years ago, many companies rushed to build their own microservices or to convert their legacy applications into microservices. Over the years, companies have implemented an abundance of microservices, mostly with Spring Boot. Each of them manage their own configurations across deployment environments like Dev, Test, and Prod.

Due to the nature of a complex business process, there are many common configurations (e.g. databases, queues, email servers, and FTP servers, etc.) used in the distributed services. This can result in services having redundant and confusing configs on a distributed system. It can become challenging to update the configs for too many services on a distributed system across multiple environments.

Thankfully, Spring Cloud Config provides the implementation to successfully resolve these issues. It provides server-side and client-side support for externalized configuration in a distributed system. With the Config Server, you have a central place to manage external properties for applications across all environments. The concepts on both client and server map identically to the Spring Environment and PropertySource abstractions, so they fit very well with Spring applications.

In this post, Iโ€™ll demonstrate Config Server and Client with example code. Iโ€™ll show you how to use Git or a local repository as a central place to store all the config files. The diagram below illustrates how the distributed client services (e.g. Investment Position/Price/Reporting Data service) fetch their configuration from the Config Server, which in turn retrieves them from one central place.

How to Create a Dystopian Future at Home with Python, OpenCV, and Microsoft Azure

Derek Andre Articles, Azure, Cloud, Development Technologies & Tools, Python, Tutorial 2 Comments

Facial recognition is both amazing and horrifying. Some amazing things it can do is the ability to find missing children or seniors, using your face to unlock your phone, and being able to board an airplane faster.

In this blog post, I want to highlight some powerful tools and platforms that allow you to create distributed facial recognition systems with OpenCV and Azureโ€™s Cognitive Services. By the end of this post, you will have a working face detector using OpenCV that can communicate with Azureโ€™s Cognitive Services.

I used Python 3.7.4 and pip 19.2.3 for this project. You can view the code from this blog at https://github.com/dcandre/Dystopian-Future-At-Home.