RantFever 4

I pontificate but not in the pejorative sense of the word.

Archive

April 2013

Learning Curve

Posted 28 April 2013
Category Ember.JS

Complaining is not attractive. But I will do it anyway. I want to get this off my chest.

Read More »

Ember.JS

Posted 10 April 2013
Category Ember.JS

I've always had a fundamental problem with Javascript. As a web application grows, I have struggled with how best to organize my Javascript into something reasonable and easy to maintain. I generally use jQuery along with any number of jQuery plugins. But I have never been sure about how should the folder structure look or how the code should be organized. I heard about node when it came out, and it sounded exciting. I also heard about backbone. Backbone really intrigued me, but I never had any time to really devote to either. 

Eventually, I had an idea for a project. I wanted to build an online version of Dominion. There already was one, but I thought I could do better. So I tried it, but I quickly got bogged down in jQuery. I figured a javascript MVC framework is what I needed. I then read about Ember.js. It was new and hot and seemed like the perfect fit what I was looking to do. I tried it a couple of times, but my efforts were half-hearted and never amounted to anything. Dominion online took a backseat to life. Since Rant Fever is redone and looking fairly good, I am ready to take Ember.js by the reins again. And this time, I won't accept defeat!

Read More »

The Old Archive

Posted 8 April 2013
Category PyroCMS

The older versions of Rant Fever (v. 3, 2, 1, and beta) were a group blog. And as such, there are a good 1,500 posts there. The new PyroCMS install didn't have those old posts, of course. And since Rant Fever was a proprietary content management system, there was no built-in way to automate importing all those posts. I could have figured out a way to bring them into the Pyro blog, but I wanted to keep them separate while still keeping them accessable. After all, that is a lot of wit to just throw away. I thought I could just put the posts in a couple of tables alongside the rest of the Pyro install and access them via a module I could write.

Read More »

Blog Categories to Rant Categories

Posted 7 April 2013
Category PyroCMS

When designing this site, I wanted the front page to have some tiles on it that linked to major sections. I quickly saw that Pyro's blog categories really leant themselves to this idea.

PyroCMS's Categories

I wanted to associate an image and a description with each category tile. But to make that happen is problematic. PyroCMS's default_blog_categories table has three fields: id, slug, and title. So how to display the categories on the front page. Luckily, PyroCMS comes with a widget to display the categories and the capability to assign the widget to an area. The area can then be added wherever you want in a post or in a template. Fine. I can do that. 

The only problem with the categories widget is that I am forced into an unordered list with the category names in order by title. No place to put an image and no description. So I quickly realized I would need to do two things: alter the table structure and associated admin pages as well as create a new widget to output the categories with an associated image and description.

For the record, there are probably lots of ways to make this happen, this is just how thought to get it done. With web development, there is always more than one way to skin a cat.

Read More »

Theming: When LESS Is More

Posted 3 April 2013
Category PyroCMS

Four themes came with my PyroCMS by default. I liked them. They were good. Still, you can't just leave the default theme. Even though the default themes look good, you don't want to look like every other default Pyro install out there.

A default situation

I began with the minimal theme. It had the fewest styles, so I copied the folder and named my new theme "rantstyle." It used 960gs as a base to the CSS. I blew away the stylesheets to start over from scratch.

There are only a few basic files needed to make a theme in PyroCMS. There is a theme.php file that has the basic theme info: who created it, what version it is, urls, etc. There is also a views folder where the layout of the site is held. It is a templating system that uses handlebars to embed or import what they call partials. So I can create a default layout that has the basic html structure I want and then insert a { { theme:partial name="metadata" } } to include anything I have in the metadata partial, which, in my case, is everything that would go in the <head> element.

As I learn more about PyroCMS, I like the simple design. Things seem to make sense so far.

Read More »