avatar

Andres Jaimes

The Rationale behind the Creation of a Model-View-Controller Framework: Fantastic

Important: This is a work in progress document. The Model-View-Controller is a software pattern frequently used for web development. As its name states, it is composed by three components: A Model or domain representation of a problem. It receives commands, processes them and modifies its state according to the input provided. A View whose main task is to retrieve information from the model and turn it into a useful representation for the user.

Intro to Responsive Web Design

This weekend I was invited to have a remote presentation on Responsive Web Design with students from the Autonomous University of Queretaro (UAQ) in Mexico. Introductory concepts are presented in code, so you have the chance to apply them immediately. The video is in spanish. Happy coding.

WordPress Snippets

As a WordPress developer I have collected / created / curated many snippets that I’ve used in my projects. I hope you find them useful.  General HTML / WordPress tags Get your template’s directory <link href="<?php echo get_template_directory_uri(); ?>/style.css" rel="stylesheet" media="screen"> Check if this is the home page <?php if (is_home()) { ... } ?>  Remove the wp_generator tag in the Head section of your HTML I recommend you to add this line for security reasons.

How to setup a FastCGI development environment in CentOS 6

Install the development environment Install the C/C++ development tools to your server: yum install gcc gcc-c++ autoconf automake Now, before installing fcgi we need to add the epel repository: rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm Once it is installed we can proceed to get the fcgi packages: yum install fcgi-devel spawn-fcgi Let’s see if we can compile a simple file. Create a file named example.c and copy and paste the following code in it:

A simple C++/Wt (Witty) skeleton for starting an application

The objective of this lesson is to show you how to make a simple web page navigation using Wt. Before starting you have to remember that Wt can be used to create 1 URL applications. That means you can have a full application that runs using just one URL. However it is also useful to give your users different URL’s to take advantage of some browser features like bookmarks or the back and forward buttons.

How to use a WComboBox with C++/Wt (Witty)

In this entry I’m going to create a simple form that shows how to add items to WComboBox in two different ways. The first one is useful for static combo items while the second one might be used to populate a combo from a database. The code is based on our previous Hello World application. There are few lines that changed.  Using Static Combo Items Adding items to a WComboBox is just a matter of calling the addItem method.

Creating a simple form using C++/Wt (Witty)

In this entry I’m going to create a simple form. This form will show you how to use controls and events in a very simple way. A couple things you have to notice before we start: I’m going to inherit from WContainerWidget. As you now know, I could have inherited from WApplication too. Most controls like, WLabel, WLineEdit and WPushButton include a “parent” parameter in their constructors. But you can also create them and add them later to any WContainerWidget.

Two ways to create a Hello World application with Wt (Witty)

Let’s start by talking a little bit about some elements and methods you will find in the code. Inheriting from WApplication or WContainerWidget are the most common ways to start an application using Wt. A WApplication instance will be in charge of creating your html, head and body tags. A WContainerWidget is usually a div tag (it can also be turned into a ul or ol by using its setList method).

Where does Windows Live Writer store themes

Windows Live Writer makes a local copy of your website images and style sheets everytime you click on the Update Theme button located in the Blog Account ribbon. You can find your local CSS file(s) in the following folder on Windows 7: C:UsersYour NameAppDataRoamingWindows Live Writerblogtemplates If you only have one blog, you are lucky. Get into the only folder you find there. If you have many blogs it will be a trial and error process to find out the right folder where your CSS files are located.

How to install Wt (Witty) on Windows

Installing Wt can be a challenging task if you don’t have the right tools. I spent many days trying to make it work with MinGW and Visual Studio 2005. No luck. Here are some of my results: MinGW I was never able to make a full compile. It was interrupted by this or that reason. I could never get any of the examples to work. Visual C++ Express 2005 Some of the examples worked, however only in “Release” mode.