Part 2: Serverless, AWS API Gateway, Lambda and Mapbox
In part 1, we completed the back end for an AWS microservice, comprised of a a PostGreSQL relational database with the PostGIS geospatial extension enabled. The PostGIS extension allows the new cloud database to store geographic data and the ability perform geographic SQL queries.
Remember, vector based geographic data can be stored in the database as points, lines and polygons.
Part 1: The PostgreSQL, PostGIS and AWS Cloud back end
Traditional monolithic web applications are hard to scale. As the code base ages and becomes more complex, adding new features or new technologies becomes increasingly difficult.
Within a microservices architecture, each application component runs as its own service and communicates with other services that drive the application through API calls, not directly. Each service performs a single function and is self contained, unaffected by other processes or changes in other processes. The idea is to break down a monolithic structure with smaller independent ones, thereby increasing resiliency of the application.
Bubble sorting is based on the idea of repeatedly comparing pairs of adjacent values and then swapping their positions when the values are out of order. It is an intuitive sorting method because it’s logic is based on the comparison of values, one at a time. The downside is that this method is inefficient and time consuming when compared to other sorting methods.
Here is an implementation of Bubble Sort in JavaScript.
const bubbleSort = (sortMe) => { sortMe.forEach((item, pass) => { console.log('pass:', pass) sortMe.forEach((item, j) => { console.log('sortMe', sortMe) if(item > sortMe[j + 1]) { const temp = sortMe[j]…
How hackers can peer into insecure web connected databases
SQL injection attacks are not new. They have been around since when websites first became connected to databases. Misbehaving hackers figured out that they could sometimes manipulate a website’s URL and access data that was not intended for them. Or, if they worked at it, they could find clever ways to destroy data in a database that is connected to to a website simply by passing a bit of SQL in the query string. …
Using Big O Analysis to write efficient code
A programmer’s main task is to write code that executes series of actions designed to produce some desired output. As every new chunk of code is written, the programmer likely must evaluate different ways to solve a particular problem through code.
So, if there are many different ways to write code that produces the desired result, how can we determine objectively if a chunk of code, or block, is better than another? This is where Big O analysis comes in.
Big O analysis is about objectively comparing different code blocks that produce…
This post will explore a method of displaying recent Medium blog posts within my web development portfolio site. Specifically, on the left hand side, we want to get this listing dynamically (outlined in red in the image below). We would like to display the last 5 blog posts that have a title, subtitle, url, pubDate, and imgUrl.
Community Building using React Native and Firebase noSQL
The inspiration for this experimental project came from discovering the Class Dojo app for web, iOS and Android. In short, the ClassDojo app helps teachers and parents build community in a classroom. By providing a fun and simple social network with many useful features, it allows for student and parent interaction and engagement. With the emergence of COVID-19, tools like these have become more important. My favorite aspect of CD is it’s simplicity and accessibility to younger children.
Part 1: The Basics
This post was inspired by one of my favorite JavaScript YouTubers, Mattias Petter Johansson, MPJ for short. MPJ hosts the Fun Fun Function channel on YouTube (currently on hiatus). He is very experienced and ventures into new and sometimes difficult territories consistently. He is entertaining and smart. Here is what he said about closures…
Closures is this really tricky subject … and it actually took me several years into JavaScript before I really truly understood what was going on. — MPJ (Closure exposure therapy — Exploring closures in JavaScript with friendly live mob programming)
How does JavaScript compare to Ruby?
A primitive data type in JavaScript is data that is not an object and has no methods.
There are 7 primitive types: undefined
, null
, boolean
, string
and number, symbol
and bigint
. Everything else in JavaScript is an is an object.
Here’s a breakdown:
undefined: the value assigned variables that have been declared, but have no valuenull: Nothing. Something that doesn't exist. The programmer sets a value to null to convey this.boolean: true/falsestring: a sequence of characters used to represent textnumber: a numbersymbol: a unique identifier type, with specific use…