You Might Not Need jQuery

Here’s a cool website I found that shows how to do some common tasks using both jQuery and plain vanilla JavaScript:

youmightnotneedjquery.com

I thought it was kinda cool to see what exactly some of the common jQuery functions are actually doing behind the scenes with JS and CSS.  Sometimes I like to keep things as simple as possible, especially for smaller adhoc apps.  Once upon a time I had a small app that needed to make just one single POST request.  Instead of including jQuery as a dependency in the project and written something like this:

$.ajax({
 type: 'POST',
 url: '/my/app/url',
 data: myData
});

I used some plain JS instead like this:

var request = new XMLHttpRequest();
request.open('POST', '/my/app/url', true);
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
request.send(myData);

Check out the GitHub repo as well for lots more examples.

Advertisements

SSL Certificate Explained

I really like this quick and easy to understand explanation of HTTPS/SSL.  I shared this with my company’s blog a few days ago as we are beginning to enforce HTTPS on our applications.  I wanted everyone on my team to understand what HTTPS is, and why it is important that we begin using HTTPS on all the custom apps we develop for clients.