User Reviews
about 1 year
ago
Haml:
Haml makes editing HTML more comfortable
by
Peter Bex
With regular HTML (or ERB), closing tags all the time and indenting gets annoying and it's too easy to get the nesting wrong, especially when you have some nested conditionally shown HTML fragments or after moving stuff around in a HTML file.
Haml fixes these problems once and for all: it replaces opening/closing tags to nest tags by using indentation to indicate the structure.
The Haml syntax makes the tree structure of HTML
... [More]
much clearer and with the Emacs mode that's shipped with it, editing is really a breeze.
There are also some disadvantages: Haml's syntax does not allow hashes on both the attributes side and the content side of a tag. It also makes it hard to nest things in such a way that only the outer part of markup differ, with common inner content. You're forced to use a partial then, or repeat the inner content for each variation of outer markup.
Last but not least, inline javascript (or other types of non-html content) is painful when you need to use Ruby code in it, because the Ruby is evaluated in another environment than the surrounding template.
On the whole, Haml gets a well-deserved 4 stars, for making my Rails templating life much easier. [Less]
1 of 1 users found the following review helpful.
Was this review helpful to you?
Yes
|
No
10 months
ago
by
Peter Bex
As a Schemer who codes PHP at work, I know the pain of having to code in a crippled language (one bright spot: at least PHP 5.3 will have real anonymous functions!). It's great that someone's working on a set of tools to make proper functional programming easier in PHP.
I've browsed the source for a bit, and already found a couple of things I recognise from the all the Greenspunning we had to do to make PHP bearable for CASCO
... [More]
(http://www.ohloh.net/projects/casco); most interesting is the dynamic scoping functionality; we had just come up with this ourselves a few weeks ago :)
We're probably not going to use this framework in CASCO because we've already decided upon a fully object-oriented programming style (without good namespacing, classes are the next best way to keep functions grouped and out of the way) and already have selected SimpleTest for our testsuite, but I still would like to wish this project all best of luck! PHP really needs better programming tools.
Love the project name, by the way ;) [Less]
1 of 1 users found the following review helpful.
Was this review helpful to you?
Yes
|
No
2 months
ago
typeface.js:
Great font replacement library!
by
Peter Bex
Finally, a purely client-side Javascript (no Flash, no images) font replacement library!
This library is small but functional, and has zero dependencies.
It's pretty fast, and has decent support for all browsers except Opera (but that's a bug in Opera, which is fixed in the upcoming version).
It has a server-side companion script to convert truetype fonts to Javascript files, which is unfortunately not freely available
... [More]
at this point; you'll have to upload your fonts to the webpage, for now.
Because it draws the fonts using the Canvas element (or VML in IE), it cannot support the full CSS transformation and effects you can apply to type, which is a shortcoming you have to be aware of.
You will also have to keep in mind that CSS font "properties" like font-weight and italics (but *not* underlining) are actually different fonts in the same font family so you'll have to upload the bold version of the font to generate a Javascript font file in order to be able to use it to replace text in elements that are styled with the font-weight property (remember, headings are boldfaced by default).
All in all, I'm very happy with this library because it makes maintenance of website headings in a CMS less of a chore -- in fact, it allows our customers to manage the headings as content without worrying about generating a new background image to replace the text with, every time. [Less]
Was this review helpful to you?
Yes
|
No