Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Developing A RESTful API With Node.js And MongoDB Atlas

Most modern web applications need to be able to handle data consumption requests and data manipulation requests from clients using HTTP. It is the norm to pass JSON data between these requests so it makes sense to use a NoSQL document database because JSON and similar is the common storage format, eliminating the need to marshal data to new formats in every request.

Lucky for us, leveraging these concepts and technologies is not a difficult task.

We’re going to see how to create a RESTful API using Node.js and Express Framework that communicates to a cloud instance of MongoDB called Atlas.

Read More

Creating A Basic Chrome Extension

Chrome Extensions have been around for a long time. I believe they are a very under-explored technology - and if you’re a traditional web developer, there’s a very small learning curve since Chrome Extensions are comprised of HTML, JavaScript and CSS. Bonus - you don’t have to worry about every browser under the sun, just Chrome! (though Firefox is becoming extension-friendly, it might be a good idea to not include Chrome-only web features).

Read More

Inheritance And Composition In A PHP Application

As developers, we have encountered scenarios where some of the code we write can be reused by other code pieces. This has brought the concepts of code reuse in paradigms like object oriented programming. In this article, the author seeks to explain when to reuse code as well as how to achieve code reuse.

Read More

Convert Amazon Links In A Hugo Site To Affiliate Links With Gulp

As you may already know, The Polyglot Developer is a statically generated website built with Hugo. That means that there are no databases involved, no server side languages, only HTML, CSS, and JavaScript.

In the past I shared the automated Gulp workflow that I use when building my blog to maintain performance and a solid standing with search engine optimization (SEO).

I received a request from a subscriber recently around affiliate link generation on a Hugo website and I figured it would be an interesting topic to tackle. Typically a WordPress plugin or similar would handle the job, but since we’re working with a static website, we have to be inventive with our build scripts.

In this tutorial we’re going to see how to build a Gulp task that will replace all Amazon links with Amazon Associates links, which is another name for their affiliate program.

Read More

Using NW.js To Convert A Website Into A Desktop Application

A while ago, I ran into a situation where I needed to make web application into a desktop application for a corporate client. The idea was to leverage as much of the existing app as possible, while still meeting the requirement of having a “desktop” application.

As a primarily Java developer, I had no idea how to do this, so I started doing research and found out that my best bet would be using JavaScript technologies.

Enter NW.js, a powerful mashup of Google Chrome and Node.js that allows you to package a web application to be run on the desktop.

Read More

TPDP Episode #20: GraphQL For API Development

I am pleased to announce that the latest episode of The Polyglot Developer Podcast is available for download! If you’ve been keeping up with the blog recently, I’ve published quite a bit of content around GraphQL as I personally believe it to be the future for API development. Being able to access related and unrelated data on demand through a single endpoint is huge for the people consuming your data and huge for the developers creating the data because of specific model definitions.

In this episode titled, GraphQL for API Development, I’m joined by Lee Byron, one of the co-creators of GraphQL at when he worked at Facebook. Lee gives us all the details on how GraphQL came to be, why it is huge for development, and how to use it successfully in your next application.

Read More

Angular Route Guards For Authorization In A Web And Mobile Application

You’re about to release your new Angular web app. It’s a photo sharing site and you want to test it, so you send a link to it to your hacker sister. She’s always messing with your stuff and she found out the URL to your admin page you added to your web app. Before you know it, she’s flushed your database using a button on that admin page that you didn’t restrict access to. Not a problem when using development data - but I’m sure your users wouldn’t be any too keen on a service where they lost all of their data. Let’s fix that

Read More