Tag: javascript
Serving Gzipped JavaScript Files From Amazon S3
If you're using Amazon S3 for a CDN, it's possible to serve compressed, gzipped files from an Amazon S3 bucket, though there are a few extra steps beyond the standard process of serving compressed files from your own web server.
Read MoreBuild Electron Applications With Vue.js And Webpack
If you're like me, you thought you'd try to build a cross-platform desktop application using the very popular Electron framework as well as the very popular Vue.js JavaScript framework. At first glance it might seem as easy as defining an Electron configuration, but in reality, a little more needs to be done when using Webpack to build the project.
I had written a few tutorials a while back around Electron, and even one with Vue.js, but in that example the Vue CLI and Webpack were not part of the equation. In this tutorial, we're going to see how to create a new Vue.js application using the Vue CLI, configure it for use with Electron, and then deploy it in all its glory.
Read MoreDeveloping 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 MoreCreating 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 MoreConvert Data Between CSV And JSON With Simple JavaScript
A popular subject on the blog has always been around the conversion of one data format to another data format. For example we've already seen how to convert XML data to JSON data with JavaScript, but what if we wanted to work with comma separated value (CSV) data instead?
We're going to see how to take a CSV file, parse it into JSON, make some changes, and then convert it back into a CSV file using Node.js and a few readily available packages.
Read MoreConvert 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 MoreUsing 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