HTML Markup

Posted on   November 26th, 2009

I’d say one of the most common aims of an application is making it self-sustainable and self-maintainable. When we deliver the last version of an app, we usually dream of forgetting completely about it. We want to have nothing else to do with that client (unless of course she wants an upgrade, another product, or she refers us to another potential client). Nonetheless, this hardly ever happens just like this. At least not to me (why is that?). A finished project usually means infinite calls and all kind of unexpected sorts of stressing problems.

Most frequently the reason is someone not reading your thoughtfully written documentation, or maybe someone regretting the way some particular functionality works (usually one explicitly detailed and requested by herself in the past) or [and that's my point today], someone simply “forgetting” how to add or format content in their web.

You want to give them the possibility to add content easily and format it so it looks fancy and gives them a sense of self-satisfaction. And here comes why to use some good markup tool. You need to let your users create HTML (from a text input, textarea, etc.) but, indeed, without actually writing it. You don’t want users writing code that will break your layout! Or having them write a special character, malicious coding, like a missed “” or anything likely to catch you with your pants down and expose any security leak.

The decision to make is thus whether to use the fanciest WYSIWYG (What You See is What You Get) editor with a full set of MSWord-like buttons and labels, or else just a markup language that will magically convert content from plain to html on submitting. After many years of improvements and fights between markup languages and WYSIWYG editors in my opinion only the following remained standing:

Markup languages, editors and gems (and its links):

Markup Language My favourite WYSIWYG editor Ruby Gem
Textile CKEditor (former FCKeditor) RedCloth
Markdown wmd BlueCloth
BBCode Markitup (generates Textile, Markdown and HTML) BBRuby
Generated HTML TinyMCE TinyMCE Hammer

After having used many of them, my personal preferences are TinyMCE for users that need to make a great deal of formatting to content (last time I implemented it was for a school web interface). It gives them a full set of tools and buttons that allow virtually anything to be done. Besides, it is awesomely simple to use, and even more simple with Rails. Of course, you are always bonded on having users with good taste.  For a more professional or technical environment, for instance, a project management tool, I think Markdown language works just neat. The best WYSIWYG editor for markdown I believe is wmd, which I happily discovered not long ago and have been using in my last projects. It’s sleek and unobtrusive, and it lets coexist PRO people, that enjoy writing straight markup (or down, in this case), and those who simply prefer selecting lines and pressing buttons (and leave alone their mental caches).  I never understood those people that hates helper bars for markup as a dogma, why shouldn’t people be allowed to press buttons instead of memorize codes? wmd is a one-fits-all!

Tags:

2 Comments »

Hello world!

Posted on   November 19th, 2009

This is it. This will be my last try to get serious and maintain a blog… once and for all. As usual, I’m in good spirits and full of hope at the starting point of a blog. I have every honest intention to address a wide variety of subjects here, most frequently technology-related stuff: software, computers, architectures, and so forth. I’ll try to follow step by step Chris Wanstrath valuable advices (or poisoned tips) at his speech on RailsConf 09′.

I must admit I feel ordinary using English as my official blog’s language, specially given the fact that it is by no manner of means my own neither one I grew up using. As most folks in the western world, I’ve been taught to learn it “if I want to be something in life”. Specially if you’re working in a field like mine, Software Engineering, you are told one day after the other to forget about your own cultural community, things are invented in English and everything will be cooler just by naming it in English, it doesn’t matter if you can’t even spell it right. Your own culture and language are useless when it comes to work. Use english! Google stuff up IN ENGLISH (I swear that was the amendment my teacher of PXC gave us last week). As much as I completely disagree with this unfortunately world spread dogma, and keep fighting it in my ordinary life, and keep working and coding everything in CATALAN, my language, I will use my blog to reach other places, if I may. Specially to get to my mates overseas or somewhere around Europe.

All being said, I hope you like the stuff I’ll write from now on
(not that I care much if you don’t… besides, as defunkt rightly said in his conference, no one will read this first post anyway)

5 Comments »