Skip to main content

Latest Entries

To illustrate the ease of using vanilla JavaScript over jQuery I decided to create a list of five examples that would demonstrate parallel behavior between JavaScript and jQuery.  The examples in this list are intended to be real world examples, but if you have any other examples I would love to hear about them too!

Another great resource to compare JavaScript and jQuery code samples is You Might Not Need jQuery.


If you have spent any time writing Object Oriented PHP or Drupal PHP you will know that there are many instances where it can be handy to know exactly what you are dealing with at a specific point in your code.  For example, possibly you are troubleshooting an issue and cannot figure out why a variable is not acting as it should, or maybe you are writing logging routines to make sure all of your exceptions are logged for future troubleshooting.  Whatever your needs may be it can be very helpful to use PHP Magic constants to assist you in your troubleshooting.

In the last 6 months or so I have noticed that a lot of the JavaScript that I have been writing to perform DOM traversal, manipulation, and event handling has gone back to vanilla JavaScript.  Outside of writing Drupal themes I find myself not wanting to use jQuery at all.  So, what is happening here?  How did I go from a web developer that primary uses jQuery as his library of choice to completely removing it from my arsenal for everything that is outside of Drupal themes?  

React JS is a semi-new open source JavaScript rendering library that came out of a collaboration between the Instagram and Facebook engineering teams.  React was created as better a way to approach complex user interfaces where the traditional MVC approach was just not sustainable anymore.  Implementing React components and Flux style data patterns attempts to solves these complex issue by providing modularity between user interface components and a one-way flow of data on the client side instead of always interacting with the server, as is done in an MVC approach.

In the last couple of years I have been involved with a lot projects all with the same type of scenario, there is a server housing a content management system or a database, a remote mobile application that reads data from the server,  and usually a web application for anonymous and authenticated web traffic.  Projects like this are extremely interesting, but can get very complicated in a hurry as the project evolves and features are added on either the web side or the mobile application side.

In part one of this post I explained the need to have a content management system detached from the web service.  In part two of this post I explained how to sync the data from Drupal to MongoDB and sync it in a way that left Node.js to just read the data and serve it.  So now in part three of this post the only thing left to do is build the web service to serve the read-only data on.