Larry Ullman

Translating Geek Into English

Useful Web Development Sites

I’m constantly running across different useful sites when it comes to choosing a Web page’s HTML, formatting, CSS, fonts, layout, and so forth. Here are a couple of notable ones:

FontTester, as you might expect, lets you play with different CSS and HTML options to adjust what fonts you use and how they are formatted. The page starts with up to three columns of sample text at the top. Then you can edit the properties of the individual columns to compare and contrast different effects. Once you have the look you like, including color, line height, indentation, and more, you can copy the corresponding CSS.

If you’re new to CSS, you might want to check out CSS Basics. I think it’s a fairly straightforward, easy to understand introduction to Cascading Style Sheets. Once you’ve grasped CSS fundamentals, and found yourself wanting more, check out the exhaustive 84 Amazingly Useful CSS Tips & Resources. There are links to LOTS of good content there; just give yourself time to kill and don’t forget to take good notes!

JavaScript Block Comments

I ran across an interesting little tidbit in a JavaScript book, I think, or online. Likely I saw it in something Douglas Crockford wrote, but couldn’t be certain. Anyway, it has to do with comments in JavaScript. The language supports two comment types:

1. Single line using the double slash:

// This is a comment.

2. Multiline (also called block) using the slash-asterisk combination:

/* This comment
can go over multiple
lines. */

The argument made (wherever it was made) is that you shouldn’t use the multiline comment style as the */ character combination can appear in JavaScript code. Namely, it might appear in a regular expression match, when slashes are used to delineate the pattern and the asterisk is a pattern modifier that looks for zero or more of something. A syntax error will arise if you use block comments around some code that includes a problematic regular expression:

/* some code
var x = 'some string'.search(/[a-z]*/g);
some code */

That’s obviously a useless example in itself, but it shows a situation in which a problem is caused by using block comments.

Blog Returning

Well, it’s been a rather rough couple of months for my family and I. My wife had a serious health issue and then we moved to another state. Hopefully things have settled now, as much as they will, and we’ve returned to a new variation on what is normal for us. I’ve finally caught up with my support forum (although if I missed a post, please let me know) and am working on getting through my accumulated email. In the next week I intend to start regularly posting in this blog again. I’ve got a few bits of news to report upon (things going on in the industry), and a lot more to write about the Yii framework. As always, I thank you for your interest in what I have to say. My sincerest thanks to those who’ve offered support and kind words over these trying few months.

MIA/Past Week

For those of you that read this blog with any regularlity (and my hearty thanks to you), my apologies for the lack of posts this past week. I’ve had a bit of a personal emergency that’s put all other tasks on the far back burner. I hope to start posting again by the end of this forthcoming week, including some detailed posts on the Yii framework.

Introduction to the Yii Framework

In 2009, I had three decent-size Web sites to develop, so I thought I might try using a PHP framework for the first time, instead of coding everything from scratch. I’ve used Ruby on Rails for Web development before, so I’m comfortable with frameworks and the MVC architecture, but I wanted to educate myself on PHP frameworks. After researching a handful of frameworks, and after an unsatisfying attempt to use Zend Framework, I finally settled on, and really came to appreciate the Yii Framework. At the time, the Yii Framework was still quite new, and there are still bugs to be worked out (for the more advanced stuff), but Yii works so well that it’s very easy to use. In this first of several posts on the Yii Framework, I just discuss setting up and testing Yii.

(Note: In October 2010, I’ve updated this entire series to reflect changes in Yii since this series was written, and to take into account feedback provided through the comments. Some outdated material will be crossed out, but left in to reflect how things have changed since the series was begun in June 2009.)