Ship It or Die (With or Without Quality, Though?)

One of the ideas that intrigue me is the “ship it or die” mentality. Regarding what it’s called, there are variations thereof, but the idea behind the phrase is simple:

If you have an idea, get it from concept to product as quickly as possible.

Sure, the idea of getting to concept to a product may also be called “concept to cash” but there’s never a guarantee that you’re going to generate cash, right? There is a guarantee that you can get it into a tangible product, though.

And in software development circles, there’s always a lot that a person can argue for or against the idea. Off the top of my head, the two pros and cons that come immediately to mind are:

  1. Pro. Getting something done quickly that works and that [potentially] generates revenue.
  2. Con. Weak architecture, maintenance, scalability, testability, and so on.

In short, there may be a tradeoff between how fast you can get ship something for a market and the architecture behind the project. Sometimes there is, sometimes there isn’t. Generally speaking, though, I think it’s safe to assume the former.

Furthermore, some may see the former as the easy way out, some may see the latter as an exercise in YAGNI or, even more simply, that the problem can be addressed whenever it comes up.

But what does this have to do with anything at the moment?

Read More

Adding a Body Class Based on a Template

Working with templates in WordPress is something that’s not uncommon. Everything is a template of sorts – from the main page template, single page template, 404 template – all the way to custom templates.

Sometimes, though, you may want to apply a class to the body element based on the template that’s being used so that you can style this particular template a bit differently than the rest of the site.

Body Class Based on a Template

Though you can do it in a number of different ways, to do it we all have our methods so I thought I’d share mine.

Read More

Working with Custom Rewrite Rules and Page Templates in WordPress

The WordPress Rewrite API is a solid API assuming that you’re comfortable with regular expressions.

Rewrite Rules and Page Templates: The Rewrite API

And, honestly, even if you’re not, tools like PHP Live RegEx make it really easy to test your code before dropping it into the add_rewrite_rule API call.

Rewrite Rules and Page Templates: PHP Live RegEx

However, there are times where you may find yourself in a situation in which you need to work with rewrite rules and page templates. And when that’s the case, it’s not always as straightforward as making a simple call with a single regular expression.

The reason? If you have multiple pages using the same template, then you’re not always going to have the page located in the same index in the query that runs on each page.

To that end, we to have to handle it in a slightly different way than, say, simply accessing a numerical index of information in the global query.

Read More

Is It Really Worth Debating jQuery Versus ES6?

When building WordPress plugins for myself or others, several of the things I take into account – as we all should – is the level of maintainability, scalability, and support for the plugin as WordPress continues to move forward.

Specifically, I’m talking about client-side development (or, more simply, JavaScript).

As the support for ES6 continues to rise, jQuery continues to move forward with development, and the desire to use new APIs to build out our solutions, I believe it’s worth asking the question:

Do we really need to stick with jQuery?

Read More

An Object-Oriented Way of Working with Models and Web Applications

When we talk about the concept of Models in object-oriented programming, we’re usually referring to a class that is a representation of the data stored in the database.

That is is, when information is stored in rows and columns, we populate a class, its attributes, and so on with that information so that we’re able to pass it around the application, manipulate it as needed, and then possibly serialize the data back to the database.

But in a web application, it’s fair to assume that the model might need to be possible to the front-end to be used. That is, imagine a front-end request making a call to the server, requesting a model (or a collection of models), and then rendering them on the front-end.

Though this particular post isn’t code-oriented, I still think it’s worth thinking through the process of translating a model from the server and then rendering it on the front-end of the web application.

Read More