Development

Follow my progress as I blog about my journey rebuilding Postleaf from the ground up.

Solving the Search Problem

I recently wrote about using an ORM and how it allowed me to support five different database platforms with minimal effort. There is, however, one feature that even Sequelize couldn't tackle for me: full-text search.

A full-text search is typically a database feature that lets you locate content just like you would in a search engine. Ideally, the results are ranked by some sort of relevancy score.

Using an ORM

I've never really bothered with ORMs before, as feelings for them tend to be mixed. I've heard that you can spend twice as long learning an ORM as you can coding raw SQL. 🤷🏻‍♂️

I figured it was time to see for myself. For the Postleaf rebuild, I decided to try out Sequelize. I discovered it some time ago and really liked what I saw, but never had a chance to use it. I'm glad I finally did.

From Handlebars to Dust.js

The first version of Postleaf used templates powered by a PHP variation of Handlebars. I chose Handlebars because the syntax is very simple to learn and understand.

There is, however, one fundamental feature of Handlebars that users tend to find confusing: helpers can have both parameters and arguments.

Getting it Right

To my awesome users:

I've been taking some time to reimagine what Postleaf should have been. Yes, the betas were pretty awesome, but they weren't what I wanted them to be in terms of design, code, and function. I can do better, and you deserve nothing less than my very best.

Thoughts on Comments

For as long as I can remember, comments have been a staple of blogging software. After all, what's a good blog post without a relevant discussion to accompany it?

You might find it strange to learn that Postleaf doesn't ship with comments. This is by design, and I'll explain why in this post.