Building an e-commerce Website
If you are considering starting out your own e-commerce business, this article is dedicated to you.
After working with clients on multiple different projects—including e-commerce sites—I know that there are aspects that new owners are not aware of before they dive deep. There isn’t as much written about the problems and failures web store owners had before they learnt. This means that one has to learn it all the hard way—very often soon after their development team has already put a lot of work into the e-commerce site.
With this article I’d like to save you some of the hassle and money and present you with a small introduction of what to expect.
Preparations
Apart from thinking about the budget, kinds of products, warehouses etc. you’ll most probably want to know how to put it all out there for the public to see. You’ve seen other web stores and intuition may tell you that you just need a “website” with some backend functionality to manage products and see the orders. You may have heard about some “free” stacks you could use or some online hassle-free platforms where you could just pay monthly and have your web store in almost no time.
All this is to some extent true—but in …
ecommerce
Creating Composite Docker Containers with Docker Compose
Composite Docker Containers
Docker is an application container system which allows logical isolation and automation of software components into isolated instances similar in some ways to a virtual server. This model is quite powerful for creating new instances of a given application rapidly, and creating automated system stacks from high-availability to high-performance clusters. Even though there is no technical limitation, the idea behind this model is that these containers should be in a 1:1 relationship with each application component. If you deploy a Docker image for Apache Tomcat, the container will contain Tomcat, and only Tomcat and its core dependencies. If you needed a Tomcat application server, and a PostgreSQL database to go with that application server; in general you would need to create two separate containers, one with the Tomcat image and the other with the PostgreSQL image. This can lead to an undesirable situation with complexity where you must manage both containers separately, even though they are both part of the same stack. In order to solve this problem, recently the Docker team developed Docker Compose to allow these complex applications to all live inside …
containers docker sysadmin
Bonked By Basic_auth Because Bcrypt
TL;DR: Don’t use a high bcrypt cost with HTTP basic auth!
Recently we had a client approach us with reports of a slow wiki experience. This was for a MediaWiki we recently installed for them; there were no fancy extensions, and the hardware, the OS, and the Apache web server were solid, perfectly normal choices. I was tasked to dive in and solve this issue.
The first step in any troubleshooting is to verify and duplicate the problem. While the wiki did feel a bit sluggish, it was not as bad as the reports we were getting of taking over 15 seconds to view a page. A side-by-side comparison with a similar wiki seemed a good place to start. I called up the main wiki page on both the client wiki and End Point’s internal wiki. Both were running the latest version of MediaWiki, had the same type of servers (located a similar distance from me), were using the same version of Apache, and had roughly the same server load. While both wiki’s pages had roughly the same amount of content, the client one loaded noticeably slower. It took less than a second for the End Point wiki, and around ten seconds for the client one!
The first possible culprit was …
apache bcrypt mediawiki performance security sysadmin
Zurb Foundation 5: Applying Styles Conditionally Based on Viewport Size
The Zurb Foundation 5 front-end framework provides many convenient features such as the ability to control the visibility of HTML elements for different browser window sizes using CSS classes. Foundation CSS classes like “show-for-small-only” and “hide-for-large-up” (full list at https://get.foundation/sites/docs-v5/components/visibility.html) make it easy to add mobile-specific content to your page or prevent certain page elements from being displayed on mobile devices.
Having an easy way to show/hide elements based on viewport size is nice, but what if you want to style an element differently based on the size of the browser that’s viewing the page? Foundation has you covered there, too, though the method is less obvious. It’s possible to use Foundation’s media query SCSS variables when writing your own custom styles in order to apply different styling rules for different viewport sizes.
For example, if you have an element that you want to offset with a margin in a large window but be flush with the left edge of a small window, you can use the Foundation media query variables to apply a styling override that’s specific to small windows:
#element {
margin-left: 100px; …css mobile
Postgres 9.5: three little things
The recent release of Postgres 9.5 has many people excited about the big new features such as UPSERT (docs) and row-level security (docs). Today I would like to celebrate three of the smaller features that I love about this release.
Before jumping into my list, I’d like to thank everyone who contributes to Postgres. I did some quick analysis and found that 85 people, from Adrien to Zeus, have helped version 9.5 of Postgres, at least according to the git logs. Of course, that number is actually higher, as it doesn’t take into account people helping out on the #postgresql channel, running buildfarm animals, doing packaging work, keeping the infrastructure running, etc. Thanks to you all!
Feature: REINDEX VERBOSE
The first feature is one I’ve been wishing for a long time—a verbose form of the REINDEX command. Thanks to Sawada Masahiko for adding this. Similar to VACUUM, REINDEX gets kicked off and then gives no progress or information until it finishes. While VACUUM has long had the VERBOSE option to get around this, REINDEX gives you no clue to which index it was working on, or how much work each index took to rebuild. Here is a normal reindex, along …
database postgres
Improve SEO URLs for Interchange search pages
This is an article aimed at beginner-to-intermediate Interchange developers.
A typical approach to a hierarchical Interchange site is:
Categories -> Category -> ProductI.e., you list all your categories as links, each of which opens up a search results page filtering the products by category, with links to the individual product pages via the flypage.
Recently I upgraded a site so the category URLs were a bit more SEO-friendly. The original category filtering search produced these lovely specimens:
/search.html?fi=products&st=db&co=1&sf=category&se=Shoes&op=rm
&sf=inactive&se=yes&op=ne&tf=category&ml=100but what I really wanted was:
/cat/Shoes.htmlSuch links are easier to communicate to users, more friendly to search engines, less prone to breakage (e.g., by getting word-wrapped in email clients), and avoid exposing details of your application (here, we’ve had to admit publicly that we have a table called “products” and that some items are “inactive”; a curious user might decide to see what happens if they change “sf=inactive&se=yes” to some other expression).
Here’s how I attacked this.
Creating a category …
interchange seo
Full Screen Gallery with Supersized and video slides
I was recently looking to build a full screen image and video gallery for our client Mission Blue. Something similar to the Google Maps interface you can see in the screenshot below:
After scouring the Internet to find a suitable jQuery plugin I finally decided on Supersized, Full screen background slideshow plugin for jQuery.
After downloading the library, include it on the page:
<link href="/wp-content/plugins/wp-supersized/theme/supersized.shutter.css?ver=4.2.2" id="supersized_theme_css-css" media="all" rel="stylesheet" type="text/css"></link>
<script src="/wp-includes/js/jquery/ui/effect.min.js?ver=1.11.4" type="text/javascript"></script>
<script src="/wp-content/plugins/wp-supersized/js/jquery.easing.min.js?ver=1.3" type="text/javascript"></script>
<script src="/wp-content/plugins/wp-supersized/js/jquery.easing.compatibility.js?ver=1.0" type="text/javascript"></script>
<script src="/wp-content/plugins/wp-supersized/js/jquery.animate-enhanced.min.js?ver=0.75" type="text/javascript"></script>
< …css design html javascript jquery extensions video wordpress
Medium-inspired Parallax Blur Effect For WordPress
Are you are running a WordPress blog, but secretly dying to have that Medium parallax blur effect? I recently implemented this, and would like to share it with you. By the way, while I was working on the article, the effect was removed from Medium, which only makes having one on the website more precious.
Let’s assume that we have our custom theme class MyTheme. In functions.php:
class MyThemeBaseFunctions {
public function __construct() {
add_image_size('blurred', 1600, 1280, true);
add_filter('wp_generate_attachment_metadata', array($this,'wp_blur_attachment_filter'));
}
}We added a custom image size blurred, and a callback wp_blur_attachment_filter to wp_generate_attachment_metadata. Here’s where the magic happens.
Before that let’s talk a little about ImageMagick, a powerful library for image processing that we will use to create the blurred effect. After some experimenting I figured that the image needed to be darkened, and then a regular blur should be applied with sigma=20. You can read more about these settings at ImageMagick Blur Usage. I used Gaussian Blur at first, but found the processing was extremely slow, and there wasn’t much …
imagemagick php user-interface wordpress

