In a previous post, I discussed how to use Nginx and Apache together on Ubuntu. I have Nginx listening on port 80 and Apache listening on port 8080. I use the Nginx proxy_pass directive to pass all PHP and Django domains (virtual hosts) to Apache. I will continue to use Apache for my existing virtual hosts, but I am going to use PHP-FPM for any new PHP domains that I set up.
On a recent Drupal (link) project, I installed the Environment Indicator module (link). One of the great aspects of this module is that it integrates with the Features (link) module. After featurizing the module’s configuration, I decided that I also wanted the feature to include the user permissions. I found that there are multiple ways to add a component to an existing feature.
I started a new project that will uses MEAN.JS (MongoDB, ExpressJS, AngularJS, Node.js). In my previous post, I discussed setting up Nginx and Apache together on Ubuntu. In this post, I will discuss how to use Express with Nginx. My initial plan was to install Express and use the Express Generator for application scaffolding, but I recently began reading about MEAN.js (and MEAN.io) and decided to use MEAN.js for application scaffolding.
I have told my co-workers on many occasions that Drupal doesn’t do true Ajax. With true Ajax, elements change without a page refresh and only the relevant elements are affected. With Drupal, the elements change because the entire form is refreshed. For instance, if you use Drupal’s Ajax to make the values of one dropdown dependent upon the selected value of another, the entire form has to be refreshed in order for the second dropdown to be updated (See Ajax Example: Dependent Dropdown). Although, there are times when I do use Drupal’s Ajax in this scenario, I much prefer to use jQuery.
Although, I have not written many posts about Drupal, I have actually worked more with Drupal over the last 4-5 year than any other web technology (except for jQuery). I recently created a module to control the display of a content type’s fields based upon roles (node add/edit). I created an import/export of the modules settings so that each environment (development, test, production) could be easily updated. The problem is that import/export is such a manual process that it was often overlooked during a deployment. So I decided to use the Features API to featurize my module’s settings.
I am beginning a new project that uses MEAN.JS (MongoDB, ExpressJS, AngularJS, Node.js). I use Apache as my webserver on my local Ubuntu VM. When I first read about using Express, I wondered how I would use Express and Apache together. Further confusion came when I learned that my host provider (webfaction uses Nginx to serve static files and Apache for PHP and other server-side technologies. So Node.js and Express will actually be running under Nginx. Because I wanted my development environment to be enulate production as much as possible, I decided to run Nginx and Apache together.
A few years ago, I created gpDojoGallery – a Dojo image gallery widget. I was recently asked whether I had a AMD-ified version of the widget. I have been doing a lot of Drupal and Magento projects lately (with a heavy dose of jQuery) and I haven’t worked with Dojo in quite a while, so I had never heard of AMD (Asynchronous Module Definition). After some quick googling, I learned that Dojo is not the only library that uses AMD, so I decided to convert my gpDojoGallery widget to the AMD format in order to better understand it.
To avoid conflicts for future Magento theme and extension developers, I created the jQuery Update extension. Similar to Drupal’s jQuery Update module, this extension will standardize the use of jQuery and jQuery UI within Magento.