A Brief Overview of Node.js and Express.js

If you’ve worked with JavaScript frameworks and libraries, chances are that you’ve heard of Node.js and Express.js. So for those who are unfamiliar to these terms – what exactly are they?

Node.js

Node.js is an open-source JavaScript runtime environment, that uses Google’s V8 JavaScript engine, where you can build server applications. Node.js is not a framework, although it has many modules that are written in JavaScript. It has event-driven architecture that is capable of asynchronous I/O, otherwise none as a form of input/output processing that allows other processing to continue before the transfer of data has finished.

Express.js

Express.js is a web application framework for Node.js, that’s used for building APIs. It is also known for being a backend component of the MEAN stack.

I’ve worked with Node.js and Express.js to create APIs, so I feel like I can never think about one of them without having the other one come to mind.

New Design for GBCI.org

This week we recently launched a new design for GBCI.org. I used Flexbox a little bit with the layout, and tried to find better images that could create more of an impact for the viewer. I also adjusted the icons and tried to style the site in such a way where CMS editors can make changes to background images without having to touch the CSS.

Here’s a look at the new homepage:

Here’s actually what the previous homepage looked like. I designed this one a couple of years ago:

Before I started working at USGBC, the GBCI website looked like this:

Overview of Design Patterns

Design patterns are guidelines for solving common problems in software development. By learning design patterns, you can quickly and easily communicate designs to other software developers.

A few common design patterns include the following:

Strategy Pattern

The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Instead of inheriting behavior, it is created.

Observer Pattern

The Observer Pattern is the most commonly used design pattern in the real world. It defines a one-to-many dependency between objects so that when one object changes its state, all of its dependents are notified and updated automatically.

Decorator Pattern

The Decorator Pattern attaches additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.

Singleton Pattern

The Singleton Pattern ensures that a class has only one instance, and provides a global access point to it.

State Pattern

The State Pattern uses a set of state constants, and uses a variable to hold the current state. The pattern encapsulates state into separate classes.

Collection Pattern

The Collection Pattern provides a way to access the elements of an aggregate object without exposing its underlying representation.

New Design for Art Portfolio Site

When I’m not busy working on websites or building applications, I like to make artwork. My work as an artist is actually what got me interested in becoming a web developer – the first website I made was for my artwork.

Over the years my art portfolio website has gone through a number of redesigns. The last one was back in 2010, so it was long overdue for an entire overhaul. Here is what the old homepage used to look like:

And here’s what the homepage looked like after the redesign:

I ended up redesigning my logo and simplifying a lot of the pages. I’m still in the process of reworking several pages, as well as adding an online store for selling my original artwork, but for the most part the heaviest lift is out of the way.

Getting Started with Rails

For anyone that’s new to Rails, there are a couple of tutorials out there that I’d highly recommend:

I’d say repeating the Rails Guide tutorial several times first is a good place to start, then moving to Michael Hartl’s tutorial and completing that a few times, which will give you a much better understanding of even more complex Rails concepts.

I’m a strong advocate for learning through repetition, especially if you’re new to programming or don’t have a background in computer science.

Using MAMP to run WordPress Locally

I’m currently in the process of redesigning and reworking my art portfolio website.  The website was built on WordPress, and I started it years ago before I ever really knew how to develop and design websites. As a result, the website has become a bit of a beast with all of its pages. So, when it comes to updating the overall look and feel, I’m often resistant to making updates since it often becomes a big ordeal.

However, the other day I realized it made more sense to figure out how to run my WordPress site locally to work on those updates in a dev environment. Previously I’d just copy the entire instance of the WordPress website and work on it live, then move the entire site to replace the older one. This always become a bit of an ordeal.

But now I’m excited at the possibilities of working locally before pushing those changes to the live environment. Here’s how I set up my environment:

  • Download and install MAMP, which is software that installs a local server environment on your computer. MAMP gives you the ability to install Apache, PHP, and MySQL on your local machine. You can find out more about installing MAMP on the WordPress documentation website.
  • Once MAMP is installed, you can copy over your entire website to your local machine.
  • Open MAMP and specify the root of the folder for the site you want to run. Then start the servers.
  • Next update the wp-config-php file so that it specifies the local host as the host, as opposed to the domain name: define('DB_HOST', 'localhost');
  • Then access the MAMP welcome screen and open up the local phpMyAdmin.
    • Find the “create new database field” and enter in the name of the backup database from the live website that you are going to import.
  • When you access the site in the browser, you should be able to see the homepage although all the other pages are probably broken. This is because you need to update the siteurl and home configurations.
    • In phpMyAdmin, select the new database
    • Select the “wp_options” table
    • Search for “siteurl” within the “option_name” column
    • Edit the “siteurl” so it points to the localhost
    • Next, search for “home” within the “option_name” column
    • Edit the “home” item so it points to the localhost as well
  • Next, visit the homepage for the locally installed site and ta-da, it should work fine. You are also able to login with the wp-admin by using the usual admin credentials you use for the live website. Now you can edit themes, update plugins, and test out other features locally without worrying about breaking your live website.

New Design for Portfolio Site

I finally got around to updating the look and feel of this portfolio website. Previously the site was bogged down with too many pages, and from a technical stand-point, I wasn’t taking advantage of customizing templates very well with php. Below is actually the way the homepage previously looked before the redesign:

Megan Coyle's previous web portfolio design

With this updated look, it was important that I focus on page load time, and also simplify the overall layout. The font sizes on the previous site were also fairly large. And lastly, the older site focused primarily on my web design work. I wanted to rework the entire site so that it could focus more on my development work.

GRESB Website

Project Details:

gresb.com
GRESB was in need of a new marketing website redesign. I began the process by putting together a rough draft of a site by customizing a build of Drupal. After going through a series of edits, I also worked on adding in JavaScript functionality for carousels and collapse/expand panels. The new site was launched at the beginning of this month.

Programs Used:

  • Drupal (CMS)
  • JavaScript
  • Photoshop
  • Illustrator

GRESB Website

William Coyle Portfolio Website

Project Details:

wtcoyle.com
I created the logo and manipulated William Coyle’s photographs for different sections of the website. After completing the website with Dreamweaver, I later reworked the entire site with WordPress so the client could make updates.

Programs & Technology Used:

  • jQuery
  • JavaScript
  • CSS & HTML
  • PHP
  • Photoshop
  • Illustrator
  • WordPress (CMS)

wtcoyle_1-website

wtcoyle_2-website

USGBC STUDIO Website

Project Details:

studio.usgbc.org
This was a collaboration with one of the designers on my team. I worked on developing the user experience and framework. The other designer worked on fine-tuning and editing the overall look.  I also worked on customizing a WordPress theme so that our non-coder team members would be able to make updates to the website.

Programs & Technology Used:

  • jQuery
  • JavaScript
  • CSS & HTML
  • PHP
  • Photoshop
  • WordPress

Studio USGBC

Studio USGBC