Fixed all broken links.
jump to
@@ -2,4 +2,5 @@ -----
title: "Page Not Found" content-type: page ----- -<p>The page you’re looking for cannot be found. Try searching the <a href="/archives/">archives</a>, maybe you’ll have better luck!</p> +<p>The page you’re looking for cannot be found. Try searching the <a href="/articles/">articles</a>, maybe + you’ll have better luck!</p>
@@ -5,61 +5,154 @@ timestamp: 1213234200
tags: "internet|rant|personal|writing" ----- <p><em>“It has been a while since my last post, sorry about that”</em><br /> -I read this sentence (or something along those lines) on many blogs on the Internet, including mine. As a matter of fact, I actually didn’t write a meaningful post on my blog for a long time and no, probably this is not going to change that either.</p> -<p>Yesterday I started thinking <strong>why</strong> this happens, not only to me but to a lot of other non-professional bloggers. A professional blogger &emdash; for what I can tell &emdash; is someone like Michael Arrington or Gina Trapani: someone who has the luck (or course) to be able to just blog for a living.</p> -<p>I don’t blog for a living: my site is self-sustaining via a few very unobtrusive ads, just that. I have a full time job, and I blog in my spare time about my interests, without even trying to make “proper” money from my site. There’s nothing wrong with it: I believe there are some other people in my condition, and that’s quite normal.</p> -<p>That being said, let’s examine the ten most common reasons why I (and you too, maybe) end up not updating my blog, <em>even when I have time to do so</em>.h3. Someone already blogged about it</p> -<p>This is very irritating. I am obsessed with original content. I want to write about something other people <em>never</em> (or hardly ever) wrote about. As a consequence, I often find myself googling the same topic I’m planning my blog post on, and I <em>obviously</em> often get quite a few results, too!</p> -<p>I actually wanted to title this very post “The Blogger’s Block”, but I immediately thought of putting that very title into Google, just to see if someone else already blogged about it. Sure they did! Not original at all, tough luck. <br /> -It also happened a few weeks ago: I wanted to write about the current state of tech news sites and Antonio Cangiano comes up with a similar <a href="http://antoniocangiano.com/2008/05/29/random-thoughts-on-social-sites/">post</a>. Very interesting indeed, but quite annoying as well!</p> + I read this sentence (or something along those lines) on many blogs on the Internet, including mine. As a matter of + fact, I actually didn’t write a meaningful post on my blog for a long time and no, probably this is not going + to change that either.</p> +<p>Yesterday I started thinking <strong>why</strong> this happens, not only to me but to a lot of other non-professional + bloggers. A professional blogger &emdash; for what I can tell &emdash; is someone like Michael Arrington or Gina + Trapani: someone who has the luck (or course) to be able to just blog for a living.</p> +<p>I don’t blog for a living: my site is self-sustaining via a few very unobtrusive ads, just that. I have a full + time job, and I blog in my spare time about my interests, without even trying to make “proper” money + from my site. There’s nothing wrong with it: I believe there are some other people in my condition, and + that’s quite normal.</p> +<p>That being said, let’s examine the ten most common reasons why I (and you too, maybe) end up not updating my + blog, <em>even when I have time to do so</em>.h3. Someone already blogged about it</p> +<p>This is very irritating. I am obsessed with original content. I want to write about something other people + <em>never</em> (or hardly ever) wrote about. As a consequence, I often find myself googling the same topic I’m + planning my blog post on, and I <em>obviously</em> often get quite a few results, too! +</p> +<p>I actually wanted to title this very post “The Blogger’s Block”, but I immediately thought of + putting that very title into Google, just to see if someone else already blogged about it. Sure they did! Not + original at all, tough luck. <br /> + It also happened a few weeks ago: I wanted to write about the current state of tech news sites and Antonio Cangiano + comes up with a similar <a href="http://antoniocangiano.com/2008/05/29/random-thoughts-on-social-sites/">post</a>. + Very interesting indeed, but quite annoying as well!</p> <p>OK scrap that, think about something else…</p> -<p>This can potentially go on for days, and the only solution is of course trying not to worry about it, and just write the damn thing (that’s what I did to write this post).</p> +<p>This can potentially go on for days, and the only solution is of course trying not to worry about it, and just write + the damn thing (that’s what I did to write this post).</p> <h3>I didn’t research enough on the subject</h3> -<p>This happens tipically with reviews, round-ups, etc. Things I actually enjoy writing, but which may be easily subject to (harsh) criticism unless ou do them right. <br /> -I wanted to write a review of the new Treo 750 I bought. I’ve been using for a while, I learnt a few interesting hacks etc. etc. Unfortunately the 3G iPhone came out, so everyone is all hyped up about it. Too bad that I, being Italian and living in Italy, I never actually touched the damn thing!<br /> -What has that got to do with my Treo 750? Well, it would be nice to write a review of a Windows Mobile 6 phone comparing to the upcoming Apple wonder, wouldn’t it?</p> -<p>The solution to this would be trying to limit the scope of your post: screw Apple, let’s just focus on my Treo 750 and on the amazing amount of programming languages I can use on it!</p> +<p>This happens tipically with reviews, round-ups, etc. Things I actually enjoy writing, but which may be easily subject + to (harsh) criticism unless ou do them right. <br /> + I wanted to write a review of the new Treo 750 I bought. I’ve been using for a while, I learnt a few + interesting hacks etc. etc. Unfortunately the 3G iPhone came out, so everyone is all hyped up about it. Too bad that + I, being Italian and living in Italy, I never actually touched the damn thing!<br /> + What has that got to do with my Treo 750? Well, it would be nice to write a review of a Windows Mobile 6 phone + comparing to the upcoming Apple wonder, wouldn’t it?</p> +<p>The solution to this would be trying to limit the scope of your post: screw Apple, let’s just focus on my Treo + 750 and on the amazing amount of programming languages I can use on it!</p> <h3>After researching for X days, I realized it was all a waste of time</h3> -<p>This happens with big articles. I once thought about writing a comprehensive article about all the possible ways to deploy a Ruby on Rails web site. Cool, isn’t it? I started researching about all the most esoteric lightweight web servers, about JRuby, Glassfish, IronRuby, … A lot of things. And new solutions kept coming up, and with them more and more posts, and then even entire books on the subjects.</p> -<p>Very frustrating. I abandoned the whole thing, because there was simply no reason to go on researching: it was all a waste of time.</p> -<p>How to fix this? Again, reduce the scope of your article so that you are able to reduce the time you spend researching about it. Or maybe try to get paid to write it, so that even if there’s plenty of articles about the same subject, at least you have a concrete purpose to write yours.</p> -<p>Erhm, yes, by the way, keep an eye on <a href="http://www.sitepoint.com">SitePoint</a> in the next few days/weeks, OK?</p> +<p>This happens with big articles. I once thought about writing a comprehensive article about all the possible ways to + deploy a Ruby on Rails web site. Cool, isn’t it? I started researching about all the most esoteric lightweight + web servers, about JRuby, Glassfish, IronRuby, … A lot of things. And new solutions kept coming up, and with + them more and more posts, and then even entire books on the subjects.</p> +<p>Very frustrating. I abandoned the whole thing, because there was simply no reason to go on researching: it was all a + waste of time.</p> +<p>How to fix this? Again, reduce the scope of your article so that you are able to reduce the time you spend + researching about it. Or maybe try to get paid to write it, so that even if there’s plenty of articles about + the same subject, at least you have a concrete purpose to write yours.</p> +<p>Erhm, yes, by the way, keep an eye on <a href="http://www.sitepoint.com">SitePoint</a> in the next few days/weeks, + OK?</p> <h3>I only write when I’m inspired, and now I’m not</h3> -<p>Very, very common. I normally think about a very cool article to write in the evening, or early in the morning, or whenever I don’t have access to a computer or the Internet. <br /> -Of course I don’t forget about it, but by the time I have a chance to actually write it, I really don’t fancy doing so. Oh, the irony! <br /> -It happened today, actually, during my lunch break: I was supposed to write this post but I didn’t feel like it. I lost my inspiration and all my artistic verve, so no, it can’t be done. Tough luck, wait until next time.</p> -<p>How did I solve this? Well, I started writing the post in my coffee break: there was no way to finish it in time, of course, but at least I started it.<br /> -I also saved it to my <span class="caps">PDA</span> and continued writing it when I had a chance. Eventually, I managed to finish it during my lunch break, the next day.</p> -<p>Try to write <em>whenever you are inspired</em>. If you are not inspired in your lunch break, do some work in your lunch break and then write when, in an hour or so, probably, you feel like writing again.</p> +<p>Very, very common. I normally think about a very cool article to write in the evening, or early in the morning, or + whenever I don’t have access to a computer or the Internet. <br /> + Of course I don’t forget about it, but by the time I have a chance to actually write it, I really don’t + fancy doing so. Oh, the irony! <br /> + It happened today, actually, during my lunch break: I was supposed to write this post but I didn’t feel like + it. I lost my inspiration and all my artistic verve, so no, it can’t be done. Tough luck, wait until next + time.</p> +<p>How did I solve this? Well, I started writing the post in my coffee break: there was no way to finish it in time, of + course, but at least I started it.<br /> + I also saved it to my <span class="caps">PDA</span> and continued writing it when I had a chance. Eventually, I + managed to finish it during my lunch break, the next day.</p> +<p>Try to write <em>whenever you are inspired</em>. If you are not inspired in your lunch break, do some work in your + lunch break and then write when, in an hour or so, probably, you feel like writing again.</p> <h3>This won’t make Digg’s front page</h3> -<p>Digg, Reddit, DZone, you name it. They are all excellent free tools for promoting your content. Don’t tell me you never wrote a post <em>for the sake of making the front page</em> of one of those sites. I did, I confess.<br /> -I didn’t make Digg’s front page in a while, and I’m probably never going to make it again. The reason? When it comes to promoting the right content in a fair way Digg <strong>sucks</strong>. As a consequence, 80% of the articles which appear on Digg <strong>suck</strong>. I’m sure you’ll be able to forgive my French when I say that <strong>Digg utterly sucks</strong>.</p> -<p>No matter how clever your story may be, unless you’re backed up by a swarm or an active community willing to Digg your story, you simply aren’t going to make it. When is the last time a proper programming article made it to Digg? I don’t remember, probably way before I unsubscribed to the Digg’s Technology feed, about a year or so ago.</p> -<p>Just write for the sake of writing. Don’t even submit your story to Digg (unless you’re writing about the iPhone, of course, then you may have a chance): post it to a less-known site, maybe, or to Reddit, instead. You won’t get as much traffic, granted, but you also won’t get tons of idiots writing pointless crap on your site and you won’t risk a server crash. If it’s destiny, then some good soul will post it to Digg, but nobody will digg it. That’s just life, I’m afraid.</p> +<p>Digg, Reddit, DZone, you name it. They are all excellent free tools for promoting your content. Don’t tell me + you never wrote a post <em>for the sake of making the front page</em> of one of those sites. I did, I confess.<br /> + I didn’t make Digg’s front page in a while, and I’m probably never going to make it again. The + reason? When it comes to promoting the right content in a fair way Digg <strong>sucks</strong>. As a consequence, + 80% of the articles which appear on Digg <strong>suck</strong>. I’m sure you’ll be able to forgive my + French when I say that <strong>Digg utterly sucks</strong>.</p> +<p>No matter how clever your story may be, unless you’re backed up by a swarm or an active community willing to + Digg your story, you simply aren’t going to make it. When is the last time a proper programming article made + it to Digg? I don’t remember, probably way before I unsubscribed to the Digg’s Technology feed, about a + year or so ago.</p> +<p>Just write for the sake of writing. Don’t even submit your story to Digg (unless you’re writing about the + iPhone, of course, then you may have a chance): post it to a less-known site, maybe, or to Reddit, instead. You + won’t get as much traffic, granted, but you also won’t get tons of idiots writing pointless crap on your + site and you won’t risk a server crash. If it’s destiny, then some good soul will post it to Digg, but + nobody will digg it. That’s just life, I’m afraid.</p> <h3>It has been too long since my last post: the next one will have to make up for it</h3> <p>This happens when you start feeling guilty because you didn’t post in a long time.</p> -<p><em>“My next post is going to be superb, long, interesting and everyone will start flocking back to my blog!”</em></p> -<p>Wrong. First of all because statistically people just don’t “flock back” because you bestowed them of one interesting post (you have to keep up, too), and second because by doing so your mind will automatically discard all those bits of things you wanted to write about, but you never did because you’re waiting for that special <em>next post</em> which will be <em>so much better</em> and will bring your blob back to <del>spam</del> life.</p> -<p>It happened, it happened… again, all you have to do is just post all the tidbits you need, while you’re preparing your big shot: your blog will remain “fresh” and more people will enjoy your interesting posts, whenever they’ll come.</p> +<p><em>“My next post is going to be superb, long, interesting and everyone will start flocking back to my + blog!”</em></p> +<p>Wrong. First of all because statistically people just don’t “flock back” because you bestowed them + of one interesting post (you have to keep up, too), and second because by doing so your mind will automatically + discard all those bits of things you wanted to write about, but you never did because you’re waiting for that + special <em>next post</em> which will be <em>so much better</em> and will bring your blob back to <del>spam</del> + life.</p> +<p>It happened, it happened… again, all you have to do is just post all the tidbits you need, while you’re + preparing your big shot: your blog will remain “fresh” and more people will enjoy your interesting + posts, whenever they’ll come.</p> <h3>Nobody gives a damn, anyway</h3> -<p>I didn’t want to upset my younger audience by using a nasty f-word in the title, but that’s exactly how it feels like it, sometimes.<br /> -I went to Rome last week, did you know? I twittered about it, you <strong>ought</strong> to know! And of course you’ll all be waiting for the usual 10-page-long article on my awesome vacation. Like when I <a href="http://www.h3rald.com/articles/incomplete-guide-to-london">went to London</a>, remember?<br /> -No, sadly not everyone may be interested in this crap. So I probably won’t post about it: who cares? When you start thinking like this, you may stop posting for weeks: not everyone may be interested in everything you post, and I believe that’s normal.<br /> -Especially for a blog like mine, which is deliberately open to all my interests: programming, technology, travelling, etc. That’s why most blogs try to be themed: they write about a particular subject, even a single programming project, and they (try to) do it well. The trade-off is that a themed blog may run out of posts amazingly quickly, if you’re not carefula and if you’re not 100% devoted to your blog’s theme. <br /> -A themed blog will build up a faithful audience, like when I was writing almost exclusively about CakePHP: a lot of <span class="caps">PHP</span> programmers where flocking here daily. Then things <a href="http://www.h3rald.com/blog/42">went wrong</a> and I really couldn’t be bothered to write about the same crap. Which leads us to the next topic…</p> +<p>I didn’t want to upset my younger audience by using a nasty f-word in the title, but that’s exactly how + it feels like it, sometimes.<br /> + I went to Rome last week, did you know? I twittered about it, you <strong>ought</strong> to know! And of course + you’ll all be waiting for the usual 10-page-long article on my awesome vacation. Like when I <a + href="/articles/incomplete-guide-to-london">went to London</a>, remember?<br /> + No, sadly not everyone may be interested in this crap. So I probably won’t post about it: who cares? When you + start thinking like this, you may stop posting for weeks: not everyone may be interested in everything you post, and + I believe that’s normal.<br /> + Especially for a blog like mine, which is deliberately open to all my interests: programming, technology, + travelling, etc. That’s why most blogs try to be themed: they write about a particular subject, even a single + programming project, and they (try to) do it well. The trade-off is that a themed blog may run out of posts + amazingly quickly, if you’re not carefula and if you’re not 100% devoted to your blog’s theme. + <br /> + A themed blog will build up a faithful audience, like when I was writing almost exclusively about CakePHP: a lot of + <span class="caps">PHP</span> programmers where flocking here daily. Then things <a href=/articles/42">went + wrong</a> + and I really couldn’t be bothered to write about the same crap. Which leads us to the next topic… +</p> <h3>If I write about this, a large chunk of my audience is going to be upset</h3> -<p>This applies especially to themed blogs: if you’re a well-known Firefox addict, you can’t suddenly start writing about <a href="http://www.h3rald.com/articles/firefox-lovers-guide-to-opera">Opera</a>, praising its speed and the features it offers out-of-the box!<br /> -If you take a side, you’d better stick to it, if you want your audience to stick to you: the ten people who happen to read this blog are probably quite shocked by the amount of times I “changed side”: from CakePHP and <span class="caps">PHP</span> to Rails and Ruby, from Firefox to Opera (well, wait until my next SitePoint article comes out, at least…). Probably they are not the same people who read this blog a year or so ago.</p> -<p>In the end, it’s entirely up to you: if you are prone to radically change our opinion (and this happen in technology, much more than in politics), which involves changing the whole theme of your blog, maybe you should consider not having a themed blog at all. <br /> -And if you don’t feel 100% sure you want a themed blog, you definitely shouldn’t go for a themed domain name, or you may end up abandoning it afterwards. And when that happens, unless you’re writing damn cool posts like <a href="http://redhanded.hobix.com/">Why</a>, it’s going to hurt your audience. On the other hand, if you’re sure you’ll get ten times more visitors, go for it.<br /> -No, h3rald.com stays… I may end up raving about Safari at some point within the next ten years though, don’t be upset!</p> +<p>This applies especially to themed blogs: if you’re a well-known Firefox addict, you can’t suddenly start + writing about <a href="/articles/firefox-lovers-guide-to-opera">Opera</a>, praising its speed and the features it + offers out-of-the box!<br /> + If you take a side, you’d better stick to it, if you want your audience to stick to you: the ten people who + happen to read this blog are probably quite shocked by the amount of times I “changed side”: from + CakePHP and <span class="caps">PHP</span> to Rails and Ruby, from Firefox to Opera (well, wait until my next + SitePoint article comes out, at least…). Probably they are not the same people who read this blog a year or so + ago.</p> +<p>In the end, it’s entirely up to you: if you are prone to radically change our opinion (and this happen in + technology, much more than in politics), which involves changing the whole theme of your blog, maybe you should + consider not having a themed blog at all. <br /> + And if you don’t feel 100% sure you want a themed blog, you definitely shouldn’t go for a themed domain + name, or you may end up abandoning it afterwards. And when that happens, unless you’re writing damn cool posts + like <a href="http://redhanded.hobix.com/">Why</a>, it’s going to hurt your audience. On the other hand, if + you’re sure you’ll get ten times more visitors, go for it.<br /> + No, h3rald.com stays… I may end up raving about Safari at some point within the next ten years though, + don’t be upset!</p> <h3>I’m not an expert on the subject, so I shouldn’t blog about it</h3> -<p>This is a common problem I have when I try to write about something I don’t know extensively enough. When I started to learn Ruby, I was eager to start writing about it: it seemed just too cool to be true!<br /> -I thought about writing a longish post on learning Ruby from scratch, but then I realized it wouldn’t have been a great idea: I was just starting to learn a new language, I didn’t know all the nitty-gritty and writing about it to teach others was going to be a bit presumptuous, maybe!<br /> -Instead, I opted for a lighted <a href="http://www.h3rald.com/articles/10-reasons-to-learn-ruby">10 reasons to learn Ruby</a> article, clearly stating in the first paragraph that I was just a noob getting excited about his new toy. It worked, actually: people seemed to enjoy it, and I was partially excused for the few mistakes I made here and there.<br /> -You don’t have to be an expert to blog about something: you just have to be totally honest about what you know, and what you don’t know.</p> +<p>This is a common problem I have when I try to write about something I don’t know extensively enough. When I + started to learn Ruby, I was eager to start writing about it: it seemed just too cool to be true!<br /> + I thought about writing a longish post on learning Ruby from scratch, but then I realized it wouldn’t have + been a great idea: I was just starting to learn a new language, I didn’t know all the nitty-gritty and writing + about it to teach others was going to be a bit presumptuous, maybe!<br /> + Instead, I opted for a lighted <a href="/articles/10-reasons-to-learn-ruby">10 reasons to learn Ruby</a> article, + clearly stating in the first paragraph that I was just a noob getting excited about his new toy. It worked, + actually: people seemed to enjoy it, and I was partially excused for the few mistakes I made here and there.<br /> + You don’t have to be an expert to blog about something: you just have to be totally honest about what you + know, and what you don’t know.</p> <h3>There are a lot of professional bloggers out there, and I’m not one of them</h3> -<p>Finally, this can be summarized in two words: inferiority complex. “Proper” blogs fire out 10+ posts <em>per day</em>, and I don’t even write ten points in <em>a month</em>! Again, those a professional bloggers: they live for blogging (and make an awful lot of money out of it), and they most likely have someone else blogging for them, too! <br /> -Think of TechCrunch or LifeHacker, for example: they have a small legion of talented writers working for them &emdash; even if Michael Harrington does rant about Twitter about three times a week himself, though.<br /> -At the end of the day, what matters is the <em>quality</em> of your posts. Not the length minf, the Quality. I personally think that non-professionals (I said “non-professionals”, not “amateurs”!) are <em>allowed</em> to write about once a week, if they can provide good content, that is.</p> -<p>But you still do have to write <em>at least</em> once a week (OK, let’s make it ten days), otherwise either you’re justified (you genuinely don’t have time) or you may be a victim of one of these common fears. Watch out, and happy blogging!</p> +<p>Finally, this can be summarized in two words: inferiority complex. “Proper” blogs fire out 10+ posts + <em>per day</em>, and I don’t even write ten points in <em>a month</em>! Again, those a professional bloggers: + they live for blogging (and make an awful lot of money out of it), and they most likely have someone else blogging + for them, too! <br /> + Think of TechCrunch or LifeHacker, for example: they have a small legion of talented writers working for them + &emdash; even if Michael Harrington does rant about Twitter about three times a week himself, though.<br /> + At the end of the day, what matters is the <em>quality</em> of your posts. Not the length minf, the Quality. I + personally think that non-professionals (I said “non-professionals”, not “amateurs”!) are + <em>allowed</em> to write about once a week, if they can provide good content, that is. +</p> +<p>But you still do have to write <em>at least</em> once a week (OK, let’s make it ten days), otherwise either + you’re justified (you genuinely don’t have time) or you may be a victim of one of these common fears. + Watch out, and happy blogging!</p>
@@ -4,31 +4,85 @@ content-type: article
timestamp: 1144767780 tags: "cakephp" ----- -<p>I should write more. I noticed that I since I decided to take a break from <a href="http:www.zzine.org">zZine Magazine</a> I more or less stopped writing – and started <em>baking</em> again with <a href="http://www.cakephp.org/">CakePHP</a>. As a result I finally recoded this website and <em>refreshed</em> a little bit my almost-rusty baking skills.</p> -<p style="float:left;"><img src="http://base--/img/pictures/cakephp.png" alt="" /></p> -<p>Why not taking advantage of this and write more about CakePHP then? After all, my last <a href="http://base--/articles/view/cakephp/">article</a> turned out well enough and some people even bookmarked it online on del.icio.us and ma.gnolia… Now it’s a bit out of date, I must admit: it was based on a pre-beta release of the framework, and we’re (more or less) stable now. <br /> -A lot of things changed in the Bakers Community since then! At the time the <a href="http://wiki.cakephp.org/">wiki</a> barely started and there was no <a href="http://manual.cakephp.org/">manual</a> whatsoever, only my long and perhaps <em>slightly</em> boring article describing Cake’s functionalities. Now there things are much better for newcomers: they have a continuously growing community to rely upon, both on the Google user group and on <span class="caps">IRC</span> (#cakephp on FreeNode counted 63 members today, while back in the day 20 was a big number). There are also a few people who started blogging and starting websites about CakePHP: while I was the first to write an article about Cake I was <em>the last</em> so far to start a blog :/ Oh well, nobody’s perfect!</p> -<p>The first site I came across – although not a blog really – is Graham Bird’s <a href="http://grahambird.co.uk/cake/">Cake for Beginners</a>. When someone asks me some basic questions about CakePHP I send him there because first of all they’ll find a short <span class="caps">FAQ</span> about the framework, i.e. something everybody should know before even start thinking about learning Cake. Similarly, the guy has a <a href="http://grahambird.co.uk/cake/glossary/">Glossary</a> in progress to help those souls who feel lost in Cake’s terminology. If you don’t consider yourself a total beginner anymore, the <a href="http://grahambird.co.uk/cake/tutorials/">Tutorials</a> section can be a very interesting read: I wanted to add some <span class="caps">AJAX</span> bits to my site, but the documentation about this seemed pretty scarce, so I headed to the <a href="http://grahambird.co.uk/cake/tutorials/ajax.php">Ajax Task List</a> tutorial and it really helped.</p> -<p>On the blogs front, on the other hand, <a href="http://cakebaker.42dh.com/">Cake Baker</a> seems to be the most active: I’m starting to check this one often (OK, I’d better subscribe to the <span class="caps">RSS</span> feeds, perhaps) because it seems to be <span class="caps">THE</span> best place to get the latest news about everything concerning CakePHP: The author seems to post quite frequently (there’s always a new post every 1-3 days maximum) includes short code snippets when necessary and report news when there’s anything to report.</p> -<p><a href="http://sentino.wordpress.com/">Sentino</a> is also an interesting place to learn new things about CakePHP: the only problem is that the author seems to post less frequently… the blog seems to have some sort of “milestone” schedule, publishing something when there’s something big enough to justify a post. If you want to subscribe to a less frequent blog with only the essentials about Cake, this is a good choice.</p> -<p><a href="http://rossoft.wordpress.com/">RosSoft</a> unlike the others mentioned up to now has a much more technical approach: no news about Cake or anything, just some <span class="caps">REALLY</span> useful real-world example of Cake helpers, components etc. etc., with <span class="caps">FULL</span> source code to cut and paste. Really handy if you need something specific, truly excellent for beginners to have a look at how Cake classes should be written. <br /> -Among the most interesting fully working snippets:<br /> -<a href="http://rossoft.wordpress.com/2006/03/29/ip-to-country-component-geo-location/">IP-to-country component</a> <br /> -<a href="http://rossoft.wordpress.com/2006/03/27/poor-mans-cron-component/">Poor man’s cron component</a><br /> -<a href="http://rossoft.wordpress.com/2006/03/16/image-auth-component/">Image Auth – <span class="caps">CAPTCHA</span> component</a></p> +<p>I should write more. I noticed that I since I decided to take a break from <a href="http:www.zzine.org">zZine + Magazine</a> I more or less stopped writing – and started <em>baking</em> again with <a + href="http://www.cakephp.org/">CakePHP</a>. As a result I finally recoded this website and <em>refreshed</em> a + little bit my almost-rusty baking skills.</p> +<p style="float:left;"><img src="/img/pictures/cakephp.png" alt="" /></p> +<p>Why not taking advantage of this and write more about CakePHP then? After all, my last <a + href="/articles/cakephp/">article</a> turned out well enough and some people even bookmarked it online on + del.icio.us and ma.gnolia… Now it’s a bit out of date, I must admit: it was based on a pre-beta release + of the framework, and we’re (more or less) stable now. <br /> + A lot of things changed in the Bakers Community since then! At the time the <a + href="http://wiki.cakephp.org/">wiki</a> barely started and there was no <a + href="http://manual.cakephp.org/">manual</a> whatsoever, only my long and perhaps <em>slightly</em> boring + article describing Cake’s functionalities. Now there things are much better for newcomers: they have a + continuously growing community to rely upon, both on the Google user group and on <span class="caps">IRC</span> + (#cakephp on FreeNode counted 63 members today, while back in the day 20 was a big number). There are also a few + people who started blogging and starting websites about CakePHP: while I was the first to write an article about + Cake I was <em>the last</em> so far to start a blog :/ Oh well, nobody’s perfect!</p> +<p>The first site I came across – although not a blog really – is Graham Bird’s <a + href="http://grahambird.co.uk/cake/">Cake for Beginners</a>. When someone asks me some basic questions about + CakePHP I send him there because first of all they’ll find a short <span class="caps">FAQ</span> about the + framework, i.e. something everybody should know before even start thinking about learning Cake. Similarly, the guy + has a <a href="http://grahambird.co.uk/cake/glossary/">Glossary</a> in progress to help those souls who feel lost in + Cake’s terminology. If you don’t consider yourself a total beginner anymore, the <a + href="http://grahambird.co.uk/cake/tutorials/">Tutorials</a> section can be a very interesting read: I wanted to + add some <span class="caps">AJAX</span> bits to my site, but the documentation about this seemed pretty scarce, so I + headed to the <a href="http://grahambird.co.uk/cake/tutorials/ajax.php">Ajax Task List</a> tutorial and it really + helped.</p> +<p>On the blogs front, on the other hand, <a href="http://cakebaker.42dh.com/">Cake Baker</a> seems to be the most + active: I’m starting to check this one often (OK, I’d better subscribe to the <span + class="caps">RSS</span> feeds, perhaps) because it seems to be <span class="caps">THE</span> best place to get + the latest news about everything concerning CakePHP: The author seems to post quite frequently (there’s always + a new post every 1-3 days maximum) includes short code snippets when necessary and report news when there’s + anything to report.</p> +<p><a href="http://sentino.wordpress.com/">Sentino</a> is also an interesting place to learn new things about CakePHP: + the only problem is that the author seems to post less frequently… the blog seems to have some sort of + “milestone” schedule, publishing something when there’s something big enough to justify a post. If + you want to subscribe to a less frequent blog with only the essentials about Cake, this is a good choice.</p> +<p><a href="http://rossoft.wordpress.com/">RosSoft</a> unlike the others mentioned up to now has a much more technical + approach: no news about Cake or anything, just some <span class="caps">REALLY</span> useful real-world example of + Cake helpers, components etc. etc., with <span class="caps">FULL</span> source code to cut and paste. Really handy + if you need something specific, truly excellent for beginners to have a look at how Cake classes should be written. + <br /> + Among the most interesting fully working snippets:<br /> + <a href="http://rossoft.wordpress.com/2006/03/29/ip-to-country-component-geo-location/">IP-to-country component</a> + <br /> + <a href="http://rossoft.wordpress.com/2006/03/27/poor-mans-cron-component/">Poor man’s cron + component</a><br /> + <a href="http://rossoft.wordpress.com/2006/03/16/image-auth-component/">Image Auth – <span + class="caps">CAPTCHA</span> component</a> +</p> <p style="float:right;"><img src="http://xcite-online.de/spliceit/themes/SpliceIt/logo.png" alt="" /></p> -<p><a href="http://www.thinkingphp.org/">ThinkingPHP</a> is another “technical” Cake blog, with interesting code snippets and thoughts about our favourite <span class="caps">PHP</span> framework. For those who don’t know or don’t remember him (yes, like me…), he’s the author of <a href="http://xcite-online.de/spliceit/">SpliceIt!</a>… what?</p> +<p><a href="http://www.thinkingphp.org/">ThinkingPHP</a> is another “technical” Cake blog, with interesting + code snippets and thoughts about our favourite <span class="caps">PHP</span> framework. For those who don’t + know or don’t remember him (yes, like me…), he’s the author of <a + href="http://xcite-online.de/spliceit/">SpliceIt!</a>… what?</p> <blockquote> -<p>SpliceIt!’s mission is to provide a clean and light-weight code base for people who want to create complex webapps faster then ever. The things we want to provide are:<br /> - – User/Right Managment<br /> - – Theming Support<br /> - – i18n<br /> - – Url Aliasing<br /> - – and most notabily: Modularization of often used Code Segments</p> + <p>SpliceIt!’s mission is to provide a clean and light-weight code base for people who want to create complex + webapps faster then ever. The things we want to provide are:<br /> + – User/Right Managment<br /> + – Theming Support<br /> + – i18n<br /> + – Url Aliasing<br /> + – and most notabily: Modularization of often used Code Segments</p> </blockquote> -<p>i.e. something I should have checked before recoding this website. I’ll definitely keep this in mind for the next release of h3rald.com.</p> +<p>i.e. something I should have checked before recoding this website. I’ll definitely keep this in mind for the + next release of h3rald.com.</p> <p style="float:left;"><img src="http://rdos.rd11.com/img/rd11/rdlogo.gif" alt="" /></p> -<p><a href="http://rd11.com/posts">Posts@ rd11</a> a.k.a. gwoo [and seth]‘s blog. Moment of silence. Gwoo is CakePHP’s project manager (respect+) and one of the lead developers of CakePHP and he also actually uses Cake for his website and blog instead of WordPress :)<br /> -What can I write about him. It’s difficult. I’ll avoid all possible pseudo-religious comparisons but when I say that <em>he created CakePHP</em> I think I say it all. The code he used for his blog is part of a collection of open-source, Cake-powered tools all prefixed with rd- or Cake, available on <a href="https://cakeforge.org/projects/rdos">CakeForge</a>. I personally think that looking at his sample applications can be one of the best way to learn how to bake <em>properly</em>, and yes, I <strong>did</strong> check them out before coding this site for the second time. Demos are <a href="http://rdos.rd11.com/">online</a>.</p> -<p>That’s it. These are perhaps the most well-known bakers and/or Cake bloggers on the planet. There are certainly others, maybe even in other languages, but now I’d better stop writing now, because this is a rather long blog post. Sorry. I’m new to blogging and I just can’t help myself: especially with Cake, I need to write lenghty texts!<br /> -More to come…</p> +<p><a href="http://rd11.com/posts">Posts@ rd11</a> a.k.a. gwoo [and seth]‘s blog. Moment of silence. Gwoo is + CakePHP’s project manager (respect+) and one of the lead developers of CakePHP and he also actually uses Cake + for his website and blog instead of WordPress :)<br /> + What can I write about him. It’s difficult. I’ll avoid all possible pseudo-religious comparisons but + when I say that <em>he created CakePHP</em> I think I say it all. The code he used for his blog is part of a + collection of open-source, Cake-powered tools all prefixed with rd- or Cake, available on <a + href="https://cakeforge.org/projects/rdos">CakeForge</a>. I personally think that looking at his sample + applications can be one of the best way to learn how to bake <em>properly</em>, and yes, I <strong>did</strong> + check them out before coding this site for the second time. Demos are <a href="http://rdos.rd11.com/">online</a>. +</p> +<p>That’s it. These are perhaps the most well-known bakers and/or Cake bloggers on the planet. There are certainly + others, maybe even in other languages, but now I’d better stop writing now, because this is a rather long blog + post. Sorry. I’m new to blogging and I just can’t help myself: especially with Cake, I need to write + lenghty texts!<br /> + More to come…</p>
@@ -4,63 +4,129 @@ content-type: article
timestamp: 1144928828 tags: "" ----- -<p>The time has come. The times when I used to meander around reading stuff on the Net and writing about whatever I wanted are over. Incidentally, the world may end, <em>your</em> laptop could explode and I could knock at your door in a few minutes asking for money, imagine that!</p> -<p>Nothing of the above, alright, bad joke, but sooner or later the time to <em>start doing something</em> comes, at some point you ought to start making some real money. It’s time to settle down, my fianceé are eager to get our own independence, move to our new house (which we’re still doing up) etc. etc. Fair enough. I spent the last five months wasting my time looking for a job, a <em>proper</em> job having something to do with <acronym title="Information Technology"><span class="caps">IT</span></acronym> and finally something seems to be possible.</p> -<p><em>Either nothing or everything</em> – I may even say that: now I have to face a difficult choice between two job proposals that seem both fairly interesting. <br /> -<em>“Go wherever you can get more bucks, you nutter!”</em> – Well, there’s more to it.<br /> -Let’s examine now the two similar but yet different realities I have to choose from. Maybe you’ll never be in my situation, but I hope this can help at least those who experienced or could experience something similar someday.</p> +<p>The time has come. The times when I used to meander around reading stuff on the Net and writing about whatever I + wanted are over. Incidentally, the world may end, <em>your</em> laptop could explode and I could knock at your door + in a few minutes asking for money, imagine that!</p> +<p>Nothing of the above, alright, bad joke, but sooner or later the time to <em>start doing something</em> comes, at + some point you ought to start making some real money. It’s time to settle down, my fianceé are eager to + get our own independence, move to our new house (which we’re still doing up) etc. etc. Fair enough. I spent + the last five months wasting my time looking for a job, a <em>proper</em> job having something to do with <acronym + title="Information Technology"><span class="caps">IT</span></acronym> and finally something seems to be + possible.</p> +<p><em>Either nothing or everything</em> – I may even say that: now I have to face a difficult choice between two + job proposals that seem both fairly interesting. <br /> + <em>“Go wherever you can get more bucks, you nutter!”</em> – Well, there’s more to it.<br /> + Let’s examine now the two similar but yet different realities I have to choose from. Maybe you’ll never + be in my situation, but I hope this can help at least those who experienced or could experience something similar + someday. +</p> <p><em><strong>Working under Uncle Bill’s wing</strong></em><br /> -<img src="http://base--/img/pictures/genova.jpg" alt="" /> Not Microsoft. No, not directly at any rate. I’ve recently been contacted by a well known multi-national company which does almost anything ranging from computers, phones, electrical stuff to huge self-aware robots designed to conquer new worlds… Not quite, but let’s just say that this image contributes to give an idea of a Corporate-type reality.</p> + <img src="/img/pictures/genova.jpg" alt="" /> Not Microsoft. No, not directly at any rate. I’ve recently been + contacted by a well known multi-national company which does almost anything ranging from computers, phones, + electrical stuff to huge self-aware robots designed to conquer new worlds… Not quite, but let’s just say + that this image contributes to give an idea of a Corporate-type reality. +</p> <p><em>Preliminaries</em><br /> -I happen to be an Italian whose English skills go a bit beyond the <em>“Hello, me Italian and like to do friendship with you”</em>, I applied in the above (un)mentioned company as <em>Software Tester</em> and got contacted twenty days afterwards about a possible position as <em>Technical Writer</em>. It makes perfect sense. Well, at any rate I was pleased and I went to the pre-selection which was something like a pre-<span class="caps">GCSE</span> English test with a bunch of “technical” questions (“What does <span class="caps">HTTP</span> mean?”…).<br /> -Thanks to our Merciful God I passed it (and thus avoided endless teasing by my British fianceé), and they wanted to have a proper interview with me today.<br /> -I went there and came back a few hours ago, and I think it wasn’t too bad, let’s say I may stand good chances but as normally happens in such companies in the end it was just something like <em>Thank you for coming, we’ll call you by the end of April</em>. Although I mentioned that I recently had some other job offer obviously they couldn’t give a damn: as any other big company, they need to interview all the possible candidates to be sure they pick the right one, and that’s fair enough.</p> + I happen to be an Italian whose English skills go a bit beyond the <em>“Hello, me Italian and like to do + friendship with you”</em>, I applied in the above (un)mentioned company as <em>Software Tester</em> and + got contacted twenty days afterwards about a possible position as <em>Technical Writer</em>. It makes perfect sense. + Well, at any rate I was pleased and I went to the pre-selection which was something like a pre-<span + class="caps">GCSE</span> English test with a bunch of “technical” questions (“What does <span + class="caps">HTTP</span> mean?”…).<br /> + Thanks to our Merciful God I passed it (and thus avoided endless teasing by my British fianceé), and they + wanted to have a proper interview with me today.<br /> + I went there and came back a few hours ago, and I think it wasn’t too bad, let’s say I may stand good + chances but as normally happens in such companies in the end it was just something like <em>Thank you for coming, + we’ll call you by the end of April</em>. Although I mentioned that I recently had some other job offer + obviously they couldn’t give a damn: as any other big company, they need to interview all the possible + candidates to be sure they pick the right one, and that’s fair enough.</p> <p><em>The job</em><br /> -In the remote eventuality they decide to take me on board, I’d be part of a Documentation Team in charge of writing technical documents, manuals and silly jokes – perhaps – about some semi-classified huge internal semi-intelligent corporate framework. <br /> -Now, although some people may already start to feel bored even at thinking about a job like that, I think this role would fit me perfectly. I love writing. I love researching. I love crating documentations, howtos, reports and any other boring (for other people) stuff! And they want me to write in English, not in Italian, which is – it may sound weird – a true relief for me. <br /> -At the interview I had a chance to talk about my <a href="http://base--/articles/">articles</a> and they seemed interested in this activity of mine… I even mentioned my <a href="http://base--/articles/view/cakephp/">CakePHP article</a> and they say they’re gonna check it out. Oh well, this site’s stats are always one Firefox tab away from my current main browsing tab, so you can bet I’ll be tracking that.</p> + In the remote eventuality they decide to take me on board, I’d be part of a Documentation Team in charge of + writing technical documents, manuals and silly jokes – perhaps – about some semi-classified huge + internal semi-intelligent corporate framework. <br /> + Now, although some people may already start to feel bored even at thinking about a job like that, I think this role + would fit me perfectly. I love writing. I love researching. I love crating documentations, howtos, reports and any + other boring (for other people) stuff! And they want me to write in English, not in Italian, which is – it may + sound weird – a true relief for me. <br /> + At the interview I had a chance to talk about my <a href="/articles/">articles</a> and they seemed interested in + this activity of mine… I even mentioned my <a href="/articles/cakephp/">CakePHP article</a> and they say + they’re gonna check it out. Oh well, this site’s stats are always one Firefox tab away from my current + main browsing tab, so you can bet I’ll be tracking that.</p> <p><em>The contract and the salary</em><br /> -<em>Classified</em>. They didn’t say anything, as usual, but presumably it should be a permanent (or semi-permanent) contract with all the contributions, health insurance, taxes etc. paid. And free cookies. Yum!<br /> -Salary… well, it shouldn’t be too bad, anyway.</p> + <em>Classified</em>. They didn’t say anything, as usual, but presumably it should be a permanent (or + semi-permanent) contract with all the contributions, health insurance, taxes etc. paid. And free cookies. Yum!<br /> + Salary… well, it shouldn’t be too bad, anyway. +</p> <p><em>PROs</em></p> <ul> <li>I’ll be doing something I really enjoy: writing in English</li> <li>Steady job, steady contract, more security</li> <li>Corporare Environment</li> - <li>I can show off with my friends who are still studying pointless stuff and tell them I’m working for <company name removed></li> + <li>I can show off with my friends who are still studying pointless stuff and tell them I’m working for + <company name removed> + </li> </ul> <p><em>CONs</em></p> <ul> <li>There’s a risk I’ll lose my individuality</li> <li>The salary could be lower than expected – at least initially</li> - <li>They’ll get back to me at the end of this month, and I have to give an answer to someone else before that</li> - <li>My friends and fianceé will probably hassle me to give them free goodies they think I’ll get from the company</li> + <li>They’ll get back to me at the end of this month, and I have to give an answer to someone else before that + </li> + <li>My friends and fianceé will probably hassle me to give them free goodies they think I’ll get from + the company</li> </ul> <p><em><strong>Working in a ‘cool place’, and fly high</strong></em> <br /> -<img src="http://base--/img/pictures/lambruschini.jpg" alt="" /> Nope, sorry, the <a href="http://www.cakefoundation.org/">Cake Software Foundation</a> unfortunately is not hiring. The alternative is a small company in my city, Genoa, which recently merged with a slightly bigger company based in Milan, which <em>might</em> merge with a big national company involved in producing some successful (here in Italy and even abroad, a little bit) TV programs. Network involved are Italy’s national channels, good ol’ pal Berlusconi’s channels, Sky Italy and (drums) <span class="caps">MTV</span>.<br /> -Cool, innit? What do they do? Well, interaction between mobile phones and TV through software and networks. Polls, <span class="caps">SMS</span> chat services, <span class="caps">WAP</span> application downloads, “take matey out of Big Brother’s house”, <span class="caps">SMS</span>/<span class="caps">MMS</span> blind dates related to some well known TV programs, tele-voting at Sanremo Festival etc. etc.</p> + <img src="/img/pictures/lambruschini.jpg" alt="" /> Nope, sorry, the <a href="http://www.cakefoundation.org/">Cake + Software Foundation</a> unfortunately is not hiring. The alternative is a small company in my city, Genoa, which + recently merged with a slightly bigger company based in Milan, which <em>might</em> merge with a big national + company involved in producing some successful (here in Italy and even abroad, a little bit) TV programs. Network + involved are Italy’s national channels, good ol’ pal Berlusconi’s channels, Sky Italy and (drums) + <span class="caps">MTV</span>.<br /> + Cool, innit? What do they do? Well, interaction between mobile phones and TV through software and networks. Polls, + <span class="caps">SMS</span> chat services, <span class="caps">WAP</span> application downloads, “take matey + out of Big Brother’s house”, <span class="caps">SMS</span>/<span class="caps">MMS</span> blind dates + related to some well known TV programs, tele-voting at Sanremo Festival etc. etc. +</p> <p><em>Preliminaries</em> <br /> -Their first interview was the most unusual I’ve ever had, and I <a href="http://base--/blog/view/9/">already wrote</a> about it: they even asked me to solve a riddle. Then they wanted to meet me again and showed me how they work in two different areas (see next section). They are really chilled out, friendly, they seem alright, even the main boss who deals with the company’s financial side, which is always a plus. <br /> -By the way, they already offered me the job, and I’ll have to give an answer next Tuesday – that’s the bad part.</p> + Their first interview was the most unusual I’ve ever had, and I <a href="/articles/9/">already wrote</a> + about it: they even asked me to solve a riddle. Then they wanted to meet me again and showed me how they work in two + different areas (see next section). They are really chilled out, friendly, they seem alright, even the main boss who + deals with the company’s financial side, which is always a plus. <br /> + By the way, they already offered me the job, and I’ll have to give an answer next Tuesday – that’s + the bad part.</p> <p><em>The Job</em><br /> -The Lead Developer of the company apparently seemed satisfied enough with my knowledge and Java skills. A first possibility for mewould be working for them as full-time Java Developer. Coding. Wake up, go to work, Code for eight hours, go home, sleep/other things, wake up, go to work…<br /> -It would be a good experience, and other people would choose this immediately over anything else. Coding what? Parsing algorythms for the <span class="caps">SMS</span> we receive, data manipulation, storage, re-formatting etc. etc.<br /> -The other possibility which they suggested after noticing my ability to write and research would be 2nd Level Help Desk. Get dozens of technical emails every day, file reports, notify developers when something goes wrong, propose solutions, implement solutions, monitor the systems and even execute queries on the production server on the fly, in real time (eeek!). <br /> -This could sound boring/annoying/scary but since I’m a freak I think it’s an interesting prospective. Perhaps not as qualifying as being a Java Developer, perhaps not.</p> + The Lead Developer of the company apparently seemed satisfied enough with my knowledge and Java skills. A first + possibility for mewould be working for them as full-time Java Developer. Coding. Wake up, go to work, Code for eight + hours, go home, sleep/other things, wake up, go to work…<br /> + It would be a good experience, and other people would choose this immediately over anything else. Coding what? + Parsing algorythms for the <span class="caps">SMS</span> we receive, data manipulation, storage, re-formatting etc. + etc.<br /> + The other possibility which they suggested after noticing my ability to write and research would be 2nd Level Help + Desk. Get dozens of technical emails every day, file reports, notify developers when something goes wrong, propose + solutions, implement solutions, monitor the systems and even execute queries on the production server on the fly, in + real time (eeek!). <br /> + This could sound boring/annoying/scary but since I’m a freak I think it’s an interesting prospective. + Perhaps not as qualifying as being a Java Developer, perhaps not.</p> <p><em>The contract and the salary</em><br /> -1200-1250 (or more) €/month, after tax. Which in my country is considered a more-than-reasonable pay, especially for a first job. Differnt form of contract, from consultant-with-<span class="caps">VAT</span> to renewable yearly projects, which is probably what I’d go for. Contributions/taxes paid, kind of, holidays and other vacancies included, kind of.</p> + 1200-1250 (or more) €/month, after tax. Which in my country is considered a more-than-reasonable pay, + especially for a first job. Differnt form of contract, from consultant-with-<span class="caps">VAT</span> to + renewable yearly projects, which is probably what I’d go for. Contributions/taxes paid, kind of, holidays and + other vacancies included, kind of.</p> <p><em>PROs</em></p> <ul> <li>Perhaps better salary</li> <li>I know exactly what they offer, they told me their offer in detail</li> <li>Chilled out environment</li> - <li>Perhaps I can sneak and read my desperate friends’ <span class="caps">SMS</span> when they try to pull birds</li> + <li>Perhaps I can sneak and read my desperate friends’ <span class="caps">SMS</span> when they try to pull + birds</li> </ul> <p><em>CONs</em></p> <ul> <li>Less steady contract, less security</li> <li>I’ll hardly ever use my English skills, perhaps</li> <li>They <span class="caps">NEED</span> a yes or no by next tuesday</li> - <li>My friends will probably hassle me to spy on other people’s <span class="caps">SMS</span> traffic and/or make them win TV contests</li> + <li>My friends will probably hassle me to spy on other people’s <span class="caps">SMS</span> traffic and/or + make them win TV contests</li> </ul> -<p>Here’s where I stand. I can’t complain, alright, but I must choose and act carefully. I’ll sleep on it.</p> +<p>Here’s where I stand. I can’t complain, alright, but I must choose and act carefully. I’ll sleep on + it.</p>
@@ -4,10 +4,39 @@ content-type: article
timestamp: 1144938060 tags: "cakephp|writing" ----- -<p>Too right. Enough being a lazy writer, it’s time to seriously produce something. I could sit here and pretend that long blog posts can make up for the lack of new articles, but I’d like to write something <em>proper</em> and new. Judging by the latest stats people come here hoping to find either a blog <em>entirely</em> devoted to CakePHP or some CakePHP related content. Well, actually they can <a href="http://base--/tags/CakePHP/">find</a> quite a bit, but I’d like to be able to sport more Cake-related articles, bookmarks, and posts. My main problem is that I could add ten bookmarks about Cake right away, but the <em>latest addition</em> showed on the front page would feature only bookmarks, which would be bad (yes, I do worry about silly things). At the moment this blog is the second easiest way to provide fresh content frequently enough to encourage visitors to come back, but articles could be even better.</p> -<p style="float:left;"><img src="http://base--/img/pictures/baking_bear.png" alt="" /></p> -<p>Without further ado, I hereby announce that <em>I am working on some new articles on CakePHP</em>, at least one. I’d like to write something technical about CakePHP’s advanced features, because that’s where the current documentation is lacking, at the moment: associations, caching, some advanced components… they are topics which seem to interest those bakers who already baked their first cake and are now looking for some more icing.</p> -<p>Interested? Good! Sadly, that’s not what I’m going to write now, at least not the first article I’ll be releasing. Please stop calling me names, there’s no need to say that I’m just a lazy coward who doesn’t want to get his hands dirty and write some tough stuff. And stop pulling those sad faces! Think about… new bakers. There are new people learning about Cake and I know there are, I just discovered <a href="http://www.480x.com/2006/04/12/eureka/">one</a> yesterday almost by chance: he seems to be really enthusiastic about Cake, judging by his <a href="http://www.480x.com/2006/04/13/eureka-part-deux/">latest post</a> (OK, nevermind the pic).<br /> -Those people are mostly more-or-less experienced <span class="caps">PHP</span> programmers who want to find an answer to all their development problems and annoyance. Well, my good friends, the answer lies in Cake. Cake can save us all and bestow powerful blessings of Good <span class="caps">PHP</span> Design and Well-structured Programming upon our messy spaghetti code!</p> -<p>I almost considered writing a humorous article about Cake, but luckily I changed my mind. My old <a href="http://base--/articles/view/cakephp/">CakePHP article</a> is already a few months old and was written when Cake was in pre-beta. I feel it’s time for a more up-to-date howto and introduction to our framework, something maybe not as lenghty but easily readable by almost anyone interested in starting to learn about Cake.</p> -<p>Baking lessons. Yes, that’s it. I’m currently writing an article divided in ten lessons which could potentially turn casual cowboy coders into (apprentice) bakers. That could be easy for those already enlightened by <acronym title="Object Oriented Programming"><span class="caps">OOP</span></acronym> and <acronym title="Model-View-Controller"><span class="caps">MVC</span></acronym>, and perhaps more difficult for others: at any rate, I’ll try my best.</p> +<p>Too right. Enough being a lazy writer, it’s time to seriously produce something. I could sit here and pretend + that long blog posts can make up for the lack of new articles, but I’d like to write something <em>proper</em> + and new. Judging by the latest stats people come here hoping to find either a blog <em>entirely</em> devoted to + CakePHP or some CakePHP related content. Well, actually they can find quite a bit, but + I’d like to be able to sport more Cake-related articles, bookmarks, and posts. My main problem is that I could + add ten bookmarks about Cake right away, but the <em>latest addition</em> showed on the front page would feature + only bookmarks, which would be bad (yes, I do worry about silly things). At the moment this blog is the second + easiest way to provide fresh content frequently enough to encourage visitors to come back, but articles could be + even better.</p> +<p style="float:left;"><img src="/img/pictures/baking_bear.png" alt="" /></p> +<p>Without further ado, I hereby announce that <em>I am working on some new articles on CakePHP</em>, at least one. + I’d like to write something technical about CakePHP’s advanced features, because that’s where the + current documentation is lacking, at the moment: associations, caching, some advanced components… they are + topics which seem to interest those bakers who already baked their first cake and are now looking for some more + icing.</p> +<p>Interested? Good! Sadly, that’s not what I’m going to write now, at least not the first article + I’ll be releasing. Please stop calling me names, there’s no need to say that I’m just a lazy + coward who doesn’t want to get his hands dirty and write some tough stuff. And stop pulling those sad faces! + Think about… new bakers. There are new people learning about Cake and I know there are, I just discovered <a + href="http://www.480x.com/2006/04/12/eureka/">one</a> yesterday almost by chance: he seems to be really + enthusiastic about Cake, judging by his <a href="http://www.480x.com/2006/04/13/eureka-part-deux/">latest post</a> + (OK, nevermind the pic).<br /> + Those people are mostly more-or-less experienced <span class="caps">PHP</span> programmers who want to find an + answer to all their development problems and annoyance. Well, my good friends, the answer lies in Cake. Cake can + save us all and bestow powerful blessings of Good <span class="caps">PHP</span> Design and Well-structured + Programming upon our messy spaghetti code!</p> +<p>I almost considered writing a humorous article about Cake, but luckily I changed my mind. My old <a + href="/articles/cakephp/">CakePHP article</a> is already a few months old and was written when Cake was in + pre-beta. I feel it’s time for a more up-to-date howto and introduction to our framework, something maybe not + as lenghty but easily readable by almost anyone interested in starting to learn about Cake.</p> +<p>Baking lessons. Yes, that’s it. I’m currently writing an article divided in ten lessons which could + potentially turn casual cowboy coders into (apprentice) bakers. That could be easy for those already enlightened by + <acronym title="Object Oriented Programming"><span class="caps">OOP</span></acronym> and <acronym + title="Model-View-Controller"><span class="caps">MVC</span></acronym>, and perhaps more difficult for others: at + any rate, I’ll try my best. +</p>
@@ -4,37 +4,70 @@ content-type: article
timestamp: 1145001300 tags: "cakephp|webdevelopment|php" ----- -<p>When I first talked to gwoo, CakePHP’s project manager, I asked him if Cake had any potential <em>limitations</em>. I asked him – I was kidding actually – wether it would be possible to build an application like Gmail using the framework and he – very seriously – simply said <em>“yes, why not?”</em>. <br /> -I repeat myself when I say that CakePHP leaves plenty of freedom to developers within the bounds of its <span class="caps">MVC</span> structure: once you grasp the basic logic behind it, your possibilities are endless. I don’t want to act as a Ruby on Rails fanatic and boast that <em>you can do anything with CakePHP</em> and things like that, but I can certainly say that CakePHP can be <em>extended</em> and <em>integrated</em> with other collections of scripts, frameworks and projects. With limitations, of course: you probably don’t want to force an integration between CakePHP and another <span class="caps">MVC</span>/Event Driven/Whatever framework, simply because it would be rather pointless and potential conflicts may occur.</p> -<p>What I keep finding online is other open source projects adopting CakePHP as <em>backend</em> and <em>structure</em>. I’m sure there are many examples which could be mentioned here, but I chose two in particular: one has been around for a few months and the other is just born.</p> -<p style="float:left;"><img src="http://base--/img/pictures/amfphp.jpg" alt="" /></p> +<p>When I first talked to gwoo, CakePHP’s project manager, I asked him if Cake had any potential + <em>limitations</em>. I asked him – I was kidding actually – wether it would be possible to build an + application like Gmail using the framework and he – very seriously – simply said <em>“yes, why + not?”</em>. <br /> + I repeat myself when I say that CakePHP leaves plenty of freedom to developers within the bounds of its <span + class="caps">MVC</span> structure: once you grasp the basic logic behind it, your possibilities are endless. I + don’t want to act as a Ruby on Rails fanatic and boast that <em>you can do anything with CakePHP</em> and + things like that, but I can certainly say that CakePHP can be <em>extended</em> and <em>integrated</em> with other + collections of scripts, frameworks and projects. With limitations, of course: you probably don’t want to force + an integration between CakePHP and another <span class="caps">MVC</span>/Event Driven/Whatever framework, simply + because it would be rather pointless and potential conflicts may occur.</p> +<p>What I keep finding online is other open source projects adopting CakePHP as <em>backend</em> and <em>structure</em>. + I’m sure there are many examples which could be mentioned here, but I chose two in particular: one has been + around for a few months and the other is just born.</p> +<p style="float:left;"><img src="/img/pictures/amfphp.jpg" alt="" /></p> <p><a href="http://amfphp.org/"><span class="caps">AMFPHP</span></a> is quite an interesting project:</p> <blockquote> -<p>“[it] is an open-source Flash Remoting gateway. It’s fast, reliable, 100% free and open-source. Flash Remoting is a technology built into the Flash player core that enables sending data between the server and the client seemlessly.”</p> + <p>“[it] is an open-source Flash Remoting gateway. It’s fast, reliable, 100% free and open-source. Flash + Remoting is a technology built into the Flash player core that enables sending data between the server and the + client seemlessly.”</p> </blockquote> -<p>In other words, it makes lifes much easier for developers who’d like to integrate their flash animations and script more tightly into their <span class="caps">PHP</span> application. If you are curious to see some results, head off to <span class="caps">AMFPHP</span> <a href="http://amfphp.org/showcase.html">showcase</a>.<br /> -Cool, but what has this project to do with CakePHP? Well, gwoo recently created <a href="http://cakeforge.org/projects/cakeamfphp/">CakeAMFPHP</a>, a CakeForge project which just yesterday reached its <a href="http://rd11.com/posts/view/21">0.4.0 release</a>, and it’s fully compatible with <span class="caps">AMFPHP</span> 1.2.3 and CakePHP 0.10 final.<br /> -Here’s an excerpt taken from CakeAMFPHP <span class="caps">README</span>.txt file:</p> +<p>In other words, it makes lifes much easier for developers who’d like to integrate their flash animations and + script more tightly into their <span class="caps">PHP</span> application. If you are curious to see some results, + head off to <span class="caps">AMFPHP</span> <a href="http://amfphp.org/showcase.html">showcase</a>.<br /> + Cool, but what has this project to do with CakePHP? Well, gwoo recently created <a + href="http://cakeforge.org/projects/cakeamfphp/">CakeAMFPHP</a>, a CakeForge project which just yesterday + reached its <a href="http://rd11.com/posts/view/21">0.4.0 release</a>, and it’s fully compatible with <span + class="caps">AMFPHP</span> 1.2.3 and CakePHP 0.10 final.<br /> + Here’s an excerpt taken from CakeAMFPHP <span class="caps">README</span>.txt file:</p> <blockquote> -<p>“[…] <br /> -1) get CakePHP 0.10 final (http://cakephp.org)<br /> -2) get amfphp 1.2.3 (http://amfphp.org)<br /> -3) get the <span class="caps">UFO</span> js http://www.bobbyvandersluis.com/ufo/<br /> -4) put amfphp into /app/vendors<br /> -5) put cakeamfphp into vendors<br /> -6) put the cake_gateway.php in /app/webroot<br /> -7) put the cakeamfphp.php in /app/views/helpers<br /> -8) put CakeMySqlAdpater.php in /app/vendors/amfphp-core/adapters<br /> -9) Voila: NetServices.setDefaultGatewayUrl( ‘http://localhost/cake_install/cake_gateway.php’);<br /> -Access the service browser through<br /> -http://localhost/cake_install/vendors/cakeamfphp/cakebrowser/”</p> + <p>“[…] <br /> + 1) get CakePHP 0.10 final (http://cakephp.org)<br /> + 2) get amfphp 1.2.3 (http://amfphp.org)<br /> + 3) get the <span class="caps">UFO</span> js http://www.bobbyvandersluis.com/ufo/<br /> + 4) put amfphp into /app/vendors<br /> + 5) put cakeamfphp into vendors<br /> + 6) put the cake_gateway.php in /app/webroot<br /> + 7) put the cakeamfphp.php in /app/views/helpers<br /> + 8) put CakeMySqlAdpater.php in /app/vendors/amfphp-core/adapters<br /> + 9) Voila: NetServices.setDefaultGatewayUrl( ‘http://localhost/cake_install/cake_gateway.php’);<br /> + Access the service browser through<br /> + http://localhost/cake_install/vendors/cakeamfphp/cakebrowser/”</p> </blockquote> -<p>The installation doesn’t seem too painful at all. And – guess what – gwoo recently updated a very informative tutorial showing how to create a simple – but still impressive – bullettin board with CakeAMFPHP.</p> +<p>The installation doesn’t seem too painful at all. And – guess what – gwoo recently updated a very + informative tutorial showing how to create a simple – but still impressive – bullettin board with + CakeAMFPHP.</p> <p><em>“Cool, but I never liked flash, what about <span class="caps">AJAX</span>?”</em></p> -<p style="float:left;"><img src="http://base--/img/pictures/qooxdoo.gif" alt="" /></p> -<p>CakePHP has a nice <span class="caps">AJAX</span> helper to be used in conjunction with <a href="http://prototype.conio.net/">prototype</a>, but there are truly a lot of libraries, mini-frameworks, pre-built applications to create interactive desktop-like user interfaces. Some people may already know <a href="http://qooxdoo.oss.schlund.de/">qooxdoo</a>,</p> +<p style="float:left;"><img src="/img/pictures/qooxdoo.gif" alt="" /></p> +<p>CakePHP has a nice <span class="caps">AJAX</span> helper to be used in conjunction with <a + href="http://prototype.conio.net/">prototype</a>, but there are truly a lot of libraries, mini-frameworks, + pre-built applications to create interactive desktop-like user interfaces. Some people may already know <a + href="http://qooxdoo.oss.schlund.de/">qooxdoo</a>,</p> <blockquote> -<p>“[…] an advanced open-source JavaScript-based <span class="caps">GUI</span> toolkit. qooxdoo continues where simple <span class="caps">HTML</span> is not enough. This way qooxdoo can help you implement your <span class="caps">AJAX</span>-enhanced web 2.0 application – easier than ever before.”</p> + <p>“[…] an advanced open-source JavaScript-based <span class="caps">GUI</span> toolkit. qooxdoo + continues where simple <span class="caps">HTML</span> is not enough. This way qooxdoo can help you implement + your <span class="caps">AJAX</span>-enhanced web 2.0 application – easier than ever before.”</p> </blockquote> -<p>In a recent <a href="http://groups.google.com/group/cake-php/browse_thread/thread/ba219c64cd794764/1d77973293514618?lnk=raot">discussion</a> on CakePHP user group someone suggested the possibility to integrate qooxdoo with CakePHP. Apparently qooxdoo people were <a href="http://www.nabble.com/Re%3A-qooxdoo-PHP-framework-project-p3799302.html">evaluating</a> various <span class="caps">MVC</span> frameworks, and Cake was obviously listed together with two other Rails clones for <span class="caps">PHP</span>. The good news is that <a href="http://cakeforge.org/users/a100rk/">100rk</a> just started a new project called <a href="http://cakeforge.org/projects/cqx"><span class="caps">CQX</span></a>, which – although still in pre-alpha a development demo is already available, and it <em>shows off</em> most of qooxdoo’s features… <a href="http://cqx.100rk.org/trunk/">Take a look</a></p> +<p>In a recent <a + href="http://groups.google.com/group/cake-php/browse_thread/thread/ba219c64cd794764/1d77973293514618?lnk=raot">discussion</a> + on CakePHP user group someone suggested the possibility to integrate qooxdoo with CakePHP. Apparently qooxdoo people + were <a href="http://www.nabble.com/Re%3A-qooxdoo-PHP-framework-project-p3799302.html">evaluating</a> various <span + class="caps">MVC</span> frameworks, and Cake was obviously listed together with two other Rails clones for <span + class="caps">PHP</span>. The good news is that <a href="http://cakeforge.org/users/a100rk/">100rk</a> just + started a new project called <a href="http://cakeforge.org/projects/cqx"><span class="caps">CQX</span></a>, which + – although still in pre-alpha a development demo is already available, and it <em>shows off</em> most of + qooxdoo’s features… <a href="http://cqx.100rk.org/trunk/">Take a look</a></p> <p>Best of luck to 100rk and his brand new project, I really hope to see more of it soon!</p>
@@ -4,16 +4,28 @@ content-type: article
timestamp: 1145106900 tags: "cakephp|webdevelopment" ----- -<p><em>“CakePHP will officially support Internationalization (i18n) from version 2.0”</em>. That is to say: not right now. That doesn’t mean we have to wait, no chance! I’m Italian and there are plenty of bakers speaking a language other than English who might want to develop a multi-lingual website.</p> -<p>I did, <a href="http://v60.h3rald.com/">once</a>, and the final result wasn’t too bad in the end: every page of the site (except the articles) could be translated into Italian. Before examining my solution (which is far from optimal) I’d like to mention an excellent CakePHP package which allows basic (mostly statuc) i18n.<br /> -It looks like I missed an important baker in my recent <a href="http://base--/blog/view/11">blog post</a>: <a href="http://www.noswad.me.uk/">Andy Dawson</a>, creator – among other things – of the <a href="http://cakeforge.org/snippet/detail.php?type=package&id=2">Locale Package</a>, available at CakeForge. His solution actually came out after H3RALD.com v60 was already developed so I didn’t use it for my own site.<br /> -At a first glance Andy’s solution truly solves basic l18n problems in an elegant way: the most important code snippet is the <a href="http://cakeforge.org/snippet/download.php?type=snippet&id=74">Locale Component</a> which provides the following functionalities:</p> +<p><em>“CakePHP will officially support Internationalization (i18n) from version 2.0”</em>. That is to say: + not right now. That doesn’t mean we have to wait, no chance! I’m Italian and there are plenty of bakers + speaking a language other than English who might want to develop a multi-lingual website.</p> +<p>I did, <a href="http://v60.h3rald.com/">once</a>, and the final result wasn’t too bad in the end: every page of + the site (except the articles) could be translated into Italian. Before examining my solution (which is far from + optimal) I’d like to mention an excellent CakePHP package which allows basic (mostly statuc) i18n.<br /> + It looks like I missed an important baker in my recent <a href="/articles/11">blog post</a>: <a + href="http://www.noswad.me.uk/">Andy Dawson</a>, creator – among other things – of the <a + href="http://cakeforge.org/snippet/detail.php?type=package&id=2">Locale Package</a>, available at CakeForge. + His solution actually came out after H3RALD.com v60 was already developed so I didn’t use it for my own + site.<br /> + At a first glance Andy’s solution truly solves basic l18n problems in an elegant way: the most important code + snippet is the <a href="http://cakeforge.org/snippet/download.php?type=snippet&id=74">Locale Component</a> which + provides the following functionalities:</p> <ul> <li>automatic language detection based on browser’s UserAgent string</li> <li>loading of locale files</li> <li>setting of customizeable (translated) messages</li> </ul> -<p>The getString() method provided in the locale component is actually used through the double underscore function, which is already defined (but not yet implemented) in the standard CakePHP file <code>cake/basics.php</code> (yes, this is a small core hack). Andy’s double underscore function can take five parameters:</p> +<p>The getString() method provided in the locale component is actually used through the double underscore function, + which is already defined (but not yet implemented) in the standard CakePHP file <code>cake/basics.php</code> (yes, + this is a small core hack). Andy’s double underscore function can take five parameters:</p> <pre><code>function __($msgId, $MessageArgs=NULL, $capitalize=1, $punctuate=0,$Code=NULL) { require_once(COMPONENTS.'locale.php');@@ -25,21 +37,26 @@ <ul>
<li>a “message id” or the message itself</li> <li>some parameters which can be passed to the message</li> <li>the message’s capitalization: - <ul> - <li>0 = no change</li> - <li>1 = first letter of first word</li> - <li>2 = fist character of all words</li> - </ul></li> + <ul> + <li>0 = no change</li> + <li>1 = first letter of first word</li> + <li>2 = fist character of all words</li> + </ul> + </li> <li>the message’s punctuation: - <ul> - <li>0 = ""</li> - <li>1 = .</li> - <li>2 = !</li> - <li>3 = ?</li> - </ul></li> + <ul> + <li>0 = ""</li> + <li>1 = .</li> + <li>2 = !</li> + <li>3 = ?</li> + </ul> + </li> <li>the language code, if you need to override your page’s language</li> </ul> -<p>This is a convenient method which can be used everywhere, both in your controllers and in your views, to translate simple pre-stored messages. Where are those messages stored? In various locale files which must be placed in <code>app/controllers/components/messages/</code> and look like this:</p> +<p>This is a convenient method which can be used everywhere, both in your controllers and in your views, to translate + simple pre-stored messages. Where are those messages stored? In various locale files which must be placed in + <code>app/controllers/components/messages/</code> and look like this: +</p> <pre><code> $messages = Array ( 'LocaleSetTo'=>"Site locale set to UK English", 'LocaleChangeTo'=>"Change site locale to UK English",@@ -47,10 +64,19 @@ // Time related messages
'ago' => "%s ago", 'ages' => "a long time ago (%s)", )</code></pre> -<p>The locale package also comes with a <em>Language Controller</em> you can use to handle language changes, and a useful rewrite of the <em>Time Helper_. Andy recently updated his <a href="http://wiki.cakephp.org/tutorials:i18n">i18n tutorial</a> available on CakePHP Wiki, a very interesting read on how to quickly add i18n support to yout first Cake blog (yes, the one described in the <a href="http://wiki.cakephp.org/tutorials:blog_tutorial">Blog Tutorial</a>_-</em>1).</p> -<p>So far so good. The Locale Package provide some basic multi-lingual support in an efficient way, and I’d certainly use it if I decide to (re-)develop a multi-lingual site, but unfortunately this does not fully solve the problem.<br /> -If you want <strong>full</strong> i18n, for sure you’d like to have all the contents of your website translated, which is – normally – dynamic and maybe stored in a database. That was the case of my old website: all the pages are dynamic, not static, so I had to think about something else. <br /> -Since I only had plans to develop a <em>dual</em> language site, I opted for a very lazy (but yet effective) solution: each table – more or less – had “duplicate” fields, something like this:</p> +<p>The locale package also comes with a <em>Language Controller</em> you can use to handle language changes, and a + useful rewrite of the <em>Time Helper_. Andy recently updated his <a + href="http://wiki.cakephp.org/tutorials:i18n">i18n tutorial</a> available on CakePHP Wiki, a very + interesting read on how to quickly add i18n support to yout first Cake blog (yes, the one described in the <a + href="http://wiki.cakephp.org/tutorials:blog_tutorial">Blog Tutorial</a>_-</em>1).</p> +<p>So far so good. The Locale Package provide some basic multi-lingual support in an efficient way, and I’d + certainly use it if I decide to (re-)develop a multi-lingual site, but unfortunately this does not fully solve the + problem.<br /> + If you want <strong>full</strong> i18n, for sure you’d like to have all the contents of your website + translated, which is – normally – dynamic and maybe stored in a database. That was the case of my old + website: all the pages are dynamic, not static, so I had to think about something else. <br /> + Since I only had plans to develop a <em>dual</em> language site, I opted for a very lazy (but yet effective) + solution: each table – more or less – had “duplicate” fields, something like this:</p> <ul> <li>id</li> <li>title_en</li>@@ -60,7 +86,11 @@ <li>text_it</li>
<li>created</li> <li>modified</li> </ul> -<p>I basically defined a global $lang variable set to “en” by default and then I accessed the record’s fields (for example in views) like this:</p> +<p>I basically defined a global $lang variable set to “en” by default and then I accessed the record’s + fields (for example in views) like this:</p> <p><code>echo $data['Project']['text_'.$lang]</code></p> -<p>Ugly, perhaps, but did the job. The good (or bad) thing about this technique was that I could modify the contents of a project, for example, regardless of the current language: in my add/edit view, I chose to generate <em>all</em> the fields of a table and therefore modify all the fields of a project without switching to the other language.</p> -<p>How will Cake support locales? Will we have “localized” database tables (and models?) Only time will tell…</p> +<p>Ugly, perhaps, but did the job. The good (or bad) thing about this technique was that I could modify the contents of + a project, for example, regardless of the current language: in my add/edit view, I chose to generate <em>all</em> + the fields of a table and therefore modify all the fields of a project without switching to the other language.</p> +<p>How will Cake support locales? Will we have “localized” database tables (and models?) Only time will + tell…</p>
@@ -4,16 +4,46 @@ content-type: article
timestamp: 1145251800 tags: "cakephp|webdevelopment|databases" ----- -<p>One of the most recurring questions on CakePHP User Group is probably <em>“Does Cake support X database?”</em>. Sure, most of us tend to use just MySQL for our websites and applications, but in certain situations some more <em>exotic</em> database support makes the difference. A partial answer to the question above could be <em>“Yes, probably, at least partially”</em>: CakePHP offers support for some database “natively” (i.e. Cake folks made some <em>ad hoc</em> database drivers), others through either <a href="http://adodb.sourceforge.net/">ADOdb</a> or <a href="http://pear.php.net/package/DB"><span class="caps">PEAR</span>::DB</a>.</p> -<p>CakePHP seems to use a <em>multiple level</em> database abstraction: in other words, popular abstraction layers like ADOdb or <span class="caps">PEAR</span>::DB have been wrapped in a “driver” which basically extends the DboSource class (which is the most high level database abstraction). Some people don’t like the idea, because this means that the could be some performance issues, for one, and also that inevitably not <em>all</em> features offered by either ADOdb or <span class="caps">PEAR</span>::DB are used. In my very, very, very modest opinion (I’m not an expert on this matter), this solution focus on achieving good database compatibility leaving the doors open for further tinkering, if needed.</p> -<p style="float:left;"><img src="http://base--/img/pictures/postgres.png" alt="" /></p> -<p>Having said this, yes, the possibilities are good that your favorite database is supported by CakePHP, more or less. Of course, as repeatedly pointed out by some CakePHP core developers, Cake dev team didn’t and is not going to test <em>every</em> database with Cake, using either of the two abstraction layers, but users are more than welcome to do so.</p> +<p>One of the most recurring questions on CakePHP User Group is probably <em>“Does Cake support X + database?”</em>. Sure, most of us tend to use just MySQL for our websites and applications, but in certain + situations some more <em>exotic</em> database support makes the difference. A partial answer to the question above + could be <em>“Yes, probably, at least partially”</em>: CakePHP offers support for some database + “natively” (i.e. Cake folks made some <em>ad hoc</em> database drivers), others through either <a + href="http://adodb.sourceforge.net/">ADOdb</a> or <a href="http://pear.php.net/package/DB"><span + class="caps">PEAR</span>::DB</a>.</p> +<p>CakePHP seems to use a <em>multiple level</em> database abstraction: in other words, popular abstraction layers like + ADOdb or <span class="caps">PEAR</span>::DB have been wrapped in a “driver” which basically extends the + DboSource class (which is the most high level database abstraction). Some people don’t like the idea, because + this means that the could be some performance issues, for one, and also that inevitably not <em>all</em> features + offered by either ADOdb or <span class="caps">PEAR</span>::DB are used. In my very, very, very modest opinion + (I’m not an expert on this matter), this solution focus on achieving good database compatibility leaving the + doors open for further tinkering, if needed.</p> +<p style="float:left;"><img src="/img/pictures/postgres.png" alt="" /></p> +<p>Having said this, yes, the possibilities are good that your favorite database is supported by CakePHP, more or less. + Of course, as repeatedly pointed out by some CakePHP core developers, Cake dev team didn’t and is not going to + test <em>every</em> database with Cake, using either of the two abstraction layers, but users are more than welcome + to do so.</p> <p>Let’s now have a look at what is <em>known to work</em> with Cake:</p> -<p><strong>MySQL</strong> works fine, and is currently recommended as <em>preferred</em> database solution. What about <strong>MySQLi</strong>? Well, thanks to mappleJoe there’s a (PHP5 only!) <a href="http://cakephp.org/pastes/show/770e73e77e4d7a3d32c2f3de3f175512">driver</a> ready to be used.</p> -*PostgreSQL*’s support is continuously improving. Something may work, something may not: the good news is that the folks who are using it are <a href="http://groups.google.com/group/cake-php/browse_thread/thread/85a29ab6ec6826a0/8eecea26ba53e1fd?q=postgres&rnum=1#8eecea26ba53e1fd">sharing their thoughts</a> with the rest of us. -<p style="float:right;"><img src="http://base--/img/pictures/sqlite.gif" alt="" /></p> -<p><strong>SQLite</strong> is supported natively, or so it seems… what about the newest SQLite3? Yes, probably: there’s a quick <a href="http://www.thompsonlife.net/index.php?section=9">howto</a> on ThompsonLife.net to make it work through the dbo_pear driver.</p> -<p><strong>Access</strong> works through the ADOdb driver, as reported in CakePHP <a href="http://wiki.cakephp.org/docs:databases">wiki</a> (thanks ivanp).</p> -<p><a href="http://www.filemaker.com/">FileMaker</a> is getting there: things aren’t that easy, but bdb is doing <a href="http://groups.google.com/group/cake-php/browse_thread/thread/572d8dd2ba4cbdf7/dca851c795247c0b?q=database&rnum=2#dca851c795247c0b">all his best</a> to make it work, good luck!</p> -<p>Neil Fincham was also trying to develop a custom driver to support <a href="http://www.pervasive.com/">Pervasive</a> through a <a href="http://www.unixodbc.org/">unixODBC</a> driver. Best of luck!</p> -<p>For other databases, check ADOdb’s <a href="http://phplens.com/adodb/supported.databases.html">list of supported databases</a> and use the <code>dbo-adodb</code> driver, or use <span class="caps">PEAR</span>::DB (for fbsql, ibase, informix, msql, mssql, mysql, mysqli, oci8, odbc, pgsql,sqlite and sybase) using the <code>dbo-pear</code> driver.</p> +<p><strong>MySQL</strong> works fine, and is currently recommended as <em>preferred</em> database solution. What about + <strong>MySQLi</strong>? Well, thanks to mappleJoe there’s a (PHP5 only!) <a + href="http://cakephp.org/pastes/show/770e73e77e4d7a3d32c2f3de3f175512">driver</a> ready to be used.</p> +*PostgreSQL*’s support is continuously improving. Something may work, something may not: the good news is that the +folks who are using it are <a + href="http://groups.google.com/group/cake-php/browse_thread/thread/85a29ab6ec6826a0/8eecea26ba53e1fd?q=postgres&rnum=1#8eecea26ba53e1fd">sharing + their thoughts</a> with the rest of us. +<p style="float:right;"><img src="/img/pictures/sqlite.gif" alt="" /></p> +<p><strong>SQLite</strong> is supported natively, or so it seems… what about the newest SQLite3? Yes, probably: + there’s a quick <a href="http://www.thompsonlife.net/index.php?section=9">howto</a> on ThompsonLife.net to + make it work through the dbo_pear driver.</p> +<p><strong>Access</strong> works through the ADOdb driver, as reported in CakePHP <a + href="http://wiki.cakephp.org/docs:databases">wiki</a> (thanks ivanp).</p> +<p><a href="http://www.filemaker.com/">FileMaker</a> is getting there: things aren’t that easy, but bdb is doing + <a + href="http://groups.google.com/group/cake-php/browse_thread/thread/572d8dd2ba4cbdf7/dca851c795247c0b?q=database&rnum=2#dca851c795247c0b">all + his best</a> to make it work, good luck!</p> +<p>Neil Fincham was also trying to develop a custom driver to support <a href="http://www.pervasive.com/">Pervasive</a> + through a <a href="http://www.unixodbc.org/">unixODBC</a> driver. Best of luck!</p> +<p>For other databases, check ADOdb’s <a href="http://phplens.com/adodb/supported.databases.html">list of + supported databases</a> and use the <code>dbo-adodb</code> driver, or use <span class="caps">PEAR</span>::DB + (for fbsql, ibase, informix, msql, mssql, mysql, mysqli, oci8, odbc, pgsql,sqlite and sybase) using the + <code>dbo-pear</code> driver.</p>
@@ -4,16 +4,41 @@ content-type: article
timestamp: 1145605143 tags: "" ----- -<p>Once upon a time I used <a href="http://en.wikipedia.org/wiki/BBCode">BBcode</a>. <a href="http://base--/bookmarks/view/cyberarmy">CyberArmy</a> and all its affiliated sites adopted it as <em>de-facto</em> standard for forums and articles, so consequently more or less all my articles are bbcoded. <br /> -I could copy and paste the <em>BBcodeHelper</em> I coded for this site, and it could be quite an interesting read for some people… well, tough luck: today I’d like to talk about <a href="http://base--/bookmarks/view/textile-reference/">Textile</a> instead, which now I consider <em>the answer</em> to all text formatting problems.</p> -<p>If what I wrote up to here doesn’t make sense to you, I’m rambling about the apparent necessity and the undeniable need of web developers, content managers, and writers to use something else other than <span class="caps">HTML</span> for adding style and formatting text. What’s wrong with <span class="caps">HTML</span>? Nothing, it’s just too “tiresome” to use: you have to remember to close all tags, break lines, use the <code><strong></code> tag every time you want <strong>bold text</strong>, etc. etc.<br /> -Some people even freak out when you tell them that they have to use <span class="caps">HTML</span> in their text: “it’s just <em>waaaaaay too difficult</em> to learn and use” …things like that.</p> -<p>Whether you are scared to learn <span class="caps">HTML</span>, you don’t want to, or you know it but you’re too lazy to seriously thinking about manually use a markup language to write your article, I can say that you’ll definitely become addicted to Textile. What? <em>“<acronym title="What You See is What You Get"><span class="caps">WYSIWYG</span></acronym> <span class="caps">HTML</span> editors?”</em> – C’mon, let’s at least <em>try</em> to be serious :)<br /> -Why BBcode doesn’t help enough? Well, simply because I don’t see why <code>[i]this[/i]</code> is easier than <code><i>this</i></code>: unless you have a particular phobia for angular brackets, it seems quite similar to me!</p> -<p>What about <code>_this_</code> instead? You use only two additional characters instead of seven. <span class="caps">SEVEN</span>. If I only want italcized text I honestly can’t imagine myself using more than two extra characters. It’s natural. It’s human.</p> -<p style="float:left;"><img src="http://base--/img/pictures/pear2.gif" alt="" /></p> -Precisely. Textile is a <em>“Humane web text generator™”</em>, it’s simple, elegant and produces standard compliant <span class="caps">XHTML</span> code. <a href="http://www.textism.com/about/">Dean Allen</a> should be worshipped by entire generations of web developers for inventing something so easy to use and so <em>elegant</em> at the same time. Maybe not worshipped, but for sure respected. -<p>I won’t copy and paste the extremely useful <a href="http://cakeforge.org/projects/textilehelper/">TextileHelper</a> for CakePHP either, simply because it’s 4085 lines long and it would be pointless: you can just get it and use it.</p> +<p>Once upon a time I used <a href="http://en.wikipedia.org/wiki/BBCode">BBcode</a>. CyberArmy and all its affiliated + sites adopted it as <em>de-facto</em> + standard for forums and articles, so consequently more or less all my articles are bbcoded. <br /> + I could copy and paste the <em>BBcodeHelper</em> I coded for this site, and it could be quite an interesting read + for some people… well, tough luck: today I’d like to talk about Textile instead, which now I consider + <em>the answer</em> to all + text formatting problems.</p> +<p>If what I wrote up to here doesn’t make sense to you, I’m rambling about the apparent necessity and the + undeniable need of web developers, content managers, and writers to use something else other than <span + class="caps">HTML</span> for adding style and formatting text. What’s wrong with <span + class="caps">HTML</span>? Nothing, it’s just too “tiresome” to use: you have to remember to + close all tags, break lines, use the <code><strong></code> tag every time you want <strong>bold text</strong>, + etc. etc.<br /> + Some people even freak out when you tell them that they have to use <span class="caps">HTML</span> in their text: + “it’s just <em>waaaaaay too difficult</em> to learn and use” …things like that.</p> +<p>Whether you are scared to learn <span class="caps">HTML</span>, you don’t want to, or you know it but + you’re too lazy to seriously thinking about manually use a markup language to write your article, I can say + that you’ll definitely become addicted to Textile. What? <em>“<acronym + title="What You See is What You Get"><span class="caps">WYSIWYG</span></acronym> <span + class="caps">HTML</span> editors?”</em> – C’mon, let’s at least <em>try</em> to be + serious :)<br /> + Why BBcode doesn’t help enough? Well, simply because I don’t see why <code>[i]this[/i]</code> is easier + than <code><i>this</i></code>: unless you have a particular phobia for angular brackets, it seems quite + similar to me!</p> +<p>What about <code>_this_</code> instead? You use only two additional characters instead of seven. <span + class="caps">SEVEN</span>. If I only want italcized text I honestly can’t imagine myself using more than + two extra characters. It’s natural. It’s human.</p> +<p style="float:left;"><img src="/img/pictures/pear2.gif" alt="" /></p> +Precisely. Textile is a <em>“Humane web text generator™”</em>, it’s simple, elegant and produces +standard compliant <span class="caps">XHTML</span> code. <a href="http://www.textism.com/about/">Dean Allen</a> should +be worshipped by entire generations of web developers for inventing something so easy to use and so <em>elegant</em> at +the same time. Maybe not worshipped, but for sure respected. +<p>I won’t copy and paste the extremely useful <a + href="http://cakeforge.org/projects/textilehelper/">TextileHelper</a> for CakePHP either, simply because + it’s 4085 lines long and it would be pointless: you can just get it and use it.</p> <p>I’ll just include some examples of textile formatting…</p> <table> <tr>@@ -34,29 +59,37 @@ <td> <code>fixed width</code> text</td>
</tr> <tr> <td> <code>"text":url</code> </td> - <td> <a href="http://base--/">linked</a> text </td> + <td> <a href="/">linked</a> text </td> </tr> <tr> <td> <code>!path/to/image!</code> </td> <td> image </td> </tr> </table> -<p>These are just some trivial examples. With textile you can also format text blocks, add custom <span class="caps">CSS</span> code and even float images or text! Tables? Sure, how do you think I created the table above?</p> +<p>These are just some trivial examples. With textile you can also format text blocks, add custom <span + class="caps">CSS</span> code and even float images or text! Tables? Sure, how do you think I created the table + above?</p> <pre><code> | *Textile Code* | *Result* | | @*text*@ | *bold* text | | @_text_@ | _italicized_ text | | <code>@text@<code>| @fixed width@ text| -| @"text":url@ | "linked":http://base--/ text | +| @"text":url@ | "linked":/ text | | @!path/to/image!@ | image | </code></pre> <p>The simplest and most intuitive way possible!</p> -<p>Regardless, Textile is not perfect and may have some quirks, at least the CakePHP helper: the_undefined pointed out in a <a href="http://www.thinkingphp.org/2006/03/22/textile-a-personal-love-of-mine/">blog post</a> that external links are opened in the same window, so he provided a patch to the textile helper to handle this situation.<br /> -I also noticed that sometimes empty <code>style=""</code> and <code>class=""</code> attributed are generated, which don’t do any particular harm, but they are not needed either… so here’s a quick fix to improve your Textile experience in CakePHP: You can use this function ideally in your customized textile helper, <code>$data</code> should be the return value of TextileHelper’s <code>process()</code> method.</p> +<p>Regardless, Textile is not perfect and may have some quirks, at least the CakePHP helper: the_undefined pointed out + in a <a href="http://www.thinkingphp.org/2006/03/22/textile-a-personal-love-of-mine/">blog post</a> that external + links are opened in the same window, so he provided a patch to the textile helper to handle this situation.<br /> + I also noticed that sometimes empty <code>style=""</code> and <code>class=""</code> attributed are generated, which + don’t do any particular harm, but they are not needed either… so here’s a quick fix to improve + your Textile experience in CakePHP: You can use this function ideally in your customized textile helper, + <code>$data</code> should be the return value of TextileHelper’s <code>process()</code> method. +</p> <pre><code> function _fixTextile($data) { - $patterns = array( '/http://base--/', + $patterns = array( '//', '/style=""/', '/class=""/', '/ >/');
@@ -4,52 +4,148 @@ content-type: article
timestamp: 1146022560 tags: "personal" ----- -<p>Yesterday my grandpa passed away, due to an aggravation of his health condition, breathing problems and various other complications. He died in hospital, on Liberation Day, the Italian national holiday celebrating the liberation of our country from the nazi-fascist regime by the Allied troops and partisans on April 25th 1945. He died exactly 61 years after that day.</p> -<p>I’d like to remember my grandpa today, because he most certainly deserves it, as he was a really extraordinary person.</p> +<p>Yesterday my grandpa passed away, due to an aggravation of his health condition, breathing problems and various other + complications. He died in hospital, on Liberation Day, the Italian national holiday celebrating the liberation of + our country from the nazi-fascist regime by the Allied troops and partisans on April 25th 1945. He died exactly 61 + years after that day.</p> +<p>I’d like to remember my grandpa today, because he most certainly deserves it, as he was a really extraordinary + person.</p> <p><em>“Yes, I’m sure he was, isn’t everybody extraordinary in some way?”</em></p> -<p>Definitely: everybody is special, and people tend to say that especially when someone passes away. In my grandpa’s case, actually I can say that in a slightly more absolute sense: his life was truly uncommon and very active.</p> +<p>Definitely: everybody is special, and people tend to say that especially when someone passes away. In my + grandpa’s case, actually I can say that in a slightly more absolute sense: his life was truly uncommon and + very active.</p> <p><strong>A very active life</strong></p> -<p style="float:left;"><img src="http://base--/img/pictures/grandpa.jpg" alt="" /></p> -<p>Vittorio Cevasco, my grandfather, was certainly the most active member of my family. We’re talking about a man who was still able to drive a car up to last September (he was nearly 90 years old), and used to drive 500 Km on the motorway and mountain roads every year to go on vacation: he went to the same place, Mals Vinschgau, near the Italian-Austrian-Swiss border for over fifty years. He never had particular troubles to walk, and just in the past months started using a walking stick… before that he used to walk around the city by himself everyday, in his endless meanderings. He always had something to do: visit friends, go to public offices, go to our house in the countryside – he still used to cultivate the land with potatoes, tomatoes and basil as a hobby until a few months ago – and so on: he was really a busy man.<br /> -I can certainly say that I never though he was really old until after his wife, my grandma, died, about a year ago. Since then he really aged, and quickly, as she probably was one of the main reasons of his existance.</p> -<p>When he was “young” (i.e. less than 80) he used to <em>compete</em> with the lift in his flat running down the stairs. Everyone else was taking the lift, but he always chose to go on foot down the stairs, to keep in exercise. His other exercise was cultivating our land in Sessarego, near Bogliasco (Genoa, Italy), as a hobby more than anything, providing us with fresh <em>biological</em> products like that extraordinary basil essential to make our very tasty local <a href="http://www.pesto.net/eng/index.php">pesto sauce</a>.<br /> -He always tried to convince me to do some work there, and he actually taught me various tips and secrets which will hopefully be useful in near future. Sadly, when he was alive I wasn’t too keen on the idea of cultivating and maintain our land from time to time… but I kind of changed my mind recently, and I know he realized that just a few days before he died.</p> -<p>After <span class="caps">WWII</span> he did various things, he even was erhm… somehow active in <em>certain international import/export activities</em> of watches from Switzerland to Italy – quite a common thing back in the day, especially considering that the border was at just a few hours drive.<br /> -Later on he became an estate agent, working for a local office and then helping out some friends running their activity. In 2001 he hit his own personal record selling a fancy villa worth one billion of the old Italian Lire – which convert to approx. 500,000 Euro, but at the time it was much bigger money than that. With the commission generated by that sale he bought a brand new Ford Fiesta: he was 85 years old.</p> +<p style="float:left;"><img src="/img/pictures/grandpa.jpg" alt="" /></p> +<p>Vittorio Cevasco, my grandfather, was certainly the most active member of my family. We’re talking about a man + who was still able to drive a car up to last September (he was nearly 90 years old), and used to drive 500 Km on the + motorway and mountain roads every year to go on vacation: he went to the same place, Mals Vinschgau, near the + Italian-Austrian-Swiss border for over fifty years. He never had particular troubles to walk, and just in the past + months started using a walking stick… before that he used to walk around the city by himself everyday, in his + endless meanderings. He always had something to do: visit friends, go to public offices, go to our house in the + countryside – he still used to cultivate the land with potatoes, tomatoes and basil as a hobby until a few + months ago – and so on: he was really a busy man.<br /> + I can certainly say that I never though he was really old until after his wife, my grandma, died, about a year ago. + Since then he really aged, and quickly, as she probably was one of the main reasons of his existance.</p> +<p>When he was “young” (i.e. less than 80) he used to <em>compete</em> with the lift in his flat running + down the stairs. Everyone else was taking the lift, but he always chose to go on foot down the stairs, to keep in + exercise. His other exercise was cultivating our land in Sessarego, near Bogliasco (Genoa, Italy), as a hobby more + than anything, providing us with fresh <em>biological</em> products like that extraordinary basil essential to make + our very tasty local <a href="http://www.pesto.net/eng/index.php">pesto sauce</a>.<br /> + He always tried to convince me to do some work there, and he actually taught me various tips and secrets which will + hopefully be useful in near future. Sadly, when he was alive I wasn’t too keen on the idea of cultivating and + maintain our land from time to time… but I kind of changed my mind recently, and I know he realized that just + a few days before he died.</p> +<p>After <span class="caps">WWII</span> he did various things, he even was erhm… somehow active in <em>certain + international import/export activities</em> of watches from Switzerland to Italy – quite a common thing + back in the day, especially considering that the border was at just a few hours drive.<br /> + Later on he became an estate agent, working for a local office and then helping out some friends running their + activity. In 2001 he hit his own personal record selling a fancy villa worth one billion of the old Italian Lire + – which convert to approx. 500,000 Euro, but at the time it was much bigger money than that. With the + commission generated by that sale he bought a brand new Ford Fiesta: he was 85 years old.</p> <p>But no, these are not the most extraordinary episodes of his life of course. He could fly – literally.</p> -<p>He was one of the first man in Italy and the the first in Genoa area to get a flying license, back in 1934. A news which made the local papers at the time, and we still have that article somewhere. He wanted to become a civil pilot, but he never did: the Country needed him to protect our sky, when Italy joined the War in 1941.</p> +<p>He was one of the first man in Italy and the the first in Genoa area to get a flying license, back in 1934. A news + which made the local papers at the time, and we still have that article somewhere. He wanted to become a civil + pilot, but he never did: the Country needed him to protect our sky, when Italy joined the War in 1941.</p> <p><strong>The Aviator</strong></p> -<p style="float:left;"><img src="http://base--/img/pictures/sessarego.jpg" alt="" /></p> -<p>My grandpa lived the early years of his youth in the village of Sessarego, where my great-grandfather bought an old house, after taking part in <a href="http://www.italian-american.com/garib-it.htm's">Giuseppe Garibaldi</a> expedition at Marsala (1860) fighting for the Italian independence (he’s listed among <a href="http://www.italian-american.com/garibal.htm">the ones</a> who actually landed there).<br /> -There his parents used to have a few cows and produce milk, and one of his tasks was milking delivery… no scooters or cars, at the time, of course, and certainly not for a teenager like him: he often had to carry the milk barrels up and down the hill <em>on foot</em>, and I’m talking about 1-2 Km with at least 30-40 kilos on your shoulders!</p> -<p>But my grandpa’s plans were much different: he wanted to fly away, and high – literally. You can imagine the face of my grand-grandfather when he expressed his wish to become a pilot! Nobody ever did that, in the area, and becoming a pilot was, at the time, like becoming an astronaut in the seventies.<br /> -The price of the license was really high at the time, 1,200 Lire. That would be like at least 30,000 Euro now, especially considering that his parents weren’t exactly rich. In the very end, my father supported him and provided as much money as he could afford: 1000 Lire.<br /> -But he still needed 200 Lire, so after hassling the flying instructors he signed an agreement stating that if they anticipated him the money he’d have paid them back once he started working: it was clear in fact that he’d have became a military pilot, as the Regime needed people for their brand new aircrafts, and the was felt imminent.<br /> -He paid them back, eventually, after passing both the civil and military tests. He became a sergeant for the <em>Regia Aviazione</em> (Royal Airforce), with a salary of 20 Lire/month, ten of which went to the flying school, for many months, but he was still earning some very decent money.</p> -<p>One of the most peculiar things about my grandpa was his memory: he was always able to tell you the story of his life, all the events, with the same details and <em>all the exact dates</em>, on every occasion. Even when we took him to the hospital, a few weeks ago, when we asked the nurse if he was self-conscious she said: <em>“Yes… well, he was talking a few hours ago, but I don’t know if he was raving or what… he said he was a pilot, and that he used to fly at 350Km/h…”</em></p> -<p style="float:right;"><img src="http://base--/img/pictures/r2002-main.jpg" alt="" /></p> -<p>Damn right. His old <a href="http://www.comandosupremo.com/Re2002.html">Re 2002</a> was able to fly at 350 Km/h if pushed, at a standard altitude of 35,000 m, while carrying a 500Kg bomb. It was <em>his</em> plane, and he never forgot that, even a few days before he passed away. He’d tell you all the stats, the mechanics, the technical details and all the tricks to perform acrobatic maneuvers if you asked him… Not that actually anybody ever did, because <em>every</em> time something reminded him of that, even slightly, he’d start talking about the old days when he was commanding his squad patrolling the Italian borders.</p> -<p>Last year, after my grandma died and he didn’t feel like driving 500Km to go to the mountains (for the first time in his life), I had to drive his <em>Fiesta</em> myself in my first long driving journey. At first I wasn’t too sure I’d have enjoyed the drive, partly because of the long distance and partly because I was going to be alone with my grandpa for about six hours, and I was afraid of not be able to find enough topics of conversation…</p> +<p style="float:left;"><img src="/img/pictures/sessarego.jpg" alt="" /></p> +<p>My grandpa lived the early years of his youth in the village of Sessarego, where my great-grandfather bought an old + house, after taking part in <a href="http://www.italian-american.com/garib-it.htm's">Giuseppe Garibaldi</a> + expedition at Marsala (1860) fighting for the Italian independence (he’s listed among <a + href="http://www.italian-american.com/garibal.htm">the ones</a> who actually landed there).<br /> + There his parents used to have a few cows and produce milk, and one of his tasks was milking delivery… no + scooters or cars, at the time, of course, and certainly not for a teenager like him: he often had to carry the milk + barrels up and down the hill <em>on foot</em>, and I’m talking about 1-2 Km with at least 30-40 kilos on your + shoulders!</p> +<p>But my grandpa’s plans were much different: he wanted to fly away, and high – literally. You can imagine + the face of my grand-grandfather when he expressed his wish to become a pilot! Nobody ever did that, in the area, + and becoming a pilot was, at the time, like becoming an astronaut in the seventies.<br /> + The price of the license was really high at the time, 1,200 Lire. That would be like at least 30,000 Euro now, + especially considering that his parents weren’t exactly rich. In the very end, my father supported him and + provided as much money as he could afford: 1000 Lire.<br /> + But he still needed 200 Lire, so after hassling the flying instructors he signed an agreement stating that if they + anticipated him the money he’d have paid them back once he started working: it was clear in fact that + he’d have became a military pilot, as the Regime needed people for their brand new aircrafts, and the was felt + imminent.<br /> + He paid them back, eventually, after passing both the civil and military tests. He became a sergeant for the + <em>Regia Aviazione</em> (Royal Airforce), with a salary of 20 Lire/month, ten of which went to the flying school, + for many months, but he was still earning some very decent money.</p> +<p>One of the most peculiar things about my grandpa was his memory: he was always able to tell you the story of his + life, all the events, with the same details and <em>all the exact dates</em>, on every occasion. Even when we took + him to the hospital, a few weeks ago, when we asked the nurse if he was self-conscious she said: + <em>“Yes… well, he was talking a few hours ago, but I don’t know if he was raving or what… + he said he was a pilot, and that he used to fly at 350Km/h…”</em></p> +<p style="float:right;"><img src="/img/pictures/r2002-main.jpg" alt="" /></p> +<p>Damn right. His old <a href="http://www.comandosupremo.com/Re2002.html">Re 2002</a> was able to fly at 350 Km/h if + pushed, at a standard altitude of 35,000 m, while carrying a 500Kg bomb. It was <em>his</em> plane, and he never + forgot that, even a few days before he passed away. He’d tell you all the stats, the mechanics, the technical + details and all the tricks to perform acrobatic maneuvers if you asked him… Not that actually anybody ever + did, because <em>every</em> time something reminded him of that, even slightly, he’d start talking about the + old days when he was commanding his squad patrolling the Italian borders.</p> +<p>Last year, after my grandma died and he didn’t feel like driving 500Km to go to the mountains (for the first + time in his life), I had to drive his <em>Fiesta</em> myself in my first long driving journey. At first I + wasn’t too sure I’d have enjoyed the drive, partly because of the long distance and partly because I was + going to be alone with my grandpa for about six hours, and I was afraid of not be able to find enough topics of + conversation…</p> <p>That fear went away almost instantly right a few minutes after we started the journey.<br /> -When we got on the motorway, I started complaining that my dad was going slightly over the limit with his brand new Peugeot 307: <em>“Look, he’s already going at 140km/h and we just started the journey!”</em></p> -<p><em>“Centûcäranta chilumetri l’ûa… û më aeruplannu pûeivä fâ ï trexëntusincûanta cûmme ninte!”</em><br /> -[140 kilometers per hour… my plane could easily do 350!]</p> -<p>He normally used to speak in <em>zeneise</em> (“Genovese”), Genoa’s dialect, mixed with some Italian <em>if he really had to</em>. That was it: if you started talking about speed, technology, engines, history or any other topic which was <em>slightly</em> related to his plane, the war, the regime etc. he always started off talking about his past and his plane, ignoring everything else. <br /> -My grandma used to get kinda annoyed about it… on every occasion, if he had a chance, he’d start talking about <em>that particular day in 193x/4x</em> and so on: we all knew that, and actually I enjoyed listening to his stories, mostly because they were genuine and authentic relics of an old and glorious past. I think in his mind he wanted us all to remember him in that way, to always keep in mind that he was a pilot and how he enjoyed it, even when he went in jail for it, even when his plane was taken down…</p> -<p style="float:left;"><img src="http://base--/img/pictures/Re2002.jpg" alt="" /></p> -<p>On that day right after he was assigned to a new base, they asked him to perform some exercises in the air, loops and all sort of acrobatics: <em>“ë sölite cöse che së dûviëiva fä in t’ë l’aviäsiûn”</em> [the usual things you had to do in the airforce].<br /> -He was just starting practicing the Re 2002 at the time, but he quickly found out that it was <em>extremely</em> maneuvrable, at least to the standards of the time: the equivalent of a top range today’s fighter.<br /> -He started off with some usual things, performing various twists in the air, loops, etc. etc. until he had to end his exhibition with a dive from an altitude of 10,000m down at maximum speed to a limit of 1500m… On that particular day a colonel from another base and some other high-ranking officer were down on the ground near the aircraft to enjoy the show, and check that everything was performed correctly. My grandpa was aware of that, so he decided to perform a great show especially for them that day: he went up to 10,000m, and then dove down accelerating, helped by gravity… he went down and down, faster and faster, people down on the ground were staring at him waiting for him to pull up the plane, but nothing, he still went down and down so that quickly the small crowd of captains and colonels got scared and run away in every direction: <em>“He’ll crash, he’ll crash!”</em> <br /> -He did not crash, not that day… he went down up to slightly less than 100m and <em>then</em> pulled up the plane: ar real wonderful <em>extreme</em> performance. Now imagine this beast of a plane coming down at 300Km/h and accelerating, making a terrible noise typical of the engines of the time and then <em>pull up suddenly</em> right above your head: one more second and he wouldn’t have been able to tell that story.<br /> -He was called by the commander of the base who told him: <em>“Cevasco, you’re hell of a skilled pilot, but now I have to put you in jail for a day for not obeying your orders of staying above 1500m”</em> – That, I reckon, was one of the best days of my grandpa’s life.</p> -<p>He was never captured, but his plane was taken down by an English <em>Spitfire</em> in the South of Italy. The war was nearly finished, and there were just those little air fights from time to time. He really risked a lot that day, and managed to attempt an emergency “landing” completely destroying his plane along as part of his jaw, which was alright after a few months. <br /> -Since then he never flew again, and managed to escape to be re-called in duty. But he did like flying back with his memories to those glorious days.</p> -<p>A few years ago my dad showed him Microsoft’s <em>“Flight Simulator 98”</em>, and some other flying games. He was amazed at the graphic, but not so satisfied with the whole <em>simulation</em> thing: not even close to reality, too damn easy.</p> -<p><em>“Cäu më, te vûeive vedde tïe a fä vûlá û më aeruplannu”</em><br /> -[My dear, I’d have liked to see you trying to fly <em>my</em> plane]</p> + When we got on the motorway, I started complaining that my dad was going slightly over the limit with his brand new + Peugeot 307: <em>“Look, he’s already going at 140km/h and we just started the journey!”</em></p> +<p><em>“Centûcäranta chilumetri l’ûa… û më aeruplannu pûeivä + fâ ï trexëntusincûanta cûmme ninte!”</em><br /> + [140 kilometers per hour… my plane could easily do 350!]</p> +<p>He normally used to speak in <em>zeneise</em> (“Genovese”), Genoa’s dialect, mixed with some + Italian <em>if he really had to</em>. That was it: if you started talking about speed, technology, engines, history + or any other topic which was <em>slightly</em> related to his plane, the war, the regime etc. he always started off + talking about his past and his plane, ignoring everything else. <br /> + My grandma used to get kinda annoyed about it… on every occasion, if he had a chance, he’d start talking + about <em>that particular day in 193x/4x</em> and so on: we all knew that, and actually I enjoyed listening to his + stories, mostly because they were genuine and authentic relics of an old and glorious past. I think in his mind he + wanted us all to remember him in that way, to always keep in mind that he was a pilot and how he enjoyed it, even + when he went in jail for it, even when his plane was taken down…</p> +<p style="float:left;"><img src="/img/pictures/Re2002.jpg" alt="" /></p> +<p>On that day right after he was assigned to a new base, they asked him to perform some exercises in the air, loops and + all sort of acrobatics: <em>“ë sölite cöse che së dûviëiva fä in + t’ë l’aviäsiûn”</em> [the usual things you had to do in the airforce].<br /> + He was just starting practicing the Re 2002 at the time, but he quickly found out that it was <em>extremely</em> + maneuvrable, at least to the standards of the time: the equivalent of a top range today’s fighter.<br /> + He started off with some usual things, performing various twists in the air, loops, etc. etc. until he had to end + his exhibition with a dive from an altitude of 10,000m down at maximum speed to a limit of 1500m… On that + particular day a colonel from another base and some other high-ranking officer were down on the ground near the + aircraft to enjoy the show, and check that everything was performed correctly. My grandpa was aware of that, so he + decided to perform a great show especially for them that day: he went up to 10,000m, and then dove down + accelerating, helped by gravity… he went down and down, faster and faster, people down on the ground were + staring at him waiting for him to pull up the plane, but nothing, he still went down and down so that quickly the + small crowd of captains and colonels got scared and run away in every direction: <em>“He’ll crash, + he’ll crash!”</em> <br /> + He did not crash, not that day… he went down up to slightly less than 100m and <em>then</em> pulled up the + plane: ar real wonderful <em>extreme</em> performance. Now imagine this beast of a plane coming down at 300Km/h and + accelerating, making a terrible noise typical of the engines of the time and then <em>pull up suddenly</em> right + above your head: one more second and he wouldn’t have been able to tell that story.<br /> + He was called by the commander of the base who told him: <em>“Cevasco, you’re hell of a skilled pilot, + but now I have to put you in jail for a day for not obeying your orders of staying above 1500m”</em> + – That, I reckon, was one of the best days of my grandpa’s life.</p> +<p>He was never captured, but his plane was taken down by an English <em>Spitfire</em> in the South of Italy. The war + was nearly finished, and there were just those little air fights from time to time. He really risked a lot that day, + and managed to attempt an emergency “landing” completely destroying his plane along as part of his jaw, + which was alright after a few months. <br /> + Since then he never flew again, and managed to escape to be re-called in duty. But he did like flying back with his + memories to those glorious days.</p> +<p>A few years ago my dad showed him Microsoft’s <em>“Flight Simulator 98”</em>, and some other flying + games. He was amazed at the graphic, but not so satisfied with the whole <em>simulation</em> thing: not even close + to reality, too damn easy.</p> +<p><em>“Cäu më, te vûeive vedde tïe a fä vûlá û më + aeruplannu”</em><br /> + [My dear, I’d have liked to see you trying to fly <em>my</em> plane]</p> <p>…and that was it: the beginning of another journey back in time.</p> -<p>He always had a very practical view of life and especially of technology. He wouldn’t take you seriously and would not be interested in knowing about programming and the Internet, unless it could produce some concrete result:</p> -<p><em>“Ti che ti stûddi da insegnë e che ti stë sempre davanti a-û cumputer, nun te puriësci truvä ûn sistemmä de anä in t’ë a banca e piggië qualche miliûn the Euro?”</em><br /> -[You that you’re studying to become an engineer and that spend so long in front of the computer, couldn’t you find a way to get into a bank and get out some million of Euro?]</p> -<p>He’d have loved me to become a [rich] hacker, probably… But the last time I saw him, last Friday, he seemed happy enough to hear that I was just about to start working.</p> -<p>He realized that I finally found a good job after my studies, and then my dad told him Roxanne and I would have moved to the countryside, in Sessarego… He made a big effort to move the muscles of his mouth in a large smile: he was happy.</p> +<p>He always had a very practical view of life and especially of technology. He wouldn’t take you seriously and + would not be interested in knowing about programming and the Internet, unless it could produce some concrete result: +</p> +<p><em>“Ti che ti stûddi da insegnë e che ti stë sempre davanti a-û cumputer, nun te + puriësci truvä ûn sistemmä de anä in t’ë a banca e piggië qualche + miliûn the Euro?”</em><br /> + [You that you’re studying to become an engineer and that spend so long in front of the computer, + couldn’t you find a way to get into a bank and get out some million of Euro?]</p> +<p>He’d have loved me to become a [rich] hacker, probably… But the last time I saw him, last Friday, he + seemed happy enough to hear that I was just about to start working.</p> +<p>He realized that I finally found a good job after my studies, and then my dad told him Roxanne and I would have moved + to the countryside, in Sessarego… He made a big effort to move the muscles of his mouth in a large smile: he + was happy.</p>
@@ -4,24 +4,37 @@ content-type: article
timestamp: 1146142020 tags: "website|review" ----- -<p>Today is my birthday! <a href="http://base--/blog/view/20/">Not too happy</a>, but still my birthday after all. What presents did I get from my relatives and friends? Well, various things, but I told my parents and uncles I actually needed some web space… <em>“What? Didn’t you have the hosting sorted out?”</em><br /> -Well, I had, up to a few days ago when my friends and hosting provider, DeWayne Lehman, decided to close down his <a href="http://www.block-house.com">company</a>. The reason being, to cut a long story short, that he can’t keep up with competition: he doesn’t have enough customers, and he can’t afford server upgrades, while other companies are literally giving space away.<br /> -That was a pity, not only because Block House used to host various non-profit orgs and initiatives, but also because the guy who run it was an excellent admin, always offering excellent support.</p> -<p>Anyhow, in the end I’ll have to transfer all five of my sites to a new host, so here we go again: <em>what’s the best hosting company?</em><br /> -Obviously it depends a lot on what you’re looking for, and here’s what I need:</p> +<p>Today is my birthday! <a href="/articles/20/">Not too happy</a>, but still my birthday after all. What presents did + I get from my relatives and friends? Well, various things, but I told my parents and uncles I actually needed some + web space… <em>“What? Didn’t you have the hosting sorted out?”</em><br /> + Well, I had, up to a few days ago when my friends and hosting provider, DeWayne Lehman, decided to close down his <a + href="http://www.block-house.com">company</a>. The reason being, to cut a long story short, that he can’t + keep up with competition: he doesn’t have enough customers, and he can’t afford server upgrades, while + other companies are literally giving space away.<br /> + That was a pity, not only because Block House used to host various non-profit orgs and initiatives, but also because + the guy who run it was an excellent admin, always offering excellent support.</p> +<p>Anyhow, in the end I’ll have to transfer all five of my sites to a new host, so here we go again: + <em>what’s the best hosting company?</em><br /> + Obviously it depends a lot on what you’re looking for, and here’s what I need: +</p> <ul> <li>At least 4GB of space</li> <li>At least 30GB/month bandwidth</li> - <li><span class="caps">PHP</span> of course, but also other languages like Perl, Python and Ruby (+ Rails support)</li> + <li><span class="caps">PHP</span> of course, but also other languages like Perl, Python and Ruby (+ Rails support) + </li> <li>MySQL databases… at least 10-20</li> <li>Be able to host 5-6 sites minimum</li> <li>Subdomains allowed (10 in total?)</li> <li><span class="caps">FTP</span> <em>and <span class="caps">SSH</span></em> access</li> <li>Subversion, if possible</li> </ul> -<p>All this for less than 10$/month, ideally 5$, on shared hosting. I already made my choice and if you’re reading this post it means everything worked fine, but anyway, let’s have a look at what the market can offer for my needs. I only went for US-based hosts: Italian hosts are terrible and US hosts are normally more reliable and cheaper.</p> -<p style="float:left;"><img src="http://base--/img/pictures/dreamhost.gif" alt="" /></p> -<p>The first hosting company I was tempted by was <a href="http://www.dreamhost.com">DreamHost</a>. They can literally sell you anything but their mother, at stupidly cheap rates for what you get (apparently):</p> +<p>All this for less than 10$/month, ideally 5$, on shared hosting. I already made my choice and if you’re reading + this post it means everything worked fine, but anyway, let’s have a look at what the market can offer for my + needs. I only went for US-based hosts: Italian hosts are terrible and US hosts are normally more reliable and + cheaper.</p> +<p style="float:left;"><img src="/img/pictures/dreamhost.gif" alt="" /></p> +<p>The first hosting company I was tempted by was <a href="http://www.dreamhost.com">DreamHost</a>. They can literally + sell you anything but their mother, at stupidly cheap rates for what you get (apparently):</p> <ul> <li>20GB of space</li> <li>1TB (!) bandwidth</li>@@ -33,10 +46,19 @@ <li><span class="caps">FTP</span> and <span class="caps">SSH</span> access</li>
<li>Subversion and <span class="caps">CVS</span></li> <li>…and more</li> </ul> -<p>For 7.95 if you pay two years in advance. And the first time you can get up to 97$ off by using one of the thousands referrer’s coupons available on the net. OK, where’s the catch? Well, there’s a <a href="http://futurosity.com/231/why-dreamhost-sucks">bad review</a> about them which points out that their reliability is not too great, for example, and that the seem to be rather dodgy in general. “They are overselling, they’ll soon enforce <span class="caps">CPU</span> restrictions” etc. etc. <br /> -<em>…let’s move along</em></p> -<p style="float:right;"><img src="http://base--/img/pictures/rails.gif" alt="" /></p> -<p>I might try out Ruby on Rails someday, so perhaps I thought it would be wise to choose a host supporting it, for a change. The first Rails friendly I thought about was <a href="http://www.railsplayground.org">RailsPlayground</a>, which started off as <span class="caps">FREE</span> Rails host and then ended up offering interesting commercial hosting plans. They are not bad, and I’d have probably gone with them if I had only one site to manage: for 60$ a year you get:</p> +<p>For 7.95 if you pay two years in advance. And the first time you can get up to 97$ off by using one of the thousands + referrer’s coupons available on the net. OK, where’s the catch? Well, there’s a <a + href="http://futurosity.com/231/why-dreamhost-sucks">bad review</a> about them which points out that their + reliability is not too great, for example, and that the seem to be rather dodgy in general. “They are + overselling, they’ll soon enforce <span class="caps">CPU</span> restrictions” etc. etc. <br /> + <em>…let’s move along</em> +</p> +<p style="float:right;"><img src="/img/pictures/rails.gif" alt="" /></p> +<p>I might try out Ruby on Rails someday, so perhaps I thought it would be wise to choose a host supporting it, for a + change. The first Rails friendly I thought about was <a href="http://www.railsplayground.org">RailsPlayground</a>, + which started off as <span class="caps">FREE</span> Rails host and then ended up offering interesting commercial + hosting plans. They are not bad, and I’d have probably gone with them if I had only one site to manage: for + 60$ a year you get:</p> <ul> <li>3GB of space</li> <li>30GB bandwidth</li>@@ -48,9 +70,12 @@ <li><span class="caps">FTP</span> and <span class="caps">SSH</span> access</li>
<li>Subversion and <span class="caps">CVS</span></li> <li>…and more</li> </ul> -<p>Well, the only reason why I didn’t go with them was that I did slightly more space, only that. The plan for 5GB of space costs 11$/month, which was too expensive for my liking.</p> -<p style="float:left;"><img src="http://base--/img/pictures/textdrive.gif" alt="" /></p> -<p>Since we’re talking about Rails, why not <a href="http://www.textdrive.com">Textdrive</a>? Founded by 200 IT professional, hosts high quality sites, it’s the official Rails host… An “elite” solution, here’s what you get:</p> +<p>Well, the only reason why I didn’t go with them was that I did slightly more space, only that. The plan for 5GB + of space costs 11$/month, which was too expensive for my liking.</p> +<p style="float:left;"><img src="/img/pictures/textdrive.gif" alt="" /></p> +<p>Since we’re talking about Rails, why not <a href="http://www.textdrive.com">Textdrive</a>? Founded by 200 IT + professional, hosts high quality sites, it’s the official Rails host… An “elite” solution, + here’s what you get:</p> <ul> <li>Use Apache and Lighttpd web servers side-by-side</li> <li>Host PHP4 and PHP5 web pages and applications</li>@@ -58,19 +83,25 @@ <li>Host a weblog using Textpattern, Wordpress, MovableType, Typo, etc</li>
<li>Host Ruby and Ruby on Rails applications (including <span class="caps">FCGI</span> and hundreds of gems)</li> <li>Host Perl applications (including 100’s of Perl modules)</li> <li>Host Python applications like Django</li> - <li>Manage your code base with version control (Subversion, <span class="caps">SVK</span>, Darcs, Monotone & Arch)</li> + <li>Manage your code base with version control (Subversion, <span class="caps">SVK</span>, Darcs, Monotone & + Arch)</li> <li>Share iCal files over WebDAV</li> <li>Mount a WebDAV drive on your desktop (like iDisk)</li> <li>Easily create free subdomains with wildcard <span class="caps">DNS</span></li> <li>Store your Basecamp file uploads over <span class="caps">SFTP</span></li> <li>Access your account via <span class="caps">SFTP</span> and <span class="caps">SSH</span></li> - <li>Add domains, unlimited <span class="caps">IMAP</span> and <span class="caps">POP</span> mail boxes and mail aliases through a control panel</li> + <li>Add domains, unlimited <span class="caps">IMAP</span> and <span class="caps">POP</span> mail boxes and mail + aliases through a control panel</li> <li>Check your email through Webmail</li> <li>Host Mailman mailing lists complete with archives</li> <li>Use MySQL (default), PostgreSQL, SQLite and Berkeley databases</li> </ul> -<p>Plans start at 12$/month for 1GB of space and one website… The 3GB one is 40$/month, for 20 sites in total. Too bad it’s too expensive for me as they are truly the top for shared hosting – I think.</p> -<p><a href="http://www.hostgator.com/">Host Gator</a>, which seems to be one of the most frequently recommended at SitePoint.com forums, is not bad either. They have a “hatchling” plan for 3,5GB at 6.95, which wasn’t bad, but it only allows one domain to be hosted. The “Baby” plan allows unlimited domains and is 9.95$/month, which is kinda dear. You get:</p> +<p>Plans start at 12$/month for 1GB of space and one website… The 3GB one is 40$/month, for 20 sites in total. Too + bad it’s too expensive for me as they are truly the top for shared hosting – I think.</p> +<p><a href="http://www.hostgator.com/">Host Gator</a>, which seems to be one of the most frequently recommended at + SitePoint.com forums, is not bad either. They have a “hatchling” plan for 3,5GB at 6.95, which + wasn’t bad, but it only allows one domain to be hosted. The “Baby” plan allows unlimited domains + and is 9.95$/month, which is kinda dear. You get:</p> <ul> <li>5GB of space</li> <li>75GB bandwidth</li>@@ -82,7 +113,8 @@ <li><span class="caps">FTP</span> access</li>
<li>…and more</li> </ul> <p>No <span class="caps">SSH</span>, no <span class="caps">SVN</span> and no Rails: out.</p> -<p><a href="http://www.site5.com/">Site5</a> is also one of SitePoint’s favourite, but still has limitations on the number of sites. I would have got the SuperHosting <span class="caps">XTREME</span>, for 7,77$/month:</p> +<p><a href="http://www.site5.com/">Site5</a> is also one of SitePoint’s favourite, but still has limitations on + the number of sites. I would have got the SuperHosting <span class="caps">XTREME</span>, for 7,77$/month:</p> <ul> <li>11GB of space</li> <li>400GB bandwidth</li>@@ -94,7 +126,16 @@ <li><span class="caps">FTP</span> and <span class="caps">SSH</span> access</li>
<li>…and more</li> </ul> Not bad, a little bit too much for only 5 sites… I needed 6, too bad :/ -<div style="float:right; padding:3px;"><script src="http://www.bluehost.com/src/js/h3rald/CODE2/488x160/1.jpg"></script> </div> <p>This site is currently hosted on <a href="http://www.bluehost.com">BlueHost</a>, a hosting company established in 1996, which seems to be reliable enough (not many complaints on the net) and seems serious enough. They don’t offer subversion and WebDAV for “security reasons” and in order to get a shell account you have to send them a copy of an ID card. Annoying? Well, perhaps for some: this made me understand that they don’t allow just anybody to get <span class="caps">SSH</span> access unconditionally, and I didn’t mind. I sent them a scansion of my ID card and I got a friendly support email after a few minutes, confirming that it was activated. Here’s what I got:</p> +<div style="float:right; padding:3px;"> + <script src="http://www.bluehost.com/src/js/h3rald/CODE2/488x160/1.jpg"></script> +</div> +<p>This site is currently hosted on <a href="http://www.bluehost.com">BlueHost</a>, a hosting company established in + 1996, which seems to be reliable enough (not many complaints on the net) and seems serious enough. They don’t + offer subversion and WebDAV for “security reasons” and in order to get a shell account you have to send + them a copy of an ID card. Annoying? Well, perhaps for some: this made me understand that they don’t allow + just anybody to get <span class="caps">SSH</span> access unconditionally, and I didn’t mind. I sent them a + scansion of my ID card and I got a friendly support email after a few minutes, confirming that it was activated. + Here’s what I got:</p> <ul> <li>15GB of space</li> <li>400GB bandwidth</li>@@ -105,4 +146,5 @@ <li>20 subdomains + 20 parked domains</li>
<li><span class="caps">FTP</span> and <span class="caps">SSH</span> access</li> <li>…and more</li> </ul> -<p>For 6,65$/month, 2 years pre-payment. One of the good things is that they are not fussy about giving the money back if you cancel. Anyhow… let’s hope for the best, so far, so good.</p> +<p>For 6,65$/month, 2 years pre-payment. One of the good things is that they are not fussy about giving the money back + if you cancel. Anyhow… let’s hope for the best, so far, so good.</p>
@@ -4,53 +4,75 @@ content-type: article
timestamp: 1146317340 tags: "cakephp|rails|webdevelopment" ----- -<p>Today I decided to do something different, something I’ve been dying to do since before coming across CakePHP: give Rails a <em>proper</em> try. Like many other <span class="caps">PHP</span> developers out there, when <a href="http://www.rubyonrails.org">Ruby on Rails</a> came out I felt damn jealous and terribly tempted to learn Ruby <em>only</em> to start using such an amazing web development framework. At the time I actually even started reading various tutorials about it, and I was literally amazed at how RoR revolutioned the way of developing web applications.</p> -<p style="float:left;"><img src="http://base--/img/pictures/rails.gif" alt="" /></p> -<p>One of the main problems which made me – sadly – abandon Rails was Ruby itself: personally I’ve never seen a programming language with a cleaner and more elegant syntax, but also – at least at the time – there weren’t many hosts supporting it. LuckilyI found CakePHP quickly after that…<br /> -Now however, more and more hosting companies boast full Rails support, and so when recently I <a href="http://base--/blog/view/21/">had to move</a> to a new host, I made sure it was Rails-friendly, <em>just in case I wanted to give Rails another try, someday</em>.<br /> -Oh well, the temptation was so strong that today, only a two days after switching to my new host, I felt I <em>had</em> to try it, I <em>had</em> to taste something different than the usual Cake.</p> -<p>I decided to (re-)read and follow the <a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html">OnLamp tutorial</a> about RoR, step by step, once again. I quickly typed <code>rails cookbook</code> from my shell and voilá, rails silently creates the skeleton of my application:</p> +<p>Today I decided to do something different, something I’ve been dying to do since before coming across CakePHP: + give Rails a <em>proper</em> try. Like many other <span class="caps">PHP</span> developers out there, when <a + href="http://www.rubyonrails.org">Ruby on Rails</a> came out I felt damn jealous and terribly tempted to learn + Ruby <em>only</em> to start using such an amazing web development framework. At the time I actually even started + reading various tutorials about it, and I was literally amazed at how RoR revolutioned the way of developing web + applications.</p> +<p style="float:left;"><img src="/img/pictures/rails.gif" alt="" /></p> +<p>One of the main problems which made me – sadly – abandon Rails was Ruby itself: personally I’ve + never seen a programming language with a cleaner and more elegant syntax, but also – at least at the time + – there weren’t many hosts supporting it. LuckilyI found CakePHP quickly after that…<br /> + Now however, more and more hosting companies boast full Rails support, and so when recently I <a + href="/articles/21/">had to move</a> to a new host, I made sure it was Rails-friendly, <em>just in case I + wanted to give Rails another try, someday</em>.<br /> + Oh well, the temptation was so strong that today, only a two days after switching to my new host, I felt I + <em>had</em> to try it, I <em>had</em> to taste something different than the usual Cake. +</p> +<p>I decided to (re-)read and follow the <a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html">OnLamp + tutorial</a> about RoR, step by step, once again. I quickly typed <code>rails cookbook</code> from my shell and + voilá, rails silently creates the skeleton of my application:</p> <p><span class="caps">README</span><br /> -Rakefile<br /> -app/<br /> -components/<br /> -config/<br /> -db/<br /> -doc/<br /> -favicon.ico<br /> -index.html<br /> -lib/<br /> -log/<br /> -public/<br /> -script/<br /> -structure.txt<br /> -test/<br /> -tmp/<br /> -vendor/</p> -<p>That’s familiar: it’s very similar to what CakePHP’s directory structure used to look like. Now Cake <em>evolved</em> and adopted its own schema, which – I must say – seems more functional than RoR’s, at least at a first glance:</p> + Rakefile<br /> + app/<br /> + components/<br /> + config/<br /> + db/<br /> + doc/<br /> + favicon.ico<br /> + index.html<br /> + lib/<br /> + log/<br /> + public/<br /> + script/<br /> + structure.txt<br /> + test/<br /> + tmp/<br /> + vendor/</p> +<p>That’s familiar: it’s very similar to what CakePHP’s directory structure used to look like. Now + Cake <em>evolved</em> and adopted its own schema, which – I must say – seems more functional than + RoR’s, at least at a first glance:</p> <ul> <li>app/ - <ul> - <li>config/</li> - <li>controllers/</li> - <li>models/</li> - <li>plugins/</li> - <li>tmp/</li> - <li>vendors/</li> - <li>views/</li> - <li>webroot/</li> - </ul></li> + <ul> + <li>config/</li> + <li>controllers/</li> + <li>models/</li> + <li>plugins/</li> + <li>tmp/</li> + <li>vendors/</li> + <li>views/</li> + <li>webroot/</li> + </ul> + </li> <li>cake/ - <ul> - <li>config/</li> - <li>docs/</li> - <li>libs/</li> - </ul></li> + <ul> + <li>config/</li> + <li>docs/</li> + <li>libs/</li> + </ul> + </li> <li>vendors/</li> </ul> -<p style="float:right;"><img src="http://base--/img/pictures/cakephp.png" alt="" /></p> -<p>Cake felt the necessity to divide what you can mess with (<code>app/</code>, <code>vendors/</code>) from what you’d better not touch (<code>cake/</code>). Rails just left everything on the same level.</p> -<p>After creating my database and the necessary tables I have to edit <code>config/database.yml</code>, which corresponds to Cake’s <code>app/config/database.php</code>. Then things start to become a bit different from Cake, as Rails offers some very handy built in scripts which can be used to automatically create your application’s files, i.e. executing <code>ruby script/generate controller Recipe</code> creates the controller and other bits:</p> +<p style="float:right;"><img src="/img/pictures/cakephp.png" alt="" /></p> +<p>Cake felt the necessity to divide what you can mess with (<code>app/</code>, <code>vendors/</code>) from what + you’d better not touch (<code>cake/</code>). Rails just left everything on the same level.</p> +<p>After creating my database and the necessary tables I have to edit <code>config/database.yml</code>, which + corresponds to Cake’s <code>app/config/database.php</code>. Then things start to become a bit different from + Cake, as Rails offers some very handy built in scripts which can be used to automatically create your + application’s files, i.e. executing <code>ruby script/generate controller Recipe</code> creates the controller + and other bits:</p> <pre><code>exists app/controllers/ exists app/helpers/ create app/views/recipe@@ -58,51 +80,68 @@ exists test/functional/
create app/controllers/recipe_controller.rb create test/functional/recipe_controller_test.rb create app/helpers/recipe_helper.rb</code></pre> -<p>And so on. Anyhow… I followed the tutorial and yes, it was a nice read. CakePHP borrowed a lot from Rails but not everything. Inevitably Ruby’s syntax is less verbose and looks very very clean:</p> +<p>And so on. Anyhow… I followed the tutorial and yes, it was a nice read. CakePHP borrowed a lot from Rails but + not everything. Inevitably Ruby’s syntax is less verbose and looks very very clean:</p> <p><% highlight :ruby do %><br /> -class RecipeController < ApplicationController<br /> + class RecipeController < ApplicationController<br /> scaffold :recipe</p> <p>def list<br /> - @recipes = Recipe.find_all<br /> + @recipes = Recipe.find_all<br /> end</p> <p>def edit<br /> - <code>recipe = Recipe.find(</code>params[“id”])<br /> - @categories = Category.find_all<br /> + <code>recipe = Recipe.find(</code>params[“id”])<br /> + @categories = Category.find_all<br /> end<br /> -end<br /> -<% end %></p> + end<br /> + <% end %> +</p> <p>While CakePHP’s, simply because it uses <span class="caps">PHP</span> and not Ruby, looks less pretty:</p> <p><% highlight :php do %><br /> -class RecipesController extends AppController<br /> -{<br /> + class RecipesController extends AppController<br /> + {<br /> var $scaffold;</p> <p>function list()<br /> {<br /> - $this→set(‘recipes’, $this→Recipe→findAll());<br /> + $this→set(‘recipes’, $this→Recipe→findAll());<br /> }</p> <p>function edit($id)<br /> {<br /> - $this→set(‘recipe’, $this→Recipe→find(“id = $id”));<br /> - $this→set(‘categories’, $this→Category→findAll());<br /> + $this→set(‘recipe’, $this→Recipe→find(“id = $id”));<br /> + $this→set(‘categories’, $this→Category→findAll());<br /> }</p> <p>}<br /> -<% end %></p> -<p>CakePHP Development Team did a great job translating some of Rails functionalities into <span class="caps">PHP</span>, and the while CakePHP’s syntax is <strong>much</strong> cleaner if compared to PHP’s standard spaghetti-code approach, Ruby just looks much more clear, sorry. <em>Imagine a world without funny unnecessary brackets, pointless semicolons and where everything just looks better</em>: that’s Ruby.</p> -<p>Sigh. Now I do understand why Rails was built in Ruby and not in <span class="caps">PHP</span>: simply because a PHP’s Rails would have been outscored by its “Ruby port”!</p> -<p>One thing I liked about Rails which has not been ported in Cake (yet) is a somehow smarter way of scaffolding. While the Ruby code above actually works, the CakePHP’s edit method doesn’t, or better, it does but not as expected: when you remove <code>var $scaffold</code> the scaffold is just plain gone, and you have to code everything yourself, while in Ruby you can leave the scaffold and then develop methods one by one, and still be able to use scaffolded methods if you didn’t define the custom ones.</p> -<p>The other thing I noticed about RoR is that it definitely handles errors better! This is probably another language issue. I basically forgot to set a category for the recipes, and when executing my custom list of recipes I got a very, very well structured error page showing something like:</p> + <% end %></p> +<p>CakePHP Development Team did a great job translating some of Rails functionalities into <span + class="caps">PHP</span>, and the while CakePHP’s syntax is <strong>much</strong> cleaner if compared to + PHP’s standard spaghetti-code approach, Ruby just looks much more clear, sorry. <em>Imagine a world without + funny unnecessary brackets, pointless semicolons and where everything just looks better</em>: that’s Ruby. +</p> +<p>Sigh. Now I do understand why Rails was built in Ruby and not in <span class="caps">PHP</span>: simply because a + PHP’s Rails would have been outscored by its “Ruby port”!</p> +<p>One thing I liked about Rails which has not been ported in Cake (yet) is a somehow smarter way of scaffolding. While + the Ruby code above actually works, the CakePHP’s edit method doesn’t, or better, it does but not as + expected: when you remove <code>var $scaffold</code> the scaffold is just plain gone, and you have to code + everything yourself, while in Ruby you can leave the scaffold and then develop methods one by one, and still be able + to use scaffolded methods if you didn’t define the custom ones.</p> +<p>The other thing I noticed about RoR is that it definitely handles errors better! This is probably another language + issue. I basically forgot to set a category for the recipes, and when executing my custom list of recipes I got a + very, very well structured error page showing something like:</p> <p><% highlight :ruby do %><br /> -NoMethodError in Recipe#index</p> + NoMethodError in Recipe#index</p> <p>Showing app/views/recipe/index.rhtml where line #18 raised:</p> <p>You have a nil object when you didn’t expect it!<br /> -The error occured while evaluating nil.name</p> + The error occured while evaluating nil.name</p> <p>Extracted source (around line #18):</p> -<p>15: <% @recipes.each do |recipe| <span>><br /> -16: <tr><br /> -17: <td><</span>= link_to recipe.title, :action => “show”, :id => recipe.id <span>></td><br /> -18: <td><</span>= recipe.category.name <span>></td><br /> -19: <td><</span>= recipe.date <span>></td><br /> -20: </tr><br /> -21: <</span> end <span>><br /> -<</span> end %></p> -<p>I took a screenshot of the page, because it was too nice: <a href="http://base--/img/pictures/rails_error.jpg">check it out</a>. This error page really tells you what’s wrong, and even prints the lines of code around the error! It also lets the developer check the full backtrace and every sort of information… Can we have this in CakePHP please? I actually started to develop something like this, but seemed quite hard to do in <span class="caps">PHP</span>.</p> +<p>15: <% @recipes.each do |recipe| <span>><br /> + 16: <tr><br /> + 17: <td><</span>= link_to recipe.title, :action => “show”, :id => recipe.id <span>> + </td><br /> + 18: <td><</span>= recipe.category.name <span>></td><br /> + 19: <td><</span>= recipe.date <span>></td><br /> + 20: </tr><br /> + 21: <</span> end <span>><br /> + <</span> end %></p> +<p>I took a screenshot of the page, because it was too nice: <a href="/img/pictures/rails_error.jpg">check it out</a>. + This error page really tells you what’s wrong, and even prints the lines of code around the error! It also + lets the developer check the full backtrace and every sort of information… Can we have this in CakePHP please? + I actually started to develop something like this, but seemed quite hard to do in <span class="caps">PHP</span>.</p>
@@ -4,23 +4,89 @@ content-type: article
timestamp: 1146483766 tags: "" ----- -<p>CakePHP is <span class="caps">THE</span> perfect <span class="caps">PHP</span> framework, so <em>we</em> don’t need anything else. Oh well, no. I personally love CakePHP, but I do believe other <span class="caps">PHP</span> frameworks can be interesting and maybe even useful, so today I thought I’d have a look at the <a href="http://base--/bookmarks/view/simfony/">Simfony Project</a>. This framework seems to be mentioned here and there on the Net in many different ways, someone said it can do wonders, some said it’s more advanced, others said something like <em>“qcodo sucks.. cake stinks.. symfony rocks!!!!!”</em>, so it <span class="caps">OUGHT</span> TO be pretty cool, definitely.</p> -<p style="float:left;"><img src="http://base--/img/pictures/symfony.gif" alt="" /> <em>Know thy enemy</em> someone said (OK, bad joke), so let’s have a look at this interesting alternative to CakePHP. <em>No dude, not another <span class="caps">MVC</span>-like, pseudo-Rails, <span class="caps">AJAX</span>-worshipping framework!</em> Yes, another one. Actually Symfony is more than that: while people <em>can</em> say CakePHP is similar to RoR for some features and for the strong <span class="caps">MVC</span> architecture, Symfony chose another road. Yes, <span class="caps">MVC</span> is still there, but the first thing I noticed after reading their <a href="http://www.symfony-project.com/tutorial/my_first_project.html">beginners’ tutorial</a> was that one of the things which Symfony seems to use quite regularly (and Cake doesn’t)is code generators. Things like executing <code>symfony propel-build-sql</code> or even <code>symfony propel-generate-crud frontend post Post</code> from command line to generate your code automagically, which CakePHP – except for our little <em>bake</em> script – doesn’t use. <br /> -<em>See? Simfony is <span class="caps">MUCH</span> better and <span class="caps">MUCH</span> more advanced than Cake!</em> No, hang on a minute… I just listed one thing which Symfony has more than Cake, is there any more? Yes, there is, for now: i18n – internationalization. Symfony comes with native multi-lingual support and Cake doesn’t – yet – although there are rumors that i18n for Cake 2.0 is <em>almost done</em>. This is not speculation, re-read the sentence: First off I’m referring to Cake <em>2.0</em> (which means it will take a while) and also I read it in the <a href="https://trac.cakephp.org/wiki/Proposals/2.0ToDoList">Cake 2.0 ToDo List</a>.</p> -<p>One of the most recurring and yet pointless critiques to CakePHP from Symfony enthusiasts is that the sites developed with CakePHP look terrible. I perfectly agree, look at <a href="http://www.h3rald.com/">this</a> and tell me if the developer is not a complete and hopeless idiot when it comes to design and look ‘n’ feel!<br /> -I do agree that some CakePHP sites (mine, mainly) don’t look too good, and probably the Cake Software Foundation should pay me to put it offline. I also agree that the Symfony website looks nice and is more pleasant to the eye than CakePHP’s, but I do hope that the old “design contest” doesn’t get forgotten…</p> -<p style="float:right;"><img src="http://base--/img/pictures/askeet.gif" alt="" /> The Symfony team also did something truly remarkable: a comprehensive tutorial, an advent calendar, some great free source code to download and a fully functional Web 2.0-compliant online application <em>all in one</em>. I’m referring to <a href="http://base--/bookmarks/view/askeet/">Askeet</a>, a Symfony-powered website which has been built from scratch using the framework and its development is well documented in <a href="http://www.symfony-project.com/askeet">twenty-four tutorials</a>. In one move these guys made an interesting website, some useful documentation and self promotion… what can I say: for next Christmas we’d better chain PHPnut, gwoo, nate & the others to their chairs, close them in a small room and force them to code something like that in twenty-four days.<br /> -If I were to mention something which Symfony did well I’d certainly say the <a href="http://www.symfony-project.com/content/documentation.html">documentation</a>. Screencasts, tutorials, advent calendars, a book, a wiki, <span class="caps">API</span> etc. etc. All done, and all good, I must admit that. The good news is that CakePHP is slowly catching up, and now the <a href="http://manual.cakephp.org">manual</a> looks pretty decent.</p> -<p>OK, enough flattering and let’s talk about something I didn’t like about Symfony. I downloaded the thing and it turns out it’s 1.2MB in size, <em>a hell of a framework!</em> After extracting the beast I had a look inside and found three directories: <code>data</code>, <code>lib</code> and <code>bin</code>. Not bad. I opened <code>bin</code> and found the three magic symfony scripts, alright; I opened <code>data</code> and found nine directories, I opened <code>lib</code> (the real deal) and found 25 directories! These guys maybe never heard of something called <em>“an organized directory structure”</em>, or perhaps I’m just too used to Cake’s logic and essentiality.<br /> -Browsing around I found something like 247 .dat files defining country names and currencies in all the languages of the world, script.aculo.us and prototype libraries, javascript calendars and other wonders… Weeeeheee! <br /> -The good thing is that Symfony seems to include pretty much everything you’d ever need, the bad thing is that <em>personally</em> I will never use any of the thirteen Chinese-related .dat files in th i18n directory. This philosophy is exactly the opposite to Cake: at first i got pissed off when I noticed that CakePHP doesn’t include prototype by default, but then I realized that if they started include <em>everything</em> you <em>might</em> need <em>someday</em> we’d end up like… like Symfony, with 1.2MB of stuff 500KB of which – at least – will most likely not be of any use for the average developers.</p> -<p>The other dangerous consequence of including more and more stuff is the so called <em>widget-temptation</em>: If you include script.aculo.us you <span class="caps">MUST</span> show off and offer some weird toy someone <em>may</em> use… well, Symfony seems to go in that direction, and someone compared it to component-driven frameworks like eZ Publish rather than more general-purposes projects. I’m sure the <a href="http://www.symfony-project.com/content/book/page/generator.html">admin generator</a> can be damn handy, but what happens if I’m a terribly annoying guy who’d like to tweak it and change it so that it fits <em>my</em> needs? In Cake… well, there’s nothing “official” included in the core, and when you find a third-party helper or component you feel you can take a look and poke around, extend it, or change it totally. It’s all up to the developers and their needs: personally think that widgets are useful, but some times people like a bit more flexibility.</p> -<p>So the overall impression of Symfony is that – regardless its arguable, self-proclaimed, <em>enterprise-ready</em> status – it is rather complex, with a steep(er) learning scheme which doesn’t justify the extra features.</p> -<p>From the <a href="http://www.symfony-project.com/tutorial/my_first_project.html">My first Symfony project</a> tutorial:</p> +<p>CakePHP is <span class="caps">THE</span> perfect <span class="caps">PHP</span> framework, so <em>we</em> don’t + need anything else. Oh well, no. I personally love CakePHP, but I do believe other <span class="caps">PHP</span> + frameworks can be interesting and maybe even useful, so today I thought I’d have a look at the Simfony Project. + This framework seems to be mentioned here and there on the Net + in many different ways, someone said it can do wonders, some said it’s more advanced, others said something like + <em>“qcodo sucks.. cake stinks.. symfony rocks!!!!!”</em>, so it <span class="caps">OUGHT</span> TO be + pretty cool, definitely. +</p> +<p style="float:left;"><img src="/img/pictures/symfony.gif" alt="" /> <em>Know thy enemy</em> someone said (OK, bad + joke), so let’s have a look at this interesting alternative to CakePHP. <em>No dude, not another <span + class="caps">MVC</span>-like, pseudo-Rails, <span class="caps">AJAX</span>-worshipping framework!</em> Yes, + another one. Actually Symfony is more than that: while people <em>can</em> say CakePHP is similar to RoR for some + features and for the strong <span class="caps">MVC</span> architecture, Symfony chose another road. Yes, <span + class="caps">MVC</span> is still there, but the first thing I noticed after reading their <a + href="http://www.symfony-project.com/tutorial/my_first_project.html">beginners’ tutorial</a> was that one of + the things which Symfony seems to use quite regularly (and Cake doesn’t)is code generators. Things like + executing <code>symfony propel-build-sql</code> or even <code>symfony propel-generate-crud frontend post Post</code> + from command line to generate your code automagically, which CakePHP – except for our little <em>bake</em> + script – doesn’t use. <br /> + <em>See? Simfony is <span class="caps">MUCH</span> better and <span class="caps">MUCH</span> more advanced than + Cake!</em> No, hang on a minute… I just listed one thing which Symfony has more than Cake, is there any more? + Yes, there is, for now: i18n – internationalization. Symfony comes with native multi-lingual support and Cake + doesn’t – yet – although there are rumors that i18n for Cake 2.0 is <em>almost done</em>. This is + not speculation, re-read the sentence: First off I’m referring to Cake <em>2.0</em> (which means it will take a + while) and also I read it in the <a href="https://trac.cakephp.org/wiki/Proposals/2.0ToDoList">Cake 2.0 ToDo List</a>. +</p> +<p>One of the most recurring and yet pointless critiques to CakePHP from Symfony enthusiasts is that the sites developed + with CakePHP look terrible. I perfectly agree, look at <a href="/">this</a> and tell me if the + developer is not a complete and hopeless idiot when it comes to design and look ‘n’ feel!<br /> + I do agree that some CakePHP sites (mine, mainly) don’t look too good, and probably the Cake Software Foundation + should pay me to put it offline. I also agree that the Symfony website looks nice and is more pleasant to the eye than + CakePHP’s, but I do hope that the old “design contest” doesn’t get forgotten…</p> +<p style="float:right;"><img src="/img/pictures/askeet.gif" alt="" /> The Symfony team also did something truly + remarkable: a comprehensive tutorial, an advent calendar, some great free source code to download and a fully + functional Web 2.0-compliant online application <em>all in one</em>. I’m referring to Askeet, a Symfony-powered + website which has been built from scratch using the + framework and its development is well documented in <a href="http://www.symfony-project.com/askeet">twenty-four + tutorials</a>. In one move these guys made an interesting website, some useful documentation and self + promotion… what can I say: for next Christmas we’d better chain PHPnut, gwoo, nate & the others to + their chairs, close them in a small room and force them to code something like that in twenty-four days.<br /> + If I were to mention something which Symfony did well I’d certainly say the <a + href="http://www.symfony-project.com/content/documentation.html">documentation</a>. Screencasts, tutorials, advent + calendars, a book, a wiki, <span class="caps">API</span> etc. etc. All done, and all good, I must admit that. The good + news is that CakePHP is slowly catching up, and now the <a href="http://manual.cakephp.org">manual</a> looks pretty + decent.</p> +<p>OK, enough flattering and let’s talk about something I didn’t like about Symfony. I downloaded the thing + and it turns out it’s 1.2MB in size, <em>a hell of a framework!</em> After extracting the beast I had a look + inside and found three directories: <code>data</code>, <code>lib</code> and <code>bin</code>. Not bad. I opened + <code>bin</code> and found the three magic symfony scripts, alright; I opened <code>data</code> and found nine + directories, I opened <code>lib</code> (the real deal) and found 25 directories! These guys maybe never heard of + something called <em>“an organized directory structure”</em>, or perhaps I’m just too used to + Cake’s logic and essentiality.<br /> + Browsing around I found something like 247 .dat files defining country names and currencies in all the languages of + the world, script.aculo.us and prototype libraries, javascript calendars and other wonders… Weeeeheee! <br /> + The good thing is that Symfony seems to include pretty much everything you’d ever need, the bad thing is that + <em>personally</em> I will never use any of the thirteen Chinese-related .dat files in th i18n directory. This + philosophy is exactly the opposite to Cake: at first i got pissed off when I noticed that CakePHP doesn’t + include prototype by default, but then I realized that if they started include <em>everything</em> you <em>might</em> + need <em>someday</em> we’d end up like… like Symfony, with 1.2MB of stuff 500KB of which – at least + – will most likely not be of any use for the average developers. +</p> +<p>The other dangerous consequence of including more and more stuff is the so called <em>widget-temptation</em>: If you + include script.aculo.us you <span class="caps">MUST</span> show off and offer some weird toy someone <em>may</em> + use… well, Symfony seems to go in that direction, and someone compared it to component-driven frameworks like eZ + Publish rather than more general-purposes projects. I’m sure the <a + href="http://www.symfony-project.com/content/book/page/generator.html">admin generator</a> can be damn handy, but + what happens if I’m a terribly annoying guy who’d like to tweak it and change it so that it fits + <em>my</em> needs? In Cake… well, there’s nothing “official” included in the core, and when + you find a third-party helper or component you feel you can take a look and poke around, extend it, or change it + totally. It’s all up to the developers and their needs: personally think that widgets are useful, but some times + people like a bit more flexibility. +</p> +<p>So the overall impression of Symfony is that – regardless its arguable, self-proclaimed, + <em>enterprise-ready</em> status – it is rather complex, with a steep(er) learning scheme which doesn’t + justify the extra features. +</p> +<p>From the <a href="http://www.symfony-project.com/tutorial/my_first_project.html">My first Symfony project</a> + tutorial:</p> <blockquote> -<p>So, the weblog will handle posts, and you will enable comments on them. Edit the file sf_sandbox/config/schema.xml and paste the following configuration:<br /> -<small><br /> -<pre><code> + <p>So, the weblog will handle posts, and you will enable comments on them. Edit the file sf_sandbox/config/schema.xml + and paste the following configuration:<br /> + <small><br /> + <pre><code> <?xml version="1.0" encoding="UTF-8"?> <database name="propel" defaultIdMethod="native" noxsd="true"> <table name="weblog_post" phpName="Post">@@ -45,11 +111,16 @@ <column name="created_at" type="timestamp" />
</table> </database> <p></code></pre><br /> -</small><br /> -This code is longer to read than to explain: It describes two tables Post and Comment.</p> -<p>NO! Sorry, no. This is <span class="caps">NOT</span> simple. It is logic, clear and makes perfect sense, it’s not that I’m retarded and I can’t write or read <span class="caps">XML</span> files, it’s just unnecessary. You create this and then call the slave-script to create the model and the corresponding database table… This is exactly the <em>enterprise</em> way of doing things CakePHP made me forget. <em>Convention over configuration</em>. Not hundreds of configuration files.</p> -<p>But there’s more: you can even configure your views with some simple <code>.yml</code> (!) file:<br /> -<pre><code> + </small><br /> + This code is longer to read than to explain: It describes two tables Post and Comment. + </p> + <p>NO! Sorry, no. This is <span class="caps">NOT</span> simple. It is logic, clear and makes perfect sense, it’s + not that I’m retarded and I can’t write or read <span class="caps">XML</span> files, it’s just + unnecessary. You create this and then call the slave-script to create the model and the corresponding database + table… This is exactly the <em>enterprise</em> way of doing things CakePHP made me forget. <em>Convention over + configuration</em>. Not hundreds of configuration files.</p> + <p>But there’s more: you can even configure your views with some simple <code>.yml</code> (!) file:<br /> + <pre><code> default: http_metas: content-type: text/html; charset=utf-8@@ -59,9 +130,15 @@ robots: index, follow
description: symfony project keywords: symfony, project language: en -</code></pre></p> -<p>Sure, it’s good. It helps, and it’s certainly useful, but I’d rather code a custom component to do the same thing with a few arrays. Again, this is arguable.<br /> -Validation is done through .yml files, and you can configure your administrator backend through a .yml file too! Cake has .ini-based <span class="caps">ACL</span>, and that’s about it: if I don’t want to use them I don’t use them. <br /> -Clearly you probably don’t have to edit all settings in the configuration files, but I just don’t like the approach, personally.</p> -<p>Oddly enough, Symfony’s slogan seems to be “professional web tools for lazy folks”…</p> -<p>It all depends on what you need. For <em>my</em> needs I chose CakePHP, and <a href="https://trac.cakephp.org/wiki/Cake/About">here’s why</a>.</p> +</code></pre> + </p> + <p>Sure, it’s good. It helps, and it’s certainly useful, but I’d rather code a custom component to + do the same thing with a few arrays. Again, this is arguable.<br /> + Validation is done through .yml files, and you can configure your administrator backend through a .yml file too! + Cake has .ini-based <span class="caps">ACL</span>, and that’s about it: if I don’t want to use them I + don’t use them. <br /> + Clearly you probably don’t have to edit all settings in the configuration files, but I just don’t like + the approach, personally.</p> + <p>Oddly enough, Symfony’s slogan seems to be “professional web tools for lazy folks”…</p> + <p>It all depends on what you need. For <em>my</em> needs I chose CakePHP, and <a + href="https://trac.cakephp.org/wiki/Cake/About">here’s why</a>.</p>
@@ -4,11 +4,23 @@ content-type: article
timestamp: 1146625560 tags: "cakephp|webdevelopment" ----- -<p>As <a href="http://digg.com/programming/CakePHP_1.0_has_been_released">Digg</a>_ points out, the first <em>stable</em> version of CakePHP was released, yesterday. I should have posted yesterday about it, and no, I didn’t forget: I was just busy downloading the new version, have a look at the new site, talk to people etc.</p> -<p>Anyhow, it’s ready, just baked and smells damn good. Go get it if you didn’t already, it’s available at <a href="http://cakeforge.org/frs/?group_id=23">the usual place</a>, even this time you won’t be disappointed. CakePHP now reached the 1.0 milestone, in a way which reminds me a lot about Mozilla Firefox: a lot of people were already using it <em>before</em> it went stable officially!</p> -<p style="float:left;"><img src="http://base--/img/pictures/CakePHP_1.0.png" alt="" /></p> -<p>The CakePHP Team has been humble enough not to declare their product <em>stable</em> before the time. I personally considered CakePHP stable <em>enough</em> since RC2… and considering that this site and many others have been built on alpha, beta and RC version, I think people can get an idea of Cake’s reliability.<br /> -Nothing (too) new came out the oven this time: CakePHP 1.0 is mainly a bugfix release, with all the features we’ve learnt to love. It’s just <em>better_: a lot of things have been fixed, model associations work better, etc. etc. You can read the <a href="http://cakeforge.org/frs/shownotes.php?group_id=23&release">changelog/announcement</a></em>id=85 or have a look below for a quick summary of the new features and most interesting fixes:</p> +<p>As <a href="http://digg.com/programming/CakePHP_1.0_has_been_released">Digg</a>_ points out, the first + <em>stable</em> version of CakePHP was released, yesterday. I should have posted yesterday about it, and no, I + didn’t forget: I was just busy downloading the new version, have a look at the new site, talk to people etc. +</p> +<p>Anyhow, it’s ready, just baked and smells damn good. Go get it if you didn’t already, it’s + available at <a href="http://cakeforge.org/frs/?group_id=23">the usual place</a>, even this time you won’t be + disappointed. CakePHP now reached the 1.0 milestone, in a way which reminds me a lot about Mozilla Firefox: a lot of + people were already using it <em>before</em> it went stable officially!</p> +<p style="float:left;"><img src="/img/pictures/CakePHP_1.0.png" alt="" /></p> +<p>The CakePHP Team has been humble enough not to declare their product <em>stable</em> before the time. I personally + considered CakePHP stable <em>enough</em> since RC2… and considering that this site and many others have been + built on alpha, beta and RC version, I think people can get an idea of Cake’s reliability.<br /> + Nothing (too) new came out the oven this time: CakePHP 1.0 is mainly a bugfix release, with all the features + we’ve learnt to love. It’s just <em>better_: a lot of things have been fixed, model associations work + better, etc. etc. You can read the <a + href="http://cakeforge.org/frs/shownotes.php?group_id=23&release">changelog/announcement</a></em>id=85 + or have a look below for a quick summary of the new features and most interesting fixes:</p> <pre><code> Revision: [2420] Added fix for Ticket #320.@@ -42,8 +54,17 @@ Adding check for custom error class in app/.
Added check for AppController::appError(); will be called if this method is in AppController. </code></pre> -<p style="float:right;"><img src="http://base--/img/pictures/cakesite.png" alt="" /></p> -<p>If you’re not too excited about this new release, maybe you should have a look at <a href="http://www.cakephp.org">www.cakephp.org</a>. Different? Damn right it is: it looks like someone listened to our prayers for a new website design. The merciful soul is <a href="http://www.nolimit-studio.com/">Armando Sosa</a>, the winner of CakePHP’s design contest. He’s a latin-american web designer who had the <span class="caps">GREAT</span> idea of thinking about an <em>innovative</em> design for the Cake site… Actually my dad didn’t think that way: <em>“That’s not new, that way of advertising was all over the place when I was a kid!”</em> And he’s right, Armando thought that a fifties-like template would have been perfect for Cake. Forget all the smooth, roundy-and-chubby, toons-like “official” Web 2.0 designs (beta), the new Cake site needs to stand out of the crowd…</p> -<p style="float:left;"><img src="http://base--/img/pictures/fonz.jpg" alt="" /></p> +<p style="float:right;"><img src="/img/pictures/cakesite.png" alt="" /></p> +<p>If you’re not too excited about this new release, maybe you should have a look at <a + href="http://www.cakephp.org">www.cakephp.org</a>. Different? Damn right it is: it looks like someone listened + to our prayers for a new website design. The merciful soul is <a href="http://www.nolimit-studio.com/">Armando + Sosa</a>, the winner of CakePHP’s design contest. He’s a latin-american web designer who had the + <span class="caps">GREAT</span> idea of thinking about an <em>innovative</em> design for the Cake site… + Actually my dad didn’t think that way: <em>“That’s not new, that way of advertising was all over + the place when I was a kid!”</em> And he’s right, Armando thought that a fifties-like template would + have been perfect for Cake. Forget all the smooth, roundy-and-chubby, toons-like “official” Web 2.0 + designs (beta), the new Cake site needs to stand out of the crowd…</p> +<p style="float:left;"><img src="/img/pictures/fonz.jpg" alt="" /></p> <p><br /><br /> -<em>Heyyy! Well done guys…</em></p> + <em>Heyyy! Well done guys…</em> +</p>
@@ -1,22 +1,54 @@
----- -title: "Digg Effect - the day after" +title: "Digg Effect - the day after" content-type: article timestamp: 1146794340 tags: "web20|webdevelopment|internet" ----- -<p>…So it turns out that my <a href="http://www.h3rald.com/articles/view/rails-inspired-php-frameworks/">last article</a> appeared on <a href="http://www.digg.com">Digg</a> homepage. <br /> -This was quite a pleasant surprise: I didn’t expect that an article submitted to <em>my own site</em> could make it that far! I thought you’d need a relatively well-known website, mafia’s support, some divine intervention and a terrific amount of luck, but it seems that sometimes an interesting article about an interesting subject can be enough. I’ll probably write a more detailed report of what happened soon, in another article rather than a blog post, but for now I just wanted to post a short summary here.</p> -<p>Two days ago I decided to write a roundup of the six Rails-inspired <span class="caps">PHP</span> frameworks, CakePHP, Symfony, <span class="caps">PHP</span> on Trax, Code Igniter, Biscuit and Pipeline. The reason for this was that I couldn’t find anything comparing all of them and such comparison could have been useful for some new <em>bakers_. OK, I confess, when I started writing the article I thought I’d submit it to Digg and see what happens: I saw that another <a href="http://www.phpit.net/article/ten-different-php-frameworks/">roundup</a> made it to the first page and people were quoting it everywhere on the net. It’s a nice article, but – in my humble opinion – not too exhaustive. <br /> -Then I read a comment by someone to the <a href="http://digg.com/programming/CakePHP_1.0_has_been_released">digg</a></em> of the latest Cake release stating:</p> +<p>…So it turns out that my <a href="/articles/rails-inspired-php-frameworks/">last + article</a> appeared on <a href="http://www.digg.com">Digg</a> homepage. <br /> + This was quite a pleasant surprise: I didn’t expect that an article submitted to <em>my own site</em> could + make it that far! I thought you’d need a relatively well-known website, mafia’s support, some divine + intervention and a terrific amount of luck, but it seems that sometimes an interesting article about an interesting + subject can be enough. I’ll probably write a more detailed report of what happened soon, in another article + rather than a blog post, but for now I just wanted to post a short summary here.</p> +<p>Two days ago I decided to write a roundup of the six Rails-inspired <span class="caps">PHP</span> frameworks, + CakePHP, Symfony, <span class="caps">PHP</span> on Trax, Code Igniter, Biscuit and Pipeline. The reason for this was + that I couldn’t find anything comparing all of them and such comparison could have been useful for some new + <em>bakers_. OK, I confess, when I started writing the article I thought I’d submit it to Digg and see what + happens: I saw that another <a href="http://www.phpit.net/article/ten-different-php-frameworks/">roundup</a> + made it to the first page and people were quoting it everywhere on the net. It’s a nice article, but + – in my humble opinion – not too exhaustive. <br /> + Then I read a comment by someone to the <a + href="http://digg.com/programming/CakePHP_1.0_has_been_released">digg</a></em> of the latest Cake release + stating: +</p> <blockquote> -<p>Yes, they are similar – both were inspired by Rails, but Cake has gone further to differentiate themselves. Here’s a decent (but not great) overview of some frameworks: http://www.phpit.net/article/ten-different-php-frameworks/</p> + <p>Yes, they are similar – both were inspired by Rails, but Cake has gone further to differentiate themselves. + Here’s a decent (but not great) overview of some frameworks: + http://www.phpit.net/article/ten-different-php-frameworks/</p> </blockquote> -<p>At that point, I thought that another round up, perhaps more Cake-centric, was in order. The other reason was that in one of my recent <a href="http://www.h3rald.com/blog/view/23/">blog posts</a> I tried to compare CakePHP and Symfony, but obviously my emotions got in the way and in the end I noticed I was kinda <em>attacking</em> Symfony. That was a blog post though, and that’s half-allowed, but I felt that I should have written a slightly more objective <em>article</em> mentioning also all the other competitors.</p> -<p>Anyhow, right when I went to submit my article to Digg, it turns out that another guy wrote <a href="http://digg.com/programming/5_Next_Generation_PHP_Frameworks">a similar round up</a>, which made it to Digg’s homepage. That was an annoying cohincidence, but in the end things didn’t go too bad: his roundup was more generic, while mine was more specific and detailed.</p> -<p style="float:left;"><img src="http://base--/img/pictures/dugg_detail.png" alt="" /></p> -<p>After submitting my article the reaction wasn’t instantaneous… 5, 7, 10, 13 diggs in the first two hours. Then shortly I made it to 30 and when the 40th visitor dugg it my article was moved to the first page!<br /> -I immediately noticed it when I refreshed my stats page: a minute before my girlfriend was here telling me “oh look, over 400 visitors… not too bad”. Then I refreshed the page and it said <em>539</em>, I refreshed again and said 600-something… eeep… Digg effect!</p> -<p>A special praise goes to my new hosting company, <a href="http://www.bluehost.com/track/h3rald/CODE5">BlueHost</a>: the server didn’t go down and it managed the extra traffic fine! A good test for CakePHP as well, since I built this site with it.</p> -<p>So here I am… over 5000 visitors read my article, about 600 people dugg it, nearly 40 people commented it on digg.com and 20 directly on my site. And – except for the usual <em>Rails-is-better-than-anything-else</em> comments – they were generally positive. Over 250 people bookmarked on del.icio.us and many blogs mentioned it in many different countries.</p> +<p>At that point, I thought that another round up, perhaps more Cake-centric, was in order. The other reason was that in + one of my recent <a href="/articles/23/">blog posts</a> I tried to compare CakePHP and + Symfony, but obviously my emotions got in the way and in the end I noticed I was kinda <em>attacking</em> Symfony. + That was a blog post though, and that’s half-allowed, but I felt that I should have written a slightly more + objective <em>article</em> mentioning also all the other competitors.</p> +<p>Anyhow, right when I went to submit my article to Digg, it turns out that another guy wrote <a + href="http://digg.com/programming/5_Next_Generation_PHP_Frameworks">a similar round up</a>, which made it to + Digg’s homepage. That was an annoying cohincidence, but in the end things didn’t go too bad: his roundup + was more generic, while mine was more specific and detailed.</p> +<p style="float:left;"><img src="/img/pictures/dugg_detail.png" alt="" /></p> +<p>After submitting my article the reaction wasn’t instantaneous… 5, 7, 10, 13 diggs in the first two hours. + Then shortly I made it to 30 and when the 40th visitor dugg it my article was moved to the first page!<br /> + I immediately noticed it when I refreshed my stats page: a minute before my girlfriend was here telling me “oh + look, over 400 visitors… not too bad”. Then I refreshed the page and it said <em>539</em>, I refreshed + again and said 600-something… eeep… Digg effect!</p> +<p>A special praise goes to my new hosting company, <a href="http://www.bluehost.com/track/h3rald/CODE5">BlueHost</a>: + the server didn’t go down and it managed the extra traffic fine! A good test for CakePHP as well, since I + built this site with it.</p> +<p>So here I am… over 5000 visitors read my article, about 600 people dugg it, nearly 40 people commented it on + digg.com and 20 directly on my site. And – except for the usual <em>Rails-is-better-than-anything-else</em> + comments – they were generally positive. Over 250 people bookmarked on del.icio.us and many blogs mentioned it + in many different countries.</p> <p>Money? Didn’t make much with adsense at all: programmers <em>don’t</em> click on ads!<br /> -Bandwidth? About 1GB was gone in the first five hours, now is obviously slowing down: oh well, I still have another 398GB available till the end of the month :P</p> + Bandwidth? About 1GB was gone in the first five hours, now is obviously slowing down: oh well, I still have another + 398GB available till the end of the month :P</p>
@@ -4,19 +4,41 @@ content-type: article
timestamp: 1146922980 tags: "cakephp|frameworks" ----- -<p>When I first tried Ruby on Rails I was literally amazed by the <em>generator</em> script. Yes, I was young and inexperienced then (six/seven months ago), but you must admit that getting a controller, a model, all the basic views generated automatically by</p> +<p>When I first tried Ruby on Rails I was literally amazed by the <em>generator</em> script. Yes, I was young and + inexperienced then (six/seven months ago), but you must admit that getting a controller, a model, all the basic + views generated automatically by</p> <p><code>rails script/generator scaffold Posts</code></p> -<p>is not a bad thing. Especially if the same script allows you to create model, views and controller separately and other things. <a href="http://www.symfony-project.com/">Symfony</a> and <span class="caps">PHP</span> on Trax already tried to port this functionalities, with mixed results. What about Cake? Oh well, yes, we do have something like that… something rather different, but still something: the <code>bake.php</code> script.<br /> -This cute little thing is located in the <code>cake/scripts/</code> folder and can be used – hear, hear – from command line. You can run Ruby and Perl scripts, so yes, you can actually run <span class="caps">PHP</span> from command line, although it’s not its primary purpose.</p> -<p><img src="http://base--/img/pictures/bake.jpg" alt="" /></p> -<p>Cool then, let’s open a *nix shell, Windows command prompt, etc. etc., go into the <code>cake/scripts/</code> folder and run:</p> +<p>is not a bad thing. Especially if the same script allows you to create model, views and controller separately and + other things. <a href="http://www.symfony-project.com/">Symfony</a> and <span class="caps">PHP</span> on Trax + already tried to port this functionalities, with mixed results. What about Cake? Oh well, yes, we do have something + like that… something rather different, but still something: the <code>bake.php</code> script.<br /> + This cute little thing is located in the <code>cake/scripts/</code> folder and can be used – hear, hear + – from command line. You can run Ruby and Perl scripts, so yes, you can actually run <span + class="caps">PHP</span> from command line, although it’s not its primary purpose.</p> +<p><img src="/img/pictures/bake.jpg" alt="" /></p> +<p>Cool then, let’s open a *nix shell, Windows command prompt, etc. etc., go into the <code>cake/scripts/</code> + folder and run:</p> <p><code>php bake.php</code></p> -<p>Assuming that the php executable is in your <em><span class="caps">PATH</span></em> environment variable – if not, either you add it or you’ll have to type something like:</p> +<p>Assuming that the php executable is in your <em><span class="caps">PATH</span></em> environment variable – if + not, either you add it or you’ll have to type something like:</p> <p><code>D:SERVERphpphp.exe bake.php</code></p> -<p>depending on where your php executable is. You’ll be be greeted by a “<span class="caps">CAKEPHP</span> <span class="caps">BAKE</span>” text, and then you’ll be asked a few questions. One thing to realize before proceeding any further: bake.php is <em>not</em> a generator, not in the traditional “Rails” sense, anyway. It’s rather a handy but more verbose dialogue-based configuration script – which will also generate <em>something</em> eventually if you provide all the necessary details.<br /> -A different approach, which may be good or bad according to your taste: personally I think we should also have something faster to use, like a Rails generator, and I opened a <a href="https://trac.cakephp.org/ticket/768">ticket</a> about it, but let’s see what bake.php can do, for now.</p> -<p>The answer is… nearly anything. It annoying enough to please, but if you follow its directions it can do a prettu decent job in the end, it’s far from being sentient, but let’s say it’s smart enough for a script. First of all if you try it out on a fresh Cake install it will notice that you haven’t configured your database yet, so it will ask for a hostname, username, password, database name etc. etc. and generate your <code>app/config/database.php</code> for you, not a bad start.</p> -<p>Once that’s done – and it won’t go on unless you configure a (MySQL only?) database – you can proceed with the rest. You can start creating either a controller, model or view; I tried a <code>Posts</code> controller, for example. The script then asks quite a few questions:</p> +<p>depending on where your php executable is. You’ll be be greeted by a “<span class="caps">CAKEPHP</span> + <span class="caps">BAKE</span>” text, and then you’ll be asked a few questions. One thing to realize + before proceeding any further: bake.php is <em>not</em> a generator, not in the traditional “Rails” + sense, anyway. It’s rather a handy but more verbose dialogue-based configuration script – which will + also generate <em>something</em> eventually if you provide all the necessary details.<br /> + A different approach, which may be good or bad according to your taste: personally I think we should also have + something faster to use, like a Rails generator, and I opened a <a + href="https://trac.cakephp.org/ticket/768">ticket</a> about it, but let’s see what bake.php can do, for + now.</p> +<p>The answer is… nearly anything. It annoying enough to please, but if you follow its directions it can do a + prettu decent job in the end, it’s far from being sentient, but let’s say it’s smart enough for a + script. First of all if you try it out on a fresh Cake install it will notice that you haven’t configured your + database yet, so it will ask for a hostname, username, password, database name etc. etc. and generate your + <code>app/config/database.php</code> for you, not a bad start.</p> +<p>Once that’s done – and it won’t go on unless you configure a (MySQL only?) database – you can + proceed with the rest. You can start creating either a controller, model or view; I tried a <code>Posts</code> + controller, for example. The script then asks quite a few questions:</p> <ul> <li>The controller’s name</li> <li>Whether it will use other models besides posts</li>@@ -26,7 +48,7 @@ <li>Whether you want to generate the base <span class="caps">CRUD</span> methods</li>
</ul> <p>Then finally it generates the damn thing. The result is good enough:</p> <p><small><br /> -<pre><code> + <pre><code> <?php class PostsController extends AppController {@@ -95,13 +117,19 @@ }<br />
}<br /> ?><br /> </code></pre><br /> -</small></p> -<p>It’s more or less the same with models and views: it will still ask a lot of questions and in the end generate the thing. <br /> -This behaviour is more advanced than a standard generator, you can include helpers and components already, if you want, but do you <em>really</em> want that? For models it even asks if you want to include particular associations and validation rules! Personally, I’d rather a generator script which generates something <em>immediately</em> and accepts maybe some parameters to further customization, like:</p> + </small></p> +<p>It’s more or less the same with models and views: it will still ask a lot of questions and in the end generate + the thing. <br /> + This behaviour is more advanced than a standard generator, you can include helpers and components already, if you + want, but do you <em>really</em> want that? For models it even asks if you want to include particular associations + and validation rules! Personally, I’d rather a generator script which generates something <em>immediately</em> + and accepts maybe some parameters to further customization, like:</p> <p><code>php bake.php scaffold Posts</code><br /> -<code>php bake.php controller Posts</code><br /> -<code>php bake.php model Posts</code><br /> -<code>php bake.php model Posts</code><br /> -<code>php bake.php controller Posts helper +Html -Time,Javascript</code><br /> -<code>php bake.php model Posts assoc +hasMany comments,tags</code></p> -<p>Bah… just some random thoughts. How about custom-made generators (<a href="http://wiki.rubyonrails.org/rails/pages/AvailableGenerators">Rails-inspired</a>)?</p> + <code>php bake.php controller Posts</code><br /> + <code>php bake.php model Posts</code><br /> + <code>php bake.php model Posts</code><br /> + <code>php bake.php controller Posts helper +Html -Time,Javascript</code><br /> + <code>php bake.php model Posts assoc +hasMany comments,tags</code> +</p> +<p>Bah… just some random thoughts. How about custom-made generators (<a + href="http://wiki.rubyonrails.org/rails/pages/AvailableGenerators">Rails-inspired</a>)?</p>
@@ -4,23 +4,43 @@ content-type: article
timestamp: 1147081800 tags: "cakephp" ----- -<p>Right after my <a href="http://base--/blog/view/26">last blog post</a> I decided to log on #cakephp on irc.freenode.org as usual, and gwoo pops in and says “h3raLd, you didn’t review rdBaker yet!”<br /> -That’s right, I didn’t yet, so I may as well do it today.</p> -<p>I remember hearing about rdBaker months ago, waaay before CakePHP 1.0, way before the RCs, I remember someone mentioning it on CakePHP user group in right after the bake.php script was created. <em>“How about having an online baking utility?”</em> – and that’s precisely what rdBaker is, a more <span class="caps">PHP</span>-ish version of bake.php, which runs like any other <span class="caps">PHP</span> scripts: in your browser.</p> -<p>This cute little thing is obviously available for free on <a href="http://cakeforge.org/frs/?group_id=13&release_id=74">CakeForge</a> and is part of <a href="http://www.rd11.com">gwoo</a> ’s <a href="http://cakeforge.org/projects/rdos/">rdOpenSource</a> project which includes various other Cake-powered applications.<br /> -I personally recommend new (and old) bakers to download them and play with them, try to understand how they were coded, because they can really teach you <em>a lot</em> on how to code a CakePHP application or website properly.</p> -<p>So anyway, get your copy of rdBaker, unzip it and have a look at the <code>README.txt</code> file for the installation instructions:</p> +<p>Right after my <a href="/articles/26">last blog post</a> I decided to log on #cakephp on irc.freenode.org as usual, + and gwoo pops in and says “h3raLd, you didn’t review rdBaker yet!”<br /> + That’s right, I didn’t yet, so I may as well do it today.</p> +<p>I remember hearing about rdBaker months ago, waaay before CakePHP 1.0, way before the RCs, I remember someone + mentioning it on CakePHP user group in right after the bake.php script was created. <em>“How about having an + online baking utility?”</em> – and that’s precisely what rdBaker is, a more <span + class="caps">PHP</span>-ish version of bake.php, which runs like any other <span class="caps">PHP</span> scripts: in + your browser.</p> +<p>This cute little thing is obviously available for free on <a + href="http://cakeforge.org/frs/?group_id=13&release_id=74">CakeForge</a> and is part of <a + href="http://www.rd11.com">gwoo</a> ’s <a href="http://cakeforge.org/projects/rdos/">rdOpenSource</a> project + which includes various other Cake-powered applications.<br /> + I personally recommend new (and old) bakers to download them and play with them, try to understand how they were + coded, because they can really teach you <em>a lot</em> on how to code a CakePHP application or website properly.</p> +<p>So anyway, get your copy of rdBaker, unzip it and have a look at the <code>README.txt</code> file for the + installation instructions:</p> <quote> -<p>1. Place rdBaker in the root along side /cake_install/app.<br /> -2. chmod /cake_install/rdBaker/tmp to 0777<br /> -3. launch http://localhost/cake_install/rdBaker/</p> + <p>1. Place rdBaker in the root along side /cake_install/app.<br /> + 2. chmod /cake_install/rdBaker/tmp to 0777<br /> + 3. launch http://localhost/cake_install/rdBaker/</p> </quote> <p>Not too hard, innit?</p> -<p><img src="http://base--/img/pictures/rdbaker.jpg" alt="" /></p> -<p>Good. So you try accessing something like <code>http://localhost/php/test/cakephp/cake_test/rdBaker/</code> (that’s on my own local <span class="caps">WAMP</span> server) and you’ll get a nice page asking you to “supply your ingredients” via a simple form. <br /> -Unlike its command line cousin, rdBaker doesn’t require you to fill in <em>all</em> the fields, but just the full path to the save directory (which is normally already filled in) and of course the name of the model (Post, User, Comment).<br /> -Then you can select the type of output and choose whether you want to generate an empty controller, a scaffolded one or the <em>full</em> option including all the most common <acronym title="Create, Retrieve, Update, Delete"><span class="caps">CRUD</span></acronym> methods.<br /> -Finally – if you like – you can enter any association or valitation rules for your model, then press the <em>Bake it!</em> button and voilá, in you’ll find three directories (controllers, models and views) in your save directory containing all the <acronym title="Model View Controller"><span class="caps">MVC</span></acronym> entities you need regarding a particular model:</p> +<p><img src="/img/pictures/rdbaker.jpg" alt="" /></p> +<p>Good. So you try accessing something like <code>http://localhost/php/test/cakephp/cake_test/rdBaker/</code> + (that’s on my own local <span class="caps">WAMP</span> server) and you’ll get a nice page asking you to + “supply your ingredients” via a simple form. <br /> + Unlike its command line cousin, rdBaker doesn’t require you to fill in <em>all</em> the fields, but just the + full path to the save directory (which is normally already filled in) and of course the name of the model (Post, User, + Comment).<br /> + Then you can select the type of output and choose whether you want to generate an empty controller, a scaffolded one + or the <em>full</em> option including all the most common <acronym title="Create, Retrieve, Update, Delete"><span + class="caps">CRUD</span></acronym> methods.<br /> + Finally – if you like – you can enter any association or valitation rules for your model, then press the + <em>Bake it!</em> button and voilá, in you’ll find three directories (controllers, models and views) in + your save directory containing all the <acronym title="Model View Controller"><span class="caps">MVC</span></acronym> + entities you need regarding a particular model: +</p> <pre><code> rdBaker Result Array (@@ -35,15 +55,20 @@ </code></pre>
<p>But there’s more! By checking the appropriate checkbox, you can get all the stuff packed in a zip file!</p> <p>Not bad at all, and fast as well.</p> <p>Now the bad things…<br /> -The script works fine, but there’s something which could be improved, perhaps:</p> + The script works fine, but there’s something which could be improved, perhaps:</p> <ul> - <li>If you choose to put everything in a zip file, the file will be named “baked_by_rdBaker.zip” – not a big deal, but maybe it could be personalized according to the model name entered.</li> - <li>Regardless you want to add validation rules to your model or not, you’ll <em>always</em> find some validation rules for a <em>title</em> and <em>body</em> field. I checked and they are hardcoded in the template file (rdBaker/views/helpers/templates/full/model.txt):<br /> -<pre><code> + <li>If you choose to put everything in a zip file, the file will be named “baked_by_rdBaker.zip” – + not a big deal, but maybe it could be personalized according to the model name entered.</li> + <li>Regardless you want to add validation rules to your model or not, you’ll <em>always</em> find some + validation rules for a <em>title</em> and <em>body</em> field. I checked and they are hardcoded in the template file + (rdBaker/views/helpers/templates/full/model.txt):<br /> + <pre><code> var $validate = array( 'title'=>VALID_NOT_EMPTY, 'body'=>VALID_NOT_EMPTY); -</code></pre></li> - <li>In the baked index.thtml view, there will always be a column named “Title”. This, again, is hardcoded in the template.</li> +</code></pre> + </li> + <li>In the baked index.thtml view, there will always be a column named “Title”. This, again, is hardcoded + in the template.</li> </ul> <p>Other than these things, everything seems to work fine. A really nice script!</p>
@@ -4,8 +4,27 @@ content-type: article
timestamp: 1147580760 tags: "website|writing" ----- -<p>Yes, I know, I’ve been slaking a little bit, and haven’t posted on my blog in a while. Well, I actually <em>didn’t</em> slack at all in these days getting ready to start my job, looking for a damn fitted kitchen for my house and… writing more articles.</p> -<p>Nothing special, and nothing too technical, to be honest, but equally interesting. First of all I updated my <a href="http://base--/articles/view/ie-lovers-guide-to-firefox/">An IE Lover’s Guide to Firefox</a> a little bit and people at SpreadFirefox.com and <a href="http://www.firefoxfacts.com/">FirefoxFacts</a> liked it. Glad to hear that, unfortunately some guy who wrote about <a href="http://mywebpages.comcast.net/SupportCD/FirefoxMyths.html">Firefox Myths</a> wasn’t too impressed, but at any rate he read it anyway.</p> -<p>OK, this wasn’t a new article at all, but <a href="http://base--/articles/view/the-internet-philosopher/">this one</a> is fresh, at least. It’s about a Swedish guy who decided to emigrate to India pursuing an ideal: writing for his own opinions and ideas. And he gets paid for that too! After reading more about him on his <a href="http://base--/bookmarks/view/ropix">website</a> I decided to write something about him. An interesting and rather unusual read. Pity that some sections of his homepage are in Swedish only.</p> -<p>Finally, yesterday I felt inspired and decided to write <a href="http://base--/articles/view/social-bookmarking-services">another roundup</a> featuring ten popular social bookmarking websites. Trying all those services was fun, with a few exceptions of course. The bad news is that there are already various reviews about social bookmarking sites and thus the Digg folk doesn’t seem to be particularly interested in <a href="http://digg.com/software/Ten_popular_social_bookmarking_services_reviewed">reading another one</a>, but hey! After all I can’t expect of getting dugg for every roundup I write, can’t I?</p> -<p>That’s about it. And what about the CakePHP article I promised <a href="http://base--/blog/view/13/">long ago</a> to CakePHP beginners? It’s done, written and ready to be published! Unfortunately the magazine I submitted it to is taking quite a bit to review it and – most important – to tell me whether they’ll publish it or not. Let’s hope for the best.</p> +<p>Yes, I know, I’ve been slaking a little bit, and haven’t posted on my blog in a while. Well, I actually + <em>didn’t</em> slack at all in these days getting ready to start my job, looking for a damn fitted kitchen + for my house and… writing more articles. +</p> +<p>Nothing special, and nothing too technical, to be honest, but equally interesting. First of all I updated my <a + href="/articles/ie-lovers-guide-to-firefox/">An IE Lover’s Guide to Firefox</a> a little bit and + people at SpreadFirefox.com and <a href="http://www.firefoxfacts.com/">FirefoxFacts</a> liked it. Glad to hear that, + unfortunately some guy who wrote about <a href="http://mywebpages.comcast.net/SupportCD/FirefoxMyths.html">Firefox + Myths</a> wasn’t too impressed, but at any rate he read it anyway.</p> +<p>OK, this wasn’t a new article at all, but <a href="/articles/the-internet-philosopher/">this one</a> is + fresh, at least. It’s about a Swedish guy who decided to emigrate to India pursuing an ideal: writing for his + own opinions and ideas. And he gets paid for that too! After reading more about him on his website I decided to + write something about him. An interesting and rather + unusual read. Pity that some sections of his homepage are in Swedish only.</p> +<p>Finally, yesterday I felt inspired and decided to write <a href="/articles/social-bookmarking-services">another + roundup</a> featuring ten popular social bookmarking websites. Trying all those services was fun, with a few + exceptions of course. The bad news is that there are already various reviews about social bookmarking sites and thus + the Digg folk doesn’t seem to be particularly interested in <a + href="http://digg.com/software/Ten_popular_social_bookmarking_services_reviewed">reading another one</a>, but + hey! After all I can’t expect of getting dugg for every roundup I write, can’t I?</p> +<p>That’s about it. And what about the CakePHP article I promised <a href="/articles/13/">long ago</a> to CakePHP + beginners? It’s done, written and ready to be published! Unfortunately the magazine I submitted it to is + taking quite a bit to review it and – most important – to tell me whether they’ll publish it or + not. Let’s hope for the best.</p>
@@ -4,12 +4,27 @@ content-type: article
timestamp: 1148132820 tags: "cakephp|tutorial" ----- -<p>Tutorials are great, articles are helpful, manuals are essential and the <span class="caps">API</span> is your best friend, but there’s still something missing there… Unfortunately podcasts are not yet available, but the CakePHP team is proud to announce the creation of two <a href="http://cakephp.org/pages/screencasts">screencasts</a> in an effort to help new bakers familiarizing with CakePHP’s concepts. <br /> -This is old news now, the screencasts section came together with the <a href="http://base--/blog/view/24">site overhaul</a> but I only got a chance to take a look at them (one of them only, to be totally honest) recently, and so here’s a spoil… erhm, a <em>detailed</em> description of John Anderson’s screencast about the <a href="http://manual.cakephp.org/chapter/18">Blog Tutorial</a>.</p> -<p style="float:left;"><img src="http://base--/img/pictures/CakePHP_1.0.png" alt="" /></p> -<p>There’s something I’ll never do: a screencast. Recording every mouse movement, every word or piece of code typed in half an hour? No way! And what happens if I mistype something? People will keep pointing out the fact that I was starting to type <code></h2></code> to close a <code></h1></code> tag, or that I waited an eternity like five full seconds before deciding what to do. I guess I’m quite paranoid… John did it, and he did it well. Using just bash, vim and Safari he was able to record an excellent 30-minutes screencast featuring the blog tutorial. <br /> -Before people start complaining that the blog tutorial should be completed in fifteen minutes, keep in mind that John’s screencast is meant to show everything clearly to new users, via a trial and error approach if necessary.</p> -<p>Here’s what happens in the screencast, nothing new if your read the blog tutorial, but still interesting, especially if you’re new to Cake. Unfortunately there’s no audio, but the video talks by itself and John will occasionally write some comments here and there.</p> +<p>Tutorials are great, articles are helpful, manuals are essential and the <span class="caps">API</span> is your best + friend, but there’s still something missing there… Unfortunately podcasts are not yet available, but the + CakePHP team is proud to announce the creation of two <a href="http://cakephp.org/pages/screencasts">screencasts</a> + in an effort to help new bakers familiarizing with CakePHP’s concepts. <br /> + This is old news now, the screencasts section came together with the <a href="/articles/24">site overhaul</a> but I + only got a chance to take a look at them (one of them only, to be totally honest) recently, and so here’s a + spoil… erhm, a <em>detailed</em> description of John Anderson’s screencast about the <a + href="http://manual.cakephp.org/chapter/18">Blog Tutorial</a>.</p> +<p style="float:left;"><img src="/img/pictures/CakePHP_1.0.png" alt="" /></p> +<p>There’s something I’ll never do: a screencast. Recording every mouse movement, every word or piece of + code typed in half an hour? No way! And what happens if I mistype something? People will keep pointing out the fact + that I was starting to type <code></h2></code> to close a <code></h1></code> tag, or that I waited an + eternity like five full seconds before deciding what to do. I guess I’m quite paranoid… John did it, and + he did it well. Using just bash, vim and Safari he was able to record an excellent 30-minutes screencast featuring + the blog tutorial. <br /> + Before people start complaining that the blog tutorial should be completed in fifteen minutes, keep in mind that + John’s screencast is meant to show everything clearly to new users, via a trial and error approach if + necessary.</p> +<p>Here’s what happens in the screencast, nothing new if your read the blog tutorial, but still interesting, + especially if you’re new to Cake. Unfortunately there’s no audio, but the video talks by itself and John + will occasionally write some comments here and there.</p> <p><em><strong>0:01 – 5:00</strong></em></p> <ul> <li><span class="caps">SVN</span> checkout to get the latest CakePHP version</li>@@ -78,6 +93,7 @@ <li>edit a post</li>
<li>move around, switch views</li> <li>edit config/routes.php</li> <li>set default route to posts/index</li> - <li>refresh – all done!</li> + <li>refresh – all done!</li> </ul> -<p>That’s it. All in a 40MB .mov file. Download it from <a href="http://www.archive.org/download/CakePHP_BlogTutorialJohn/BlogTutorial.mov">here</a>.</p> +<p>That’s it. All in a 40MB .mov file. Download it from <a + href="http://www.archive.org/download/CakePHP_BlogTutorialJohn/BlogTutorial.mov">here</a>.</p>
@@ -4,21 +4,68 @@ content-type: article
timestamp: 1148561820 tags: "writing|tools" ----- -<p>Since in these days (and even more in near future) I’m really writing a lot I thought it would be good to share my thoughts on some writing programs and tools I started using for writing these blog posts, articles, and more.</p> -<p>I’m going to examine a few applications which I find useful for different tasks, since I recently came to the conclusion that I cannot use the same editor for everything I write: some magazines require a .doc document, others want just plain text, my site uses the truly excellent <a href="http://http://www.textism.com/">textile</a> markup, zZine Magazine used BBcode, other site use their own “proprietary” styles and so on. One could just give up and use Notepad – or better, <a href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a> – for everything, while someone else like me might opt for various applications according to the task.</p> -<p>One of the few essential requirements for a <em>writer</em> is some spell checking functionality. Sad but true, this is enough to leave the most popular multi-purpose programming editor out: programmers don’t need a spell checker, a highlighter for their favourite language is more than enough. <br /> -I will not mention all the applications I tried to find the Perfect Editor, and I’ll just focus on the programs I ended up using in the end. Some may be well known, others may not, anyway, here we go.</p> -<p style="float:left;"><img src="http://base--/img/pictures/wp/bill.jpg" alt="" /></p> -<p><a href="http://www.microsoft.com/office/preview/default.mspx">Word 2007 Beta 2</a> – Yes, I know that OpenOffice is free and OO Writer works great, but perhaps at work you’ll be asked to use MS Word. Some editors may require that as well, and their templates may not be correctly rendered by OpenOffice, so in the end you’ll still have to use Redmond’s most popular Word Processor – <em>if you have it</em>. If you got it with your laptop (I didn’t) or your auntie gave you 300$ to buy it you’re all set, but if you don’t? <br /> -Oh well, yes, OpenOffice is the right choice perhaps, but at least until February 2007 uncle Bill lets you try the bleeding (quite literally) edge of all the commercial word processors: Word 2007 beta 2. You can download the whole Office Suite (and more) for free, <a href="http://www.microsoft.com/office/preview/beta/overview.mspx">run</a>. I did it yesterday and well, it’s nice to try this brand-new piece of eye candy. the interface is completely new, you won’t find the usual drop down menu but with some imagination you’ll manage to save/create/open a new document by clicking on the big roundy Office logo on the top left corner. More user friendly? Perhaps, once you get used to it. It <span class="caps">STILL</span> doesn’t have a tabbed interface, so you <span class="caps">STILL</span> have to clutter your taskbar if you want to keep more than one document open. <br /> -At any rate, it does the job, exactly in the same way as it did in the previous versions. <br /> -I use it if people ask me to, and for writing stuff which doesn’t need to be formatted with a particular markup or style but rather look nice and have pictures embedded.</p> -<p style="float:right;"><img src="http://base--/img/pictures/wp/writely.gif" alt="" /></p> -<p><a href="http://base--/bookmarks/view/writely/">Writely</a> – Now this is much more fun. A <em>online</em>, <span class="caps">AJAX</span>-powered word processor recently acquired by Google. IT’s currently in closed beta, but I was lucky enough to get an account before they closed registrations and I can invite people to use it.<br /> -It’s nice. It’s nice if you have to work with MS Word documents or create <span class="caps">PDF</span> files, and it supports the most essential features offered by desktop word processors, plus some more, really convenient functionalities. <br /> -It can import MS Word documents pretty well and also any kind of text file, so that you can edit it online anytime and anywhere. You can star, tag, archive, edit and delete your documents in a really easy way and – which is one of its killer features – you can grant access to certain documents to collaborators for editing or viewing. Other word processors out there offer similar features, but Writely is by far the nicest to use and perhaps even the more advanced. I recently wrote a couple of articles about CakePHP (coming soon-ish to some online magazines near you) and then gave access to gwoo and PhpNut for editing, so that they could check the code snippets, in particular: it was a success. Magazine editors were happy and impressed as well.<br /> -Another really wonderful feature is <em>version support</em>. I discovered this recently: when you edit a document and save it, Writely automatically creates a new version of it, storing the old ones as well, so that you can even compare them to highlight differences if you wish: a great feature to keep track of the editing process and know exactly who edited which. When I noticed it that was it, Writely has become my online <em>repository</em> for my articles and writings.</p> -<p style="float:left;"><img src="http://base--/img/pictures/wp/cream.png" alt="" /></p> -<p><a href="http://base--/bookmarks/view/cream-editor">Cream</a> – I discovered this a while ago, and it’s perhaps the most multi-purpose editor out there. It’s built on top of Vim (respect+) but it has a friendlier interface by default, and that’s exactly what I’m using right now for typing this post. The reasons are simple: it supports <span class="caps">ANY</span> kind of file format and any character encoding. There’s an highlighter for everything, including BBcode and textile, and of course you can make your own. It also includes spell checking on-the-fly which is missing in many simple editors. <br /> -Whenever I have to write something which requires some particular formatting or markup I use Cream, it does the job pretty well, and whenever I feel brave I can always switch to “expert” view and challenge my vi skills ;)</p> -<p>That’s pretty much what I use for writing articles, posts, and other documents… I tried other alternatives like RoughDraft or similar programs but I’m now really happy with these three applications. Commercial “writer’s programs”? There are some out there, but who wants to spend 40$ or more for something which offer less than MS Word when you can use OpenOffice and Writely for free?</p> +<p>Since in these days (and even more in near future) I’m really writing a lot I thought it would be good to share + my thoughts on some writing programs and tools I started using for writing these blog posts, articles, and more.</p> +<p>I’m going to examine a few applications which I find useful for different tasks, since I recently came to the + conclusion that I cannot use the same editor for everything I write: some magazines require a .doc document, others + want just plain text, my site uses the truly excellent <a href="http://http://www.textism.com/">textile</a> markup, + zZine Magazine used BBcode, other site use their own “proprietary” styles and so on. One could just give + up and use Notepad – or better, <a href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a> + – for everything, while someone else like me might opt for various applications according to the task.</p> +<p>One of the few essential requirements for a <em>writer</em> is some spell checking functionality. Sad but true, this + is enough to leave the most popular multi-purpose programming editor out: programmers don’t need a spell + checker, a highlighter for their favourite language is more than enough. <br /> + I will not mention all the applications I tried to find the Perfect Editor, and I’ll just focus on the + programs I ended up using in the end. Some may be well known, others may not, anyway, here we go.</p> +<p style="float:left;"><img src="/img/pictures/wp/bill.jpg" alt="" /></p> +<p><a href="http://www.microsoft.com/office/preview/default.mspx">Word 2007 Beta 2</a> – Yes, I know that + OpenOffice is free and OO Writer works great, but perhaps at work you’ll be asked to use MS Word. Some editors + may require that as well, and their templates may not be correctly rendered by OpenOffice, so in the end + you’ll still have to use Redmond’s most popular Word Processor – <em>if you have it</em>. If you + got it with your laptop (I didn’t) or your auntie gave you 300$ to buy it you’re all set, but if you + don’t? <br /> + Oh well, yes, OpenOffice is the right choice perhaps, but at least until February 2007 uncle Bill lets you try the + bleeding (quite literally) edge of all the commercial word processors: Word 2007 beta 2. You can download the whole + Office Suite (and more) for free, <a href="http://www.microsoft.com/office/preview/beta/overview.mspx">run</a>. I + did it yesterday and well, it’s nice to try this brand-new piece of eye candy. the interface is completely + new, you won’t find the usual drop down menu but with some imagination you’ll manage to save/create/open + a new document by clicking on the big roundy Office logo on the top left corner. More user friendly? Perhaps, once + you get used to it. It <span class="caps">STILL</span> doesn’t have a tabbed interface, so you <span + class="caps">STILL</span> have to clutter your taskbar if you want to keep more than one document open. <br /> + At any rate, it does the job, exactly in the same way as it did in the previous versions. <br /> + I use it if people ask me to, and for writing stuff which doesn’t need to be formatted with a particular + markup or style but rather look nice and have pictures embedded.</p> +<p style="float:right;"><img src="/img/pictures/wp/writely.gif" alt="" /></p> +<p>Writely – Now this is much more fun. A <em>online</em>, <span class="caps">AJAX</span>-powered word processor + recently acquired by Google. IT’s currently in closed + beta, but I was lucky enough to get an account before they closed registrations and I can invite people to use + it.<br /> + It’s nice. It’s nice if you have to work with MS Word documents or create <span class="caps">PDF</span> + files, and it supports the most essential features offered by desktop word processors, plus some more, really + convenient functionalities. <br /> + It can import MS Word documents pretty well and also any kind of text file, so that you can edit it online anytime + and anywhere. You can star, tag, archive, edit and delete your documents in a really easy way and – which is + one of its killer features – you can grant access to certain documents to collaborators for editing or + viewing. Other word processors out there offer similar features, but Writely is by far the nicest to use and perhaps + even the more advanced. I recently wrote a couple of articles about CakePHP (coming soon-ish to some online + magazines near you) and then gave access to gwoo and PhpNut for editing, so that they could check the code snippets, + in particular: it was a success. Magazine editors were happy and impressed as well.<br /> + Another really wonderful feature is <em>version support</em>. I discovered this recently: when you edit a document + and save it, Writely automatically creates a new version of it, storing the old ones as well, so that you can even + compare them to highlight differences if you wish: a great feature to keep track of the editing process and know + exactly who edited which. When I noticed it that was it, Writely has become my online <em>repository</em> for my + articles and writings.</p> +<p style="float:left;"><img src="/img/pictures/wp/cream.png" alt="" /></p> +<p>Cream – I discovered this a while ago, and it’s perhaps the + most multi-purpose editor out there. It’s built on top of Vim (respect+) but it has a friendlier interface by + default, and that’s exactly what I’m using right now for typing this post. The reasons are simple: it + supports <span class="caps">ANY</span> kind of file format and any character encoding. There’s an highlighter + for everything, including BBcode and textile, and of course you can make your own. It also includes spell checking + on-the-fly which is missing in many simple editors. <br /> + Whenever I have to write something which requires some particular formatting or markup I use Cream, it does the job + pretty well, and whenever I feel brave I can always switch to “expert” view and challenge my vi skills + ;)</p> +<p>That’s pretty much what I use for writing articles, posts, and other documents… I tried other + alternatives like RoughDraft or similar programs but I’m now really happy with these three applications. + Commercial “writer’s programs”? There are some out there, but who wants to spend 40$ or more for + something which offer less than MS Word when you can use OpenOffice and Writely for free?</p>
@@ -4,21 +4,49 @@ content-type: article
timestamp: 1149931560 tags: "frameworks|php|webdevelopment|review" ----- -<p>Someone recently added a comment to my article about <a href="http://base--/articles/rails-inspired-php-frameworks/">Rails-inspired <span class="caps">PHP</span> frameworks</a> pointing out that I forgot another Rails-like framework, in my round-up. He obviously posted a link to this rather mysterious Rails port in <span class="caps">PHP</span> and spam or not, I’d like to thank this guy for letting me know of the existance of <a href="http://base--/bookmarks/view/akelos-framework">Akelos</a>, a new <span class="caps">PHP</span> framework which seems simply too good to be true.</p> -<p style="float:left;"><img src="http://base--/img/pictures/frameworks/akelos_framework.png" alt="" /></p> -<p>Let me just spend a few words more before writing more about it though. First off, it’s not available yet. OR at least it doesn’t seem to be: the author is planning to release his work to the Open Source community but… well, he’s a bit concerned about the current “<span class="caps">PHP</span> Framework War”: he wouldn’t like to end up like <a href="http://subway.python-hosting.com/">Subway</a> or just be slagged off by those merciless reviewers who enjoy write round-ups and comparisons about frameworks. <a href="http://www.bermi.org/page/about_me">Bermi Ferrer</a> is “just” a talented <span class="caps">PHP</span> developer who decided to create his own framework and he really enjoyed doing so, nothing more, nothing less.</p> -<p><em>“I considered other <span class="caps">PHP</span> ports of Ruby on Rails, but we could not find all we needed on them. One feature that I needed on the core was internationalization and Unicode support, so I decided to roll my own framework trying to keep most of the original rails interface so most of its documentation could work for it.”</em></p> -<p>Where did I hear that? Nothing new: it’s always the same story of frameworks not being as we want them to be etc., it’s human. And yes, it’s <em><strong>another</strong></em> attempt to port Ruby on Rails to <span class="caps">PHP</span>, and a damn good one — or so it seems.</p> -<p><small>Before proceeding any further, I’d like to write a short warning for a few people who may or may not want to pop in and start commenting about the Rails-is-better-than-any-<span class="caps">PHP</span>-clone issue: <strong>If I see a single comment slagging off this framework (or any other) only because it’s a port of Rails to <span class="caps">PHP</span>, it will be deleted, may it be David Heinemeier Hansson himself</strong>. Stop it, no seriously, I think it will be counter productive for Rails in the end: I really like RoR and I love the way it works, and yes, I think Ruby is definitely the best language to do that sort of things, <span class="caps">EVERYBODY</span> <span class="caps">KNOWS</span> <span class="caps">THAT</span>. Please, please, save us poor <span class="caps">PHP</span> developers the usual preaching.</small></p> -<p style="float:right;"><img src="http://base--/img/pictures/frameworks/bermi_ferrer.png" alt="" /></p> -<p>Right, back to Akelos now. Curious as I am I immediately checked out the official page and all i found was a pretty long list of features which made me dribble, literally… ooops!</p> +<p>Someone recently added a comment to my article about <a + href="/articles/rails-inspired-php-frameworks/">Rails-inspired <span class="caps">PHP</span> frameworks</a> + pointing out that I forgot another Rails-like framework, in my round-up. He obviously posted a link to this rather + mysterious Rails port in <span class="caps">PHP</span> and spam or not, I’d like to thank this guy for letting + me know of the existence of Akelos, a new <span class="caps">PHP</span> framework which seems simply too good to be + true.</p> +<p style="float:left;"><img src="/img/pictures/frameworks/akelos_framework.png" alt="" /></p> +<p>Let me just spend a few words more before writing more about it though. First off, it’s not available yet. OR + at least it doesn’t seem to be: the author is planning to release his work to the Open Source community + but… well, he’s a bit concerned about the current “<span class="caps">PHP</span> Framework + War”: he wouldn’t like to end up like <a href="http://subway.python-hosting.com/">Subway</a> or just be + slagged off by those merciless reviewers who enjoy write round-ups and comparisons about frameworks. <a + href="http://www.bermi.org/page/about_me">Bermi Ferrer</a> is “just” a talented <span + class="caps">PHP</span> developer who decided to create his own framework and he really enjoyed doing so, + nothing more, nothing less.</p> +<p><em>“I considered other <span class="caps">PHP</span> ports of Ruby on Rails, but we could not find all we + needed on them. One feature that I needed on the core was internationalization and Unicode support, so I decided + to roll my own framework trying to keep most of the original rails interface so most of its documentation could + work for it.”</em></p> +<p>Where did I hear that? Nothing new: it’s always the same story of frameworks not being as we want them to be + etc., it’s human. And yes, it’s <em><strong>another</strong></em> attempt to port Ruby on Rails to <span + class="caps">PHP</span>, and a damn good one — or so it seems.</p> +<p><small>Before proceeding any further, I’d like to write a short warning for a few people who may or may not + want to pop in and start commenting about the Rails-is-better-than-any-<span class="caps">PHP</span>-clone + issue: <strong>If I see a single comment slagging off this framework (or any other) only because it’s a + port of Rails to <span class="caps">PHP</span>, it will be deleted, may it be David Heinemeier Hansson + himself</strong>. Stop it, no seriously, I think it will be counter productive for Rails in the end: I + really like RoR and I love the way it works, and yes, I think Ruby is definitely the best language to do that + sort of things, <span class="caps">EVERYBODY</span> <span class="caps">KNOWS</span> <span + class="caps">THAT</span>. Please, please, save us poor <span class="caps">PHP</span> developers the usual + preaching.</small></p> +<p style="float:right;"><img src="/img/pictures/frameworks/bermi_ferrer.png" alt="" /></p> +<p>Right, back to Akelos now. Curious as I am I immediately checked out the official page and all i found was a pretty + long list of features which made me dribble, literally… ooops!</p> <p>Let’s just quote the most juicy ones, shall we?</p> <p>Active Record [“Model”]</p> <ul> <li>Associations</li> <li>Callbacks</li> <li><strong>Transactions</strong></li> - <li><strong>Finders</strong> [ <code>$Project->findFirstBy('language AND start_year:greater', 'PHP', '2004');</code> ]</li> + <li><strong>Finders</strong> [ + <code>$Project->findFirstBy('language AND start_year:greater', 'PHP', '2004');</code> ] + </li> <li>Versioning</li> <li>…</li> </ul>@@ -44,21 +72,33 @@ </ul>
<p>And then more Akelos-only goodies:</p> <ul> <li><strong>Multilingual Models and Views</strong></li> - <li><strong>Locale alias integrated on <span class="caps">URLS</span> (example.com/spanish will load the es_ES locale)</strong></li> + <li><strong>Locale alias integrated on <span class="caps">URLS</span> (example.com/spanish will load the es_ES + locale)</strong></li> <li>Database migrations using DB Designer files</li> <li><strong>Pure <span class="caps">PHP</span> support for Unicode (no extensions required)</strong></li> <li><strong>Unit Tested source code</strong></li> <li>Code Generators</li> <li>Built in <span class="caps">XHTML</span> validator</li> <li>Automated locale management</li> - <li><strong>Clean separation from <span class="caps">HTML</span> and Javascript using <span class="caps">CSS</span> event selectors.</strong></li> + <li><strong>Clean separation from <span class="caps">HTML</span> and Javascript using <span class="caps">CSS</span> + event selectors.</strong></li> <li>Ajax file uploads</li> <li><strong><span class="caps">AFLAX</span> integration</strong></li> <li>Dojo Rich Text Editor</li> <li>Format converters</li> - <li>File handling using <span class="caps">SFTP</span> for shared host running Apache as user nobody (as most CPanel server do)</li> + <li>File handling using <span class="caps">SFTP</span> for shared host running Apache as user nobody (as most CPanel + server do)</li> <li><strong>Distributed sessions using databases</strong></li> </ul> -<p>Impressed? I was, honest. And I’m talking as a CakePHP fanatic here, and I must say that if this framework can really offer all this <em>and</em> — and this is what really matters — is also as simple as Cake to learn and well performing… well, this is definitely going to be quite a promising player in the “<span class="caps">PHP</span> Framework War” (but is not a real war, is it?), although the author is quite worried about that:</p> -<p><em>“I’m also concerned about the <span class="caps">PHP</span> Framework war, I don’t want to play that game. Building this Framework was a great experience, it works great for me and it has helped me to become a better programmer so I don’t want to spend my time discussing about if this is better or not than other solutions. That’s the reason I’ll first look for great developers interested in the Framework to help me releasing it.”</em></p> -<p>Really, this will be an interesting project to check out, once it goes open source, and yes, I really wish Bermi all the best. Good luck, <a href="http://www.bermi.org/projects/akelos_framework">Akelos Framework</a>.</p> +<p>Impressed? I was, honest. And I’m talking as a CakePHP fanatic here, and I must say that if this framework can + really offer all this <em>and</em> — and this is what really matters — is also as simple as Cake to + learn and well performing… well, this is definitely going to be quite a promising player in the “<span + class="caps">PHP</span> Framework War” (but is not a real war, is it?), although the author is quite + worried about that:</p> +<p><em>“I’m also concerned about the <span class="caps">PHP</span> Framework war, I don’t want to play + that game. Building this Framework was a great experience, it works great for me and it has helped me to become + a better programmer so I don’t want to spend my time discussing about if this is better or not than other + solutions. That’s the reason I’ll first look for great developers interested in the Framework to + help me releasing it.”</em></p> +<p>Really, this will be an interesting project to check out, once it goes open source, and yes, I really wish Bermi all + the best. Good luck, <a href="http://www.bermi.org/projects/akelos_framework">Akelos Framework</a>.</p>
@@ -5,16 +5,24 @@ timestamp: 1152688740
tags: "italy" ----- <p><em><strong>Italy has won the World Cup!</strong></em></p> -<p>It doesn’t matter if Zidane first scored on a totally unfair penalty kick at the 7th minute and then, totally out of his mind, headbutted Materazzi… WE <span class="caps">WON</span>, <span class="caps">AND</span> WE <span class="caps">KICKED</span> <span class="caps">THEIR</span> <span class="caps">ASS</span>, end of story :)</p> +<p>It doesn’t matter if Zidane first scored on a totally unfair penalty kick at the 7th minute and then, totally + out of his mind, headbutted Materazzi… WE <span class="caps">WON</span>, <span class="caps">AND</span> WE + <span class="caps">KICKED</span> <span class="caps">THEIR</span> <span class="caps">ASS</span>, end of story :)</p> <div align="center"> -<p><img src="http://base--/img/italy/worldcup.jpg" alt="" /> </div></p> + <p><img src="/img/italy/worldcup.jpg" alt="" /> +</div> +</p> <blockquote> -<p style="float:left;"><img src="http://base--/img/italy/grosso.jpg" alt="" /></p> -<p>“Italy beat France 5-3 in a penalty shoot-out to win the World Cup after an absorbing 1-1 draw in Berlin.</p> -<p style="float:right;"><img src="http://base--/img/italy/italy1.jpg" alt="" /></p> -<p>Fabio Grosso scored the winning goal after France’s David Trezeguet missed.</p> -<p>Playing his last game before retiring, Zinedine Zidane’s career ended in disgrace after he was sent off for crazily headbutting Marco Materazzi.</p> -<p>Zidane had put France ahead early on with a coolly-taken chipped penalty, before Materazzi levelled with a header from an Andrea Pirlo corner.<br /> -The result caps an incredible period for Italian football, with the domestic game embroiled in a corruption scandal similar to 1982 when they last won the World Cup. "</p> + <p style="float:left;"><img src="/img/italy/grosso.jpg" alt="" /></p> + <p>“Italy beat France 5-3 in a penalty shoot-out to win the World Cup after an absorbing 1-1 draw in Berlin. + </p> + <p style="float:right;"><img src="/img/italy/italy1.jpg" alt="" /></p> + <p>Fabio Grosso scored the winning goal after France’s David Trezeguet missed.</p> + <p>Playing his last game before retiring, Zinedine Zidane’s career ended in disgrace after he was sent off for + crazily headbutting Marco Materazzi.</p> + <p>Zidane had put France ahead early on with a coolly-taken chipped penalty, before Materazzi levelled with a header + from an Andrea Pirlo corner.<br /> + The result caps an incredible period for Italian football, with the domestic game embroiled in a corruption + scandal similar to 1982 when they last won the World Cup. "</p> </blockquote> <p><a href="http://news.bbc.co.uk/sport2/hi/football/world_cup_2006/4991652.stm">Read More</a></p>
@@ -4,23 +4,47 @@ content-type: article
timestamp: 1153789620 tags: "website|cakephp" ----- -<p>Quite a bit of time passed since the last blog post, and I’m actually sorry about that, but as I thought, I don’t have as much free time as I used to be. Work is work, after all!<br /> -This post will be multipurpose as actually I bluid up a few things to write about in the last few days… erhm, ok, <em>weeks</em>.</p> +<p>Quite a bit of time passed since the last blog post, and I’m actually sorry about that, but as I thought, I + don’t have as much free time as I used to be. Work is work, after all!<br /> + This post will be multipurpose as actually I bluid up a few things to write about in the last few days… erhm, + ok, <em>weeks</em>.</p> <h3>New Website Design</h3> -<p>Something different eh? Yep, definitely! Some time ago I started a small project called <a href="http://base--/projects/view/h3rald-redesign">h3raLd.com Re-design</a> hoping that some <span class="caps">GFX</span> guru could provide a new template for this website, and actually in the end I decided to accept the work of <em><strong>Bartus F. Teipel</strong></em> a Brazilian CakePHP enthusiast.<br /> -Bartus is obviously (<span class="caps">MUCH</span>) more talented than me when it comes to design, and I was amazed at the quality of the template he provided, in a really short time. <br /> -Unfortunately he didn’t yet provide a link to his main website/portfolio, but for now all I can show you is his website for party pics, <a href="http://www.circuscircus.com.br/">CircusCircus</a>.</p> -<p>The new template sports a more contemporary Web2.0-ish look which I like a lot, and Bartus used libraries like <a href="http://prototype.conio.net/">prototype</a>, <a href="http://moofx.mad4milk.net/">moo.fx</a> and <a href="http://www.html.it/articoli/niftycube/index.html">Nifty Corners Cube</a> for the <span class="caps">AJAX</span> effects and functionalities. <br /> -A really outstanding work, thanks Bartus!</p> +<p>Something different eh? Yep, definitely! Some time ago I started a small project called <a + href="/projects/view/h3rald-redesign">h3raLd.com Re-design</a> hoping that some <span class="caps">GFX</span> + guru could provide a new template for this website, and actually in the end I decided to accept the work of + <em><strong>Bartus F. Teipel</strong></em> a Brazilian CakePHP enthusiast.<br /> + Bartus is obviously (<span class="caps">MUCH</span>) more talented than me when it comes to design, and I was amazed + at the quality of the template he provided, in a really short time. <br /> + Unfortunately he didn’t yet provide a link to his main website/portfolio, but for now all I can show you is + his website for party pics, <a href="http://www.circuscircus.com.br/">CircusCircus</a>. +</p> +<p>The new template sports a more contemporary Web2.0-ish look which I like a lot, and Bartus used libraries like <a + href="http://prototype.conio.net/">prototype</a>, <a href="http://moofx.mad4milk.net/">moo.fx</a> and <a + href="http://www.html.it/articoli/niftycube/index.html">Nifty Corners Cube</a> for the <span + class="caps">AJAX</span> effects and functionalities. <br /> + A really outstanding work, thanks Bartus!</p> <h3>The CakePHP Herald project has been completed</h3> -<p>With my <a href="http://www.h3rald.com/articles/view/cakephp-first-bite/">latest article</a> about CakePHP published on SitePoint, the <a href="http://base--/projects/view/cakephp-herald/">CakePHP Herald</a> project was completed.<br /> -I must say that I really enjoyed writing all those articles about CakePHP, and the only thing I regret is not to have written anything (yet) about some more advanced topic about CakePHP. This was mostly due to – again – lack of time to focus on advanced topic and produce some quality examples.</p> -<p>However, judging by the positive feedback I received about the articles, I am really happy of the final result: even more people discovered the power of CakePHP and became <em>bakers</em>. Happy baking to all of you!</p> -<p><em>So… no more articles about Cake?</em> Maybe not for a while, I think I’ll be rather busy in the following months. Curious? Read on :-)</p> +<p>With my <a href="/articles/cakephp-first-bite/">latest article</a> about CakePHP published + on SitePoint, the CakePHP Herald project was completed.<br /> + I must say that I really enjoyed writing all those articles about CakePHP, and the only thing I regret is not to + have written anything (yet) about some more advanced topic about CakePHP. This was mostly due to – again + – lack of time to focus on advanced topic and produce some quality examples.</p> +<p>However, judging by the positive feedback I received about the articles, I am really happy of the final result: even + more people discovered the power of CakePHP and became <em>bakers</em>. Happy baking to all of you!</p> +<p><em>So… no more articles about Cake?</em> Maybe not for a while, I think I’ll be rather busy in the + following months. Curious? Read on :-)</p> <h3>My biggest and most important project</h3> -<p>I actually got really pissed off with Larry, Garret & the other Master Bakers because of what they wrote on the <a href="http://cakeforge.org/forum/forum.php?forum_id=244">announcement</a> for the latest CakePHP release:</p> +<p>I actually got really pissed off with Larry, Garret & the other Master Bakers because of what they wrote on the + <a href="http://cakeforge.org/forum/forum.php?forum_id=244">announcement</a> for the latest CakePHP release: +</p> <blockquote> -<p>“[…]In other news, some new articles were published on Sitepoint <sup class="footnote" id="fnr3"><a href="#fn3">3</a></sup> and in the International <span class="caps">PHP</span> magazine <sup class="footnote" id="fnr4"><a href="#fn4">4</a></sup>. Fabio Cevasco <sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup> is the man behind these articles. Together with Fabio, we will be writing a book that will be published […]”</p> + <p>“[…]In other news, some new articles were published on Sitepoint <sup class="footnote" id="fnr3"><a + href="#fn3">3</a></sup> and in the International <span class="caps">PHP</span> magazine <sup + class="footnote" id="fnr4"><a href="#fn4">4</a></sup>. Fabio Cevasco <sup class="footnote" id="fnr5"><a + href="#fn5">5</a></sup> is the man behind these articles. Together with Fabio, we will be writing a book + that will be published […]”</p> </blockquote> -<p>After all this time I spent <em>trying desperately not to say a word about it</em> they came out and heralded it out of nowhere. Sigh… they ruined the surprise effect! Oh well, it’s too late now, isn’t it?</p> -<p>So yes, when I say that I’m spending at least 60% of my time (at work and at home) writing I really mean it. The rest? Well, I do have a lovely girlfriend after all!!!</p> +<p>After all this time I spent <em>trying desperately not to say a word about it</em> they came out and heralded it out + of nowhere. Sigh… they ruined the surprise effect! Oh well, it’s too late now, isn’t it?</p> +<p>So yes, when I say that I’m spending at least 60% of my time (at work and at home) writing I really mean it. + The rest? Well, I do have a lovely girlfriend after all!!!</p>
@@ -4,19 +4,37 @@ content-type: article
timestamp: 1154475180 tags: "frameworks|php|webdevelopment|review" ----- -<p>Bermi Ferrer kept his promise, and even if a few were skeptic on the <a href="http://base--/blog/view/34/">pre-announced</a> features of his upcoming Akelos framework, last week he sent me a “development preview” and a few days ago he opened the development <span class="caps">SVN</span> repository to the public:</p> +<p>Bermi Ferrer kept his promise, and even if a few were skeptic on the <a href="/articles/34/">pre-announced</a> + features of his upcoming Akelos framework, last week he sent me a “development preview” and a few days + ago he opened the development <span class="caps">SVN</span> repository to the public:</p> <p><a href="svn://akelos.org/trunk" target="_blank">svn://akelos.org/trunk</a></p> <p>Go, get it: it’s worthwhile (see below).</p> -<p>“[…] The Akelos Framework is an open-source port of Ruby on Rails to the <span class="caps">PHP</span> programming language.<br /> -The main goal of the Akelos Framework is to help programmers to build multilingual database-backed web applications according to the Model-View-Control pattern. It lets you write less code by favoring conventions over configuration.”</p> -<p>At the Akelos Framework Features page you can find detailed information about what has been already implemented into the framework.</p> +<p>“[…] The Akelos Framework is an open-source port of Ruby on Rails to the <span class="caps">PHP</span> + programming language.<br /> + The main goal of the Akelos Framework is to help programmers to build multilingual database-backed web applications + according to the Model-View-Control pattern. It lets you write less code by favoring conventions over + configuration.”</p> +<p>At the Akelos Framework Features page you can find detailed information about what has been already implemented into + the framework.</p> </blockquote> -<p>I think it says it all, well almost. Some people will undoubtedly be disgusted by yet-another-hopeless-Rails-clone: <em>not again!</em> I hear them crying…</p> -<p>Well, yeah, I think this – to be honest – should be the last attempt someone makes to port Rails to <span class="caps">PHP</span> or at least port <em>some features and the overall philosophy</em>, like <a href="http://base--/bookmarks/view/cakephp">CakePHP</a> did: there are honestly too many for one single language. Look at Python, <a href="http://www.djangoproject.com/">Django</a> seems to be the only “Rails-inspired” framework available and everyone is happy with it, while as a general rule <span class="caps">PHP</span> folks are never happy with what they already got.</p> -<p>Bermi is undoubtedly one of them, and that’s the reason he decided to code his very own Rails-inspired framework for <span class="caps">PHP</span>, which is, to date, the most remarkable of the ones I left out (it wasn’t available at the time) in my <a href="http://base--/articles/rails-inspired-php-frameworks/">article</a>.</p> +<p>I think it says it all, well almost. Some people will undoubtedly be disgusted by yet-another-hopeless-Rails-clone: + <em>not again!</em> I hear them crying… +</p> +<p>Well, yeah, I think this – to be honest – should be the last attempt someone makes to port Rails to <span + class="caps">PHP</span> or at least port <em>some features and the overall philosophy</em>, like CakePHP did: + there are honestly too many for one single language. Look at + Python, <a href="http://www.djangoproject.com/">Django</a> seems to be the only “Rails-inspired” + framework available and everyone is happy with it, while as a general rule <span class="caps">PHP</span> folks are + never happy with what they already got.</p> +<p>Bermi is undoubtedly one of them, and that’s the reason he decided to code his very own Rails-inspired + framework for <span class="caps">PHP</span>, which is, to date, the most remarkable of the ones I left out (it + wasn’t available at the time) in my <a href="/articles/rails-inspired-php-frameworks/">article</a>.</p> <h3>Confirmed Features & Contents</h3> -<p>So well, although I didn’t really have a proper chance to play with Akelos I can certainly herald some of its – verified, this time – features.</p> -<p>For one, it’s huge. Take Cake, add <em>every excellent, useful third party library or class you can possibly thing of</em> and you’ll get Akelos. No kidding. The unzipped source of the whole framework is a massive 16MB, 8.5 of which constitute the <code>vendors</code> folder. What’s in it? Well, all this:</p> +<p>So well, although I didn’t really have a proper chance to play with Akelos I can certainly herald some of its + – verified, this time – features.</p> +<p>For one, it’s huge. Take Cake, add <em>every excellent, useful third party library or class you can possibly + thing of</em> and you’ll get Akelos. No kidding. The unzipped source of the whole framework is a massive + 16MB, 8.5 of which constitute the <code>vendors</code> folder. What’s in it? Well, all this:</p> <ul> <li>ADOdb</li> <li>Domit</li>@@ -31,7 +49,8 @@ <li>SimpleTest</li>
<li>A Simple <span class="caps">PHP</span> <span class="caps">YAML</span> Class</li> <li>Textile</li> </ul> -<p>Then, similarly, all the state-of-the-art Javascript/<span class="caps">AJAX</span> hyper-hyped libraries are included:</p> +<p>Then, similarly, all the state-of-the-art Javascript/<span class="caps">AJAX</span> hyper-hyped libraries are + included:</p> <ul> <li><span class="caps">AFLAX</span></li> <li>Behaviour</li>@@ -42,8 +61,11 @@ <li>FileUploader (by the author, using prototype)</li>
<li>Window</li> <li>EventSelectors</li> </ul> -<p style="float:left;"><img src="http://base--/img/pictures/frameworks/akelos_framework_logo.gif" alt="" /></p> -<p>Good, well, kind of: that’s just what <em>others</em> did, but it’s worth noting that it’s all there and – apparently – integrated with the framework, hopefully not too tightly. But people are fussy, and do not get excited easily anymore, long gone are the early days of Rails, when the whole Internet shake at hearing about <em>code generators</em>… Aye, there are in Akelos as well, of course!</p> +<p style="float:left;"><img src="/img/pictures/frameworks/akelos_framework_logo.gif" alt="" /></p> +<p>Good, well, kind of: that’s just what <em>others</em> did, but it’s worth noting that it’s all + there and – apparently – integrated with the framework, hopefully not too tightly. But people are fussy, + and do not get excited easily anymore, long gone are the early days of Rails, when the whole Internet shake at + hearing about <em>code generators</em>… Aye, there are in Akelos as well, of course!</p> <p>Coming to the more juicy stuff, <em>lo’ and behold, ye contents of /lib folder (with comments):</em></p> <ul> <li>AkActionController (controller)</li>@@ -54,16 +76,17 @@ <li>AkAdodbCache (content caching)</li>
<li>AkCharset (utf8 support, includes <em>all</em> mappings)</li> <li>AkConfig (load config settings)</li> <li>AkConverters (conversions!) - <ul> - <li>DBDesigner > AkelosDatabaseDesign</li> - <li>Excel > Array (bi-dimensional)</li> - <li>Excel > <span class="caps">CSV</span></li> - <li><span class="caps">HTML</span> > <span class="caps">RTF</span></li> - <li><span class="caps">HTML</span> > Text</li> - <li>Word > Unicode</li> - <li><span class="caps">PDF</span> > Text</li> - <li>Xdoc > Text</li> - </ul></li> + <ul> + <li>DBDesigner > AkelosDatabaseDesign</li> + <li>Excel > Array (bi-dimensional)</li> + <li>Excel > <span class="caps">CSV</span></li> + <li><span class="caps">HTML</span> > <span class="caps">RTF</span></li> + <li><span class="caps">HTML</span> > Text</li> + <li>Word > Unicode</li> + <li><span class="caps">PDF</span> > Text</li> + <li>Xdoc > Text</li> + </ul> + </li> <li>AkHeaders (<span class="caps">HTTP</span> headers, redirections)</li> <li>AkImages (Image operations, resizing)</li> <li>AkLocalize (Localization, countries and timezones)</li>@@ -75,10 +98,20 @@ <li>AkRouter</li>
<li>AkZip</li> <li>…</li> </ul> -<p>Well, it’s all there, at any rate. The best way to know if it all works, and <em>how</em> it works, is simply to try it out: <a href="http://www.akelos.org/">www.akelos.org</a>.</p> +<p>Well, it’s all there, at any rate. The best way to know if it all works, and <em>how</em> it works, is simply + to try it out: <a href="http://www.akelos.org/">www.akelos.org</a>.</p> <h3>Remarks</h3> -<p>As I said earlier, Akelos looks like <em>CakePHP on steroids</em>: agreed, the Cake philosophy of “no we-may-use-it code in the trunk” has been <em>completely</em> (and intentionally) ignored, but this is our chance to peek at what CakePHP could have become if such philosophy didn’t become a lifestyle for the Cake Dev Team. <br /> -Akelos code is Rails-inspired, so yes, it’s <em>very</em> similar to Cake, although with some rough edges and some re-used parts, but it’s the work of <span class="caps">ONE</span> person with no community support (yet), don’t forget. Remarkable.</p> +<p>As I said earlier, Akelos looks like <em>CakePHP on steroids</em>: agreed, the Cake philosophy of “no + we-may-use-it code in the trunk” has been <em>completely</em> (and intentionally) ignored, but this is our + chance to peek at what CakePHP could have become if such philosophy didn’t become a lifestyle for the Cake Dev + Team. <br /> + Akelos code is Rails-inspired, so yes, it’s <em>very</em> similar to Cake, although with some rough edges and + some re-used parts, but it’s the work of <span class="caps">ONE</span> person with no community support (yet), + don’t forget. Remarkable.</p> <p>And he needs co-developers, by the looks of it, so there you are then: there’s <em>your</em> chance!</p> -<p>My personal opinion about it? Well, I think Akelos can learn from CakePHP and vice-versa: a merge? Well, at least it would reduce the number of Rails-inspired framework for <span class="caps">PHP</span> and <em>possibly</em> meet the needs of more people: those who want just the essentials, as a framework, and those who like to be <em>virtually almighty</em> and be able to do anything, <em>if they wanted to</em>.</p> -<p>Two flavours of the same framework? <em>CakePHP</em> and <em>cAkePHP</em> (note the case)? Bah, let’s stop raving now, shall we?</p> +<p>My personal opinion about it? Well, I think Akelos can learn from CakePHP and vice-versa: a merge? Well, at least it + would reduce the number of Rails-inspired framework for <span class="caps">PHP</span> and <em>possibly</em> meet the + needs of more people: those who want just the essentials, as a framework, and those who like to be <em>virtually + almighty</em> and be able to do anything, <em>if they wanted to</em>.</p> +<p>Two flavours of the same framework? <em>CakePHP</em> and <em>cAkePHP</em> (note the case)? Bah, let’s stop + raving now, shall we?</p>
@@ -4,19 +4,56 @@ content-type: article
timestamp: 1158551460 tags: "web20|ajax|review" ----- -<p>The so-called “<span class="caps">AJAX</span> Start Pages” are not a new concept anymore, and like for almost any other offspring of Web 2.0 there is more than one to chose from. Hence the increasing number of comparative reviews on the Web nowadays (Yes, I’m guilty of that too). I soon learnt that for any “good and useful thing” on the web there are at least <em>n</em> clones: consider for example social bookmarking, community-powered news sites, php frameworks…<br /> -And no, you can’t use the word clone because it has a strong negative connotation nowadays so let’s just say that whenever someone comes up with a new idea, others examine it, process it and in a few weeks (days?) some <em>very, very similar application</em> comes out, and it’s <em>better</em> than the previous one. <br /> -Now, I don’t know exactly whether <a href="http://www.netvibes.com/">NetVibes</a> was one of the first <span class="caps">AJAX</span> Start Pages created or not, but at any rate – in my very, very, very humble opinion, is the most advanced and the most usable of <a href="http://www.techcrunch.com/2005/12/07/ajax-desktops-wont-stop/">the lot</a>, and an essential tool for lazy folks like me who want to keep up-to-date with what’s going on without having to visit dozen of websites everyday.</p> -<p style="float:left;"><img src="http://base--/img/pictures/netvibes.jpg" alt="" /></p> -<p>I can see people jumping up and down shouting “Pageflakes is better”, “Protopage kicks a$$” etc. etc. Well, yes, probably, as you like: different people like different things, and when it comes to <span class="caps">AJAX</span> Start Pages there’s really a lot to choose from: 3spots has an excellent (and complete, I believe) <a href="http://3spots.blogspot.com/2006/03/ajax-or-flash-startpages-or-homepages.html">list</a> of all the start pages currently available on the Net, so yes, you can try them out yourself and make out your mind :)</p> +<p>The so-called “<span class="caps">AJAX</span> Start Pages” are not a new concept anymore, and like for + almost any other offspring of Web 2.0 there is more than one to chose from. Hence the increasing number of + comparative reviews on the Web nowadays (Yes, I’m guilty of that too). I soon learnt that for any “good + and useful thing” on the web there are at least <em>n</em> clones: consider for example social bookmarking, + community-powered news sites, php frameworks…<br /> + And no, you can’t use the word clone because it has a strong negative connotation nowadays so let’s just + say that whenever someone comes up with a new idea, others examine it, process it and in a few weeks (days?) some + <em>very, very similar application</em> comes out, and it’s <em>better</em> than the previous one. <br /> + Now, I don’t know exactly whether <a href="http://www.netvibes.com/">NetVibes</a> was one of the first <span + class="caps">AJAX</span> Start Pages created or not, but at any rate – in my very, very, very humble + opinion, is the most advanced and the most usable of <a + href="http://www.techcrunch.com/2005/12/07/ajax-desktops-wont-stop/">the lot</a>, and an essential tool for lazy + folks like me who want to keep up-to-date with what’s going on without having to visit dozen of websites + everyday.</p> +<p style="float:left;"><img src="/img/pictures/netvibes.jpg" alt="" /></p> +<p>I can see people jumping up and down shouting “Pageflakes is better”, “Protopage kicks a$$” + etc. etc. Well, yes, probably, as you like: different people like different things, and when it comes to <span + class="caps">AJAX</span> Start Pages there’s really a lot to choose from: 3spots has an excellent (and + complete, I believe) <a + href="http://3spots.blogspot.com/2006/03/ajax-or-flash-startpages-or-homepages.html">list</a> of all the start + pages currently available on the Net, so yes, you can try them out yourself and make out your mind :)</p> <p>I made up my mind long ago after experimenting a few of those. Why Netvibes? OK, let’s see:</p> <ol> - <li><strong>Fast to load</strong>: Netvibes is fast. Relatively fast, of course, for sure is not as fast as a plain, old-style html page, but I think it’s perhaps one of the fastest <span class="caps">AJAX</span> start pages ever created. As they <a href="http://blog.netvibes.com/?2006/08/17/75-the-future-of-netvibes">pointed out</a>, with a 15 million investment performance can only get better…</li> - <li><strong>Tabbed pages</strong>: After tabbed browsing, tabs within a single page seem to gain popularity. Netvibes allows you to create more than one page to prevent cluttering and general chaos: you can create a tab for CakePHP feeds, one for some cute <span class="caps">AJAX</span> widgets you’ll never use, another for al that Web 2.0 rubbish you’ll never read — that’s what I do at least.</li> - <li><strong>Smart Google Module</strong>: Finally Netvibes has a <em>proper</em> Google search module, which enable users to search with Google and view results <em>on Netvibes</em> instead of opening up a browser tab.</li> - <li><strong><span class="caps">RSS</span> done right</strong>: Their <span class="caps">RSS</span> reader is nice: by clicking on a feed title it opens up a <em>virtual window</em> inside the page with the whole story and a menu with links to the other stories included in the feed. This is the most convenient way to read whole articles like TechCrunch’s ones without leaving the page (and without loading the heavy TechCrunch UI).</li> - <li><strong>Public <span class="caps">API</span> for modules</strong>: For those who – unlike me – has some proper free time and would like to develop their own module, the <a href="http://eco.netvibes.com/developers/">Netvibes Mini Module <span class="caps">API</span></a> is public…</li> - <li><strong>Ecosystem</strong> : Netvibes <a href="http://eco.netvibes.com/">Ecosystem</a> includes hundreds of modules and podcasts and thousands of feeds and tabs which can be integrated into any Netvibes page with a single click. Some of my favourites: <a href="http://eco.netvibes.com/modules/3492/xe.com-currency-converter">XE</a> Currency Converter, <a href="http://eco.netvibes.com/modules/3709/quick-translator">Quick Translator</a>, <a href="http://eco.netvibes.com/modules/6776/google-map">Google Map</a> <a href="http://eco.netvibes.com/modules/91/daily-cartoons">Daily Cartoons</a> and <a href="http://eco.netvibes.com/modules/6/bitty-browser">Bitty Browser</a>. <br /> -CakePHP feeds? <a href="http://eco.netvibes.com/?type=all&q=cakephp">Loads</a>!</li> + <li><strong>Fast to load</strong>: Netvibes is fast. Relatively fast, of course, for sure is not as fast as a plain, + old-style html page, but I think it’s perhaps one of the fastest <span class="caps">AJAX</span> start + pages ever created. As they <a href="http://blog.netvibes.com/?2006/08/17/75-the-future-of-netvibes">pointed + out</a>, with a 15 million investment performance can only get better…</li> + <li><strong>Tabbed pages</strong>: After tabbed browsing, tabs within a single page seem to gain popularity. + Netvibes allows you to create more than one page to prevent cluttering and general chaos: you can create a tab + for CakePHP feeds, one for some cute <span class="caps">AJAX</span> widgets you’ll never use, another for + al that Web 2.0 rubbish you’ll never read — that’s what I do at least.</li> + <li><strong>Smart Google Module</strong>: Finally Netvibes has a <em>proper</em> Google search module, which enable + users to search with Google and view results <em>on Netvibes</em> instead of opening up a browser tab.</li> + <li><strong><span class="caps">RSS</span> done right</strong>: Their <span class="caps">RSS</span> reader is nice: + by clicking on a feed title it opens up a <em>virtual window</em> inside the page with the whole story and a + menu with links to the other stories included in the feed. This is the most convenient way to read whole + articles like TechCrunch’s ones without leaving the page (and without loading the heavy TechCrunch UI). + </li> + <li><strong>Public <span class="caps">API</span> for modules</strong>: For those who – unlike me – has + some proper free time and would like to develop their own module, the <a + href="http://eco.netvibes.com/developers/">Netvibes Mini Module <span class="caps">API</span></a> is + public…</li> + <li><strong>Ecosystem</strong> : Netvibes <a href="http://eco.netvibes.com/">Ecosystem</a> includes hundreds of + modules and podcasts and thousands of feeds and tabs which can be integrated into any Netvibes page with a + single click. Some of my favourites: <a + href="http://eco.netvibes.com/modules/3492/xe.com-currency-converter">XE</a> Currency Converter, <a + href="http://eco.netvibes.com/modules/3709/quick-translator">Quick Translator</a>, <a + href="http://eco.netvibes.com/modules/6776/google-map">Google Map</a> <a + href="http://eco.netvibes.com/modules/91/daily-cartoons">Daily Cartoons</a> and <a + href="http://eco.netvibes.com/modules/6/bitty-browser">Bitty Browser</a>. <br /> + CakePHP feeds? <a href="http://eco.netvibes.com/?type=all&q=cakephp">Loads</a>!</li> </ol> <p>Enough?</p>
@@ -4,19 +4,33 @@ content-type: article
timestamp: 1162441500 tags: "cakephp|writing" ----- -<p>Despite all my efforts to keep the whole thing quiet for the time being, a few days ago I entered the words “CakePHP Recipes” in Google and discovered – to my astonishment – that my new book about the CakePHP framework is already for (pre)sale in many popular online bookstores.</p> -<p>Up to now I never made any formal announcement myself (although the Cake Software Foundation already did, months ago), nor gave out any juicy details about it, but maybe now the time has come to post something more about it. Yes, I am indeed writing a book about the CakePHP framework, and yes, you can already buy it but no, you can’t phisically get it simply because it’s still in progress (miracles of the modern publishing industry!).</p> -<p style="float:left;"><img src="http://base--/img/cakephp-recipes/cover.jpg" alt="" /></p> -<p>I’d like to point out that I’m not the <em>only</em> author of the book: all the code examples and snippets included in the book is provided by the Cake Software Foundation staff, in the person of Larry E. Masters and Garrett J. Woodworth mainly, who will also act as technical editors and first reviewers of the book, together with other trusthworthy CakePHP core developers.<br /> -It is our intent to produce an enjoyable and yet very useful book which will hopefully help CakePHP enthusiasts to use the framework in real-world situations: the book will not focus on theory but on practice, by providing a lot of interesting “recipes” on how to implement a particular functionality in a CakePHP web application.</p> +<p>Despite all my efforts to keep the whole thing quiet for the time being, a few days ago I entered the words + “CakePHP Recipes” in Google and discovered – to my astonishment – that my new book about the + CakePHP framework is already for (pre)sale in many popular online bookstores.</p> +<p>Up to now I never made any formal announcement myself (although the Cake Software Foundation already did, months + ago), nor gave out any juicy details about it, but maybe now the time has come to post something more about it. Yes, + I am indeed writing a book about the CakePHP framework, and yes, you can already buy it but no, you can’t + phisically get it simply because it’s still in progress (miracles of the modern publishing industry!).</p> +<p style="float:left;"><img src="/img/cakephp-recipes/cover.jpg" alt="" /></p> +<p>I’d like to point out that I’m not the <em>only</em> author of the book: all the code examples and + snippets included in the book is provided by the Cake Software Foundation staff, in the person of Larry E. Masters + and Garrett J. Woodworth mainly, who will also act as technical editors and first reviewers of the book, together + with other trusthworthy CakePHP core developers.<br /> + It is our intent to produce an enjoyable and yet very useful book which will hopefully help CakePHP enthusiasts to + use the framework in real-world situations: the book will not focus on theory but on practice, by providing a lot of + interesting “recipes” on how to implement a particular functionality in a CakePHP web application.</p> <p>Why should you get it? Here are some reasons:</p> <ul> <li>It is a book written <em>by</em> programmers <em>for</em> programmers</li> <li>All the code included in the book has been created and tested by the creators of the framework</li> - <li>Part of all the revenues generated by the book (including royalties) will go to the Cake Software Foundation, and hopefully contribute to improve our already excellent framework.</li> + <li>Part of all the revenues generated by the book (including royalties) will go to the Cake Software Foundation, + and hopefully contribute to improve our already excellent framework.</li> </ul> -<p>Very special thanks to <a href="http://www.peachpit.com/">Peachpit Press</a> for giving me and the Cake Software Foundation this chance to</p> +<p>Very special thanks to <a href="http://www.peachpit.com/">Peachpit Press</a> for giving me and the Cake Software + Foundation this chance to</p> <p>More to come…</p> <blockquote> -<p><strong><span class="caps">UPDATE</span></strong>: This book <a href="http://www.h3rald.com/blog/42">has been canceled</a> and therefore will <span class="caps">NEVER</span> be available in bookshops or online stores.</p> + <p><strong><span class="caps">UPDATE</span></strong>: This book <a href=/articles/42">has been + canceled</a> and therefore will <span class="caps">NEVER</span> be available in bookshops or online stores. + </p> </blockquote>
@@ -4,15 +4,39 @@ content-type: article
timestamp: 1173437940 tags: "cakephp|rant|writing" ----- -<p>My fiancée keeps telling me that too many cakes are not good for me, and I never listen: I always liked cakes! I <strong>did</strong> like the CakePHP™<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup> framework too, once, and I <strong>did</strong> write <a href="http://www.h3rald.com/projects/view/cakephp-herald">some articles</a> about it in the past, and I believe at least a bunch of Bakers found them useful, especially at the time.<br /> -I do believe the Cake™ Software Foundation<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup> quite liked having their framework featured on popular websites like php|architect and SitePoint, and I believe that I contributed – to some extent – to make it one of the most popular frameworks available for the <span class="caps">PHP</span> programming language.</p> -<p>Unfortunately though someone decided that two of such articles and my personal website were no longer worth a mention on CakePHP official website frontpage. To me, this makes sense since the two CakePHP-related series which are being published by <span class="caps">IBM</span> are much more up-to-date than my articles, and thus deserve such a mention instead.</p> -<p>Oddly enough, I took a screenshot of the CakePHP website just yesterday <em>“by chance”</em> and my articles were still there:</p> -<p><img src="http://www.h3rald.com/img/pictures/cake-promo/cakephp-08032007.png" alt="" /></p> +<p>My fiancée keeps telling me that too many cakes are not good for me, and I never listen: I always liked cakes! + I <strong>did</strong> like the CakePHP™<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup> framework + too, once, and I <strong>did</strong> write some articles about it in + the past, and I believe at least a bunch of Bakers found them useful, especially at the time.<br /> + I do believe the Cake™ Software Foundation<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup> quite + liked having their framework featured on popular websites like php|architect and SitePoint, and I believe that I + contributed – to some extent – to make it one of the most popular frameworks available for the <span + class="caps">PHP</span> programming language.</p> +<p>Unfortunately though someone decided that two of such articles and my personal website were no longer worth a mention + on CakePHP official website frontpage. To me, this makes sense since the two CakePHP-related series which are being + published by <span class="caps">IBM</span> are much more up-to-date than my articles, and thus deserve such a + mention instead.</p> +<p>Oddly enough, I took a screenshot of the CakePHP website just yesterday <em>“by chance”</em> and my + articles were still there:</p> +<p><img src="/img/pictures/cake-promo/cakephp-08032007.png" alt="" /></p> <p>…while this morning they weren’t anymore:</p> -<p><img src="http://www.h3rald.com/img/pictures/cake-promo/cakephp-09032007.png" alt="" /></p> -<p>Of course I can’t provide any proof that I took the screenshot yesterday, and of course I don’t have any proof of the fact that someone in <span class="caps">CSF</span> may have thought that due to my recent <a href="http://www.h3rald.com/blog/view/42/">bad behavior</a> my articles didn’t deserve to be publicized anymore. I am confident that the Cake Software Foundation always does its best in keeping its site up-to-date, and I am glad that yesterday’s accident reminded them that there were far better articles which needed to be featured on their site. At least I <em>finally</em> did something good for the community!</p> -<p>Sarcasm apart, I feel I owe an apology for blowing this whole thing out of proportions: I disclosed embarassing details about our past project which – for the sake of the framework – should have never been made public, perhaps.<br /> -I want all of you to know that I still think that CakePHP is the best <span class="caps">PHP</span> framework ever made and I genuinely think that Larry E. Master did outstanding work in all this time, along with the rest of <span class="caps">CSF</span> members and contributors. Best of luck for your future editorial and development projects.</p> -<p>Since now my contributions are no longer “officially recognized”, I think I’d better to move on devoting my attention to something else.</p> -<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> “CakePHP” and “Cake” <em>seems</em> to be registered trademarks of the Cake Software Foundation Inc. I’m not sure if I’m allowed to use them in this blog — If anyone has any problem with it, please let me know.</p> +<p><img src="/img/pictures/cake-promo/cakephp-09032007.png" alt="" /></p> +<p>Of course I can’t provide any proof that I took the screenshot yesterday, and of course I don’t have any + proof of the fact that someone in <span class="caps">CSF</span> may have thought that due to my recent <a + href="/articles/42/">bad behavior</a> my articles didn’t deserve to be publicized anymore. I am confident + that the Cake Software Foundation always does its best in keeping its site up-to-date, and I am glad that + yesterday’s accident reminded them that there were far better articles which needed to be featured on their + site. At least I <em>finally</em> did something good for the community!</p> +<p>Sarcasm apart, I feel I owe an apology for blowing this whole thing out of proportions: I disclosed embarassing + details about our past project which – for the sake of the framework – should have never been made + public, perhaps.<br /> + I want all of you to know that I still think that CakePHP is the best <span class="caps">PHP</span> framework ever + made and I genuinely think that Larry E. Master did outstanding work in all this time, along with the rest of <span + class="caps">CSF</span> members and contributors. Best of luck for your future editorial and development + projects.</p> +<p>Since now my contributions are no longer “officially recognized”, I think I’d better to move on + devoting my attention to something else.</p> +<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> “CakePHP” and “Cake” + <em>seems</em> to be registered trademarks of the Cake Software Foundation Inc. I’m not sure if I’m + allowed to use them in this blog — If anyone has any problem with it, please let me know. +</p>
@@ -4,60 +4,148 @@ content-type: article
timestamp: 1184814120 tags: "php|rails|cakephp|frameworks" ----- -<p>I <a href="http://www.h3rald.com/blog/34">already</a> <a href="http://www.h3rald.com/blog/38">covered</a> the Akelos <span class="caps">PHP</span> framework in the past, but for those who don’t know it, Akelos seems to be one of the few <a href="http://www.h3rald.com/articles/rails-inspired-php-frameworks">Rails-inspired <span class="caps">PHP</span> frameworks</a> still worth mentioning, besides CakePHP and Symphony of course.</p> -<p>I recently has a look at their recently-relaunched <a href="http://www.akelos.org/">community website</a> and I noticed this phrase:</p> +<p>I <a href=/articles/34">already</a> <a href=/articles/38">covered</a> the Akelos <span class="caps">PHP</span> + framework in + the past, but for those who don’t know it, Akelos seems to be one of the few <a + href="/articles/rails-inspired-php-frameworks">Rails-inspired <span class="caps">PHP</span> frameworks</a> still + worth mentioning, besides CakePHP and Symphony of course.</p> +<p>I recently has a look at their recently-relaunched <a href="http://www.akelos.org/">community website</a> and I + noticed this phrase:</p> <blockquote> -<p>“Being port of Ruby on Rails to <span class="caps">PHP</span> Akelos is also optimized for programmer happiness and sustainable productivity”</p> + <p>“Being port of Ruby on Rails to <span class="caps">PHP</span> Akelos is also optimized for programmer + happiness and sustainable productivity”</p> </blockquote> -<p>Bermi Ferrer, Akelos creator, openly admits the framework is a port of Ruby on Rails to <span class="caps">PHP</span>, an attempt to help <em>“Ruby on Rails developers who need to code in <span class="caps">PHP</span>”</em>, among others. Of course Akelos is not Rails, simply because Ruby is (thank God for that!) not <span class="caps">PHP</span>, however I decided to find out more, and I asked Bermi a few questions, which he promptly answered.<h4><em>There are a lot of frameworks for <span class="caps">PHP</span>, perhaps too many: why did you decide to create Akelos rather than using one of the existing ones?</em></h4></p> -<p>I started coding <a href="http://www.akelos.org/">Akelos</a> back in 2004 for our internal developments. At that time I only found very few frameworks out there like <a href="http://www.mojavi.org/">Mojavi</a> and <a href="http://ez.no/">eZ Publish</a>. These frameworks were not my ideal of an <a href="http://en.wikipedia.org/wiki/Agile_software_development">Agile development</a> environment, so I decided to brew my own solution.</p> -<p>After reading <a href="http://www.martinfowler.com/books.html">Patterns of Enterprise Application Architecture</a> it was clear to me the kind of framework I wanted <a href="http://www.akelos.org/">Akelos</a> to become, so I started to implement some of the design patterns from the book into Akelos.</p> -<p>During the summer of 2005 I had a look into other <span class="caps">PHP</span> frameworks like <a href="http://www.cakephp.org/">CakePHP</a>, <a href="http://phpontrax.com/"><span class="caps">PHP</span> on Trax</a>, and <a href="http://www.bennolan.com/biscuit/">Biscuit</a> but none of them was more complete or easier to use than what Akelos was already at that time.</p> -<p>Then I used <a href="http://www.rubyonrails.org/">Rails</a> for one small personal project and immediately found that <a href="http://www.akelos.org/">Akelos</a> interfaces, conventions and philosophy were close to the Rails approach. <a href="http://api.rubyonrails.org/files/vendor/rails/activerecord/README.html">Rails ActiveRecord</a> implementation was impressive, better than mine and much much better than other existing <span class="caps">PHP</span> implementations, so I first ported the ActiveRecord code using <a href="http://adodb.sourceforge.net/"><span class="caps">PHP</span> AdoDB</a> as the database abstraction layer.</p> -<p>After that point, whenever I had a problem to solve while coding my customers applications I turned to Rails and they usually had the most elegant solution available. So I did like the idea of digging into Rails code to learn more Ruby and bringing Rails magic to the <span class="caps">PHP</span> world. It also helped the fact that Rails inline documentation is excellent so it could be easily adapted for Akelos.</p> +<p>Bermi Ferrer, Akelos creator, openly admits the framework is a port of Ruby on Rails to <span + class="caps">PHP</span>, an attempt to help <em>“Ruby on Rails developers who need to code in <span + class="caps">PHP</span>”</em>, among others. Of course Akelos is not Rails, simply because Ruby is + (thank God for that!) not <span class="caps">PHP</span>, however I decided to find out more, and I asked Bermi a few + questions, which he promptly answered. +<h4><em>There are a lot of frameworks for <span class="caps">PHP</span>, perhaps too many: why did you decide to create + Akelos rather than using one of the existing ones?</em></h4> +</p> +<p>I started coding <a href="http://www.akelos.org/">Akelos</a> back in 2004 for our internal developments. At that time + I only found very few frameworks out there like <a href="http://www.mojavi.org/">Mojavi</a> and <a + href="http://ez.no/">eZ Publish</a>. These frameworks were not my ideal of an <a + href="http://en.wikipedia.org/wiki/Agile_software_development">Agile development</a> environment, so I decided + to brew my own solution.</p> +<p>After reading <a href="http://www.martinfowler.com/books.html">Patterns of Enterprise Application Architecture</a> it + was clear to me the kind of framework I wanted <a href="http://www.akelos.org/">Akelos</a> to become, so I started + to implement some of the design patterns from the book into Akelos.</p> +<p>During the summer of 2005 I had a look into other <span class="caps">PHP</span> frameworks like <a + href="http://www.cakephp.org/">CakePHP</a>, <a href="http://phpontrax.com/"><span class="caps">PHP</span> on + Trax</a>, and <a href="http://www.bennolan.com/biscuit/">Biscuit</a> but none of them was more complete or + easier to use than what Akelos was already at that time.</p> +<p>Then I used <a href="http://www.rubyonrails.org/">Rails</a> for one small personal project and immediately found that + <a href="http://www.akelos.org/">Akelos</a> interfaces, conventions and philosophy were close to the Rails approach. + <a href="http://api.rubyonrails.org/files/vendor/rails/activerecord/README.html">Rails ActiveRecord</a> + implementation was impressive, better than mine and much much better than other existing <span + class="caps">PHP</span> implementations, so I first ported the ActiveRecord code using <a + href="http://adodb.sourceforge.net/"><span class="caps">PHP</span> AdoDB</a> as the database abstraction layer. +</p> +<p>After that point, whenever I had a problem to solve while coding my customers applications I turned to Rails and they + usually had the most elegant solution available. So I did like the idea of digging into Rails code to learn more + Ruby and bringing Rails magic to the <span class="caps">PHP</span> world. It also helped the fact that Rails inline + documentation is excellent so it could be easily adapted for Akelos.</p> <h4><em>What’s new since last time I posted about Akelos?</em></h4> -<p>The biggest change is the direction that the project has taken. Until now we have not dedicated time to promote Akelos, we just used it for our internal projects and we have been adding features as needed without a fixed roadmap or advocacy.</p> -<p>Now this has changed. More and more developers are using Akelos and contributing functionalities they miss from Rails. After some serious contribution proposals and many developers telling us how much they like Akelos, we decided to take the time to build a nice community site which includes <a href="http://forum.akelos.org/">forums</a>, a <a href="http://wiki.akelos.org/">wiki</a>, a new <a href="http://www.akelos.org/docs/tutorials/booklink">tutorial</a> and <a href="http://www.akelos.org/screencasts">a screen-cast</a>.</p> +<p>The biggest change is the direction that the project has taken. Until now we have not dedicated time to promote + Akelos, we just used it for our internal projects and we have been adding features as needed without a fixed roadmap + or advocacy.</p> +<p>Now this has changed. More and more developers are using Akelos and contributing functionalities they miss from + Rails. After some serious contribution proposals and many developers telling us how much they like Akelos, we + decided to take the time to build a nice community site which includes <a + href="http://forum.akelos.org/">forums</a>, a <a href="http://wiki.akelos.org/">wiki</a>, a new <a + href="http://www.akelos.org/docs/tutorials/booklink">tutorial</a> and <a + href="http://www.akelos.org/screencasts">a screen-cast</a>.</p> <p>There are also some improvements like:</p> <ul> -<li>Sintags, now accepts ruby-like calls to helper methods from the views.</li> -<li>Action Webservice, a component for creating and consuming Web Services easily.</li> -<li>Action Mailer, which allows you to receive and send (directly or in delayed mode) emails from within your application. (this is almost ready to ship)</li> -<li>Acts as tree behavior for Models.</li> -<li>Many performance improvements.</li> -<li>Many small contributions and bug fixes.</li> -<li>Code base reduced from 16MB to 9MB.</li> + <li>Sintags, now accepts ruby-like calls to helper methods from the views.</li> + <li>Action Webservice, a component for creating and consuming Web Services easily.</li> + <li>Action Mailer, which allows you to receive and send (directly or in delayed mode) emails from within your + application. (this is almost ready to ship)</li> + <li>Acts as tree behavior for Models.</li> + <li>Many performance improvements.</li> + <li>Many small contributions and bug fixes.</li> + <li>Code base reduced from 16MB to 9MB.</li> </ul> -<h4><em>From the new site, it seems that Akelos is – or aims to be – a port of Rails for <span class="caps">PHP</span>. Is that true? Do you aim to target Rails developers as possible users of the framework in situations in which “they have no choice” but to use <span class="caps">PHP</span> instead of Ruby?</em></h4> -<p>Akelos has ported many Ruby on Rails components keeping their interfaces and functionality whenever it was feasible to port the Ruby code to <span class="caps">PHP</span>. It might be considered a port in the sense of functionality, but there are some Rails strengths that rely on the Ruby language and that are impossible to port to <span class="caps">PHP</span>. However, Ruby developers will find that Akelos is the <span class="caps">PHP</span> framework with is the closest to Rails.</p> -<p>On the other hand, many <span class="caps">PHP</span> developers have moved to Ruby because <span class="caps">PHP</span> lacked a hyper-productive and fun-to-use framework like Rails for building complex applications. That is no longer the case, and those who excel at <span class="caps">PHP</span> can start being productive from day one by using Akelos. In this way, Akelos target users are those who already know <span class="caps">PHP</span> and need to build complex applications that can run on almost any cheap shared hosting using a solid foundation based on good coding practices and widely accepted conventions.</p> +<h4><em>From the new site, it seems that Akelos is – or aims to be – a port of Rails for <span + class="caps">PHP</span>. Is that true? Do you aim to target Rails developers as possible users of the + framework in situations in which “they have no choice” but to use <span class="caps">PHP</span> + instead of Ruby?</em></h4> +<p>Akelos has ported many Ruby on Rails components keeping their interfaces and functionality whenever it was feasible + to port the Ruby code to <span class="caps">PHP</span>. It might be considered a port in the sense of functionality, + but there are some Rails strengths that rely on the Ruby language and that are impossible to port to <span + class="caps">PHP</span>. However, Ruby developers will find that Akelos is the <span class="caps">PHP</span> + framework with is the closest to Rails.</p> +<p>On the other hand, many <span class="caps">PHP</span> developers have moved to Ruby because <span + class="caps">PHP</span> lacked a hyper-productive and fun-to-use framework like Rails for building complex + applications. That is no longer the case, and those who excel at <span class="caps">PHP</span> can start being + productive from day one by using Akelos. In this way, Akelos target users are those who already know <span + class="caps">PHP</span> and need to build complex applications that can run on almost any cheap shared hosting + using a solid foundation based on good coding practices and widely accepted conventions.</p> <h4><em>What Rails features are missing in Akelos?</em></h4> -<p>A standalone webserver like WebBrick, <span class="caps">RJS</span>, has and belongs to many through associations, string/number/date extensions and Active Resource.</p> +<p>A standalone webserver like WebBrick, <span class="caps">RJS</span>, has and belongs to many through associations, + string/number/date extensions and Active Resource.</p> <p>Ruby-powered features like modules, runtime class overriding and blocks will never be available in Akelos.</p> -<p>Scaffolds in Akelos work by generating code, I found quite useless to enable $scaffold = true; and have magic functionality that you can’t modify, so I decided not to invest my time on that one.</p> -<h4><em>I noticed quite a few generators available for Akelos, do they work as a Rails developer may expect them to work?</em></h4> +<p>Scaffolds in Akelos work by generating code, I found quite useless to enable $scaffold = true; and have magic + functionality that you can’t modify, so I decided not to invest my time on that one.</p> +<h4><em>I noticed quite a few generators available for Akelos, do they work as a Rails developer may expect them to + work?</em></h4> <p>The ones that are available do pretty much the same as in RoR.</p> -<h4><em>How does Akelos compare to other similar <span class="caps">PHP</span> frameworks like, say, CakePHP? What features does Akelos offer which Cake doesn’t offer and vice-versa?</em></h4> -<p>I’m not aware of Cake’s functionalities. At the time I started porting Rails my feelings about CakePHP were that they missed the simplicity point in favor of architectural discussions that lead to confusing code, but that was long ago.</p> -<p>Akelos (and Rails) do not implement <span class="caps">ACL</span> like Cake does, as that is a business logic component that varies too much from one case to other, it has no place inside the framework.</p> -<p>Akelos is built with internationalization in its core. You can even internationalize your Models by prefixing the column name with the locale.</p> -<p>I think that Cake only has an act_as_tree behavior on models while Akelos has Tree, Nested Set, and List. Akelos also implements handy features from Rails like <a href="http://en.wikipedia.org/wiki/Optimistic_concurrency_control">optimistic locking</a>, <a href="http://www.martinfowler.com/eaaCatalog/lazyLoad.html">lazy loading</a>, <a href="http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html">table inheritance</a>, counters, automatic transactions, really powerful validations, calculations…, and I think most of these advanced features are still missing on Cake, but maybe I’m wrong.</p> +<h4><em>How does Akelos compare to other similar <span class="caps">PHP</span> frameworks like, say, CakePHP? What + features does Akelos offer which Cake doesn’t offer and vice-versa?</em></h4> +<p>I’m not aware of Cake’s functionalities. At the time I started porting Rails my feelings about CakePHP + were that they missed the simplicity point in favor of architectural discussions that lead to confusing code, but + that was long ago.</p> +<p>Akelos (and Rails) do not implement <span class="caps">ACL</span> like Cake does, as that is a business logic + component that varies too much from one case to other, it has no place inside the framework.</p> +<p>Akelos is built with internationalization in its core. You can even internationalize your Models by prefixing the + column name with the locale.</p> +<p>I think that Cake only has an act_as_tree behavior on models while Akelos has Tree, Nested Set, and List. Akelos also + implements handy features from Rails like <a + href="http://en.wikipedia.org/wiki/Optimistic_concurrency_control">optimistic locking</a>, <a + href="http://www.martinfowler.com/eaaCatalog/lazyLoad.html">lazy loading</a>, <a + href="http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html">table inheritance</a>, counters, + automatic transactions, really powerful validations, calculations…, and I think most of these advanced + features are still missing on Cake, but maybe I’m wrong.</p> <h4><em>Did you include unit tests for all the framework classes?</em></h4> <p>The main components are fully unit tested, and no new code or patch gets into the trunk without unit tests.</p> <h4><em>Did you or someone do any performance test or benchmarks on Akelos already?</em></h4> -<p>During the last month a lot of code was refactored to improve performance with the help of <a href="http://xdebug.org/">Xdebug</a>, <a href="http://kcachegrind.sourceforge.net/">Kcachegrind</a> and <a href="http://httpd.apache.org/docs/2.0/programs/ab.html">ab</a>. We significantly improved the performance in one of our most complex intranet applications, a <a href="http://www.basecamphq.com/">basecamp</a>-like system.</p> -<p>Akelos also implements caching at many levels, so it’s very easy to increase performance as we did with a new <span class="caps">CMS</span> that can handle +200 requests per second using <a href="http://www.apache.org/">Apache</a> in a cheap shared server environment.</p> -<h4><em>Why should a <span class="caps">PHP</span> developer choose Akelos over another <span class="caps">PHP</span> framework?</em></h4> -<p><a href="http://www.akelos.org/docs/tutorials/booklink#mvc">Akelos <span class="caps">MVC</span> implementation</a> and <a href="http://www.akelos.org/docs/tutorials/booklink#workflow">workflow</a> are really easy to understand.</p> -<p>In Akelos all the methods and interfaces are thoroughly selected, so whenever you need to do something you just need to type what you think. Default options are selected with care so you don’t need to set any configuration unless you want to modify the default behavior.</p> -<p>Coding multilingual applications, building complex relationships within models, distributing databases changes within your development team, building Ajax interfaces, unit testing your code and many other common tasks for <span class="caps">PHP</span> developers are really simple to accomplish when using Akelos.</p> -<p>Akelos is designed to work on PHP4 and PHP5 and it comes with an easy web installer you can adapt for your application. It has functions for working with files and directories in common situations when the web server runs as a different user.</p> -<p>And one of the main reasons for choosing Akelos is that it makes coding fun and lets you focus on solving user problems rather than wasting your time in repetitive technical annoyances. When coding with other developers the <em>convention over configuration philosophy</em> helps everybody to understand exactly how everything works and where to find things.</p> +<p>During the last month a lot of code was refactored to improve performance with the help of <a + href="http://xdebug.org/">Xdebug</a>, <a href="http://kcachegrind.sourceforge.net/">Kcachegrind</a> and <a + href="http://httpd.apache.org/docs/2.0/programs/ab.html">ab</a>. We significantly improved the performance in + one of our most complex intranet applications, a <a href="http://www.basecamphq.com/">basecamp</a>-like system.</p> +<p>Akelos also implements caching at many levels, so it’s very easy to increase performance as we did with a new + <span class="caps">CMS</span> that can handle +200 requests per second using <a + href="http://www.apache.org/">Apache</a> in a cheap shared server environment. +</p> +<h4><em>Why should a <span class="caps">PHP</span> developer choose Akelos over another <span class="caps">PHP</span> + framework?</em></h4> +<p><a href="http://www.akelos.org/docs/tutorials/booklink#mvc">Akelos <span class="caps">MVC</span> implementation</a> + and <a href="http://www.akelos.org/docs/tutorials/booklink#workflow">workflow</a> are really easy to understand.</p> +<p>In Akelos all the methods and interfaces are thoroughly selected, so whenever you need to do something you just need + to type what you think. Default options are selected with care so you don’t need to set any configuration + unless you want to modify the default behavior.</p> +<p>Coding multilingual applications, building complex relationships within models, distributing databases changes within + your development team, building Ajax interfaces, unit testing your code and many other common tasks for <span + class="caps">PHP</span> developers are really simple to accomplish when using Akelos.</p> +<p>Akelos is designed to work on PHP4 and PHP5 and it comes with an easy web installer you can adapt for your + application. It has functions for working with files and directories in common situations when the web server runs + as a different user.</p> +<p>And one of the main reasons for choosing Akelos is that it makes coding fun and lets you focus on solving user + problems rather than wasting your time in repetitive technical annoyances. When coding with other developers the + <em>convention over configuration philosophy</em> helps everybody to understand exactly how everything works and + where to find things. +</p> <h4><em>Is there any website using Akelos already?</em></h4> -<p>The <a href="http://www.thechemicalbrothers.com/">Chemical Brothers</a> new website which has been developed by <a href="http://www.3ev.com/">3rd Eye Vision (3ev)</a> is using Akelos. </p> -<p>The <a href="http://www.akelos.org/">Akelos.org</a> site is running a <span class="caps">CMS</span> named Editam which we will release as Open Source in a near future.</p> -<p>Some small websites like <a href="http://www.fundaciocaixacarlet.com/">Fundacio Caixa Carlet</a> and many intranet/extranet sites that we’ve been coding during the last 2 years.</p> +<p>The <a href="http://www.thechemicalbrothers.com/">Chemical Brothers</a> new website which has been developed by <a + href="http://www.3ev.com/">3rd Eye Vision (3ev)</a> is using Akelos. </p> +<p>The <a href="http://www.akelos.org/">Akelos.org</a> site is running a <span class="caps">CMS</span> named Editam + which we will release as Open Source in a near future.</p> +<p>Some small websites like <a href="http://www.fundaciocaixacarlet.com/">Fundacio Caixa Carlet</a> and many + intranet/extranet sites that we’ve been coding during the last 2 years.</p> <h4><em>What are your future plans for Akelos? Anything new on the way?</em></h4> <p>A new manual, and a better <span class="caps">API</span> interface are the main priorities right now.</p> <p>Continuing bringing Rails functionality as needed.</p> -<p>Releasing our sister project Editam <span class="caps">CMS</span> which will help developers who need to add functionality on the top of a <span class="caps">CMS</span> using a solid <span class="caps">MVC</span> framework like Akelos.</p> +<p>Releasing our sister project Editam <span class="caps">CMS</span> which will help developers who need to add + functionality on the top of a <span class="caps">CMS</span> using a solid <span class="caps">MVC</span> framework + like Akelos.</p>
@@ -4,7 +4,17 @@ content-type: article
timestamp: 1188442740 tags: "personal|website|writing" ----- -<p>I’m back. I was so eager to go on holiday that I didn’t even bother writing a post about it, too bad. I actually when on holiday for a week but I thought I’d take three weeks off from my blog duties in favor of laziness and relax, but unfortunately my laptop decided to go wrong as well, so I didn’t actually manage to relax that much.</p> -<p>Now everything is fine. I still have to send in my laptop for assistance but it’s usable at least, and I finally found the time (and the money) to buy a desktop PC. I always wanted to build my own, actually, but in the end I decided to opt for a pre-made Fujitsu Siemens, mainly for economic reasons and time constraints. I won’t publish the specs, but it’s alright for me and my fiancée.</p> -<p>So what now? Well… the usual: more posts will soon be added to the <a href="/tags/simplyonrails">Simply On Rails</a> series, a Ruby-related article is on the way (it will be edited by the excellent <a href="http://www.cyberarmy.net">CyberArmy</a> Publication Editing Staff this time), I may venture in a site upgrade whenever they decide to release version 4.2 of Typo which is supposed to be imminent and I’ll eventually complete another pet project of mine, but that will take more time…</p> +<p>I’m back. I was so eager to go on holiday that I didn’t even bother writing a post about it, too bad. I + actually when on holiday for a week but I thought I’d take three weeks off from my blog duties in favor of + laziness and relax, but unfortunately my laptop decided to go wrong as well, so I didn’t actually manage to + relax that much.</p> +<p>Now everything is fine. I still have to send in my laptop for assistance but it’s usable at least, and I + finally found the time (and the money) to buy a desktop PC. I always wanted to build my own, actually, but in the + end I decided to opt for a pre-made Fujitsu Siemens, mainly for economic reasons and time constraints. I won’t + publish the specs, but it’s alright for me and my fiancée.</p> +<p>So what now? Well… the usual: more posts will soon be added to the Simply On Rails series, a Ruby-related + article is on the way (it will be edited by the excellent <a href="http://www.cyberarmy.net">CyberArmy</a> + Publication Editing Staff this time), I may venture in a site upgrade whenever they decide to release version 4.2 of + Typo which is supposed to be imminent and I’ll eventually complete another pet project of mine, but that will + take more time…</p> <p>Stay tuned.</p>
@@ -8,7 +8,7 @@ -----
I've been working in Technical Communications for nearly seven years now, first and foremost Technical Writer and more recently as Documentation Manager. In other words, my work revolves around manuals and online helps, authoring tools and guidelines, documentation standards and… you get the picture. -And yet, although I write articles and develop [documentation tools](/gliph/) in my free time as well, I rarely write about my job on this site. But when I was offered the opportunity to read and review [Best Practices for Technical Writers and Editors](http://www.informit.com/store/best-practices-for-technical-writers-and-editors-video-9780132929660), I just couldn't resist. +And yet, although I write articles and develop [documentation tools](/glyph/) in my free time as well, I rarely write about my job on this site. But when I was offered the opportunity to read and review [Best Practices for Technical Writers and Editors](http://www.informit.com/store/best-practices-for-technical-writers-and-editors-video-9780132929660), I just couldn't resist. ### Contents
@@ -4,13 +4,24 @@ content-type: article
timestamp: 1238221440 tags: "ruby|concatenative|programming" ----- -<p>A while ago, I sat down examining a few <a href="http://www.h3rald.com/articles/10-programming-languages">alternative programming languages</a> I might decide to learn someday. Each of those languages has its own peculiarities, and I didn’t choose them randomly, I chose them based on their popularity, power, paradigm and how actively they are developed.</p> -<p>I included <a href="http://factorcode.org/">Factor</a> as the only representative for <em>concatenative programming</em>, an interesting way to write programs, but seldom used in “recent” languages (except for Factor and a few others).</p> +<p>A while ago, I sat down examining a few <a href="/articles/10-programming-languages">alternative programming + languages</a> I might decide to learn someday. Each of those languages has its own peculiarities, and I + didn’t choose them randomly, I chose them based on their popularity, power, paradigm and how actively they are + developed.</p> +<p>I included <a href="http://factorcode.org/">Factor</a> as the only representative for <em>concatenative + programming</em>, an interesting way to write programs, but seldom used in “recent” languages + (except for Factor and a few others).</p> <h3>The Joy of concatenative programming</h3> -<p>If you have absolutely no clue on what I’m talking about, you should consider looking at the home page for the <a href="http://www.latrobe.edu.au/philosophy/phimvt/joy.html">Joy Programming Language</a>, or maybe just the <a href="http://www.latrobe.edu.au/philosophy/phimvt/joy/j00ovr.html">overview</a>: it should be enough to tikle your curiosity.</p> -<p>Joy is often considered the <em>canonical</em> concatenative programming language: a basic —but working— implementation of a simple programming language to illustrate the fundamentals of concatenative programming. Joy looks like this:</p> +<p>If you have absolutely no clue on what I’m talking about, you should consider looking at the home page for the + <a href="http://www.latrobe.edu.au/philosophy/phimvt/joy.html">Joy Programming Language</a>, or maybe just the <a + href="http://www.latrobe.edu.au/philosophy/phimvt/joy/j00ovr.html">overview</a>: it should be enough to tikle + your curiosity.</p> +<p>Joy is often considered the <em>canonical</em> concatenative programming language: a basic —but working— + implementation of a simple programming language to illustrate the fundamentals of concatenative programming. Joy + looks like this:</p> <p><code>2 3 + dup *</code></p> -<p>This simple programs computes the sum of 2 and 3, pushes it on the stack, duplicates it (using the <code>dup</code> combinator) and then multiplies the two values, obtaining 25 as a result.</p> +<p>This simple programs computes the sum of 2 and 3, pushes it on the stack, duplicates it (using the <code>dup</code> + combinator) and then multiplies the two values, obtaining 25 as a result.</p> <p>Let’s slow down a second. Here’s what happens, exactly:</p> <table> <tr>@@ -38,16 +49,27 @@ <td> * </td>
<td> <sup class="footnote" id="fnr25"><a href="#fn25">25</a></sup> </td> </tr> </table> -<p>Got it? Let’s take it one step further. When you enter <code>dup</code> and then <code>*</code>, you are effectively computing the square of a number, so we can define the function <code>square</code> simply as:</p> +<p>Got it? Let’s take it one step further. When you enter <code>dup</code> and then <code>*</code>, you are + effectively computing the square of a number, so we can define the function <code>square</code> simply as:</p> <p><code>square == dup *</code></p> <p>In Ruby, this would be:</p> -<div class='ruby'><pre><code>def square(x) +<div class='ruby'> + <pre><code>def square(x) x*x -end</code></pre></div><p>What’s unusual here? — Simple, there are no <em>variables</em> involved. Joy doesn’t need any explicit variable or <em>formal parameters</em> of any sort.</p> +end</code></pre> +</div> +<p>What’s unusual here? — Simple, there are no <em>variables</em> involved. Joy doesn’t need any + explicit variable or <em>formal parameters</em> of any sort.</p> <p>There’s more. Take the following code:</p> <p><code>[1 2 3 4] [dup *] map</code></p> -<p>The <code>map</code> combinator expects a list and a <em>quoted program</em> (the same one used to compute the square) and produces a new list containing the result of that program applied to each element of the original list. Basically the equivalent of:</p> -<div class='ruby'><pre><code>[1,2,3,4].map { |e| e*e }</code></pre></div><p>Do you notice anything different? — Yes, Joy doesn’t need blocks or lambdas either, it uses <em>quoted programs</em> instead, which are nothing but slightly fancier lists (or arrays, as you like).</p> +<p>The <code>map</code> combinator expects a list and a <em>quoted program</em> (the same one used to compute the + square) and produces a new list containing the result of that program applied to each element of the original list. + Basically the equivalent of:</p> +<div class='ruby'> + <pre><code>[1,2,3,4].map { |e| e*e }</code></pre> +</div> +<p>Do you notice anything different? — Yes, Joy doesn’t need blocks or lambdas either, it uses <em>quoted + programs</em> instead, which are nothing but slightly fancier lists (or arrays, as you like).</p> <p>Let’s recap then, Joy doesn’t need of:</p> <ul> <li>lambda functions or blocks (quotation does the trick)</li>@@ -55,9 +77,13 @@ <li>explicit parameters (everything you need is on the stack)</li>
<li>variable assignments (same as above)</li> <li>explicit recursion (provided you can use combinators like linrec, primrec, binrec, etc.)</li> </ul> -<p>I would consider this one of the best examples of <em>programming minimalism</em>: an incredibly simple syntax, a very small set of rules, but a good deal of power.</p> +<p>I would consider this one of the best examples of <em>programming minimalism</em>: an incredibly simple syntax, a + very small set of rules, but a good deal of power.</p> <h3>Ruby objects on the stack</h3> -<p>After reading about Joy, I realized that implementing something similar in Ruby would be an interesting mini-project (let’s say a week of lunch breaks) to understand more about concatenative programming. It would also be pointless, too: a stack-based programming language implemented on top of one of the most high-level programming languages you can find isn’t going to be fast, is it? Nevertheless, it would still be interesting.</p> +<p>After reading about Joy, I realized that implementing something similar in Ruby would be an interesting mini-project + (let’s say a week of lunch breaks) to understand more about concatenative programming. It would also be + pointless, too: a stack-based programming language implemented on top of one of the most high-level programming + languages you can find isn’t going to be fast, is it? Nevertheless, it would still be interesting.</p> <p>Ruby offers everything you need to build a Joy-like <span class="caps">DSL</span>:</p> <ul> <li>You can use arrays as …arrays, but also as quoted programs, and to model the stack itself.</li>@@ -66,28 +92,53 @@ <li>You can use Symbols as functions (we’ll get to this in a minute)</li>
</ul> <p>If you think about the following expression in postfix notation:</p> <p><code>2 2 +</code></p> -<p>We <em>could</em> translate it into infix notation (<code>2 + 2</code>), because Ruby supports it, but it’s not general enough. What you could do is this though:</p> -<div class='ruby'><pre><code>2.send(:+, 2)</code></pre></div><p>Message sending. I can see all the SmallTalk sympathizers drooling already. Well yes, In Ruby, <em>everything</em> is an object, so <em>everything</em> has a receiver and maybe some parameters. In other words, every method call can be reduced to the following syntax:</p> -<div class='ruby'><pre><code>receiver.send(method, *params)</code></pre></div><p>In this way, it is safe to assume that everything has a receiver, which could be understood as a function parameter, and may have 0 or more parameters. Take the following then:</p> -<div class='ruby'><pre><code>[2, 2, :+]</code></pre></div><p>It’s not too different from Joy, and it’s still Ruby code. All you have to do is use something to do the following:</p> +<p>We <em>could</em> translate it into infix notation (<code>2 + 2</code>), because Ruby supports it, but it’s not + general enough. What you could do is this though:</p> +<div class='ruby'> + <pre><code>2.send(:+, 2)</code></pre> +</div> +<p>Message sending. I can see all the SmallTalk sympathizers drooling already. Well yes, In Ruby, <em>everything</em> is + an object, so <em>everything</em> has a receiver and maybe some parameters. In other words, every method call can be + reduced to the following syntax:</p> +<div class='ruby'> + <pre><code>receiver.send(method, *params)</code></pre> +</div> +<p>In this way, it is safe to assume that everything has a receiver, which could be understood as a function parameter, + and may have 0 or more parameters. Take the following then:</p> +<div class='ruby'> + <pre><code>[2, 2, :+]</code></pre> +</div> +<p>It’s not too different from Joy, and it’s still Ruby code. All you have to do is use something to do the + following:</p> <ul> <li>Take an array, and examine each item: - <ul> - <li>If it’s an object (non-Symbol), then push it on top of the stack.</li> - <li>If it’s a Symbol, then do something different, i.e.: <ul> - <li>Find its receiver and its parameters and call a method.</li> - <li>Manipulate something on the stack.</li> - </ul></li> - </ul></li> + <li>If it’s an object (non-Symbol), then push it on top of the stack.</li> + <li>If it’s a Symbol, then do something different, i.e.: + <ul> + <li>Find its receiver and its parameters and call a method.</li> + <li>Manipulate something on the stack.</li> + </ul> + </li> + </ul> + </li> </ul> <p>In this case, we have to find :+’s receiver and its parameter and we’re sorted.</p> -<p>Unfortunately Ruby’s <code>arity</code> method isn’t that reliable. For example: <code>"test".instance_method(:sub).arity</code> returns -1, while it should return “2” to be useful. So we have no choice but find a way to pass the method’s arity explicitly, in some cases.</p> +<p>Unfortunately Ruby’s <code>arity</code> method isn’t that reliable. For example: + <code>"test".instance_method(:sub).arity</code> returns -1, while it should return “2” to be useful. So + we have no choice but find a way to pass the method’s arity explicitly, in some cases.</p> <p>For example like this:</p> -<div class='ruby'><pre><code>["Ciao, Fabio", /Ciao/, "Hello", :sub|2]</code></pre></div><p>If we define a | operator for the Symbol class, it’s not too bad after all. It’s heavy, but in this way we can use <em>any</em> Ruby method in postfix notation.</p> +<div class='ruby'> + <pre><code>["Ciao, Fabio", /Ciao/, "Hello", :sub|2]</code></pre> +</div> +<p>If we define a | operator for the Symbol class, it’s not too bad after all. It’s heavy, but in this way + we can use <em>any</em> Ruby method in postfix notation.</p> <h3>Introducing the Concatenative Ruby <span class="caps">DSL</span></h3> -<p><a href="/concatenative">Concatenative</a> is a simple Ruby <span class="caps">DSL</span> for concatenative programming. You can write concatenative programs inside ordinary Ruby arrays and execute them by calling either <code>Array#execute</code> or <code>Kernel#concatenate</code>, like this:</p> -<div class='ruby'><pre><code>require 'concatenative' +<p><a href="/concatenative">Concatenative</a> is a simple Ruby <span class="caps">DSL</span> for concatenative + programming. You can write concatenative programs inside ordinary Ruby arrays and execute them by calling either + <code>Array#execute</code> or <code>Kernel#concatenate</code>, like this:</p> +<div class='ruby'> + <pre><code>require 'concatenative' concatenate( 10,@@ -96,21 +147,34 @@ [1, :+],
[:dup, 1, :-], [:*], :linrec - )</code></pre></div><p>This simple program calculates the factorial of 10. As you can see, no matter how unusual it may look, it is perfectly valid Ruby code and it is equivalent to the following Joy code:</p> + )</code></pre> +</div> +<p>This simple program calculates the factorial of 10. As you can see, no matter how unusual it may look, it is + perfectly valid Ruby code and it is equivalent to the following Joy code:</p> <p><code> 10 [0 =] [1 +] [dup 1 -] [*] linrec </code></p> <p>Granted, Joy looks better, but that’s the tradeoff for not writing a parser for Joy syntax, after all. <br /> -Looking at the code above, there are a few things to keep in mind when programming with Concatenative:</p> + Looking at the code above, there are a few things to keep in mind when programming with Concatenative:</p> <ul> <li>You are using Ruby arrays, so you have to use commas, at least</li> - <li>functions, operators and combinators (let’s just call them <em>words</em>) are available as Ruby symbols</li> - <li>The arity of all Ruby infix operators has been already set to “1” by concatenative using the <code>set_arity</code> method (which simply stores the arity of a particular symbol in a constant hash)</li> + <li>functions, operators and combinators (let’s just call them <em>words</em>) are available as Ruby symbols + </li> + <li>The arity of all Ruby infix operators has been already set to “1” by concatenative using the + <code>set_arity</code> method (which simply stores the arity of a particular symbol in a constant hash)</li> <li>You can specify explicit arities using the | operator (<code>:gsub|2</code>, or <code>:join|1</code>)</li> <li>Unless the arity has been specified, an arity of 0 is assumed.</li> - <li>You can define your own concatenative functions using the <code>Symbol#<=</code> method, which expects a quoted concatenative program.</li> + <li>You can define your own concatenative functions using the <code>Symbol#<=</code> method, which expects a + quoted concatenative program.</li> </ul> <h3>Performance issues</h3> -<p>In its current form, Concatenative can be very slow, as show the “benchmarks” provided in the /examples folder, especially if you use recursive combinators. This is understandable because everything is implemented in pure Ruby, which is totally unsuitable for low level stuff.</p> -<p>If you are interested, you are more than welcome to submit patches and suggestions to improve Concatenative’s performance, or, if you feel brave enough, you could help me create a C extension instead: things would become much faster then.</p> -<p>At any rate, feel free to play with it. You can get the source from <a href="http://github.com/h3rald/concatenative/tree/master">GitHub</a>, you can get the gem from <a href="http://rubyforge.org/projects/concatenative/">RubyForge</a> and you can submit ticket through <a href="http://github.com/h3rald/concatenative/issues">GitHub</a> as well.</p> +<p>In its current form, Concatenative can be very slow, as show the “benchmarks” provided in the /examples + folder, especially if you use recursive combinators. This is understandable because everything is implemented in + pure Ruby, which is totally unsuitable for low level stuff.</p> +<p>If you are interested, you are more than welcome to submit patches and suggestions to improve Concatenative’s + performance, or, if you feel brave enough, you could help me create a C extension instead: things would become much + faster then.</p> +<p>At any rate, feel free to play with it. You can get the source from <a + href="http://github.com/h3rald/concatenative/tree/master">GitHub</a>, you can get the gem from <a + href="http://rubyforge.org/projects/concatenative/">RubyForge</a> and you can submit ticket through <a + href="http://github.com/h3rald/concatenative/issues">GitHub</a> as well.</p>
@@ -7,15 +7,36 @@ timestamp: 1198847940
tags: "browsers|review|opera|firefox" ----- <blockquote> -<p><strong>Note:</strong> This article can be considered a sequel for <a href="http://www.h3rald.com/articles/ie-lovers-guide-to-firefox">An IE Lover’s Guide to Firefox</a>, which described Firefox through the eyes of an Internet Explorer fan. Similarly, this article describes Opera’s features from the point of view of a user – myself – who has been using Firefox for years and is now considering another browser switch.</p> + <p><strong>Note:</strong> This article can be considered a sequel for <a + href="/articles/ie-lovers-guide-to-firefox">An IE Lover’s Guide to Firefox</a>, + which described Firefox through the eyes of an Internet Explorer fan. Similarly, this article describes + Opera’s features from the point of view of a user – myself – who has been using Firefox for + years and is now considering another browser switch.</p> </blockquote> -<p>I am a Firefox fan. I’ve been using Firefox since it was named “Firebird” and calling it “stable” was a big overstatement. Firefox dragged me out of Internet Explorer, and that was definitely one of its biggest achievements.</p> -<p>Because I’m addicted to trying out new tools, however, I always kept testing new browsers I discovered here and there. K-Meleon, Flock, Sleipnir… When Safari came out for Windows I immediately installed it and used it for about 2 hours, only to realize that it wasn’t – and it still isn’t – usable at all, mainly due to sporadic crashes.</p> +<p>I am a Firefox fan. I’ve been using Firefox since it was named “Firebird” and calling it + “stable” was a big overstatement. Firefox dragged me out of Internet Explorer, and that was definitely + one of its biggest achievements.</p> +<p>Because I’m addicted to trying out new tools, however, I always kept testing new browsers I discovered here and + there. K-Meleon, Flock, Sleipnir… When Safari came out for Windows I immediately installed it and used it for + about 2 hours, only to realize that it wasn’t – and it still isn’t – usable at all, mainly + due to sporadic crashes.</p> <p style="float:right;"><img src="/files/opera/fast.jpg" alt="" /></p> -<p>Similarly, I’ve been trying out <a href="http://www.opera.com/">Opera</a> periodically, as new releases came out, but again it didn’t seem to work for me. The biggest complaint I had was its inability to render heavily-ajaxified web sites properly. However, now it seems that the Opera Development Team made a big effort to improve the browser, and I was pleased to notice that <a href="http://www.opera.com/products/desktop/next/">Opera 9.5b</a> (“Kestrel”) doesn’t seem to have this sort of problems at all.h3. Planning the Switch</p> -<p>Firefox has extensions. Plenty of them actually. Some are useful, like the newish Del.icio.us one made by Yahoo, and also crappy ones you’ll never use unless you want to have a fancy button on one of your over-cluttered toolbars which enables you to interface more easily with X or Y web services you hardly ever use.</p> -<p>By contrast, Opera never attempted to add full-blown extension support to its venerable and yet very powerful browser. Instead, they kept building more and more features right into its core, being careful not to undermine the browser’s two proverbial qualities: <em>speed</em> and <em>stability</em>. What seemed a doomed philosophy at first turned out to be a good thingin the long run. More and more people are getting more and more worried about Firefox’s memory issues and begin to <em>wander off</em> to explore new things, exactly like I did.</p> -<p>The first step to switch from Firefox to Opera is to reduce the number of Firefox extensions to the bare minimum you need:</p> +<p>Similarly, I’ve been trying out <a href="http://www.opera.com/">Opera</a> periodically, as new releases came + out, but again it didn’t seem to work for me. The biggest complaint I had was its inability to render + heavily-ajaxified web sites properly. However, now it seems that the Opera Development Team made a big effort to + improve the browser, and I was pleased to notice that <a href="http://www.opera.com/products/desktop/next/">Opera + 9.5b</a> (“Kestrel”) doesn’t seem to have this sort of problems at all.h3. Planning the Switch +</p> +<p>Firefox has extensions. Plenty of them actually. Some are useful, like the newish Del.icio.us one made by Yahoo, and + also crappy ones you’ll never use unless you want to have a fancy button on one of your over-cluttered + toolbars which enables you to interface more easily with X or Y web services you hardly ever use.</p> +<p>By contrast, Opera never attempted to add full-blown extension support to its venerable and yet very powerful + browser. Instead, they kept building more and more features right into its core, being careful not to undermine the + browser’s two proverbial qualities: <em>speed</em> and <em>stability</em>. What seemed a doomed philosophy at + first turned out to be a good thingin the long run. More and more people are getting more and more worried about + Firefox’s memory issues and begin to <em>wander off</em> to explore new things, exactly like I did.</p> +<p>The first step to switch from Firefox to Opera is to reduce the number of Firefox extensions to the bare minimum you + need:</p> <ul> <li>Colorzilla</li> <li>Web Developer</li>@@ -27,20 +48,42 @@ <li>Del.icio.us</li>
</ul> How many extensions do you <em>actually</em> use? Here’s a short analysis for the ones above: <ul> - <li>The first three are related to Web Development only, which means that I don’t need them unless I’m doing some web-development tests during which I’m always going to have more than one browser open anyway. <strong><span class="caps">UPDATE</span>:</strong> there are a few <a href="http://widgets.opera.com/search/?order=name&q=ruler">Ruler</a> widget which can be used instead of MeasureIt <em>(thanks <strong>Ameer</strong>)</em>.</li> - <li>SearchStatus gives me Alexa Rank and Google Pagerank: I think I can survive without those for a while. <strong><span class="caps">UPDATE</span>:</strong> if not, there’s always <a href="http://www.puzzleclub.ru/files/seobar/">SEObar</a> <em>(thanks <strong>Ameer</strong>)</em>.</li> - <li>I use Gmail Manager because my girlfriend uses Gmail on the same computer. I’m switching to Opera and she’ll stick with Firefox, so no problem there…</li> - <li>Secure Login? It’s called <em>Wand</em> and it has been built-in into Opera for the last decade or so.</li> - <li>Del.icio.us – OK, I won’t be able to access my favorite tags as quickly, but <a href="http://erlang.no/2005/10/06/delicious-opera-buttons-2/">someone</a> already came out with a few handy buttons for a better integration with the popular social bookmarking service.</li> + <li>The first three are related to Web Development only, which means that I don’t need them unless I’m + doing some web-development tests during which I’m always going to have more than one browser open anyway. + <strong><span class="caps">UPDATE</span>:</strong> there are a few <a + href="http://widgets.opera.com/search/?order=name&q=ruler">Ruler</a> widget which can be used instead of + MeasureIt <em>(thanks <strong>Ameer</strong>)</em>. + </li> + <li>SearchStatus gives me Alexa Rank and Google Pagerank: I think I can survive without those for a while. + <strong><span class="caps">UPDATE</span>:</strong> if not, there’s always <a + href="http://www.puzzleclub.ru/files/seobar/">SEObar</a> <em>(thanks <strong>Ameer</strong>)</em>. + </li> + <li>I use Gmail Manager because my girlfriend uses Gmail on the same computer. I’m switching to Opera and + she’ll stick with Firefox, so no problem there…</li> + <li>Secure Login? It’s called <em>Wand</em> and it has been built-in into Opera for the last decade or so. + </li> + <li>Del.icio.us – OK, I won’t be able to access my favorite tags as quickly, but <a + href="http://erlang.no/2005/10/06/delicious-opera-buttons-2/">someone</a> already came out with a few handy + buttons for a better integration with the popular social bookmarking service.</li> </ul> <blockquote> -<p><strong><span class="caps">UPDATE</span>:</strong> For a list of the features provided by Firefox extensions which are included in Opera, see Rijk’s <a href="http://files.myopera.com/Rijk/blog/extensions.html">Top 150 Popular Firefox Extensions and Opera</a></p> + <p><strong><span class="caps">UPDATE</span>:</strong> For a list of the features provided by Firefox extensions + which are included in Opera, see Rijk’s <a href="http://files.myopera.com/Rijk/blog/extensions.html">Top + 150 Popular Firefox Extensions and Opera</a></p> </blockquote> <p style="float:right;"><img src="/files/opera/opera_navigation.png" alt="" /></p> -<p>Because I’m addicted to betas, I immediately downloaded <a href="http://www.opera.com/products/desktop/next/">Opera Kestrel</a>, i.e. Opera 9.50 beta 1. I never actually liked Opera’s default theme, so I started looking around for <strong><a href="http://my.opera.com/community/customize/skins/">new skins</a></strong> (yes, eye-candy matters sometimes) and came across the Ximple series by <a href="http://my.opera.com/community/customize/skins/author/?id=serafins">serafins</a>. In particular, <a href="http://my.opera.com/community/customize/skins/info/?id=3835">2nd thought – Jimple</a> quickly became my favorite.</p> +<p>Because I’m addicted to betas, I immediately downloaded <a + href="http://www.opera.com/products/desktop/next/">Opera Kestrel</a>, i.e. Opera 9.50 beta 1. I never actually + liked Opera’s default theme, so I started looking around for <strong><a + href="http://my.opera.com/community/customize/skins/">new skins</a></strong> (yes, eye-candy matters + sometimes) and came across the Ximple series by <a + href="http://my.opera.com/community/customize/skins/author/?id=serafins">serafins</a>. In particular, <a + href="http://my.opera.com/community/customize/skins/info/?id=3835">2nd thought – Jimple</a> quickly became + my favorite.</p> <h3>Tabs</h3> <p><em>“Opera is the Web pioneer that delivered tabbed browsing in 2000 […]”</em></p> -<p>Opera tabs <em>feel</em> stable and mature. Why? Probably because tabs are used more consistently to open not only web pages but also:</p> +<p>Opera tabs <em>feel</em> stable and mature. Why? Probably because tabs are used more consistently to open not only + web pages but also:</p> <ul> <li>Downloads (“Transfers”)</li> <li><span class="caps">RSS</span> feeds</li>@@ -52,7 +95,10 @@ <li>Contacts</li>
<li>History</li> <li>Page Links</li> </ul> -<p>I think this is a great feature and Firefox should definitely consider it: v3.0 comes with new download and bookmark managers, but they’re still dialogs. Yes, I know, there’s probably some extension which allows you to display them in the sidebar, but that’s not the point: Opera brings more consistency to the overall browsing experience by using tabs wherever they should be used.</p> +<p>I think this is a great feature and Firefox should definitely consider it: v3.0 comes with new download and bookmark + managers, but they’re still dialogs. Yes, I know, there’s probably some extension which allows you to + display them in the sidebar, but that’s not the point: Opera brings more consistency to the overall browsing + experience by using tabs wherever they should be used.</p> <p>Additionally, Opera tabs…</p> <ul> <li>Can be rearranged, exactly like Firefox tabs</li>@@ -63,18 +109,26 @@ <li>Can be saved in groups (sessions) and re-opened later on</li>
<li>Can be restored if Opera crashes</li> </ul> <h3>Speed Dial</h3> -<p>When you open Opera for the first time, and <em>whenever you open a new empty tab</em> the Speed Dial is displayed. What I originally thought it was one of the most annoying things introduced by Opera 9 turned out to be actually useful and very addictive.</p> +<p>When you open Opera for the first time, and <em>whenever you open a new empty tab</em> the Speed Dial is displayed. + What I originally thought it was one of the most annoying things introduced by Opera 9 turned out to be actually + useful and very addictive.</p> <p>The idea behind it is simple:</p> <ul> <li>Show a default page with 9 slots</li> <li>Allow users to drag links to those slots</li> <li>Display preview of each slot (which is cached and can be updated by refreshing the page)</li> - <li>Allow users to quickly access pages saved in the Speed Dial via CTRL+1 .. CTRL+9 or simply by clicking them.</li> + <li>Allow users to quickly access pages saved in the Speed Dial via CTRL+1 .. CTRL+9 or simply by clicking them. + </li> </ul> -<p>Simple and effective. Once you get going with it, you’ll overcome the initial feeling of imposition and you’ll use it more and more: I literally can’t live without it now!</p> +<p>Simple and effective. Once you get going with it, you’ll overcome the initial feeling of imposition and + you’ll use it more and more: I literally can’t live without it now!</p> <h3>Right-click goodies</h3> -<p>While I was testing Opera, my girlfriend came along and asked me to look something up on <a href="http://www.imdb.com/"><span class="caps">IMDB</span></a>. I normally had <span class="caps">IMDB</span> as custom search engine in Firefox, but unfortunately Opera didn’t seem to allow users to customize their search engines…</p> -<p>Totally wrong. Not only Opera lets you add any search engine to the search bar, it also does it with style and in the easiest way possible:</p> +<p>While I was testing Opera, my girlfriend came along and asked me to look something up on <a + href="http://www.imdb.com/"><span class="caps">IMDB</span></a>. I normally had <span class="caps">IMDB</span> as + custom search engine in Firefox, but unfortunately Opera didn’t seem to allow users to customize their search + engines…</p> +<p>Totally wrong. Not only Opera lets you add any search engine to the search bar, it also does it with style and in the + easiest way possible:</p> <p style="float:right;"><img src="/files/opera/search_engines.png" alt="" /></p> <ol> <li>Go to your search engine or any website with a search form</li>@@ -82,18 +136,25 @@ <li>Right click the search field</li>
<li>Click <strong>Create Search…</strong></li> <li>Specify a name and a keyword for your search engine</li> </ol> -<p>Done. You’ll now be able to search that particular site directly from the search bar. As you can see, I added Wikipedia, <span class="caps">IMDB</span> and even the <a href="http://www.uesp.net/wiki/Main_Page">Unofficial Elder Scrolls Pages</a> in this way.</p> +<p>Done. You’ll now be able to search that particular site directly from the search bar. As you can see, I added + Wikipedia, <span class="caps">IMDB</span> and even the <a href="http://www.uesp.net/wiki/Main_Page">Unofficial Elder + Scrolls Pages</a> in this way.</p> <p>Besides creating searches, Opera lets you do a lot by right-clicking anywhere on a page:</p> <ul> - <li><strong>Block Content</strong>: Right-click an empty area of any webpage and select <strong>Block Content</strong> to select which ads, scripts and images will be blocked from now on.</li> + <li><strong>Block Content</strong>: Right-click an empty area of any webpage and select <strong>Block + Content</strong> to select which ads, scripts and images will be blocked from now on.</li> <li><strong>Validate</strong>: Validate the <span class="caps">HTML</span> source code of the current page.</li> <li><strong>Translate</strong>: Translate the current page into a foreign language with just two clicks.</li> <li><strong>Open With</strong>: Open the current page in another browser installed on your system.</li> - <li><strong>Edit Site Preferences…</strong>: Choose to block/allow cookies and popups, identify Opera as another browser, set a different encoding, enable/disable scripts, images, flash, etc. These setting apply to the <em>current web site only</em>.</li> + <li><strong>Edit Site Preferences…</strong>: Choose to block/allow cookies and popups, identify Opera as + another browser, set a different encoding, enable/disable scripts, images, flash, etc. These setting apply to + the <em>current web site only</em>.</li> <li>View source, reload page every X seconds/minutes, send by email, etc.</li> </ul> <h3>Widgets</h3> -<p><a href="http://widgets.opera.com/">Opera Widgets</a> must not be considered as Opera’s counterpart to Firefox extensions. Instead, Opera Widgets can be used as <em>poor man’s Vista Gadgets</em> on Windows XP, and they do their job most remarkably.</p> +<p><a href="http://widgets.opera.com/">Opera Widgets</a> must not be considered as Opera’s counterpart to Firefox + extensions. Instead, Opera Widgets can be used as <em>poor man’s Vista Gadgets</em> on Windows XP, and they do + their job most remarkably.</p> <p>I’m personally very fond of these ones:</p> <ul> <li><a href="http://widgets.opera.com/widget/3683/">The Free Dictionary</a></li>@@ -104,95 +165,197 @@ <li><a href="http://widgets.opera.com/widget/3689/">Currency Converter</a></li>
<li><a href="http://widgets.opera.com/widget/5118/"><span class="caps">HTML</span> Entities</a></li> <li><a href="http://widgets.opera.com/widget/7206/">Twitter</a></li> </ul> -<p>They all have a common trait: they all behave as standalone programs, as they should be. The Wikipedia one, for example, can display Wikipedia entries directly inside the widget, unlike some others which just take you to Wikipedia, which is rather pointless.</p> -<p>Although widgets live within Opera, they can be displayed “always behind”, which means they’ll be glued to your desktop and therefore will be visible whenever Opera and other applications are minimized.</p> -<p>Needless to say that anyone brave enough can make widgets for Opera by following a simple <a href="http://dev.opera.com/articles/view/opera-widgets-specification-1-0/">Widget Specification</a>.</p> +<p>They all have a common trait: they all behave as standalone programs, as they should be. The Wikipedia one, for + example, can display Wikipedia entries directly inside the widget, unlike some others which just take you to + Wikipedia, which is rather pointless.</p> +<p>Although widgets live within Opera, they can be displayed “always behind”, which means they’ll be + glued to your desktop and therefore will be visible whenever Opera and other applications are minimized.</p> +<p>Needless to say that anyone brave enough can make widgets for Opera by following a simple <a + href="http://dev.opera.com/articles/opera-widgets-specification-1-0/">Widget Specification</a>.</p> <h3>Everything you can do on the Internet</h3> -<p>The term <em>browser</em> applied to Opera is somehow misleading. Personally I would have called it something like “Internet Suite”, because that would be a better choice due to the features it offers and the things it can do.</p> -<p>Traditionally speaking, a web browser can be used to browse web pages, read feeds (sometimes) and navigate through <span class="caps">FTP</span> directories. Here’s what Opera can handle:</p> +<p>The term <em>browser</em> applied to Opera is somehow misleading. Personally I would have called it something like + “Internet Suite”, because that would be a better choice due to the features it offers and the things it + can do.</p> +<p>Traditionally speaking, a web browser can be used to browse web pages, read feeds (sometimes) and navigate through + <span class="caps">FTP</span> directories. Here’s what Opera can handle: +</p> <p style="float:right;"><img src="/files/opera/files.png" alt="" /></p> <ul> <li>Web Pages – No need of explanations here.</li> - <li><span class="caps">FTP</span> – <span class="caps">FTP</span> directories are listed very clearly, overriding server’s settings with a more user-friendly layout.</li> - <li>Local Files – This was a surprise for me. Typing <code>file://</code> will automatically load a list of the drives currently available on your machine. Similarly, auto-completion for directory and file names is supported! I almost started using Opera as my everyday’s file manager (almost).</li> - <li>Feeds – An embedded feed reader can be used to subscribe to <span class="caps">RSS</span>/Atom feeds and view them… in a tab, of course.</li> - <li>E-mails – Opera <em>is</em> also a pretty decent email client. As of version 9.5 full <span class="caps">IMAP</span> support has been added, which definitely makes the difference.</li> - <li><span class="caps">IRC</span> – Opera can be used as an client, which works pretty well. Who needs ChatZilla anymore?</li> + <li><span class="caps">FTP</span> – <span class="caps">FTP</span> directories are listed very clearly, + overriding server’s settings with a more user-friendly layout.</li> + <li>Local Files – This was a surprise for me. Typing <code>file://</code> will automatically load a list of + the drives currently available on your machine. Similarly, auto-completion for directory and file names is + supported! I almost started using Opera as my everyday’s file manager (almost).</li> + <li>Feeds – An embedded feed reader can be used to subscribe to <span class="caps">RSS</span>/Atom feeds and + view them… in a tab, of course.</li> + <li>E-mails – Opera <em>is</em> also a pretty decent email client. As of version 9.5 full <span + class="caps">IMAP</span> support has been added, which definitely makes the difference.</li> + <li><span class="caps">IRC</span> – Opera can be used as an client, which works pretty well. Who needs + ChatZilla anymore?</li> <li>News – Opera can be used to signup and retrieve news from newsgroups.</li> - <li>Gopher/<span class="caps">WAIS</span> – Although not used everyday, Opera can handle these old protocols as well.</li> - <li>BitTorrent Files – By default, Opera can act as a BitTorrent client as well, so you can just open .torrent files through the program and then monitor the download progress in the Transfers window, like with any other normal download. While this feature is indeed useful, it is also possible to <a href="http://www.opera.com/support/search/view/840/">disable it</a> and still use your favorite BitTorrent client.</li> + <li>Gopher/<span class="caps">WAIS</span> – Although not used everyday, Opera can handle these old protocols + as well.</li> + <li>BitTorrent Files – By default, Opera can act as a BitTorrent client as well, so you can just open .torrent + files through the program and then monitor the download progress in the Transfers window, like with any other + normal download. While this feature is indeed useful, it is also possible to <a + href="http://www.opera.com/support/search/view/840/">disable it</a> and still use your favorite BitTorrent + client.</li> </ul> <h3>Portability and Synchronization</h3> -<p>Let’s spend some words about <em>portability</em>. Sure, there are two “Portable Opera” apps out there, and they work well enough, but one thing I’d like about a web browser is the ability to synchronize my preferences, customizations, themes, passwords etc. etc. across multiple computers. <br /> -Firefox is <a href="http://labs.mozilla.com/2007/12/introducing-weave/">getting there</a>, although the technology is still at a very early stage.<br /> -Opera is doing something similar through <a href="http://link.opera.com/">Opera Link</a>, which allows you to synchronize automatically your Bookmarks, your Personal Bar and your Speed Dial. All you need is to get a (free) Opera account, login to Opera Link and enable the synchronization feature from the <em>File</em> menu. From now on every time you’ll modify your Speed Dial or Bookmarks, the changes will be sent to your Opera Link page. Similarly, whenever you start using opera somewhere else, if you login to your Opera Account you should be able to synchronize your Bookmarks and Speed Dial.</p> +<p>Let’s spend some words about <em>portability</em>. Sure, there are two “Portable Opera” apps out + there, and they work well enough, but one thing I’d like about a web browser is the ability to synchronize my + preferences, customizations, themes, passwords etc. etc. across multiple computers. <br /> + Firefox is <a href="http://labs.mozilla.com/2007/12/introducing-weave/">getting there</a>, although the technology + is still at a very early stage.<br /> + Opera is doing something similar through <a href="http://link.opera.com/">Opera Link</a>, which allows you to + synchronize automatically your Bookmarks, your Personal Bar and your Speed Dial. All you need is to get a (free) + Opera account, login to Opera Link and enable the synchronization feature from the <em>File</em> menu. From now on + every time you’ll modify your Speed Dial or Bookmarks, the changes will be sent to your Opera Link page. + Similarly, whenever you start using opera somewhere else, if you login to your Opera Account you should be able to + synchronize your Bookmarks and Speed Dial.</p> <p>Here are some thoughts on this type of technology:</p> <ul> - <li>It’s not totally private yet. While it’s great to be able to sync bookmarks and speed dial, the problems arise when you finish using your friend’s computer for example… what happens to the bookmarks you just sync’ed? The only way to delete them would be to have your friend to log in to his Opera account and re-sync them. Not enough privacy for my liking.</li> - <li>Your passwords, notes, widgets, etc. etc. cannot be synchronized yet, but that will hopefully be possible in near future.</li> - <li>Sync’ing bookmarks is pointless for me. Although Opera still hopes to compete with Del.icio.us & Co., that will be very hard to achieve. I stopped using in-browser bookmarks long ago.</li> - <li>Link seems and interesting feature considering that Opera is available on virtually <em>any operating system</em> and a lot of different devices (mobile phones, Nintendo DS & Wii, …).</li> + <li>It’s not totally private yet. While it’s great to be able to sync bookmarks and speed dial, the + problems arise when you finish using your friend’s computer for example… what happens to the + bookmarks you just sync’ed? The only way to delete them would be to have your friend to log in to his + Opera account and re-sync them. Not enough privacy for my liking.</li> + <li>Your passwords, notes, widgets, etc. etc. cannot be synchronized yet, but that will hopefully be possible in + near future.</li> + <li>Sync’ing bookmarks is pointless for me. Although Opera still hopes to compete with Del.icio.us & Co., + that will be very hard to achieve. I stopped using in-browser bookmarks long ago.</li> + <li>Link seems and interesting feature considering that Opera is available on virtually <em>any operating + system</em> and a lot of different devices (mobile phones, Nintendo DS & Wii, …).</li> </ul> -<p>At any rate, it is still possible to “carry around” your personal opera settings by following the instructions provided on <a href="http://help.opera.com/Windows/9.50/en/backup.html">this page</a> which explains pretty much everything you need to know aboud Opera files and local storage.</p> +<p>At any rate, it is still possible to “carry around” your personal opera settings by following the + instructions provided on <a href="http://help.opera.com/Windows/9.50/en/backup.html">this page</a> which explains + pretty much everything you need to know aboud Opera files and local storage.</p> <h3>Advanced Features</h3> -<p>Opera looks more “polished up” than Firefox in most cases. The superb usage of tabs for nearly everything is one example, and another one is the possibility to apply skins (themes) on-the-fly, without having to restart the browser. <br /> -Firefox <em>can</em> do this via the <a href="http://labs.mozilla.com/2007/12/personas-for-firefox/">Personas</a> extension, but Opera had this built-in for a long time.</p> +<p>Opera looks more “polished up” than Firefox in most cases. The superb usage of tabs for nearly everything + is one example, and another one is the possibility to apply skins (themes) on-the-fly, without having to restart the + browser. <br /> + Firefox <em>can</em> do this via the <a href="http://labs.mozilla.com/2007/12/personas-for-firefox/">Personas</a> + extension, but Opera had this built-in for a long time.</p> <p>To apply a new skin:</p> <ol> <li>Go to the <a href="http://my.opera.com/community/customize/skins/">Skins Directory</a></li> <li>Download a skin you like</li> - <li>Opera will download and apply the skin immediately, <strong>and it will ask you whether you want to keep it or not</strong>. If you choose not to, it won’t save it in your profile (very useful for quick previews). Neat.</li> + <li>Opera will download and apply the skin immediately, <strong>and it will ask you whether you want to keep it or + not</strong>. If you choose not to, it won’t save it in your profile (very useful for quick previews). + Neat.</li> </ol> -<p>Another quality opera always excelled to is accessibility. Besides using the interface in the traditional way, it is also possible to:</p> +<p>Another quality opera always excelled to is accessibility. Besides using the interface in the traditional way, it is + also possible to:</p> <ul> - <li><strong>Use <a href="http://www.opera.com/products/desktop/mouse">mouse gestures</a></strong> – I wasn’t a big fan of this until I bothered reading the excellent documentation Opera provided for them (which is significantly better than <a href="http://www.mousegestures.org/">the Firefox’s equivalent</a>). It can be quite useful at times.</li> - <li><strong>Use <a href="http://www.opera.com/products/desktop/keyboard/">keyboard shortcuts</a></strong> – Believe it or not, you can literally <a href="http://www.opera.com/support/tutorials/nomouse/">use Opera without a mouse</a>.</li> - <li><strong><a href="http://www.opera.com/products/desktop/voice/">Speak</a> to it</strong> – Opera’s voice integration is getting better and better. Not only you can effectively <a href="http://www.opera.com/support/tutorials/voice/">tell your browser what to do</a>, you can also use the built-in text-to-speech function (Windows only) to have it read entire pages for you. It actually works quite well and it can parse punctuation well enough to apply the right intonation. Just for fun, I had it read it an Italian page… and it actually worked as expected: it was like listening to an American reading an Italian text using US pronuntiation!</li> + <li><strong>Use <a href="http://www.opera.com/products/desktop/mouse">mouse gestures</a></strong> – I + wasn’t a big fan of this until I bothered reading the excellent documentation Opera provided for them + (which is significantly better than <a href="http://www.mousegestures.org/">the Firefox’s equivalent</a>). + It can be quite useful at times.</li> + <li><strong>Use <a href="http://www.opera.com/products/desktop/keyboard/">keyboard shortcuts</a></strong> – + Believe it or not, you can literally <a href="http://www.opera.com/support/tutorials/nomouse/">use Opera without + a mouse</a>.</li> + <li><strong><a href="http://www.opera.com/products/desktop/voice/">Speak</a> to it</strong> – Opera’s + voice integration is getting better and better. Not only you can effectively <a + href="http://www.opera.com/support/tutorials/voice/">tell your browser what to do</a>, you can also use the + built-in text-to-speech function (Windows only) to have it read entire pages for you. It actually works quite + well and it can parse punctuation well enough to apply the right intonation. Just for fun, I had it read it an + Italian page… and it actually worked as expected: it was like listening to an American reading an Italian + text using US pronuntiation!</li> </ul> <p>Finally, power users will be delighted of the way opera lets you hack the program settings, as you can:</p> <ul> - <li>Use <strong>Tools > Quick Preferences</strong> to block/unblock popups, cookies, Java applets, images, etc.</li> - <li>Use <strong>Tools > Advanced</strong> to access detailed information concerning cookies, cache (it lists every image/object cached!), plug-ins, Wand passwords, etc.</li> - <li>Use <strong>Tools > Appearence…</strong> to access and manage appearance-related settings, like skins, toolbars, buttons and panels</li> + <li>Use <strong>Tools > Quick Preferences</strong> to block/unblock popups, cookies, Java applets, images, etc. + </li> + <li>Use <strong>Tools > Advanced</strong> to access detailed information concerning cookies, cache (it lists + every image/object cached!), plug-ins, Wand passwords, etc.</li> + <li>Use <strong>Tools > Appearence…</strong> to access and manage appearance-related settings, like skins, + toolbars, buttons and panels</li> <li>Use <strong>Tools > Preferences…</strong> to access general preferences (all the rest)</li> - <li>Type in <strong>opera:config</strong> to view and tweak Opera’s internal settings, somehow like Firefox’s about:config, but much cleaner and easier to use.</li> - <li>Download the <strong><a href="http://dev.opera.com/tools/">Developer Console</a></strong> to have a simpler alternative to Firefox’s Web Developer Toolbar extension, to view <span class="caps">DOM</span> elements, <span class="caps">CSS</span> and Javascript information.</li> + <li>Type in <strong>opera:config</strong> to view and tweak Opera’s internal settings, somehow like + Firefox’s about:config, but much cleaner and easier to use.</li> + <li>Download the <strong><a href="http://dev.opera.com/tools/">Developer Console</a></strong> to have a simpler + alternative to Firefox’s Web Developer Toolbar extension, to view <span class="caps">DOM</span> elements, + <span class="caps">CSS</span> and Javascript information. + </li> </ul> <h3>Annoyances</h3> -<p>After using as main browser for a few weeks now, I can say that it’s great but not perfect yet. It’s very advanced, faster and more mature than any other browser, of course,but there are a few things which should be fixed or improved.</p> +<p>After using as main browser for a few weeks now, I can say that it’s great but not perfect yet. It’s very + advanced, faster and more mature than any other browser, of course,but there are a few things which should be fixed + or improved.</p> <p>In particular:</p> <ul> - <li><strong>It’s not open source</strong> – This may not matter to someone, but some people consider this an essential requirement for their browser, and that’s why Firefox is their most obvious choice. Although Opera is free, it is proprietary software after all, which means is definitely not as open as you may want it to be. Personally I’m not too bothered, as I’m starting to think that too much openness may lead to too many unuseful and bloated extensions and make the program somehow “unpredictable” and heavy.</li> - <li><del><strong>No address bar search</strong> – Amazingly, only Firefox seems to have this feature built-in. I’m referring to the ability to type whatever in the address bar to be redirected to the site returned by a Google’s <em>I’m feeling lucky</em> search. It is possible to emulate this feature in Opera by creating a custom search for <em>I’m Feeling Lucky</em> and assign it a short keyword like “l”. In this way, for example, typing in <code>l h3rald</code> should lead you to this website. Not quite as immediate as in Firefox though.</del></li> - <li><del><strong>No find as you type</strong> – Another big disappointment for who comes from Firefox or Safari: Opera still uses a dialog box to perform page searches.</del></li> - <li><del><strong>No spell clecking</strong> – Again, both Firefox and Safari now offer text fields spell checking. Opera doesn’t yet.</del></li> - <li><del><strong>No <span class="caps">HTML</span> mail composer</strong> – Opera’s built-in mail client can display <span class="caps">HTML</span> emails but doesn’t yet allow users to create them.</del></li> - <li><del><strong>Auto-start widgets?</strong> – This is a feature enhancement Opera Dev Team should consider: allow users to configure certain widgets to start automatically when Opera starts.</del></li> - <li><del><strong>Google Reader + Flash problems</strong> – Sometimes I experiences some scrolling problems when reading news which contain embedded flash movies on Google Reader.</del></li> - <li><strong>Corporate Sites</strong> – Unfortunately some corporate web site do not support Opera or are not displayed correctly in Opera. Unfortunately there’s nothing much we can do about it but trying to “mask” Opera as another browser (via <strong>right-click > Edit Site Preferences…</strong>)</li> - <li><del><strong>Default Browser Problems</strong> – Setting Opera as default browser on Windows doesn’t seem to set the file icons accordingly (or worse, it resets them to the default file icon).</del></li> + <li><strong>It’s not open source</strong> – This may not matter to someone, but some people consider + this an essential requirement for their browser, and that’s why Firefox is their most obvious choice. + Although Opera is free, it is proprietary software after all, which means is definitely not as open as you may + want it to be. Personally I’m not too bothered, as I’m starting to think that too much openness may + lead to too many unuseful and bloated extensions and make the program somehow “unpredictable” and + heavy.</li> + <li><del><strong>No address bar search</strong> – Amazingly, only Firefox seems to have this feature built-in. + I’m referring to the ability to type whatever in the address bar to be redirected to the site returned + by a Google’s <em>I’m feeling lucky</em> search. It is possible to emulate this feature in Opera + by creating a custom search for <em>I’m Feeling Lucky</em> and assign it a short keyword like + “l”. In this way, for example, typing in <code>l h3rald</code> should lead you to this website. + Not quite as immediate as in Firefox though.</del></li> + <li><del><strong>No find as you type</strong> – Another big disappointment for who comes from Firefox or + Safari: Opera still uses a dialog box to perform page searches.</del></li> + <li><del><strong>No spell clecking</strong> – Again, both Firefox and Safari now offer text fields spell + checking. Opera doesn’t yet.</del></li> + <li><del><strong>No <span class="caps">HTML</span> mail composer</strong> – Opera’s built-in mail client + can display <span class="caps">HTML</span> emails but doesn’t yet allow users to create them.</del> + </li> + <li><del><strong>Auto-start widgets?</strong> – This is a feature enhancement Opera Dev Team should consider: + allow users to configure certain widgets to start automatically when Opera starts.</del></li> + <li><del><strong>Google Reader + Flash problems</strong> – Sometimes I experiences some scrolling problems + when reading news which contain embedded flash movies on Google Reader.</del></li> + <li><strong>Corporate Sites</strong> – Unfortunately some corporate web site do not support Opera or are not + displayed correctly in Opera. Unfortunately there’s nothing much we can do about it but trying to + “mask” Opera as another browser (via <strong>right-click > Edit Site Preferences…</strong>) + </li> + <li><del><strong>Default Browser Problems</strong> – Setting Opera as default browser on Windows doesn’t + seem to set the file icons accordingly (or worse, it resets them to the default file icon).</del></li> </ul> <p><strong><span class="caps">ERRATA</span>:</strong></p> <ul> - <li>It is possible to have Opera to redirect you to the right after typing a few words in thr address bar by setting Google’s “I’m feeling lucky” as default search engine <em>(thanks <strong>EJ902</strong>)</em>.</li> - <li>Spell Checking is <a href="http://www.opera.com/support/tutorials/opera/spellcheck/">supported</a> via <span class="caps">GNU</span> Aspell <em>(thanks <strong>cvm</strong>)</em> or by using <a href="http://opera.gt500.org/ospell/">Ospell</a> for inline spell checking <em>(thanks <strong>Dava</strong>)</em>.</li> - <li>Find as you type can be triggered by pressing <code>.</code> and typing <em>(thanks <strong>cvm</strong>)</em>.</li> - <li>It is possible to auto-start widgets by saving a session with all your widget open and reloading it at every startup [CTRL+F12 > General > Startup > Continue saved sessions] <em>(thanks <strong>Tamil</strong> & <strong>Ameer</strong>)</em>.</li> - <li>As of the <a href="http://my.opera.com/desktopteam/blog/">latest snapshot</a>, setting Opera as default browser and handler for <span class="caps">HTML</span> files doesn’t cause any problems <em>thanks <strong>Ayush</strong>)</em>.</li> + <li>It is possible to have Opera to redirect you to the right after typing a few words in thr address bar by setting + Google’s “I’m feeling lucky” as default search engine <em>(thanks + <strong>EJ902</strong>)</em>.</li> + <li>Spell Checking is <a href="http://www.opera.com/support/tutorials/opera/spellcheck/">supported</a> via <span + class="caps">GNU</span> Aspell <em>(thanks <strong>cvm</strong>)</em> or by using <a + href="http://opera.gt500.org/ospell/">Ospell</a> for inline spell checking <em>(thanks + <strong>Dava</strong>)</em>.</li> + <li>Find as you type can be triggered by pressing <code>.</code> and typing <em>(thanks <strong>cvm</strong>)</em>. + </li> + <li>It is possible to auto-start widgets by saving a session with all your widget open and reloading it at every + startup [CTRL+F12 > General > Startup > Continue saved sessions] <em>(thanks <strong>Tamil</strong> + & <strong>Ameer</strong>)</em>.</li> + <li>As of the <a href="http://my.opera.com/desktopteam/blog/">latest snapshot</a>, setting Opera as default browser + and handler for <span class="caps">HTML</span> files doesn’t cause any problems <em>thanks + <strong>Ayush</strong>)</em>.</li> </ul> <h3>Conclusion</h3> -<p>Despite the few annoyances listed in the previous section, Opera 9.5 beta 1 truly impressed me. I was waiting for Opera to get better before switching and now I’ve not been using Firefox for a few weeks.<br /> -Although Opera offers a lot of features, there’s still room for improvements, especially for what concerns integration with third party services: I would really like to see some sort of integration with del.icio.us, and that could be possible via widgets at least. <br /> -Regarding the new Opera Link feature, it looks very promising and a potential competitor for Mozilla Weave even though it will be used mainly to get more and more users to register to the Opera community (I did, at least), which is indeed very active any way.</p> -<p>To conclude this article, which still barely scratches the surface of this very powerful application, I’d like to praise two more things about Opera:</p> +<p>Despite the few annoyances listed in the previous section, Opera 9.5 beta 1 truly impressed me. I was waiting for + Opera to get better before switching and now I’ve not been using Firefox for a few weeks.<br /> + Although Opera offers a lot of features, there’s still room for improvements, especially for what concerns + integration with third party services: I would really like to see some sort of integration with del.icio.us, and + that could be possible via widgets at least. <br /> + Regarding the new Opera Link feature, it looks very promising and a potential competitor for Mozilla Weave even + though it will be used mainly to get more and more users to register to the Opera community (I did, at least), which + is indeed very active any way.</p> +<p>To conclude this article, which still barely scratches the surface of this very powerful application, I’d like + to praise two more things about Opera:</p> <p><span style="float:right; margin:3px;"><br /> -<script type="text/javascript"> -digg_url = 'http://digg.com/software/A_Firefox_Lover_s_Guide_to_Opera'; -</script> -<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script><br /> -</span></p> + <script type="text/javascript"> + digg_url = 'http://digg.com/software/A_Firefox_Lover_s_Guide_to_Opera'; + </script> + <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script><br /> + </span></p> <ul> - <li>Their website network, and in particular their truly excellent documentation knowledge base, which is very comprehensive of references, tutorials and interesting articles. I am a full time technical writer myself, and I’ve hardly ever come across better documentation.</li> - <li>Their extensive <a href="http://www.opera.com/docs/specs/">support and compliance to web standards</a>, which makes Opera the most advanced browser ever made.</li> + <li>Their website network, and in particular their truly excellent documentation knowledge base, which is very + comprehensive of references, tutorials and interesting articles. I am a full time technical writer myself, and + I’ve hardly ever come across better documentation.</li> + <li>Their extensive <a href="http://www.opera.com/docs/specs/">support and compliance to web standards</a>, which + makes Opera the most advanced browser ever made.</li> </ul> -<p>If you’ve not tried Opera before, or if you’ve always dismissed it because “X browser is better”, you may want to <a href="http://www.opera.com/products/desktop/">give it another shot</a>: for me it was definitely worthwhile!</p> +<p>If you’ve not tried Opera before, or if you’ve always dismissed it because “X browser is + better”, you may want to <a href="http://www.opera.com/products/desktop/">give it another shot</a>: for me it + was definitely worthwhile!</p>
@@ -6,102 +6,149 @@ timestamp: 1314559080
tags: "glyph|ruby|opensource" ----- - <section class="section"> -<p>Too much time passed since the last Glyph release. Way too much. Finally I found the time and will to tidy up the last few remaining bugs, update the docs, and release it!</p> -<p>This new release was mainly focused on extending the features of Glyph as a <em>language</em>. Besides a few improvements that make writing Glyph code easier and more readable (e.g. macro composition), Glyph is now Turing-complete. It supports iterations, recursion, variable assignments, basic arithmetics… you can even write a program to compute the factorial of an integer, if you wanted to.</p> -<p>Additionally, it also features enhanced content reuse through fragments and output-independent macros, and a few bugfixes.</p> - <section class="section"> -<header><h1 id="h_1" class="toc">Calibre Integration</h1></header> -<p><a href="https://github.com/tammycravit">Tammy Cravit</a> proposed (and more or less implemented) an interesting new feature: integrate <a href="http://calibre-ebook.com/">Calibre</a> to generate ebooks in <span class="caps">EPUB</span> and <span class="caps">MOBI</span> format from Glyph’s native standalone <span class="caps">HTML</span> output format.</p> -<p>Although the support is still somewhat rough, you can, as a matter of fact, generate ebooks with Glyph, using Calibre.</p> + <p>Too much time passed since the last Glyph release. Way too much. Finally I found the time and will to tidy up the + last few remaining bugs, update the docs, and release it!</p> + <p>This new release was mainly focused on extending the features of Glyph as a <em>language</em>. Besides a few + improvements that make writing Glyph code easier and more readable (e.g. macro composition), Glyph is now + Turing-complete. It supports iterations, recursion, variable assignments, basic arithmetics… you can even + write a program to compute the factorial of an integer, if you wanted to.</p> + <p>Additionally, it also features enhanced content reuse through fragments and output-independent macros, and a few + bugfixes.</p> -</section> -<section class="section"> -<header><h1 id="h_2" class="toc">Macro Composition</h1></header> -<p>This release features an update at syntax-level: the possibility of “composing” macros, thereby eliminating nesting provided that containers take only one parameter and no attributes. What? This:</p> - <div class="CodeRay"> - <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>?[ + <section class="section"> + <header> + <h1 id="h_1" class="toc">Calibre Integration</h1> + </header> + <p><a href="https://github.com/tammycravit">Tammy Cravit</a> proposed (and more or less implemented) an interesting + new feature: integrate <a href="http://calibre-ebook.com/">Calibre</a> to generate ebooks in <span + class="caps">EPUB</span> and <span class="caps">MOBI</span> format from Glyph’s native standalone <span + class="caps">HTML</span> output format.</p> + <p>Although the support is still somewhat rough, you can, as a matter of fact, generate ebooks with Glyph, using + Calibre.</p> + + </section> + <section class="section"> + <header> + <h1 id="h_2" class="toc">Macro Composition</h1> + </header> + <p>This release features an update at syntax-level: the possibility of “composing” macros, thereby + eliminating nesting provided that containers take only one parameter and no attributes. What? This:</p> + <div class="CodeRay"> + <div class="code"> + <pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>?[ <span class="line-numbers"><a href="#n2" name="n2">2</a></span> not[output?[pdf]]| <span class="line-numbers"><a href="#n3" name="n3">3</a></span> ... -<span class="line-numbers"><a href="#n4" name="n4">4</a></span>]</pre></div> -</div> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>]</pre> + </div> + </div> -<p>Can be written like this:</p> + <p>Can be written like this:</p> - <div class="CodeRay"> - <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>?[ + <div class="CodeRay"> + <div class="code"> + <pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>?[ <span class="line-numbers"><a href="#n2" name="n2">2</a></span> not/output?[pdf]| <span class="line-numbers"><a href="#n3" name="n3">3</a></span> ... -<span class="line-numbers"><a href="#n4" name="n4">4</a></span>]</pre></div> -</div> +<span class="line-numbers"><a href="#n4" name="n4">4</a></span>]</pre> + </div> + </div> -<p>In this case, the <code>not</code> macro was composed with the <code>output?</code> macro, thus removing one level of nesting.</p> -<p>Additionally, I used this features to create an <code>xml</code> macro dispatcher that can be used to render raw <span class="caps">XML</span> tags, and an <code>s</code> macro dispatcher that basically is able to call nearly all the instance methods of the Ruby String class. So you can write things like <code>s/sub[This feature makes my life easier|/my/|your]</code> and similar.</p> + <p>In this case, the <code>not</code> macro was composed with the <code>output?</code> macro, thus removing one + level of nesting.</p> + <p>Additionally, I used this features to create an <code>xml</code> macro dispatcher that can be used to render raw + <span class="caps">XML</span> tags, and an <code>s</code> macro dispatcher that basically is able to call nearly + all the instance methods of the Ruby String class. So you can write things like + <code>s/sub[This feature makes my life easier|/my/|your]</code> and similar.</p> -</section> -<section class="section"> -<header><h1 id="h_3" class="toc">Turing-Completeness</h1></header> -<p>As of this version, Glyph can be considered <em>Turing-complete</em>, as it satisfies the following <a href="http://c2.com/cgi/wiki?LanguageRequirementsForTuringCompleteness">requirements for Turing-completeness</a>:</p> -<ul> - <li>A conditional construct, implemented via the <code>condition</code> macro.</li> - <li>Variable assignment, by setting the value of snippets using the <code>snippet:</code> macro and of attributes using the <code>attribute:</code> macro.</li> - <li>(infinite) iteration implemented through the new <code>while</code> macro or recursion, which is possible thanks to the new <code>define:</code> macro.</li> - <li>A memory model which emulates an infinite store: there are no enforced limits on attribute/snippets allocations and number of algorithms or parameters.</li> -</ul> -<p>Plus, Glyph now understand basic integer arithmetic:</p> - <div class="CodeRay"> - <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>def:[factorial| + </section> + <section class="section"> + <header> + <h1 id="h_3" class="toc">Turing-Completeness</h1> + </header> + <p>As of this version, Glyph can be considered <em>Turing-complete</em>, as it satisfies the following <a + href="http://c2.com/cgi/wiki?LanguageRequirementsForTuringCompleteness">requirements for + Turing-completeness</a>:</p> + <ul> + <li>A conditional construct, implemented via the <code>condition</code> macro.</li> + <li>Variable assignment, by setting the value of snippets using the <code>snippet:</code> macro and of attributes + using the <code>attribute:</code> macro.</li> + <li>(infinite) iteration implemented through the new <code>while</code> macro or recursion, which is possible + thanks to the new <code>define:</code> macro.</li> + <li>A memory model which emulates an infinite store: there are no enforced limits on attribute/snippets + allocations and number of algorithms or parameters.</li> + </ul> + <p>Plus, Glyph now understand basic integer arithmetic:</p> + <div class="CodeRay"> + <div class="code"> + <pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>def:[factorial| <span class="line-numbers"><a href="#n2" name="n2">2</a></span> ?[ <span class="line-numbers"><a href="#n3" name="n3">3</a></span> eq[{{0}}|0]|1| <span class="line-numbers"><a href="#n4" name="n4">4</a></span> multiply[ <span class="line-numbers"><a href="#n5" name="n5">5</a></span> {{0}} | factorial[subtract[{{0}}|1]] <span class="line-numbers"><a href="#n6" name="n6">6</a></span> ] <span class="line-numbers"><a href="#n7" name="n7">7</a></span> ] -<span class="line-numbers"><a href="#n8" name="n8">8</a></span>]</pre></div> -</div> +<span class="line-numbers"><a href="#n8" name="n8">8</a></span>]</pre> + </div> + </div> - <p>Not that you <em>need</em> to be able to calculate factorials in your documents, but know that now you <em>can</em>. An you can also define lexically scoped variables, err… <em>attributes</em>, like this:</p> - <div class="CodeRay"> - <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>let[ + <p>Not that you <em>need</em> to be able to calculate factorials in your documents, but know that now you + <em>can</em>. An you can also define lexically scoped variables, err… <em>attributes</em>, like this:</p> + <div class="CodeRay"> + <div class="code"> + <pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>let[ <span class="line-numbers"><a href="#n2" name="n2">2</a></span> @:[a|bits] <span class="line-numbers"><a href="#n3" name="n3">3</a></span> @:[b|bobs] <span class="line-numbers"><a href="#n4" name="n4">4</a></span> section[ <span class="line-numbers"><a href="#n5" name="n5">5</a></span> @title[Something more about attributes] <span class="line-numbers"><a href="#n6" name="n6">6</a></span>Attributes are like lexically scoped variables. You can use them to store @[a] and @[b]. <span class="line-numbers"><a href="#n7" name="n7">7</a></span> ] -<span class="line-numbers"><a href="#n8" name="n8">8</a></span>]</pre></div> -</div> +<span class="line-numbers"><a href="#n8" name="n8">8</a></span>]</pre> + </div> + </div> - <p>Handy enough.</p> + <p>Handy enough.</p> -</section> -<section class="section"> -<header><h1 id="h_4" class="toc">Embeddable fragments</h1></header> -<p>Too lazy to create snippets? Feel the urge to re-use something you already wrote somewhere? Use a <em>fragment</em> and embed it, as follows:</p> - <div class="CodeRay"> - <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>Snippets and fragments ##[good_way|are a good way to reuse] small chunks of content, -<span class="line-numbers"><a href="#n2" name="n2">2</a></span>while the include and load macros <span class="error"><</span>=[good_way] entire files.</pre></div> -</div> + </section> + <section class="section"> + <header> + <h1 id="h_4" class="toc">Embeddable fragments</h1> + </header> + <p>Too lazy to create snippets? Feel the urge to re-use something you already wrote somewhere? Use a + <em>fragment</em> and embed it, as follows:</p> + <div class="CodeRay"> + <div class="code"> + <pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>Snippets and fragments ##[good_way|are a good way to reuse] small chunks of content, +<span class="line-numbers"><a href="#n2" name="n2">2</a></span>while the include and load macros <span class="error"><</span>=[good_way] entire files.</pre> + </div> + </div> - <p>…And you can also use a new <code>load</code> macro, to embed entire files without performing any evaluation (like <code>include</code> does).</p> + <p>…And you can also use a new <code>load</code> macro, to embed entire files without performing any + evaluation (like <code>include</code> does).</p> -</section> -<section class="section"> -<header><h1 id="h_5" class="toc">Incompatibilities with previous versions</h1></header> -<p>To sum up:</p> -<ul> - <li><code>snippets.yml</code> is no more, define all your snippets inside your document instead.</li> - <li>New “invisible space separator”: <code>\/</code> instead of <code>\.</code>. Because it’s slightly prettier, nothing else.</li> - <li>The <code>rewrite:</code> macro has been replaced by the <code>define:</code> macro, which also allows recursion, so be careful!</li> - <li>If you want to render raw <span class="caps">XML</span> tags, use <code>xml/tag_name</code> instead of <code>=tag_name</code>.</li> - <li>No more <code>match</code> macro, use <code>s/match</code> instead.</li> -</ul> -<p>For the full list of the issues fixed in this release, see the <a href="http://www.h3rald.com/glyph/book/changelog.html">Changelog</a>.</p> -<p>Hope you’ll enjoy this new release of Glyph. If you want to contribute, go ahead and <a href="https://github.com/h3rald/glyph">fork the repo</a>!</p> + </section> + <section class="section"> + <header> + <h1 id="h_5" class="toc">Incompatibilities with previous versions</h1> + </header> + <p>To sum up:</p> + <ul> + <li><code>snippets.yml</code> is no more, define all your snippets inside your document instead.</li> + <li>New “invisible space separator”: <code>\/</code> instead of <code>\.</code>. Because it’s + slightly prettier, nothing else.</li> + <li>The <code>rewrite:</code> macro has been replaced by the <code>define:</code> macro, which also allows + recursion, so be careful!</li> + <li>If you want to render raw <span class="caps">XML</span> tags, use <code>xml/tag_name</code> instead of + <code>=tag_name</code>.</li> + <li>No more <code>match</code> macro, use <code>s/match</code> instead.</li> + </ul> + <p>For the full list of the issues fixed in this release, see the <a + href="/glyph/book/changelog.html">Changelog</a>.</p> + <p>Hope you’ll enjoy this new release of Glyph. If you want to contribute, go ahead and <a + href="https://github.com/h3rald/glyph">fork the repo</a>!</p> -</section> + </section> </section>
@@ -4,15 +4,33 @@ content-type: article
timestamp: 1225081740 tags: "website|rails" ----- -<p>I finally decided to redesign my web site. About 2 years passed since last time and I think this was long overdue: a lot of people liked the black <em>Nitefall</em> theme, but a lot of people found a bit too dark for their liking.</p> -<p>I decided to go for something more <del>boring</del> traditional this time: white background and only black header and footer. I think the new design improves the overall readability of the site, also because this time I kept thing simple:</p> +<p>I finally decided to redesign my web site. About 2 years passed since last time and I think this was long overdue: a + lot of people liked the black <em>Nitefall</em> theme, but a lot of people found a bit too dark for their liking. +</p> +<p>I decided to go for something more <del>boring</del> traditional this time: white background and only black header + and footer. I think the new design improves the overall readability of the site, also because this time I kept thing + simple:</p> <ul> - <li>No more sidebars – Who needs them anyway? Who wants to see my <a href="http://www.delicious.com/h3rald">delicious bookmarks</a> on <em>every single page</em>? Who wants to see that annoying Web 2.0-ish tag cloud listing all the tags I’ve ever used from 2006 onwards? I suddently realized that the right column was nothing more than wasted space, so I removed it altogether.</li> - <li>No more differentiation between <em>articles</em> and <em>blog posts</em> – As a matter of fact, I’m not posting little pointless tidbits everyday, it’s more likely just once a week or even once a month. When I post though, I tend to make it worthwhile both for me and the readers by writing about something which may interest people, for a change. In short: this may not be a “traditional blog” anymore, just a publishing platform for my articles.</li> - <li>No more “previews” – From now on, only the title of each articles is displayed in the home page, in the archives and even when searching. If you want to read an article, all you have to do is click on its title. No more “Read More” links.</li> - <li>Just three main pages: <a href="">Home</a>, <a href="/archives">Archives</a>, and <a href="/about">About</a>. Although there may be some more for special projects, at some point.</li> - <li>Use the <a href="/archives">Archives</a> to find my articles. There you’ll find a list of the 20 most used tags, a search form, and a timeline listing <em>all</em> my articles from 2006 onwards.</li> - <li>Use the tiny palette on the left side of each page to perform common actions like bookmarking, scroll up and down, etc. You can read more about it on the <a href="/about">About</a> page.</li> + <li>No more sidebars – Who needs them anyway? Who wants to see my <a + href="http://www.delicious.com/h3rald">delicious bookmarks</a> on <em>every single page</em>? Who wants to + see that annoying Web 2.0-ish tag cloud listing all the tags I’ve ever used from 2006 onwards? I suddently + realized that the right column was nothing more than wasted space, so I removed it altogether.</li> + <li>No more differentiation between <em>articles</em> and <em>blog posts</em> – As a matter of fact, I’m + not posting little pointless tidbits everyday, it’s more likely just once a week or even once a month. + When I post though, I tend to make it worthwhile both for me and the readers by writing about something which + may interest people, for a change. In short: this may not be a “traditional blog” anymore, just a + publishing platform for my articles.</li> + <li>No more “previews” – From now on, only the title of each articles is displayed in the home + page, in the archives and even when searching. If you want to read an article, all you have to do is click on + its title. No more “Read More” links.</li> + <li>Just three main pages: <a href="">Home</a>, Archives, and <a href="/about">About</a>. Although there may be some + more for special projects, at some point.</li> + <li>Use the Archives to find my articles. There you’ll find a list of the 20 most used tags, a search form, + and a timeline listing <em>all</em> my articles from 2006 onwards.</li> + <li>Use the tiny palette on the left side of each page to perform common actions like bookmarking, scroll up and + down, etc. You can read more about it on the <a href="/about">About</a> page.</li> </ul> -<p>I hope you like the new design, or at least I hope it makes my articles more readable. However, I’m open to suggestions, as usual.</p> -<p>P.S.: I dropped with Internet Explorer 6 compatibility According to my stats, less than 5% of my visitors use it, so it’s not worth the extra hassle.</p> +<p>I hope you like the new design, or at least I hope it makes my articles more readable. However, I’m open to + suggestions, as usual.</p> +<p>P.S.: I dropped with Internet Explorer 6 compatibility According to my stats, less than 5% of my visitors use it, so + it’s not worth the extra hassle.</p>
@@ -6,83 +6,134 @@ timestamp: 1356648094
tags: "website|webdevelopment" ----- - <section class="section"> -<p>One of the many things that really bothered me about my web site was the fact that it didn’t look good on my iPhone, or any small screen for that matter.</p> -<p>Years ago I <a href="http://www.alistapart.com/articles/responsive-web-design/">read about</a> responsive web design, media queries, etc., but I never had the will or the time to dive into the subject. Then <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a> came out, and it changed <em>everything</em>.</p> -<p>Not only Bootstrap provides a very solid <span class="caps">HTML</span> boilerplate and grid system, it also comes with some very nice and complete styles for every <span class="caps">HTML</span> element, a few Javascript-enhanced UI components, and best of all it is fully responsive.</p> - <section class="section"> -<header><h1 id="h_1" class="toc">Getting to know Bootstrap & its CSS wizardry</h1></header> -<p>Redesigning H3RALD.com using Twitter Bootstrap turned out to be fairly easy. I headed up to the <a href="http://twitter.github.com/bootstrap/customize.html">Customize and Download</a> page and set a few variables like the font to use (the beautiful <a href="http://aldusleaf.org/crimson.php">Crimson text</a>), the link color and so on, and downloaded the lot.</p> -<p>I more or less completely forgot about my old <span class="caps">CSS</span> stylesheets and went with Bootstrap all the way. I was happy with a lot of the defaults, but I had to add a few rules and overrides for:</p> -<ul> - <li>headings</li> - <li>line heights</li> - <li>A few custom classes I use extensively, like add a <code>text-align: justify;</code> for the <code>hyphenate</code> class.</li> -</ul> -<p>Now, one of the cool things of Bootstrap is that it comes with smart defaults, and that it lets you add specific features to elements simply by adding a <span class="caps">CSS</span> class to them. Take a look at how <a href="http://twitter.github.com/bootstrap/base-css.html#buttons">buttons</a> are constructed, for instance. Normal button? Sure:</p> -<table> -<tr> -<td> -<div class="code"> -<pre> + <p>One of the many things that really bothered me about my web site was the fact that it didn’t look good on + my iPhone, or any small screen for that matter.</p> + <p>Years ago I <a href="http://www.alistapart.com/articles/responsive-web-design/">read about</a> responsive web + design, media queries, etc., but I never had the will or the time to dive into the subject. Then <a + href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a> came out, and it changed + <em>everything</em>. + </p> + <p>Not only Bootstrap provides a very solid <span class="caps">HTML</span> boilerplate and grid system, it also + comes with some very nice and complete styles for every <span class="caps">HTML</span> element, a few + Javascript-enhanced UI components, and best of all it is fully responsive.</p> + + <section class="section"> + <header> + <h1 id="h_1" class="toc">Getting to know Bootstrap & its CSS wizardry</h1> + </header> + <p>Redesigning H3RALD.com using Twitter Bootstrap turned out to be fairly easy. I headed up to the <a + href="http://twitter.github.com/bootstrap/customize.html">Customize and Download</a> page and set a few + variables like the font to use (the beautiful <a href="http://aldusleaf.org/crimson.php">Crimson text</a>), + the link color and so on, and downloaded the lot.</p> + <p>I more or less completely forgot about my old <span class="caps">CSS</span> stylesheets and went with + Bootstrap all the way. I was happy with a lot of the defaults, but I had to add a few rules and overrides + for:</p> + <ul> + <li>headings</li> + <li>line heights</li> + <li>A few custom classes I use extensively, like add a <code>text-align: justify;</code> for the + <code>hyphenate</code> class. + </li> + </ul> + <p>Now, one of the cool things of Bootstrap is that it comes with smart defaults, and that it lets you add + specific features to elements simply by adding a <span class="caps">CSS</span> class to them. Take a look at + how <a href="http://twitter.github.com/bootstrap/base-css.html#buttons">buttons</a> are constructed, for + instance. Normal button? Sure:</p> + <table> + <tr> + <td> + <div class="code"> + <pre> <code> <button class="btn">Click Me!</button> </code> </pre> -</div> -<p></td><td><button class="btn">Click Me!</button></td></p> -</tr> -</table> -<p>That’s grey with black text. Boring. Want it red? Sure, add the <code>.btn-danger</code> class:</p> -<table> -<tr> -<td> -<div class="code"> -<pre> + </div> + <p> + </td> + <td><button class="btn">Click Me!</button></td> + </p> + </tr> + </table> + <p>That’s grey with black text. Boring. Want it red? Sure, add the <code>.btn-danger</code> class:</p> + <table> + <tr> + <td> + <div class="code"> + <pre> <code> <button class="btn btn-danger">Click Me!</button> </code> </pre> -</div> -<p></td><td><button class="btn btn-danger">Click Me!</button></td></p> -</tr> -</table> -<p>Too big? No problem, make it smaller with <code>.btn-sm</code>, so we have:</p> -<table> -<tr> -<td> -<div class="code"> -<pre> + </div> + <p> + </td> + <td><button class="btn btn-danger">Click Me!</button></td> + </p> + </tr> + </table> + <p>Too big? No problem, make it smaller with <code>.btn-sm</code>, so we have:</p> + <table> + <tr> + <td> + <div class="code"> + <pre> <code> <button class="btn btn-danger btn-small">Click Me!</button> </code> </pre> -</div> -<p></td><td><button class="btn btn-danger btn-small">Click Me!</button></td></p> -</tr> -</table> -<p>Wouldn’t it be nice to have a nice icon in it? Add an empty <code><i></code> element with a suitable class and there you have a nice <a href="http://twitter.github.com/bootstrap/base-css.html#icons">Glyphicon</a> before the button text (or you can use other icon fonts, like <a href="http://fontawesome.io/">FontAwesome</a>).</p> -<table> -<tr> -<td> -<div class="code"> -<pre> + </div> + <p> + </td> + <td><button class="btn btn-danger btn-small">Click Me!</button></td> + </p> + </tr> + </table> + <p>Wouldn’t it be nice to have a nice icon in it? Add an empty <code><i></code> element with a + suitable class and there you have a nice <a + href="http://twitter.github.com/bootstrap/base-css.html#icons">Glyphicon</a> before the button text (or + you can use other icon fonts, like <a href="http://fontawesome.io/">FontAwesome</a>).</p> + <table> + <tr> + <td> + <div class="code"> + <pre> <code> <button class="btn btn-danger btn-sm"><i class="fa fa-check"></i> Click Me!</button> </code> </pre> -</div> -<p></td><td><button class="btn btn-danger btn-sm"><i class="fa fa-check"></i> Click Me!</button></td></p> -</tr> -</table> -<p>…You get the picture. And it works surprisingly well — if you embrace its philosophy, that is. Just like Rails & Co.: an <em>opinionated</em> framework.</p> -<p>The only thing that bugged me about all this was that by adding smart <span class="caps">CSS</span> classes to elements you’re actually specifying how something looks like by polluting <span class="caps">HTML</span> code. Granted, if your stylesheet doesn’t include a <code>.btn-inverse</code> your buttons won’t automagically become black, but you know what I mean. Although in a very nice way, by following Bootstrap’s way of doing things you are no longer separating content from presentation. And in the next six months, when I’ll ditch Bootstrap for something better, all the previews of the code snippets above won’t work unless I keep using the Bootstrap stylesheet or at least some of its button classes.</p> -<p>The real problems arise for the stylesheets provided for general elements. By default, Bootstrap styles tables with no borders or colors. What if I wanted just ordinary tables to be striped and bordered? Sure, I can add the <code>.table-striped</code> and <code>.table-bordered</code> classes to all tables, and that’s it. In <span class="caps">EVERY</span> table. Or of course undo bootstrap’s magic by overriding the <span class="caps">CSS</span> rules for ordinary tables, to include the rules specified for <code>.table-striped</code> and <code>.table-bordered</code>. Copy & paste someone else’s code? Not nice.</p> -<p>Luckily, using <a href="http://sass-lang.com/"><span class="caps">SASS</span></a> finally paid off, and here’s how to do it in a nice and tidy way:</p> - -<div class="code"> -<pre> + </div> + <p> + </td> + <td><button class="btn btn-danger btn-sm"><i class="fa fa-check"></i> Click Me!</button></td> + </p> + </tr> + </table> + <p>…You get the picture. And it works surprisingly well — if you embrace its philosophy, that is. + Just like Rails & Co.: an <em>opinionated</em> framework.</p> + <p>The only thing that bugged me about all this was that by adding smart <span class="caps">CSS</span> classes + to elements you’re actually specifying how something looks like by polluting <span + class="caps">HTML</span> code. Granted, if your stylesheet doesn’t include a + <code>.btn-inverse</code> your buttons won’t automagically become black, but you know what I mean. + Although in a very nice way, by following Bootstrap’s way of doing things you are no longer separating + content from presentation. And in the next six months, when I’ll ditch Bootstrap for something better, + all the previews of the code snippets above won’t work unless I keep using the Bootstrap stylesheet or + at least some of its button classes. + </p> + <p>The real problems arise for the stylesheets provided for general elements. By default, Bootstrap styles + tables with no borders or colors. What if I wanted just ordinary tables to be striped and bordered? Sure, I + can add the <code>.table-striped</code> and <code>.table-bordered</code> classes to all tables, and + that’s it. In <span class="caps">EVERY</span> table. Or of course undo bootstrap’s magic by + overriding the <span class="caps">CSS</span> rules for ordinary tables, to include the rules specified for + <code>.table-striped</code> and <code>.table-bordered</code>. Copy & paste someone else’s code? + Not nice. + </p> + <p>Luckily, using <a href="http://sass-lang.com/"><span class="caps">SASS</span></a> finally paid off, and + here’s how to do it in a nice and tidy way:</p> + + <div class="code"> + <pre> <code> @import "_bootstrap.scss"; /* The bootstrap stylesheet - just changed its extension and prepended an underscore, nothing more */@@ -94,46 +145,77 @@ @extend .table-bordered;
} </code> </pre> -</div> -<p>There you go. All tables (ordinary <code><table></code> elements with no silly classes attached) are now bordered and striped.</p> + </div> + <p>There you go. All tables (ordinary <code><table></code> elements with no silly classes attached) are + now bordered and striped.</p> -</section> + </section> -<section class="section"> -<header><h1 id="h_2" class="toc">Header & navigation bar</h1></header> -<p>As far as the main site header goes, I decided to use the same one for all pages, containing:</p> -<ul> - <li>The site logo</li> - <li>The search input box (powered by <a href="http://www.google.com/cse/">Google Custom Search Engine</a></li> - <li>A <em>responsive</em> navigation bar with links to all the main sections of the site</li> -</ul> -<p>As far as the navigation bar goes, that’s pure Bootstrap goodness, nothing new there (except the serif font), <a href="http://twitter.github.com/bootstrap/components.html#navbar">look it up</a>.</p> -<p>For the logo… Well, I had this nice plan of using just plain <span class="caps">CSS</span> and web fonts to make it (hell, it’s basically the word “H3RALD”, with the 3 slightly bigger and moved a bit). It worked mostly fine (in webkit browser and in Opera), but Firefox didn’t like it much, and IE… well, some old versions of IE don’t play nice with web fonts, so I decided to make a nice <span class="caps">PNG</span> image and stick it there instead. Less hassle, it works everywhere, job done.</p> -<p>The search input box was a bit more of a challenge. I read up on the new <a href="https://developers.google.com/custom-search/docs/element">Custom Search Element Control <span class="caps">API</span></a>, discovered that Google decided that web designers don’t know Javascript or <span class="caps">CSS</span> nowadays and proposed a new <span class="caps">API</span> that has numerous advantages like:</p> -<blockquote> -<ul> - <li>Easy to use syntax—no JavaScript knowledge required.</li> - <li>Custom Search elements (search boxes and results pages) are rendered based on settings stored on the <span class="caps">CSE</span> servers (along with any client-side customization). Server-side changes don’t require you to copy and paste any new code into your site<br /> -</blockquote></li> -</ul> -<p>Thanks Google. Now every time I change my stylesheet I have to remember to go back to your page and change the link colors etc. And if I decide to hide the page <span class="caps">URL</span> underneath the link in the results? I can’t. And that’s why I decided to reverse engineer their <span class="caps">CSS</span> and provide my overrides. Nasty, but at least I have some control! They’re all <a href="https://github.com/h3rald/h3rald/blob/master/content/styles/_vendor.scss">here</a>, if you are curious.</p> + <section class="section"> + <header> + <h1 id="h_2" class="toc">Header & navigation bar</h1> + </header> + <p>As far as the main site header goes, I decided to use the same one for all pages, containing:</p> + <ul> + <li>The site logo</li> + <li>The search input box (powered by <a href="http://www.google.com/cse/">Google Custom Search Engine</a> + </li> + <li>A <em>responsive</em> navigation bar with links to all the main sections of the site</li> + </ul> + <p>As far as the navigation bar goes, that’s pure Bootstrap goodness, nothing new there (except the serif + font), <a href="http://twitter.github.com/bootstrap/components.html#navbar">look it up</a>.</p> + <p>For the logo… Well, I had this nice plan of using just plain <span class="caps">CSS</span> and web + fonts to make it (hell, it’s basically the word “H3RALD”, with the 3 slightly bigger and + moved a bit). It worked mostly fine (in webkit browser and in Opera), but Firefox didn’t like it much, + and IE… well, some old versions of IE don’t play nice with web fonts, so I decided to make a + nice <span class="caps">PNG</span> image and stick it there instead. Less hassle, it works everywhere, job + done.</p> + <p>The search input box was a bit more of a challenge. I read up on the new <a + href="https://developers.google.com/custom-search/docs/element">Custom Search Element Control <span + class="caps">API</span></a>, discovered that Google decided that web designers don’t know + Javascript or <span class="caps">CSS</span> nowadays and proposed a new <span class="caps">API</span> that + has numerous advantages like:</p> + <blockquote> + <ul> + <li>Easy to use syntax—no JavaScript knowledge required.</li> + <li>Custom Search elements (search boxes and results pages) are rendered based on settings stored on the + <span class="caps">CSE</span> servers (along with any client-side customization). Server-side + changes don’t require you to copy and paste any new code into your site<br /> + </blockquote> + </li> + </ul> + <p>Thanks Google. Now every time I change my stylesheet I have to remember to go back to your page and change + the link colors etc. And if I decide to hide the page <span class="caps">URL</span> underneath the link in + the results? I can’t. And that’s why I decided to reverse engineer their <span + class="caps">CSS</span> and provide my overrides. Nasty, but at least I have some control! They’re + all <a href="https://github.com/h3rald/h3rald/blob/master/content/styles/_vendor.scss">here</a>, if you are + curious.</p> -</section> + </section> -<section class="section"> -<header><h1 id="h_3" class="toc">Other minor changes & tweaks</h1></header> -<p>Other changes from the previous design were relatively minimal:</p> -<ul> - <li>No more newspaper-style home page with five columns, two will suffice.</li> - <li>A brand new <a href="/tags/">Tags</a> page, listing… well, all the site tags that were previously in the <a href="/archives/">Archives</a> pages (now only listing articles by month of publication)</li> - <li>No more Links page. No need for it.</li> - <li>A new, minimalist <a href="/contact/">Contact</a> page, featuring some of the nice <a href="http://zocial.smcllns.com/">Zocial</a> font icons.</li> - <li>No more social buttons on pages. If you use social networks like Twitter, Facebook or Google+ you already know how to share items using bookmarklets or browser extensions. No need to plague my web site with their nasty buttons, badges, ribbons & alike.</li> - <li>No ads! I have a full-time job, my site uses free and open source technologies, and I write because I like to do so, not to make money. And I can afford the few bucks necessary to pay the hosting provider. That’s why there are NO <span class="caps">ADS</span> on H3RALD.com anymore <sup>(*)</sup>.</li> -</ul> -<p><sup>(*)</sup>: For now, that is. Then I’ll probably change my mind, but until then enjoy the true no-ads experience!</p> + <section class="section"> + <header> + <h1 id="h_3" class="toc">Other minor changes & tweaks</h1> + </header> + <p>Other changes from the previous design were relatively minimal:</p> + <ul> + <li>No more newspaper-style home page with five columns, two will suffice.</li> + <li>A brand new Tags page, listing… well, all the site tags that were previously in the Archives pages + (now only listing articles by month of publication)</li> + <li>No more Links page. No need for it.</li> + <li>A new, minimalist Contact page, featuring some of the nice <a + href="http://zocial.smcllns.com/">Zocial</a> font icons.</li> + <li>No more social buttons on pages. If you use social networks like Twitter, Facebook or Google+ you + already know how to share items using bookmarklets or browser extensions. No need to plague my web site + with their nasty buttons, badges, ribbons & alike.</li> + <li>No ads! I have a full-time job, my site uses free and open source technologies, and I write because I + like to do so, not to make money. And I can afford the few bucks necessary to pay the hosting provider. + That’s why there are NO <span class="caps">ADS</span> on H3RALD.com anymore <sup>(*)</sup>.</li> + </ul> + <p><sup>(*)</sup>: For now, that is. Then I’ll probably change my mind, but until then enjoy the true + no-ads experience!</p> -</section> + </section> </section>
@@ -24,7 +24,7 @@ <hr />
### TL;DR -I ended up creating [HastySite](https://hastysite.h3rald.com), a self-contained static site generator written in [Nim](https://nim-lang.org) that leverages on [HastyScribe](https://h3rald.com/hastyscribe) for markdown processing, on [Moustachu](https://github.com/fenekku/moustachu) for mustache templates, and on the [min](https://min-lang.org) programming language for pretty much everything else. +I ended up creating [HastySite](https://hastysite.h3rald.com), a self-contained static site generator written in [Nim](https://nim-lang.org) that leverages on [HastyScribe](/hastyscribe) for markdown processing, on [Moustachu](https://github.com/fenekku/moustachu) for mustache templates, and on the [min](https://min-lang.org) programming language for pretty much everything else. ### Choosing a technology stack@@ -57,7 +57,7 @@ #### Markdown Processing
When it comes to picking a lightweight markup language, Markdown is a solid choice. It is readable and it comes in many flavors that provide just about anything you need to write an article or blog post. -A while back I created [HastyScribe](https://h3rald.com/hastyscribe), a fast Markdown processor based on [Discount](http://www.pell.portland.or.us/~orc/Code/discount/). It may not be the most standard flavor of Markdown, but it is one of the most feature-rich. Besides standard Markdown features and what is already supported by Discount, HastyScribe also provides support for: +A while back I created [HastyScribe](/hastyscribe), a fast Markdown processor based on [Discount](http://www.pell.portland.or.us/~orc/Code/discount/). It may not be the most standard flavor of Markdown, but it is one of the most feature-rich. Besides standard Markdown features and what is already supported by Discount, HastyScribe also provides support for: - Content snippets - Transclusion of other Markdown files@@ -94,7 +94,7 @@ ### Introducing _HastySite_
After a few months of experimenting and tinkering with the above-mentioned technologies, I released [HastySite](https://hastysite.h3rald.com), a fully-functional static site generator built around the HastyScribe markdown processor. -HastySite is a single, self-contained executable file available for all major platforms that allows you create a brand new static site or blog in a matter of _seconds_ -- if you choose to stick with the defaults and not customize anything, that is. Otherwise... you can go through the documentation on the site (also available as a standalone, printable [HTML file](https://www.h3rald.com/hastysite/HastySite_UserGuide.htm)), learn how everything works, and customize/extend whatever you want, from the CSS styles to use to the way you are copying files to the output folder (which can of course be something different than _output_). +HastySite is a single, self-contained executable file available for all major platforms that allows you create a brand new static site or blog in a matter of _seconds_ -- if you choose to stick with the defaults and not customize anything, that is. Otherwise... you can go through the documentation on the site (also available as a standalone, printable [HTML file](/hastysite/HastySite_UserGuide.htm)), learn how everything works, and customize/extend whatever you want, from the CSS styles to use to the way you are copying files to the output folder (which can of course be something different than _output_). If you just want to play with it, just download the executable and run **hastysite init**. This is actually the only command provided by HastySite that _cannot_ be customized (where customized in this case means _rewritten from scratch_), simply because it creates the default web site structure.@@ -102,7 +102,7 @@ This command will also dump some CSS files and fonts in your asset folder, just enough to create a web site as ugly as HastySite's ---the idea is of course that you remove those and place your own there. Similarly, you will also have some default templates and some commands you can use to create content and build the site ---you'll probably want to keep those, or maybe just change them just a little bit at least until you become comfortable with the min language.
So, to sum up, with HastySite you get: -* Enhanced Markdown support for all your content, powered by [HastyScribe](https://h3rald.com/hastyscribe). +* Enhanced Markdown support for all your content, powered by [HastyScribe](/hastyscribe). * Mustache templates support. * A bare-bones but fully-functional responsive site theme based on HastyScribe's stylesheet. * Default scripts to build and clean your site, as well as creating pages and blog posts.
@@ -5,8 +5,15 @@ timestamp: 1240530840
tags: "personal" ----- <p><img src="/images/sessarego/outside.jpg" style="float:left; border: 1px solid #B80000; margin-right: 10px;" /></p> -<p>Part of my family house in the countryside is now available for rent! It’s located in the small village of <a href="http://italia.indettaglio.it/eng/liguria/genova_bogliasco_sessarego.html">Sessarego</a>, a few minutes away from the coast, on the Italian Riviera.<br /> -We’ve been living there recently for 6 months when I started working and then moved to the city in order to be nearer to my workplace, but we still go there on holidays or on the odd week end, sometimes.</p> -<p>The house is fully furnished, it has been recently renovated, and offers all major comforts and services (utilities, TV, internet, phone, etc.). It can be ideal as a holiday house for writers, programmers, or anyone who would like to take a break from the chaotic city life without giving up all the commodities of modern life, such as the Internet.</p> +<p>Part of my family house in the countryside is now available for rent! It’s located in the small village of <a + href="http://italia.indettaglio.it/eng/liguria/genova_bogliasco_sessarego.html">Sessarego</a>, a few minutes + away from the coast, on the Italian Riviera.<br /> + We’ve been living there recently for 6 months when I started working and then moved to the city in order to be + nearer to my workplace, but we still go there on holidays or on the odd week end, sometimes.</p> +<p>The house is fully furnished, it has been recently renovated, and offers all major comforts and services (utilities, + TV, internet, phone, etc.). It can be ideal as a holiday house for writers, programmers, or anyone who would like to + take a break from the chaotic city life without giving up all the commodities of modern life, such as the Internet. +</p> <div style="padding: 30px"></div> -<p><strong>For more information, see <a href="/holidays">this page</a> and feel free to <a href="/about">contact me</a> if you want to book your stay or you needmore details!</strong></p> +<p><strong>For more information, feel free to <a href="/about">contact me</a> if you want to book your stay or you + needmore details!</strong></p>
@@ -4,21 +4,35 @@ content-type: article
timestamp: 1191024720 tags: "ruby|productivity|software|tools|redbook" ----- -<p>I’m somehow pleased to announce the opening of a new section on this site. Nothing too big actually, it’s just a <a href="/code/">page</a> with a few (one for now) brief descriptions of open source programs and scripts I made and I’d like to share with my readers.</p> -<p>Don’t expect fancy stuff: (luckily) I don’t code for a living, I code for pleasure and I code small things. Lately I’ve been trying to write a small Ruby program able to log my daily activities and also display them in a pleasant enough way, so I started using my lunch breaks at work more constructively and I came up with <a href="/code/">RedBook</a> an interactive command-line program written in Ruby.</p> +<p>I’m somehow pleased to announce the opening of a new section on this site. Nothing too big actually, it’s + just a <a href="/projects/">page</a> with a few (one for now) brief descriptions of open source programs and scripts + I + made and I’d like to share with my readers.</p> +<p>Don’t expect fancy stuff: (luckily) I don’t code for a living, I code for pleasure and I code small + things. Lately I’ve been trying to write a small Ruby program able to log my daily activities and also display + them in a pleasant enough way, so I started using my lunch breaks at work more constructively and I came up with <a + href="/projects/redbook">RedBook</a> an interactive command-line program written in Ruby.</p> <p>Main features:</p> <ul> <li>Log timestamped and <em>tagged</em> messages to a single <span class="caps">YAML</span> file</li> <li>Load and display messages containing a certain string, or certain tags or within a time frame.</li> <li>Calculate the time elapsed between two or more tasks.</li> - <li>Export loaded messages to <span class="caps">YAML</span>, <span class="caps">TXT</span> or <span class="caps">CSV</span> format.</li> + <li>Export loaded messages to <span class="caps">YAML</span>, <span class="caps">TXT</span> or <span + class="caps">CSV</span> format.</li> </ul> <p>All done via command line via simple commands:</p> <p><strong>:log</strong> This is a test message <strong>:tags</strong> test</p> <p><strong>:load</strong> <strong>:last</strong> 30 <strong>:from</strong> last week</p> <p><strong>:timecalc</strong> 2 5</p> <p><strong>:save</strong> test.txt</p> -<p>Thanks to the wonderful <a href="http://chronic.rubyforge.org/">Chronic</a> library, you can specify your time frames using natural language expressions like “8 in the morning”, “this tuesday”, “last month” and so on…</p> +<p>Thanks to the wonderful <a href="http://chronic.rubyforge.org/">Chronic</a> library, you can specify your time frames + using natural language expressions like “8 in the morning”, “this tuesday”, “last + month” and so on…</p> <p>Here’s a screenshot showing RedBook in action:</p> <p><img src="/files/redbook.png" alt="" /></p> -<p>RedBook is of course free, open source software licensed under the terms of the <span class="caps">BSD</span> license. It can be installed on any machine able to run Ruby and there’s also an <span class="caps">EXE</span> version for the lazy windows folks who don’t want to install Ruby, packed with <a href="http://www.erikveenstra.nl/rubyscript2exe/index.html">RubyScript2Exe</a>. A more in-depth article explaining how RedBook works <del>will hopefully be completed soon</del> is available <a href="http://www.h3rald.com/articles/redbook">:here</a></p> +<p>RedBook is of course free, open source software licensed under the terms of the <span class="caps">BSD</span> + license. It can be installed on any machine able to run Ruby and there’s also an <span class="caps">EXE</span> + version for the lazy windows folks who don’t want to install Ruby, packed with <a + href="http://www.erikveenstra.nl/rubyscript2exe/index.html">RubyScript2Exe</a>. A more in-depth article + explaining how RedBook works <del>will hopefully be completed soon</del> is available <a + href="/articles/redbook">:here</a></p>
@@ -6,11 +6,23 @@ timestamp: 1295802135
tags: "ruby-compendium|books|ruby" ----- - <section class="section"> -<p>Learning a programming language can be hard and time consuming. You normally have to go through a bunch of tutorials, ask questions, read books… Ruby is no exception: there are plenty of resources out there about it, but it is often hard to find what you’re looking for. So, as a weekend project, I decided to create a <em>Ruby Compendium</em>, a short book about the Ruby Ecosystem.</p> -<p>I guarantee that you <em>will not</em> be able to code in Ruby after reading this book. Yes, you read it right, this book is not about coding, it’s about learning what’s out there for you that can help you to learn how to program in Ruby. Information on Ruby implementations, versions, web sites, books, podcasts, a handful of Ruby gems to solve common problems… it’s all in there.</p> +<section class="section"> + <p>Learning a programming language can be hard and time consuming. You normally have to go through a bunch of + tutorials, ask questions, read books… Ruby is no exception: there are plenty of resources out there about + it, but it is often hard to find what you’re looking for. So, as a weekend project, I decided to create a + <em>Ruby Compendium</em>, a short book about the Ruby Ecosystem.</p> + <p>I guarantee that you <em>will not</em> be able to code in Ruby after reading this book. Yes, you read it right, + this book is not about coding, it’s about learning what’s out there for you that can help you to + learn how to program in Ruby. Information on Ruby implementations, versions, web sites, books, podcasts, a + handful of Ruby gems to solve common problems… it’s all in there.</p> -<p>The <em>Ruby Compendium</em> is available free of charge, under the terms of the <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>, and you can help improving it! It was written using my very own <a href="http://www.h3rald.com/glyph">Glyph Framework</a>, and the entire source code is available on <a href="https://github.com/h3rald/ruby-compendium">GitHub</a>, for anyone to fork.</p> -<div style="text-align:center;margin:20px; auto;font-size: 18px; font-weight:bold;"><a href="https://github.com/downloads/h3rald/ruby-compendium/ruby-compendium.pdf">Download (<span class="caps">PDF</span>)</a></div> + <p>The <em>Ruby Compendium</em> is available free of charge, under the terms of the <a + href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported + License</a>, and you can help improving it! It was written using my very own <a href="/glyph">Glyph + Framework</a>, and the entire source code is available on <a + href="https://github.com/h3rald/ruby-compendium">GitHub</a>, for anyone to fork.</p> + <div style="text-align:center;margin:20px; auto;font-size: 18px; font-weight:bold;"><a + href="https://github.com/downloads/h3rald/ruby-compendium/ruby-compendium.pdf">Download (<span + class="caps">PDF</span>)</a></div> </section>
@@ -7,88 +7,195 @@ tags: "review|books|software"
pdf: true ----- - <section class="section"> -<p>If you already heard the names Mary and Tom Poppendieck, chances are that you already know what <em>Lean Software Development</em> is. If you don’t, start from <a href="http://en.wikipedia.org/wiki/Lean_software_development">this Wikipedia page</a>. Mary and Tom coined this term with their first book on the subject <a href="http://www.amazon.com/exec/obidos/ASIN/0321150783/poppendieckco-20">Lean Software Development: An Agile Toolkit</a>, that was followed three years later by <a href="http://www.informit.com/store/product.aspx?isbn=0321437381">Implementing Lean Software Development: From Concept to Cash</a>, and finally by this book: <a href="http://www.informit.com/store/product.aspx?isbn=0321620704">Leading Lean Software Development: Results Are not the Point</a>.</p> -<p>Unlike the two other books, this one is focused about making lean software practices succeed. In some way, it can be compared to <a href="http://www.h3rald.com/articles/succeeding-with-agile-review/">Succeeding with Agile</a>, but while Mike Cohn’s book focuses entirely on Scrum, this book has a much broader scope. Moreover, the book contains a lot of digressions and stories —even not directly related to software development— aimed at understanding particular aspects of Lean Software Development and the Lean movement in general.</p> -<p>The focus is, as the title suggests, on leadership: how can you be a good leader in these difficult, ever-changing times? How can you be agile without loosing your team? How can you improve the existing processes so that they can help you achieve your goals? If you ever asked yourself these questions, this is the right book for you…</p> - <section class="section"> -<header><h1 id="h_1" class="toc">Structure and Organization</h1></header> -<p>This book is extremely well-structured. Its Table of Contents follows some very rigid rules which make this book one of the most organized texts I’ve ever come across. It is divided into six chapters, each organized as follows:</p> -<ul> - <li>A <em>snapshot</em> or an introductory story for the chapter’s main topic</li> - <li>Four <em>frames</em>, each describing a lean practice or personal quality</li> - <li>A <em>portrait</em> of a leader</li> - <li><em>Your Shot</em>, i.e. some questions and exercises for the readers</li> -</ul> -<p><img src="/img/pictures/books/leadingleanswdev.jpg" style="float:right" /></p> -<p>In total, the book contains 24 frames constituting the “Big Picture”, which is actually a very powerful framework for lean software leadership. You can read the book’s <span class="caps">TOC</span> <a href="http://www.poppendieck.com/llsd.htm">online</a> on the Poppendieck website and read the book’s Introduction (<a href="http://www.poppendieck.com/pdfs/LLSD_intro.pdf"><span class="caps">PDF</span> link</a>) on the whole concept of <em>framing</em> (yes, both the authors do love photography!).</p> -<p>When I started my career as a technical writer I used to love carefully-structured, simmetrical manuals. After a while, however, I understood that such rigorous structuring can even be dangerous if it becomes an obsession: you end up adding extra “padding writing” to make sections roughly match in length, or you start cutting down some other parts, for the same reason. Writing well-balanced books is hard, but I must say that the authors do a very good job with this book: it flows very naturally while keeping to its rigorous structure.</p> + <p>If you already heard the names Mary and Tom Poppendieck, chances are that you already know what <em>Lean Software + Development</em> is. If you don’t, start from <a + href="http://en.wikipedia.org/wiki/Lean_software_development">this Wikipedia page</a>. Mary and Tom coined + this term with their first book on the subject <a + href="http://www.amazon.com/exec/obidos/ASIN/0321150783/poppendieckco-20">Lean Software Development: An + Agile Toolkit</a>, that was followed three years later by <a + href="http://www.informit.com/store/product.aspx?isbn=0321437381">Implementing Lean Software Development: + From Concept to Cash</a>, and finally by this book: <a + href="http://www.informit.com/store/product.aspx?isbn=0321620704">Leading Lean Software Development: Results + Are not the Point</a>.</p> + <p>Unlike the two other books, this one is focused about making lean software practices succeed. In some way, it can + be compared to <a href="/articles/succeeding-with-agile-review/">Succeeding with Agile</a>, but while Mike + Cohn’s book focuses entirely on Scrum, this book has a much broader scope. Moreover, the book contains a + lot of digressions and stories —even not directly related to software development— aimed at + understanding particular aspects of Lean Software Development and the Lean movement in general.</p> + <p>The focus is, as the title suggests, on leadership: how can you be a good leader in these difficult, + ever-changing times? How can you be agile without loosing your team? How can you improve the existing processes + so that they can help you achieve your goals? If you ever asked yourself these questions, this is the right book + for you…</p> -</section> -<section class="section"> -<header><h1 id="h_2" class="toc">Chapter 1: Systems Thinking</h1></header> -<p>The first chapter is about customers, what they want and the goals of your system. It describes some interesting high level concepts like <em>failure demand</em> and <em>policy-driven waste</em>, and how to spot opportunities to improve the process.</p> -<p>What I found particularly interesting was the usage of <a href="http://www.cps.gov.uk/publications/finance/process_mapping.html">process maps</a> to analyze an existing process and find bottlenecks or leaks (in terms of time). I was instantly sold on this practice after reading the success story of how a company manage to reduce the overall time to process and solve customer issues simply by connecting customers directly to developers instead of tech support engineers. This is something you can’t apply everywhere, but after creating a process map for that specific case, the solution was evident.</p> -<p>More generally speaking, this chapter provides a recipe/checklist outlining the sequence of the phases of process improvement and problem solving:</p> -<ol> - <li><em>Understand</em></li> - <li><em>Observe</em></li> - <li><em>Visualize</em></li> - <li><em>Evaluate</em></li> - <li><em>Implement</em></li> -</ol> + <section class="section"> + <header> + <h1 id="h_1" class="toc">Structure and Organization</h1> + </header> + <p>This book is extremely well-structured. Its Table of Contents follows some very rigid rules which make this + book one of the most organized texts I’ve ever come across. It is divided into six chapters, each + organized as follows:</p> + <ul> + <li>A <em>snapshot</em> or an introductory story for the chapter’s main topic</li> + <li>Four <em>frames</em>, each describing a lean practice or personal quality</li> + <li>A <em>portrait</em> of a leader</li> + <li><em>Your Shot</em>, i.e. some questions and exercises for the readers</li> + </ul> + <p><img src="/img/pictures/books/leadingleanswdev.jpg" style="float:right" /></p> + <p>In total, the book contains 24 frames constituting the “Big Picture”, which is actually a very + powerful framework for lean software leadership. You can read the book’s <span class="caps">TOC</span> + <a href="http://www.poppendieck.com/llsd.htm">online</a> on the Poppendieck website and read the + book’s Introduction (<a href="http://www.poppendieck.com/pdfs/LLSD_intro.pdf"><span + class="caps">PDF</span> link</a>) on the whole concept of <em>framing</em> (yes, both the authors do + love photography!).</p> + <p>When I started my career as a technical writer I used to love carefully-structured, simmetrical manuals. + After a while, however, I understood that such rigorous structuring can even be dangerous if it becomes an + obsession: you end up adding extra “padding writing” to make sections roughly match in length, + or you start cutting down some other parts, for the same reason. Writing well-balanced books is hard, but I + must say that the authors do a very good job with this book: it flows very naturally while keeping to its + rigorous structure.</p> -</section> -<section class="section"> -<header><h1 id="h_3" class="toc">Chapter 2: Technical Excellence</h1></header> -<p>This is the only chapter focusing primarily on technical topics and knowledge. It starts with a very lengthy digression on the history of programming methodologies, aimed at understanding <em>what works and what doesn’t</em>. Some examples of IT stuff that worked include the Internet, PCs and …Open Source Software.</p> -<p>This chapter provides a general overview on Software Development as a whole. It contains some interesting information on software complexity and dealing with architectural dependencies, comprehensive sections on testing and continuous integration, and just a half page on refactoring (understandable, seeing that there are already plenty of excellent books on the subject).</p> + </section> + <section class="section"> + <header> + <h1 id="h_2" class="toc">Chapter 1: Systems Thinking</h1> + </header> + <p>The first chapter is about customers, what they want and the goals of your system. It describes some + interesting high level concepts like <em>failure demand</em> and <em>policy-driven waste</em>, and how to + spot opportunities to improve the process.</p> + <p>What I found particularly interesting was the usage of <a + href="http://www.cps.gov.uk/publications/finance/process_mapping.html">process maps</a> to analyze an + existing process and find bottlenecks or leaks (in terms of time). I was instantly sold on this practice + after reading the success story of how a company manage to reduce the overall time to process and solve + customer issues simply by connecting customers directly to developers instead of tech support engineers. + This is something you can’t apply everywhere, but after creating a process map for that specific case, + the solution was evident.</p> + <p>More generally speaking, this chapter provides a recipe/checklist outlining the sequence of the phases of + process improvement and problem solving:</p> + <ol> + <li><em>Understand</em></li> + <li><em>Observe</em></li> + <li><em>Visualize</em></li> + <li><em>Evaluate</em></li> + <li><em>Implement</em></li> + </ol> -</section> -<section class="section"> -<header><h1 id="h_4" class="toc">Chapter 3: Reliable Delivery</h1></header> -<p>The <em>Race to the Sky</em> section at the beginning of Chapter 3 is by far the most fascinating of the non-IT stories included in this book. It describes the construction of the Empire State Building in 1930, how it was planned out, what strategies were followed, and why it succeeded (why <em>the construction</em> succeeded: the building itself remained totally unprofitable for quite some time).</p> -<p>There are <a href="http://en.wikipedia.org/wiki/Empire_State_Building#Further_reading">plenty</a> of books on the subject, but Tom and Mary Poppendieck well summarize the key points of this modern-day epic achievement: how to build the tallest skyscraper in the world in a single year. This story teaches us how to work under very tight deadlines, by designing a system to fit constraints, rather than estimating up-front.</p> -<p>This story was perfect to introduce, in the same chapter, concepts like <a href="http://en.wikipedia.org/wiki/Kanban">Kanban</a>, <em>pull scheduling</em> and <em>adaptive control</em>, which only recently have been seriously considered in the world of Software Development but they are becoming more and more relevant.</p> + </section> + <section class="section"> + <header> + <h1 id="h_3" class="toc">Chapter 2: Technical Excellence</h1> + </header> + <p>This is the only chapter focusing primarily on technical topics and knowledge. It starts with a very lengthy + digression on the history of programming methodologies, aimed at understanding <em>what works and what + doesn’t</em>. Some examples of IT stuff that worked include the Internet, PCs and …Open + Source Software.</p> + <p>This chapter provides a general overview on Software Development as a whole. It contains some interesting + information on software complexity and dealing with architectural dependencies, comprehensive sections on + testing and continuous integration, and just a half page on refactoring (understandable, seeing that there + are already plenty of excellent books on the subject).</p> + + </section> + <section class="section"> + <header> + <h1 id="h_4" class="toc">Chapter 3: Reliable Delivery</h1> + </header> + <p>The <em>Race to the Sky</em> section at the beginning of Chapter 3 is by far the most fascinating of the + non-IT stories included in this book. It describes the construction of the Empire State Building in 1930, + how it was planned out, what strategies were followed, and why it succeeded (why <em>the construction</em> + succeeded: the building itself remained totally unprofitable for quite some time).</p> + <p>There are <a href="http://en.wikipedia.org/wiki/Empire_State_Building#Further_reading">plenty</a> of books on + the subject, but Tom and Mary Poppendieck well summarize the key points of this modern-day epic achievement: + how to build the tallest skyscraper in the world in a single year. This story teaches us how to work under + very tight deadlines, by designing a system to fit constraints, rather than estimating up-front.</p> + <p>This story was perfect to introduce, in the same chapter, concepts like <a + href="http://en.wikipedia.org/wiki/Kanban">Kanban</a>, <em>pull scheduling</em> and <em>adaptive + control</em>, which only recently have been seriously considered in the world of Software Development + but they are becoming more and more relevant.</p> -</section> -<section class="section"> -<header><h1 id="h_5" class="toc">Chapter 4: Relentless Improvement</h1></header> -<p>Chapter 4 starts with a brief history of the checklist, which was invented in 1935, to be used by airplane pilots. It then moves on to its usage in hospitals, describing how checklists helped dropping infections caused by inserting central venous catheters incorrectly. Why all this? To focus on the concept of <em>process standards</em>, or better, how <em>we</em> can improve processes to accomplish our goals.</p> -<p>Basically, this us what Toyota does: regulations should not be written on stone, but they should reviewed and updated frequently for continuous improvement or <a href="http://en.wikipedia.org/wiki/Kaizen">Kaizen</a>.</p> -<p>Finally, this chapter also briefly introduces a few different ways to perform root-cause analysis, such as using <a href="http://en.wikipedia.org/wiki/Ishikawa_diagram">fishbone diagrams</a>.</p> + </section> + <section class="section"> + <header> + <h1 id="h_5" class="toc">Chapter 4: Relentless Improvement</h1> + </header> + <p>Chapter 4 starts with a brief history of the checklist, which was invented in 1935, to be used by airplane + pilots. It then moves on to its usage in hospitals, describing how checklists helped dropping infections + caused by inserting central venous catheters incorrectly. Why all this? To focus on the concept of + <em>process standards</em>, or better, how <em>we</em> can improve processes to accomplish our goals.</p> + <p>Basically, this us what Toyota does: regulations should not be written on stone, but they should reviewed and + updated frequently for continuous improvement or <a href="http://en.wikipedia.org/wiki/Kaizen">Kaizen</a>. + </p> + <p>Finally, this chapter also briefly introduces a few different ways to perform root-cause analysis, such as + using <a href="http://en.wikipedia.org/wiki/Ishikawa_diagram">fishbone diagrams</a>.</p> -</section> -<section class="section"> -<header><h1 id="h_6" class="toc">Chapter 5: Great People</h1></header> -<p>This chapter and the last one are actually focused on people and management. In this chapter, an unusual (for this kind of books, that is) but intriguing analysis on different countries using the following dimensions:</p> -<ul> - <li>power distance</li> - <li>individualism</li> - <li>masculinity</li> - <li>uncertainty avoidance</li> - <li>long-term orientation</li> -</ul> -<p>Turns out that individualism is abundant in the Western world but not so much in the Far East (who would have thought!), but the opposite applies to power distance. A bit stereotypical, if I may, but not too much: the results are not surprising, especially when it comes to considering different cultures as a whole. Once more, the focus is again on Toyota’s Kaizen and their culture of <em>respect for the people</em>.</p> -<p>On page 198, the meaning of the subtitle of the book (Results Are not the Point) is revealed: <q>developing the people and the system so that together they are capable to achieve successful results is the point</q>. Agile is precisely about this: focusing on the people.</p> -<p>But what about leaders? This is an aspect of the whole Agile philosophy that I keep stumbling upon: if you want <em>The Team</em> to be in charge, what happens to leadership? As I found out myself working in and with Agile Teams, often there’s a serious lack of strong leaders. <q>Leadership needs to be gently refactored into Agile</q>, that’s what Mary and Tom recommend. How? It depends on each specific case, but it must always be done <em>gently</em>.</p> + </section> + <section class="section"> + <header> + <h1 id="h_6" class="toc">Chapter 5: Great People</h1> + </header> + <p>This chapter and the last one are actually focused on people and management. In this chapter, an unusual (for + this kind of books, that is) but intriguing analysis on different countries using the following dimensions: + </p> + <ul> + <li>power distance</li> + <li>individualism</li> + <li>masculinity</li> + <li>uncertainty avoidance</li> + <li>long-term orientation</li> + </ul> + <p>Turns out that individualism is abundant in the Western world but not so much in the Far East (who would have + thought!), but the opposite applies to power distance. A bit stereotypical, if I may, but not too much: the + results are not surprising, especially when it comes to considering different cultures as a whole. Once + more, the focus is again on Toyota’s Kaizen and their culture of <em>respect for the people</em>.</p> + <p>On page 198, the meaning of the subtitle of the book (Results Are not the Point) is revealed: <q>developing + the people and the system so that together they are capable to achieve successful results is the + point</q>. Agile is precisely about this: focusing on the people.</p> + <p>But what about leaders? This is an aspect of the whole Agile philosophy that I keep stumbling upon: if you + want <em>The Team</em> to be in charge, what happens to leadership? As I found out myself working in and + with Agile Teams, often there’s a serious lack of strong leaders. <q>Leadership needs to be gently + refactored into Agile</q>, that’s what Mary and Tom recommend. How? It depends on each specific + case, but it must always be done <em>gently</em>.</p> -</section> -<section class="section"> -<header><h1 id="h_7" class="toc">Chapter 6: Aligned Leaders</h1></header> -<p>The final chapter begins with the history of <em>Agile@IBM</em>, or how to turn the biggest software company in the world into a massive agile machine. It wasn’t a top-down decision, the <span class="caps">CEO</span> didn’t just wake up one morning and decided that everyone should go Agile. Quite the opposite: it was something that was <em>pulled</em> by developers rather than <em>pushed</em> at them.</p> -<p>In cases like this, companies should be focusing on developing people, including good leaders, instead of particular initiatives and processes. Leaders in turn should shift their focus from details to more high-level decisions. When it comes to facing changes, leaders should look at the <a href="http://www.bbrt.org/beyond-budgeting/bbprinc.html">12 principles</a> of the <a href="http://www.bbrt.org/"><span class="caps">BBRT</span></a> leadership model.</p> -<p>The final portrait, <em>Leaders at all Levels</em>, well summarizes the key to successful leadership: <q>leadership is about example, coaching and helping others to achieve their goals</q>.</p> + </section> + <section class="section"> + <header> + <h1 id="h_7" class="toc">Chapter 6: Aligned Leaders</h1> + </header> + <p>The final chapter begins with the history of <em>Agile@IBM</em>, or how to turn the biggest software company + in the world into a massive agile machine. It wasn’t a top-down decision, the <span + class="caps">CEO</span> didn’t just wake up one morning and decided that everyone should go Agile. + Quite the opposite: it was something that was <em>pulled</em> by developers rather than <em>pushed</em> at + them.</p> + <p>In cases like this, companies should be focusing on developing people, including good leaders, instead of + particular initiatives and processes. Leaders in turn should shift their focus from details to more + high-level decisions. When it comes to facing changes, leaders should look at the <a + href="http://www.bbrt.org/beyond-budgeting/bbprinc.html">12 principles</a> of the <a + href="http://www.bbrt.org/"><span class="caps">BBRT</span></a> leadership model.</p> + <p>The final portrait, <em>Leaders at all Levels</em>, well summarizes the key to successful leadership: + <q>leadership is about example, coaching and helping others to achieve their goals</q>.</p> -</section> -<section class="section"> -<header><h1 id="h_8" class="toc">Final Thoughts</h1></header> -<p>If you’re looking for a manual on implementing Lean Software Development in detail, this is probably not the best book on the subject. If you’re a developer at the start of your career, with no management responsibilities, you’d want more technical juice, so probably you should read the other two books by the Poppendiecks on the subject first.</p> -<p>On the other hand, if you have been working in IT for a few years, and maybe you already started to climb up the corporate ladder, reading this book could make the difference between being successful leader or not. This book does not go very in-depth with any particular methodology or process, but it does provide an excellent overview of a lot of them.</p> -<p>To get the best out of <em>Leading Lean Software Development</em>, you should read it a least once sequentially, skipping the parts that are not relevant to you (right now), taking notes on the more interesting frames, and then go back over them to digest them properly. Do <em>not</em> skip the introduction of each chapter though, for one because they are always pleasant to read between frames, and also because they do teach some very important values or strategies that you <em>must</em> assimilate.</p> -<p>The general message that stands out when reading this book is <em>focus on people</em>. Customers, of course, but also employees: every single successful company mentioned in this book, from Toyota to Southwest Airlines, became successful because they always focused on developing people <em>first</em>, and <em>then</em> products.</p> + </section> + <section class="section"> + <header> + <h1 id="h_8" class="toc">Final Thoughts</h1> + </header> + <p>If you’re looking for a manual on implementing Lean Software Development in detail, this is probably + not the best book on the subject. If you’re a developer at the start of your career, with no + management responsibilities, you’d want more technical juice, so probably you should read the other + two books by the Poppendiecks on the subject first.</p> + <p>On the other hand, if you have been working in IT for a few years, and maybe you already started to climb up + the corporate ladder, reading this book could make the difference between being successful leader or not. + This book does not go very in-depth with any particular methodology or process, but it does provide an + excellent overview of a lot of them.</p> + <p>To get the best out of <em>Leading Lean Software Development</em>, you should read it a least once + sequentially, skipping the parts that are not relevant to you (right now), taking notes on the more + interesting frames, and then go back over them to digest them properly. Do <em>not</em> skip the + introduction of each chapter though, for one because they are always pleasant to read between frames, and + also because they do teach some very important values or strategies that you <em>must</em> assimilate.</p> + <p>The general message that stands out when reading this book is <em>focus on people</em>. Customers, of course, + but also employees: every single successful company mentioned in this book, from Toyota to Southwest + Airlines, became successful because they always focused on developing people <em>first</em>, and + <em>then</em> products.</p> -</section> + </section> </section>
@@ -4,32 +4,72 @@ content-type: article
timestamp: 1240891860 tags: "personal_log|ruby|books|wedding" ----- -<p>April is tratidionally a rather busy month: Easter, public holidays, and — always — some deadline to meet at work. Moreover, my birthday is also in April which makes it even more busy! Let’s see what happened this year…h3. Using Ruby in a corporate environment</p> -<p>I’ve been using Ruby at work for a while now. I started off writing some automation script for my own needs, then someone noticed it and asked me if by chance I could develop some scripts for them, for automating part of their own job, and so on. My boss ultimately noticed it, and she liked the idea of me investing a small portion of my time to make other people save huge amount of <em>their</em> time, so now I am <em>officially</em> in charge of workflow improvements and automation (it’s even in my job description!).</p> -<p>This month a colleague of mine and I had to figure out a way to write some documents <strong>once</strong> in <span class="caps">XML</span> format and then produce different kind of outputs (other <span class="caps">XML</span> files, PDFs, etc.) using the <a href="http://dita-ot.sourceforge.net/"><span class="caps">DITA</span> Open Toolkit</a>. Originally we thought the toolkit would do most of the job, but we soon realized we needed to tweak and change a lot more than what we usually expected.</p> +<p>April is tratidionally a rather busy month: Easter, public holidays, and — always — some deadline to meet + at work. Moreover, my birthday is also in April which makes it even more busy! Let’s see what happened this + year…h3. Using Ruby in a corporate environment</p> +<p>I’ve been using Ruby at work for a while now. I started off writing some automation script for my own needs, + then someone noticed it and asked me if by chance I could develop some scripts for them, for automating part of + their own job, and so on. My boss ultimately noticed it, and she liked the idea of me investing a small portion of + my time to make other people save huge amount of <em>their</em> time, so now I am <em>officially</em> in charge of + workflow improvements and automation (it’s even in my job description!).</p> +<p>This month a colleague of mine and I had to figure out a way to write some documents <strong>once</strong> in <span + class="caps">XML</span> format and then produce different kind of outputs (other <span class="caps">XML</span> + files, PDFs, etc.) using the <a href="http://dita-ot.sourceforge.net/"><span class="caps">DITA</span> Open + Toolkit</a>. Originally we thought the toolkit would do most of the job, but we soon realized we needed to tweak + and change a lot more than what we usually expected.</p> <p>We ended up hacking together a <em>system</em> using:</p> <ul> - <li><a href="http://office.microsoft.com/en-us/infopath/default.aspx">Microsoft Infopath</a> as <span class="caps">XML</span> editor for the end users (the company buys it by default, so no worries there)</li> - <li>A Ruby program to parse and manipulate the original <span class="caps">XML</span> and produce <span class="caps">DITA</span>-compatible <span class="caps">XML</span> files.</li> - <li>Some <a href="http://ant.apache.org/">Apache Ant</a> tasks available in the open toolkit to produce an <span class="caps">XSL</span>-FO file</li> - <li><a href="http://xmlgraphics.apache.org/fop/">Apache <span class="caps">FOP</span></a> to produce the <span class="caps">PDF</span> from the <span class="caps">XSL</span>-FO file…</li> + <li><a href="http://office.microsoft.com/en-us/infopath/default.aspx">Microsoft Infopath</a> as <span + class="caps">XML</span> editor for the end users (the company buys it by default, so no worries there)</li> + <li>A Ruby program to parse and manipulate the original <span class="caps">XML</span> and produce <span + class="caps">DITA</span>-compatible <span class="caps">XML</span> files.</li> + <li>Some <a href="http://ant.apache.org/">Apache Ant</a> tasks available in the open toolkit to produce an <span + class="caps">XSL</span>-FO file</li> + <li><a href="http://xmlgraphics.apache.org/fop/">Apache <span class="caps">FOP</span></a> to produce the <span + class="caps">PDF</span> from the <span class="caps">XSL</span>-FO file…</li> </ul> -<p>The thing seems to work fine (after a lot of tweaking), and I really enjoyed creating the Ruby program to <em>glue</em> everything together. I even got a chance to introduce my colleagues to the wonderful world of <a href="http://hobix.com/textile/">Textile</a> (they are so happy that they don’t want to use <span class="caps">WYSIWYG</span> editors anymore!).</p> +<p>The thing seems to work fine (after a lot of tweaking), and I really enjoyed creating the Ruby program to + <em>glue</em> everything together. I even got a chance to introduce my colleagues to the wonderful world of <a + href="http://hobix.com/textile/">Textile</a> (they are so happy that they don’t want to use <span + class="caps">WYSIWYG</span> editors anymore!).</p> <h3>Easter in London</h3> -<p>As usual, Roxanne and I spent our Easter holidays in London, at her brother’s place. This year we actually had 9 days to go around <del>squandering money</del> spending <em>wisely</em> in food, books, clothes and entertainment.</p> -<p>Most notably, I managed to drag Roxanne to <a href="http://www.foyles.co.uk/">Foyles</a> and I got myself a copy of <a href="http://www.pragprog.com/the-pragmatic-programmer">The Pragmatic Programmer</a>, which I’m reading avidly. If it was up to me I was going to buy half of the computing section, but Roxanne <em>kindly pointed out</em> that I could get all of them from Amazon for half the price. <br /> -And she was right: for my birthday I preordered a copy of <a href="http://www.amazon.com/Programming-Language-Pragmatics-Third-Michael/dp/0123745144">Programming Language Pragmatics, 3rd Ed.</a>, which should be shipped soon.</p> +<p>As usual, Roxanne and I spent our Easter holidays in London, at her brother’s place. This year we actually had + 9 days to go around <del>squandering money</del> spending <em>wisely</em> in food, books, clothes and entertainment. +</p> +<p>Most notably, I managed to drag Roxanne to <a href="http://www.foyles.co.uk/">Foyles</a> and I got myself a copy of + <a href="http://www.pragprog.com/the-pragmatic-programmer">The Pragmatic Programmer</a>, which I’m reading + avidly. If it was up to me I was going to buy half of the computing section, but Roxanne <em>kindly pointed out</em> + that I could get all of them from Amazon for half the price. <br /> + And she was right: for my birthday I preordered a copy of <a + href="http://www.amazon.com/Programming-Language-Pragmatics-Third-Michael/dp/0123745144">Programming Language + Pragmatics, 3rd Ed.</a>, which should be shipped soon.</p> <h3>Wedding planning</h3> -<p>My spreadsheets for the wedding guests, wedding expenses (!) and …suit sizes are getting bigger and bigger. We managed to book a lot of flights to Ireland to my parents, us, relatives etc., but there are still quite a few things to do for the wedding. The most urgent thing to do right now is sending the invites: we had them printed with the words <em><span class="caps">RSVP</span> within May</em> on them, so they <em>have</em> to be out in one or two weeks at most.</p> -<p>The other thing which must be sorted soon are the suits. According to English (and Irish) tradition, the groom, the bestman, the father of the groom, the father of the bride and the ushers have to wear the same type of suit, with minor differences (the color of the waistcoats?). In my case, this means getting 7 (<span class="caps">SEVEN</span>) <em>morning suits</em> off eBay, in the right sizes! Hopefully I’ll be able to get them by the end of next week (if my bestman manages to let me know his sizes).</p> +<p>My spreadsheets for the wedding guests, wedding expenses (!) and …suit sizes are getting bigger and bigger. We + managed to book a lot of flights to Ireland to my parents, us, relatives etc., but there are still quite a few + things to do for the wedding. The most urgent thing to do right now is sending the invites: we had them printed with + the words <em><span class="caps">RSVP</span> within May</em> on them, so they <em>have</em> to be out in one or two + weeks at most.</p> +<p>The other thing which must be sorted soon are the suits. According to English (and Irish) tradition, the groom, the + bestman, the father of the groom, the father of the bride and the ushers have to wear the same type of suit, with + minor differences (the color of the waistcoats?). In my case, this means getting 7 (<span class="caps">SEVEN</span>) + <em>morning suits</em> off eBay, in the right sizes! Hopefully I’ll be able to get them by the end of next + week (if my bestman manages to let me know his sizes).</p> <h3>XBox 360 Gaming</h3> -<p>Now that our new XBox 360 finally came through, Roxanne and I have a lot of hours of hard core week end gaming ahead of us! This, added to the physiological increase of stress due to the wedding, may result in a temporary slowdown of my coding and writing activities.<br /> -Right now we’re playing <a href="http://xbox360.ign.com/objects/949/949455.html">Mirror’s Edge</a>, <a href="http://xbox360.ign.com/objects/718/718963.html">Mass Effect</a>, and <a href="http://xbox360.ign.com/objects/746/746631.html">Unreal Tournment <span class="caps">III</span></a>. The last one was a special surprise present from Roxanne (<em>“…so we can kill each other!”</em> — she’s really lovely at times!).</p> +<p>Now that our new XBox 360 finally came through, Roxanne and I have a lot of hours of hard core week end gaming ahead + of us! This, added to the physiological increase of stress due to the wedding, may result in a temporary slowdown of + my coding and writing activities.<br /> + Right now we’re playing <a href="http://xbox360.ign.com/objects/949/949455.html">Mirror’s Edge</a>, <a + href="http://xbox360.ign.com/objects/718/718963.html">Mass Effect</a>, and <a + href="http://xbox360.ign.com/objects/746/746631.html">Unreal Tournment <span class="caps">III</span></a>. The + last one was a special surprise present from Roxanne (<em>“…so we can kill each other!”</em> + — she’s really lovely at times!).</p> <h3>Other tech-related tidbits</h3> <ul> - <li>I can’t wait to go to the cinema to watch <a href="http://www.imdb.com/title/tt0796366/">Star Trek XI</a></li> + <li>I can’t wait to go to the cinema to watch <a href="http://www.imdb.com/title/tt0796366/">Star Trek XI</a> + </li> <li>I started using <a href="http://www.shelfari.com/">Shelfari</a></li> <li>I started using <a href="http://start.io">Star.io</a> as my personal, bare-bones start page.</li> - <li>I recently <a href="http://www.h3rald.com/articles/concatenative-020">released Concatenative 0.2.0</a>.</li> - <li>I’m currently evaluating the possibility to create a Ruby-based <em>Document Authoring Framework</em>. Stay tuned.</li> + <li>I recently <a href="/articles/concatenative-020">released Concatenative 0.2.0</a>.</li> + <li>I’m currently evaluating the possibility to create a Ruby-based <em>Document Authoring Framework</em>. + Stay tuned.</li> </ul>
@@ -4,31 +4,53 @@ content-type: article
timestamp: 1235736540 tags: "personal_log|ruby" ----- -<p>This has been a rather busy month, hence the lack of general Internet activity. I really wanted to post some more articles to my site, but for one reason or another I had to procrastinate more and more, and here we are at the end of the month again.</p> +<p>This has been a rather busy month, hence the lack of general Internet activity. I really wanted to post some more + articles to my site, but for one reason or another I had to procrastinate more and more, and here we are at the end + of the month again.</p> <h3>Recession time!</h3> -<p>I’ve always considered the current economic downturn as something happening <em>somewhere else</em>: <span class="caps">USA</span>, England, Ireland… but not in Italy, really: our country never boomed, we don’t go mental with loans and mortgages (or at least we didn’t use to), so there’s no real reason for a full-on recession period.</p> -<p>It turns out I was wrong. Other than the fact that our industries are more or less non-existant or already in debt, I didn’t consider that:</p> +<p>I’ve always considered the current economic downturn as something happening <em>somewhere else</em>: <span + class="caps">USA</span>, England, Ireland… but not in Italy, really: our country never boomed, we + don’t go mental with loans and mortgages (or at least we didn’t use to), so there’s no real reason + for a full-on recession period.</p> +<p>It turns out I was wrong. Other than the fact that our industries are more or less non-existant or already in debt, I + didn’t consider that:</p> <ul> <li>Italians tend to panic a lot.</li> - <li>We have an awful lot of foreign business going on, a lot of multi-national companies opened up through the years lured by cheap workers and acceptable craftmanship.</li> - <li>Our government already <del>wastes</del> invests a lot of money regularly, every year, to fuel a colossal, <a href="http://dictionary.reference.com/browse/nepotistic">nepotistic</a>, pointless bureaucratic machine they insist on calling “State”.</li> + <li>We have an awful lot of foreign business going on, a lot of multi-national companies opened up through the years + lured by cheap workers and acceptable craftmanship.</li> + <li>Our government already <del>wastes</del> invests a lot of money regularly, every year, to fuel a colossal, <a + href="http://dictionary.reference.com/browse/nepotistic">nepotistic</a>, pointless bureaucratic machine they + insist on calling “State”.</li> </ul> -<p>Result: the recession is starting to hit properly over here too. People are saving money, they don’t go out buying pointless crap, they are scared to ask for a raise at work… the usual. I work for a foreign company which has been, as were most, forced to save some money to compensate some not-so-good First Quarter’s revenues. This means less unnecessary expenses, less training, less travelling and less outsourcing, which didn’t help improving the daily work experiece. Personally, I’m not that affected by all this, nevertheless it made me bless the day my fiancée persuaded me to stop uni after my Bachelor’s Degree to get a very rewarding, not-so-stressful job.</p> +<p>Result: the recession is starting to hit properly over here too. People are saving money, they don’t go out + buying pointless crap, they are scared to ask for a raise at work… the usual. I work for a foreign company + which has been, as were most, forced to save some money to compensate some not-so-good First Quarter’s + revenues. This means less unnecessary expenses, less training, less travelling and less outsourcing, which + didn’t help improving the daily work experiece. Personally, I’m not that affected by all this, + nevertheless it made me bless the day my fiancée persuaded me to stop uni after my Bachelor’s Degree to get a + very rewarding, not-so-stressful job.</p> <h3>No ’Net @ Home</h3> -<p>The most annoying thing of the month was (and still is) the lack of Internet access at our house. Let’s do a quick recap:</p> +<p>The most annoying thing of the month was (and still is) the lack of Internet access at our house. Let’s do a + quick recap:</p> <ol> - <li>After spending one year with Telecom Italia, Roxanne and I decided to change provider to save a bit of money and get more speed.</li> - <li>On <em>December 24th</em> we requested a contract with <a href="http://www.wind.it">Wind</a>, after they assured that we’d have the Internet back on in <em>just a few days, tops</em>.</li> + <li>After spending one year with Telecom Italia, Roxanne and I decided to change provider to save a bit of money and + get more speed.</li> + <li>On <em>December 24th</em> we requested a contract with <a href="http://www.wind.it">Wind</a>, after they assured + that we’d have the Internet back on in <em>just a few days, tops</em>.</li> <li>On <em>January 5th</em> Telecom disconnected us.</li> - <li>On <em>January 12th</em> Wind sent me a mail telling me that there was going to be a <em>15-day delay</em> in the activation — well, at least they told us so! We waited.</li> - <li>On <em>February 2nd</em> I call Wind Customer Care hassling them to get a move on — just some minor delays, <em>it will only take a few days, tops</em>. We waited.</li> + <li>On <em>January 12th</em> Wind sent me a mail telling me that there was going to be a <em>15-day delay</em> in + the activation — well, at least they told us so! We waited.</li> + <li>On <em>February 2nd</em> I call Wind Customer Care hassling them to get a move on — just some minor + delays, <em>it will only take a few days, tops</em>. We waited.</li> </ol> -<p>Our new Internet line has been <em>in the process of being activated</em> ever since January 5th. Why? Because being a customer sucks, in Italy, and you can’t do much about it.<br /> -Let me quote one of the 13 phone calls I made:</p> +<p>Our new Internet line has been <em>in the process of being activated</em> ever since January 5th. Why? Because being + a customer sucks, in Italy, and you can’t do much about it.<br /> + Let me quote one of the 13 phone calls I made:</p> <ul> <li>… 5 minutes on hold, stupid music in the background …</li> <li>[Operator]: Good Evening Sir, I’m <random name>, how can I help you?</li> - <li>[Me]: Hello, I’m enquiring about the status of my Internet connection: I’ve been disconnected since the 5th of January…</li> + <li>[Me]: Hello, I’m enquiring about the status of my Internet connection: I’ve been disconnected since + the 5th of January…</li> <li>[Operator]: Phone Number please?</li> <li>[Me]: *** ******</li> <li>… 2 minutes on old …</li>@@ -40,46 +62,67 @@ <li>[Me]: Any luck?</li>
<li>[Operator]: One moment please…</li> <li>… 2 minutes on hold, stupid music in the background …</li> <li>[Operator]: Sir, it says here that you are <em>in the process of being activated</em></li> - <li>[Me]: (you stupid idiot, I can check that on the Net in less than a minute) Yes, I know what, but why, exactly? It has been over a month…</li> + <li>[Me]: (you stupid idiot, I can check that on the Net in less than a minute) Yes, I know what, but why, exactly? + It has been over a month…</li> <li>[Operator]: Let me check…</li> <li>… 3 minutes on hold, stupid music in the background …</li> <li>[Operator]: There are some technical difficulties.</li> <li>[Me]: What kind of technical difficulties?</li> <li>[Operator]: I… I don’t think you can understand Sir, it’s technical…</li> <li>[Me]: (!!!) I have a degree in IT Engineering, so yes, I think I can understand enough.</li> - <li>[Operator]: …well, there’s nothing I can do… it says we’re in the process of connecting you, it should be just…</li> + <li>[Operator]: …well, there’s nothing I can do… it says we’re in the process of connecting + you, it should be just…</li> <li>[Me]: …a matter of a couple of days, yes, I know: it has been over a month though!</li> <li>[Operator]: Sir, really, I can’t really do much about it, you’ll just have to wait</li> <li>[Me]: Can you let me speak with the Technical Department?</li> - <li>[Operator]: No, sir, I can’t: you see, your <span class="caps">ADSL</span> line is not yet activated, they can’t do anything about it.</li> - <li>[Me]: Excuse me, but I’d like to know what the problem is, and how long it will take to activate the line.</li> + <li>[Operator]: No, sir, I can’t: you see, your <span class="caps">ADSL</span> line is not yet activated, they + can’t do anything about it.</li> + <li>[Me]: Excuse me, but I’d like to know what the problem is, and how long it will take to activate the line. + </li> <li>[Operator]: Sorry sir, we don’t have this information, and we can’t commit to a specific date.</li> <li>[Me]: (!!!) May I speak to someone who knows this? May I speak to your superior?</li> <li>[Operator] No, you can’t speak to my superior. You’ll just have to wait, I’m sorry.</li> - <li>[Me]: Well, it has been over a month, and I don’t know if you realize that you were supposed to connect me in just a few days and…</li> + <li>[Me]: Well, it has been over a month, and I don’t know if you realize that you were supposed to connect me + in just a few days and…</li> <li>[Operator]: Thank you for calling sir, have a good day.</li> </ul> -<p>That barely conveys the frustration I felt and I’m still feeling now. I can’t even sue them: I could get 100 Euro at most after spending at least a couple of thousands in lawyer. So much for the land of sunshine huh?</p> +<p>That barely conveys the frustration I felt and I’m still feeling now. I can’t even sue them: I could get + 100 Euro at most after spending at least a couple of thousands in lawyer. So much for the land of sunshine huh?</p> <h3>Programming in Ruby, again</h3> -<p>Some of you may be pleased to know I’m back coding in Ruby after slacking for months. It’s just the time of the year, I guess. <br /> -I’m also evangelizing the language quite a bit at work: after I wrote a few scripts on demand, I slowly lured one of my colleagues to Vim, the Texile markup and then finally the Ruby language. He’s going through the <a href="http://www.h3rald.com/articles/hlrb-review">Humble Little Ruby Book</a> and he’s loving it, so far. He’ll hopefully be fully assimilated in a few weeks at most, and after that there will be no going back!</p> -<p>This inspired me to start a full rewrite of <a href="http://www.h3rald.com/tags/redbook/">RedBook</a>, my little Ruby daily logger. It will feature a SQLite backend and Merb’s Datamapper to take care of the dirty work.<br /> -Unfortunately, even if the new sources are already available on <a href="http://github.com/h3rald/redbook/tree/master">GitHub</a>, it will take me approximately a few more weeks to complete all the plugins and more to finish the RDoc documentation and — hopefully — a fully-fledged user manual. It’s <strong>the</strong> pet project, after all…</p> -<p>On the other hand, it will take me considerably less time (a few days?) to release the next version of my <a href="http://www.h3rald.com/tags/rawline">RawLine</a> library, featuring:</p> +<p>Some of you may be pleased to know I’m back coding in Ruby after slacking for months. It’s just the time + of the year, I guess. <br /> + I’m also evangelizing the language quite a bit at work: after I wrote a few scripts on demand, I slowly lured + one of my colleagues to Vim, the Texile markup and then finally the Ruby language. He’s going through the <a + href="/articles/hlrb-review">Humble Little Ruby Book</a> and he’s loving it, so far. He’ll hopefully + be fully assimilated in a few weeks at most, and after that there will be no going back!</p> +<p>This inspired me to start a full rewrite of RedBook, my little Ruby daily logger. It + will feature a SQLite backend and Merb’s Datamapper to take care of the dirty work.<br /> + Unfortunately, even if the new sources are already available on <a + href="http://github.com/h3rald/redbook/tree/master">GitHub</a>, it will take me approximately a few more weeks + to complete all the plugins and more to finish the RDoc documentation and — hopefully — a fully-fledged + user manual. It’s <strong>the</strong> pet project, after all…</p> +<p>On the other hand, it will take me considerably less time (a few days?) to release the next version of my RawLine + library, featuring:</p> <ul> <li>Ruby 1.9 support</li> <li>A handy little function for filename completion</li> - <li>Readline emulation, i.e. just <code>include Rawline</code> and use it as if it was <span class="caps">GNU</span> Readline</li> + <li>Readline emulation, i.e. just <code>include Rawline</code> and use it as if it was <span class="caps">GNU</span> + Readline</li> </ul> -<p>Of course this doesn’t mean RawLine is a complete, 100% Ruby port of the <span class="caps">GNU</span> Readline library, but it is definitely more Ruby-ish, more cross platform (try using Readline with Ruby on Windows…), and usable enough for most of the normal things, like:</p> +<p>Of course this doesn’t mean RawLine is a complete, 100% Ruby port of the <span class="caps">GNU</span> Readline + library, but it is definitely more Ruby-ish, more cross platform (try using Readline with Ruby on Windows…), + and usable enough for most of the normal things, like:</p> <ul> <li>tab completion</li> <li>line editing (but no vi or emacs mode yet, sorry)</li> <li>history</li> <li>quick and easy key bindings</li> </ul> -<p>Once this comes out, I’ll be implementing features on-demand, as <span class="caps">GNU</span> Readline is huge and offers way too many things anyone would ever need. Patches and contributions are of course more than welcome, though.</p> -<p>For all my open source Ruby projects, after <a href="http://www.h3rald.com/articles/where-does-your-ruby-code-live">pondering the alternatives</a>, I decided to go with the following setup:</p> +<p>Once this comes out, I’ll be implementing features on-demand, as <span class="caps">GNU</span> Readline is huge + and offers way too many things anyone would ever need. Patches and contributions are of course more than welcome, + though.</p> +<p>For all my open source Ruby projects, after <a href="/articles/where-does-your-ruby-code-live">pondering the + alternatives</a>, I decided to go with the following setup:</p> <ul> <li>My own site for the home pages of the projects</li> <li>RubyForge for gem support and for RDoc documentation</li>
@@ -4,7 +4,7 @@ content-type: article
timestamp: 1232880660 tags: "personal_log|wedding" ----- -Those who read my blog regularly may have noticed how I normally refrain from posting articles concerning my own life. I used to have a more blog-like web site, but things changed: _"Who would want to read about my life, anyway?"_ — That's what I always thought. Hence, I focused on writing general-interest, computer-related articles about programming in Ruby, about some IT book which came out, or about the latest chapter in the Browser Wars. You'll find all this in the [archives](/archives/). +Those who read my blog regularly may have noticed how I normally refrain from posting articles concerning my own life. I used to have a more blog-like web site, but things changed: _"Who would want to read about my life, anyway?"_ — That's what I always thought. Hence, I focused on writing general-interest, computer-related articles about programming in Ruby, about some IT book which came out, or about the latest chapter in the Browser Wars. You'll find all this in the [articles](/articles/). On the other hand, I thought it may be useful for my own sake to keep a more personal log of what happens in my life, so here it is, the first of hopefully many _personal log_ post, covering January 2009. ### Being social@@ -43,11 +43,11 @@ ### Writing and Programming
On the programming side, I was actually thinking about learning [Haskell](http://www.haskell.org), once and for all. I have a deep admiration and respect for the language and what it can do, but I've always been somewhat overwhelmed by its functional purity, monads, and similar. After reading [Learn You a Haskell](http://learnyouahaskell.com/chapters) (an excellent read), I moved on to [Real World Haskell](http://book.realworldhaskell.org/read/), and I was understanding _everything_, amazingly. -Then I decided to take a break and try coding a little bit in Ruby (I had to prepare a small script for work), and that was enough to motivate me to start working on [RedBook](http://www.h3rald.com/tags/redbook) again. I was determined to polish it up and put a shiny 1.0 badge on it, but I decided to stop and re-think the whole thing. I originally thought of it as a _simple_ daily logging program to record timestamped entries to a YAML file, but then added more and more features until I finally realized that _perhaps_I could have used SQLite as its backend. It turns out I was right: when I started coding RedBook about a year ago, I didn't know much about Ruby, andI didn't want to use a relational database because it seemed too unnecessary cumbersome for a beginner. It turns out I was totally wrong and [DataMapper](http://datamapper.org/) proved to be an excellent, simple and powerful choice. +Then I decided to take a break and try coding a little bit in Ruby (I had to prepare a small script for work), and that was enough to motivate me to start working on RedBook again. I was determined to polish it up and put a shiny 1.0 badge on it, but I decided to stop and re-think the whole thing. I originally thought of it as a _simple_ daily logging program to record timestamped entries to a YAML file, but then added more and more features until I finally realized that _perhaps_I could have used SQLite as its backend. It turns out I was right: when I started coding RedBook about a year ago, I didn't know much about Ruby, andI didn't want to use a relational database because it seemed too unnecessary cumbersome for a beginner. It turns out I was totally wrong and [DataMapper](http://datamapper.org/) proved to be an excellent, simple and powerful choice. RedBook might be ready in a few months, when also _all its documentation_ is ready, too. As a technical writer, I really cannot afford to release any amateur pet project to the while without documentation, it would be a bad example, wouldn't it? To make the whole thing more fun, I'll try (_try_ I said, I may change my mind) to write the RedBook Manual using [LaTeX](http://www.latex-project.org/). It shouldn't be too complicated as I'll need only 10% of its features, and hopefully the result will be pleasant enough to read. -That's it for this month, I think. For those who think this is just a long note on my Facebook profile, check out [the real deal](http://www.h3rald.com/articles/log-jan-2009) on my [web site](http://www.h3rald.com) (did I say Facebook is _totally useless_ for web promotion?). +That's it for this month, I think. For those who think this is just a long note on my Facebook profile, check out [the real deal](/articles/log-jan-2009) on my [web site](http://www.h3rald.com) (did I say Facebook is _totally useless_ for web promotion?).
@@ -4,48 +4,91 @@ content-type: article
timestamp: 1246235040 tags: "personal_log|vim|ruby|wedding" ----- -<p>Welcome to yet another of my extremely boring, excessively fragmented <a href="/tags/personal_log">personal log</a> posts. I’m seriously thinking of dropping the whole series in favor of more frequent (and shorter) blog posts, starting from next year. This means you’ll probably have to read <em>another six</em> of these priceless gems, until december 2009.<br /> -As usual, feel free to skim through as each of the following <em>sections</em> is almost completely unrelated to the others.</p> +<p>Welcome to yet another of my extremely boring, excessively fragmented personal log posts. I’m seriously + thinking of dropping the whole series in favor of more frequent (and shorter) blog posts, starting from next year. + This means you’ll probably have to read <em>another six</em> of these priceless gems, until december + 2009.<br /> + As usual, feel free to skim through as each of the following <em>sections</em> is almost completely unrelated to the + others.</p> <h3>H3RALD Web Site v8.0</h3> -<p>It’s the time of the year, again. It doesn’t happen <em>every</em> year but it’s definitely a trend (hence the high version number): I’m going to redesign & redevelop my web site.</p> -<p>This time is not the usual “Let’s pick another language and another framework and start from scratch”, but a rather more radical shift, and yet at the same time less painful. The idea is to transform H3RALD.com into a 100% static web site, without losing anything in functionality (gaining, if anything!).</p> -<p><a href="/http://tom.preston-werner.com/">Tom Preston-Werner</a> is definitely <em>not</em> the first person to <a href="http://tom.preston-werner.com/2008/11/17/blogging-like-a-hacker.html">blog like a hacker</a>, and his very own <a href="http://www.jekyllrb.com/">Jekyll</a> is definitely not the first static web site generator our there, nevertheless, he inspired me to embrace what seems to be one of the latest trend in developer’s blogs.</p> -<p>The idea is simple: turn all the blog posts and pages into static content, and rely on third party web services for things like comments, search etc. For a rather extreme by very interesting example, see <a href="http://tagaholic.me/">Tagaholic</a>.</p> +<p>It’s the time of the year, again. It doesn’t happen <em>every</em> year but it’s definitely a trend + (hence the high version number): I’m going to redesign & redevelop my web site.</p> +<p>This time is not the usual “Let’s pick another language and another framework and start from + scratch”, but a rather more radical shift, and yet at the same time less painful. The idea is to transform + H3RALD.com into a 100% static web site, without losing anything in functionality (gaining, if anything!).</p> +<p><a href="http://tom.preston-werner.com/">Tom Preston-Werner</a> is definitely <em>not</em> the first person to <a + href="http://tom.preston-werner.com/2008/11/17/blogging-like-a-hacker.html">blog like a hacker</a>, and his very + own <a href="http://www.jekyllrb.com/">Jekyll</a> is definitely not the first static web site generator our there, + nevertheless, he inspired me to embrace what seems to be one of the latest trend in developer’s blogs.</p> +<p>The idea is simple: turn all the blog posts and pages into static content, and rely on third party web services for + things like comments, search etc. For a rather extreme by very interesting example, see <a + href="http://tagaholic.me/">Tagaholic</a>.</p> <p>The advantages of this approach are many:</p> <ul> <li>Free yourself from a database.</li> - <li>Free yourself from a resource-hungry, server-side app (<a href="http://wiki.github.com/fdv/typo/">Typo</a>, in this case).</li> + <li>Free yourself from a resource-hungry, server-side app (<a href="http://wiki.github.com/fdv/typo/">Typo</a>, in + this case).</li> <li>Increase speed and reliability, without using caching or similar artifacts.</li> <li>Keep everything under version control.</li> - <li>Don’t worry about breaking things when upgrading (even if the static content generator changes, it shouldn’t really break things).</li> + <li>Don’t worry about breaking things when upgrading (even if the static content generator changes, it + shouldn’t really break things).</li> <li>Unleash the power of client-side scripting (namely, JQuery).</li> </ul> -<p>For now, I’m just brainstorming a little bit on <a href="http://github.com/h3rald/h3rald-website/issues">GitHub</a>, feel free to participate. The first step is obviously choosing a static content generator, and atm Jekyll seems to be slightly ahead of Webby. Opinions?</p> +<p>For now, I’m just brainstorming a little bit on <a + href="http://github.com/h3rald/h3rald-website/issues">GitHub</a>, feel free to participate. The first step is + obviously choosing a static content generator, and atm Jekyll seems to be slightly ahead of Webby. Opinions?</p> <h3>Glyph</h3> -<p>Did you ever want to write a short manual or a book, or even a long article? If so, chances are you gave LaTeX a shot and either fully embraced its philosophy or totally refused it. Sadly, I belong to the second category: I believe sequential documents like manuals or books should be easier to create simply by using <span class="caps">HTML</span>.</p> -<p>Whever I have a chance to actually start working on it, Glyph will become a <em>document authoring framework</em>, i.e. a way to create visually appealing documents in a simple way. All the ingredients are there, it’s only necessary to glue them together in a pretty form:</p> +<p>Did you ever want to write a short manual or a book, or even a long article? If so, chances are you gave LaTeX a shot + and either fully embraced its philosophy or totally refused it. Sadly, I belong to the second category: I believe + sequential documents like manuals or books should be easier to create simply by using <span + class="caps">HTML</span>.</p> +<p>Whever I have a chance to actually start working on it, Glyph will become a <em>document authoring framework</em>, + i.e. a way to create visually appealing documents in a simple way. All the ingredients are there, it’s only + necessary to glue them together in a pretty form:</p> <ul> - <li>Textile (and <a href="http://redcloth.org/">RedCloth</a>) to produce clean <span class="caps">HTML</span> code from a human-readable markup</li> + <li>Textile (and <a href="http://redcloth.org/">RedCloth</a>) to produce clean <span class="caps">HTML</span> code + from a human-readable markup</li> <li>CSS3 to specify page rules</li> - <li>A few rake scripts to produce a standalone <span class="caps">HTML</span> file, <span class="caps">TOC</span>, Index etc.</li> + <li>A few rake scripts to produce a standalone <span class="caps">HTML</span> file, <span class="caps">TOC</span>, + Index etc.</li> <li>An internal <span class="caps">DSL</span> for the document structure and metadata</li> <li><a href="http://www.liquidmarkup.org/">Liquid</a> for control flow, snippets and filters</li> - <li><a href="http://www.princexml.com/">PrinceXML</a> to generate a <span class="caps">PDF</span> from <span class="caps">HTML</span></li> + <li><a href="http://www.princexml.com/">PrinceXML</a> to generate a <span class="caps">PDF</span> from <span + class="caps">HTML</span></li> </ul> -<p>This project is still in planning stage, feel free to have a look at the <a href="http://github.com/h3rald/glyph/issues">issues/features page</a> on GitHub. Feedback is appreciated, as usual.</p> +<p>This project is still in planning stage, feel free to have a look at the <a + href="http://github.com/h3rald/glyph/issues">issues/features page</a> on GitHub. Feedback is appreciated, as + usual.</p> <h3>Vim files & <em>the Stash</em></h3> -<p>If you read the previous two sections of this post, you may have noticed that I’m growing more and more fond of git (and GitHub). Besides the repositories I already mentioned earlier on, I also created a personal <a href="http://github.com/h3rald/stash">stash</a>, which I’m using mainly to store some of my Linux dotfiles, article drafts and …Vim customizations.</p> -<p>If you’re looking for a color scheme for Vim, check out my very own <a href="/herald-vim-color-scheme">herald.vim</a>, and tell me what you think.</p> +<p>If you read the previous two sections of this post, you may have noticed that I’m growing more and more fond of + git (and GitHub). Besides the repositories I already mentioned earlier on, I also created a personal <a + href="http://github.com/h3rald/stash">stash</a>, which I’m using mainly to store some of my Linux + dotfiles, article drafts and …Vim customizations.</p> +<p>If you’re looking for a color scheme for Vim, check out my very own <a + href="/herald-vim-color-scheme">herald.vim</a>, and tell me what you think.</p> <h3>Getting ready for the Big Step</h3> -<p>This will probably be my last post as a free man, as I’m getting married (civilly) on July 2nd and (religiously) on July 11th. <br /> -Luckily the photographer agreed to give us a CD with all the pictures taken on the big day, with no copyright restrictions attached to it (believe it or not, some photographers don’t allow you to republish <em>your own</em> photos unless you ask them first), so I’ll probably write a long post with pictures when we come back from our (half) honeymoon.</p> -<p>Everything is pretty much organized. We had troubles with the waistcoats we got from eBay: they were cut almost randomly to <em>resamble</em> waistcoats, but they weren’t so we had to re-order another lot of 7 sets (waistcoat, cravat <em>and</em> shirt this time) from another seller, this time UK-based. I seriously hope to get them in time.</p> -<p>On the 24th we’re having a party at our house. If you were invited, feel free to drop by, otherwise be prepared to be thrown out of the window (4th floor) by one of our ushers (Roxanne’s <em>big</em> brother). It’s probalby going to be about 30-40 people in the end, mainly because most of my office can’t come due to holidays they booked in advance.</p> +<p>This will probably be my last post as a free man, as I’m getting married (civilly) on July 2nd and + (religiously) on July 11th. <br /> + Luckily the photographer agreed to give us a CD with all the pictures taken on the big day, with no copyright + restrictions attached to it (believe it or not, some photographers don’t allow you to republish <em>your + own</em> photos unless you ask them first), so I’ll probably write a long post with pictures when we come + back from our (half) honeymoon.</p> +<p>Everything is pretty much organized. We had troubles with the waistcoats we got from eBay: they were cut almost + randomly to <em>resamble</em> waistcoats, but they weren’t so we had to re-order another lot of 7 sets + (waistcoat, cravat <em>and</em> shirt this time) from another seller, this time UK-based. I seriously hope to get + them in time.</p> +<p>On the 24th we’re having a party at our house. If you were invited, feel free to drop by, otherwise be prepared + to be thrown out of the window (4th floor) by one of our ushers (Roxanne’s <em>big</em> brother). It’s + probalby going to be about 30-40 people in the end, mainly because most of my office can’t come due to + holidays they booked in advance.</p> <p>What’s left to do now? Well:</p> <ul> <li>Send the bomboniere over to Ireland</li> <li>Make sure my dad actually ships the 96 specially-bottled bottles of our own wine to uncle John, in Ireland.</li> <li>Make sure uncle John doesn’t drink all the 96 bottles of wine before the wedding reception.</li> - <li>Make sure my best man understood that the speech he has do make <em>must</em> be in English, at least 3 minutes long and not too offensive to the groom.</li> - <li>Pay a huge, colossal heap of money for the whole thing. It’s going to cost us (and my dad) quite a bit, in the end. But it’s a once-in-a-lifetime experience, after all (getting totally trashed in a fancy hotel with all your family, including 2nd and 3rd grade cousins).</li> + <li>Make sure my best man understood that the speech he has do make <em>must</em> be in English, at least 3 minutes + long and not too offensive to the groom.</li> + <li>Pay a huge, colossal heap of money for the whole thing. It’s going to cost us (and my dad) quite a bit, in + the end. But it’s a once-in-a-lifetime experience, after all (getting totally trashed in a fancy hotel + with all your family, including 2nd and 3rd grade cousins).</li> </ul>
@@ -4,4 +4,123 @@ content-type: article
timestamp: 1134133434 tags: "google|internet" ----- -Since 1998 SEO experts, webmasters, and even casual users spent ages trying to figure out the magic within that small green bar... but what's really behind Google's most famous invention?If you never experienced the sensation of looking at such a <em>green bar</em> before, then maybe you don't know what I'm referring to; I suggest downloading and installing the Google Toolbar[1]. This IE add-on (now available for the Firefox browser) was developed by Google years ago and still remains the most common way to view a website's <strong>PageRank</strong> through a simple bar with a variable length, according to a 10 point scale.<br /><br />I quietly mentioned the infamous word <em>PageRank</em> earlier, but what is it?<br />Some people think the idea of the word might come from a pun involving one of Google's co-founders (Larry <em>Page</em>), while others simply think it was the most obvious choice for a system which was supposed to <em>rank</em> pages according to importance and popularity. Anyhow, the only certain thing is that two (insert appropriate adjective here) students of Stanford University wrote a paper, in 1998, called "The Anatomy of a Large-Scale Hypertextual Web Search Engine"[3], in which, they discussed some interesting ideas for developing a large scale search engine using a particular algorithm they invented, which was supposed to help delivering the most relevant results for any search query provided by a user of the service.<br /><br />It is also certain that these two guys, Larry Page and Sergey Brin, eventually made an awful lot of money in the following years, developing and expanding an initially simple-looking website/web application with a funny name[4] and turning it into one of the biggest and most profitable businesses in the history of Computer Science. But let's now examine how PageRank works. <br /><br /><br /><strong>Deus ex machina</strong><br /> Google's co-founders kindly provided a short text summing up their innovative (and perhaps secret) technology[5]. In particular, one paragraph seems to offer a brief and simple explanation of how PageRank works:<br /><fieldset><blockquote><br /><em>PageRank relies on the uniquely democratic nature of the web by using its vast link structure as an indicator of an individual page's value. In essence, Google interprets a link from page A to page B as a vote, by page A, for page B. But, Google looks at more than the sheer volume of votes, or links a page receives; it also analyzes the page that casts the vote. Votes cast by pages that are themselves "important", weigh more heavily and help to make other pages "important."<br /></em></blockquote></fieldset><br /><br /> The first time I read this paragraph, I really experienced a feeling of admiration and ecstasy for these two enlightened minds who decided to bestow their priceless gift on the World Wide Web: a system which gives every page the due importance through a democratic system. Isn't it wonderful?<br /><br /> Of course there's (much) more to it than a short paragraph, and obviously this <em>explanation</em> wasn?t enough for those people (webmasters, SEO experts, kids creating their online family albums, etc.), who gradually became more and more interested in knowing further details about the system, hoping that it would have improved their placement in Google's search results. <br /><br /> Indeed, PageRank contributed to label some sites as <em>important</em> and gradually the number of ?PageRank 10? websites[6] began to rise, but generally remaining a prerogative of important names of the IT industry (Microsoft, Apple and obviously Google itself, for example). But how did such sites achieve that? How did the green toolbar grow so much for them and not as much for your grandma's personal webpage?<br /><br /> Soon enough, theories and speculations produced an approximation of the algorithm[7], which is generally thought to be an acceptable model to understand how the system works.<br /><br />Take the following equation:<br /><br /><em>PR(A) = (1-d) + d (PR(T1)/C(T1) + ... + PR(Tn)/C(Tn))</em><br /><br />Where:<br /><br /><em>PR(A)</em> - The PageRank value of a certain page<br /><em>PR(Tn)</em> - The PageRank value of all pages linking to A<br /><em>C(Tn)</em> - The number of links present on page Tn<br /><em>d</em>(... - "damp factor", thought to be 0.85 <br /><br /> It now appears clear that the PageRank of page A depends on the number of pages linking to it. Furthermore, important factors taken into consideration are the <em>quality</em> of such pages (i.e. whether they have a high PageRank themselves or not) and the number of links present on each page, which causes the vote to be <em>divided</em> equally among them. <br /><br /> This is, in a nutshell, how PageRank is supposed to work. This is obviously a simple model, and there's actually a more mathematical/probabilistic approach[8] which goes beyond the scope of this article and requires some notions of probability theory.<br /><br /><br /><strong>Considerations and opinions</strong><br />With this model in mind, it's now possible to understand how (in a very simplified way) Google works: each month Google spiders search the web, and follow links from a page to another, keeping track of the "votes". PageRank is then calculated for every page and updated. This process normally takes a lot of time and, as a matter of fact, PageRank seems to be updated only every 4 months nowadays: these trimester updates normally causes a page to increase its rank by one (or more if you're lucky) level on the bar, or in some cases, lower it in the same way.<br /><br /> By taking a closer look at the formula proposed above, you'll notice that the maximum value of PR(A) is by no means equal to 10, as it depends on how many pages link to A and how many outbound links there are on such pages. As a matter of fact, people started speculating on the nature of the scale used for PageRank: on the toolbar it ranges from 0 to 10, while in reality a PageRank 10 (take Microsoft.com for example) should correspond to <em>some millions</em> in practice. <br /><br /> The most accredited theory is that the PageRank displayed on the green bar is the result of a sort of correspondence between real values and such 0 to 10 scale. Also, people suggested that such scale is in fact a base 5 (or 6) logarithmic scale. This would explain for example why it takes much longer to acquire PageRank 7 from PageRank 6 than acquiring PageRank 3 from PageRank 2.<br />For the non-mathematical minds, a <em>logarithmic scale</em> is a succession of numbers NOT incremented by "1" or a fixed quantity, but by an always-growing exponential factor: taking a base-10 logarithmic scale, values of 1,2,3 would correspond respectively to 10^1, 10^2 and 10^3 (10, 100, 1000).<br /><br /> For a long time Google seemed to use PageRank as an important factor for getting first places in search results, and it's still partly true: if you search for the keyword "Italy" you're likely to find some high PR sites as first results.<br /><br /> This resulted in all the possible forms of speculations: webmasters started asking money for publishing links on high PR pages, and similarly SEO experts started adopting various infamous tactics to obtain a high PageRank for their customers: this includes, for example, <em>link farms</em>[9].<br /><br />It's now clear that what is was believed to be a solution relying on the <em>uniquely democratic nature of the web</em> turned out to be a complete failure in that sense, because the very basis of the concept is wrong. Sad, but true, the WWW is by no means democratic at all. <br /><br /> Another complaint against PageRank was that new sites took ages to acquire <em>respectable</em> PageRank and therefore appear on the top of search results, no matter how wonderfully they were written. This is still partly true, as anyone can notice by searching Google, but the algorithm itself is continuously being tweaked both for stopping spammers and link farms, and also to favour those sites which provide relevant and appropriate content and are not up to some dodgy trick; I must admit that the situation is gradually getting better.<br /><br /><br /><strong>Case Study: ItalySimply.com and h3raLd.com</strong><br />I'm now going to discuss my own personal experience with PageRank applied to my two websites, ItalySimply[10] and h3raLd Labs[11]. While the second one is not currently advertised or promoted, because at the moment I don't have enough time for other web developing projects, with the first one I tried to follow a <em>SEO Strategy</em> trying to acquire PageRank and good placement in search engines.<br />You can see the result yourself: ItalySimply acquired PageRank 5 and h3raLd PageRank 4: not bad at all considering they are both two relatively new websites, ItalySimply being officially born in August 2004 and h3raLd Labs actually had some serious content from April 2005 on. <br /><br /> For ItalySimply, I even experienced a period of <em>PageRank 0</em> which lasted about 2 months: although according to Google all websites should have at least PR1, PR0 is used to penalize some <em>unusual</em> behaviour which in my case was a <em>302 - Temporarily Moved</em> redirect which was necessary to redirect users to a subfolder of the server. Later on I learned how this can be interpreted as a dodgy redirection by search engines[12], and why I was penalized by Google for this with a PR0. After noticing the mistakes, I immediately started a strategic link campaign; obtaining links from some good sites (also with high PR) related to mine, and PageRank for ItalySimply began to grow, from 0 to 3, then 4, and just recently 5.<br /><br /> At the same time, I re-designed h3raLd.com and noticed that it acquired PR1, because it was already listed in Google and didn't get any <em>vote</em> from other sites. I then decided to put a link to h3raLd Labs on <em>every</em> page of ItalySimply, which are now ranging from PR5 to PR2. <br /><br /> The result was an immediate growth of h3raLd.com in terms of PR, which reached an acceptable 4 without <em>any</em> link swapped, banner displayed on behalf of other sites, or anything as such. <br /><br /> The difference between the two sites though is much bigger than 1 point on PR, in terms of placement in search results: ItalySimply has some relatively interesting content and various pages, and it ranks good enough on MSN and Yahoo, and even Google, to an extent; h3raLd.com has just 4 pages and doesn't seem to appear at all in search engines, unless you search for something like "h3raLd". Again, this is a proof that nowadays PR doesn't mean immediate placement on the top of search results.<br /><br /><br /><strong>Final Considerations</strong><br /> Although PR is by no means the unique factor to determine search engine placements, it's still certainly important as a <em>co-factor</em>. As I said, it's still extremely difficult for a new page with low PageRank to place before a high-ranked one. Surely, if I decided to put something more interesting on h3raLd.com I would get better results than buying a new domain and creating a new site: old sites with high PR are still <em>naturally</em> inclined to rank better than new ones. Got that? Now, all you need to do is buy a really stupid domain name and create some pages for it, then think about it like a bottle of whisky; let it age for a while making it get some respectable rank: when you have a clever idea you'll have your ready-made place to promote it!<br /><br /><em>In Google we trust!</em><br /><br /><br /><br /><strong>Sources and related links:</strong><br /><br />[1] Google Toolbar, <a href="http://toolbar.google.com/">http://toolbar.google.com/</a><br />[2] Stanford University, <a href="http://www.stanford.edu/">http://www.stanford.edu/</a><br />[3] Lawrence Page and Sergey Brin, "The Anatomy of a Large-Scale Hypertextual Web Search Engine", Computer Science Department, Stanford University, <a href="http://www-db.stanford.edu/~backrub/google.html">http://www-db.stanford.edu/~backrub/google.html</a><br />[4] Google, <a href="http://www.google.com/">http://www.google.com/</a><br />[5] Google Technology, <a href="http://www.google.com/technology/">http://www.google.com/technology/</a><br />[6] List of PageRank 10 sites, <a href="http://www.searchenginegenie.com/pagerank-10-sites.htm">http://www.searchenginegenie.com/pagerank-10-sites.htm</a><br />[7] Ian Rogers, "The Google Pagerank Algorithm and How It Works", IPR Computing Ltd. <a href="http://www.iprcom.com/papers/pagerank/index.html">http://www.iprcom.com/papers/pagerank/index.html</a><br />[8] Pagerank, Wikipedia page, <a href="http://en.wikipedia.org/wiki/Pagerank">http://en.wikipedia.org/wiki/Pagerank</a> <br />[9] Link Farm, Wikipedia Page, <a href="http://en.wikipedia.org/wiki/Link_farm">http://en.wikipedia.org/wiki/Link_farm</a><br />[10] ItalySimply - Italy Real Estate Services and Relocation Help, <a href="http://www.italysimply.com/">http://www.italysimply.com/</a><br />[11] h3raLd Labs - Freelance Web Development, <a href="http://www.h3rald.com/">http://www.h3rald.com/</a><br />[12] "The Rundown on 301 and 302 redirects", September 10th, 2004, <br /><a href="http://www.rankforsales.com/seo-articles/301-and-302-domain-name-redirects.html">http://www.rankforsales.com/seo-articles/301-and-302-domain-name-redirects.html</a><br /> +Since 1998 SEO experts, webmasters, and even casual users spent ages trying to figure out the magic within that small +green bar... but what's really behind Google's most famous invention?If you never experienced the sensation of looking +at such a <em>green bar</em> before, then maybe you don't know what I'm referring to; I suggest downloading and +installing the Google Toolbar[1]. This IE add-on (now available for the Firefox browser) was developed by Google years +ago and still remains the most common way to view a website's <strong>PageRank</strong> through a simple bar with a +variable length, according to a 10 point scale.<br /><br />I quietly mentioned the infamous word <em>PageRank</em> +earlier, but what is it?<br />Some people think the idea of the word might come from a pun involving one of Google's +co-founders (Larry <em>Page</em>), while others simply think it was the most obvious choice for a system which was +supposed to <em>rank</em> pages according to importance and popularity. Anyhow, the only certain thing is that two +(insert appropriate adjective here) students of Stanford University wrote a paper, in 1998, called "The Anatomy of a +Large-Scale Hypertextual Web Search Engine"[3], in which, they discussed some interesting ideas for developing a large +scale search engine using a particular algorithm they invented, which was supposed to help delivering the most relevant +results for any search query provided by a user of the service.<br /><br />It is also certain that these two guys, Larry +Page and Sergey Brin, eventually made an awful lot of money in the following years, developing and expanding an +initially simple-looking website/web application with a funny name[4] and turning it into one of the biggest and most +profitable businesses in the history of Computer Science. But let's now examine how PageRank works. +<br /><br /><br /><strong>Deus ex machina</strong><br /> Google's co-founders kindly provided a short text summing up +their innovative (and perhaps secret) technology[5]. In particular, one paragraph seems to offer a brief and simple +explanation of how PageRank works:<br /> +<fieldset> + <blockquote><br /><em>PageRank relies on the uniquely democratic nature of the web by using its vast link structure + as an indicator of an individual page's value. In essence, Google interprets a link from page A to page B as + a vote, by page A, for page B. But, Google looks at more than the sheer volume of votes, or links a page + receives; it also analyzes the page that casts the vote. Votes cast by pages that are themselves + "important", weigh more heavily and help to make other pages "important."<br /></em></blockquote> +</fieldset><br /><br /> The first time I read this paragraph, I really experienced a feeling of admiration and ecstasy +for these two enlightened minds who decided to bestow their priceless gift on the World Wide Web: a system which gives +every page the due importance through a democratic system. Isn't it wonderful?<br /><br /> Of course there's (much) more +to it than a short paragraph, and obviously this <em>explanation</em> wasn?t enough for those people (webmasters, SEO +experts, kids creating their online family albums, etc.), who gradually became more and more interested in knowing +further details about the system, hoping that it would have improved their placement in Google's search results. +<br /><br /> Indeed, PageRank contributed to label some sites as <em>important</em> and gradually the number of +?PageRank 10? websites[6] began to rise, but generally remaining a prerogative of important names of the IT industry +(Microsoft, Apple and obviously Google itself, for example). But how did such sites achieve that? How did the green +toolbar grow so much for them and not as much for your grandma's personal webpage?<br /><br /> Soon enough, theories and +speculations produced an approximation of the algorithm[7], which is generally thought to be an acceptable model to +understand how the system works.<br /><br />Take the following equation:<br /><br /><em>PR(A) = (1-d) + d (PR(T1)/C(T1) + + ... + PR(Tn)/C(Tn))</em><br /><br />Where:<br /><br /><em>PR(A)</em> - The PageRank value of a certain +page<br /><em>PR(Tn)</em> - The PageRank value of all pages linking to A<br /><em>C(Tn)</em> - The number of links +present on page Tn<br /><em>d</em>(... - "damp factor", thought to be 0.85 <br /><br /> It now appears clear that the +PageRank of page A depends on the number of pages linking to it. Furthermore, important factors taken into consideration +are the <em>quality</em> of such pages (i.e. whether they have a high PageRank themselves or not) and the number of +links present on each page, which causes the vote to be <em>divided</em> equally among them. <br /><br /> This is, in a +nutshell, how PageRank is supposed to work. This is obviously a simple model, and there's actually a more +mathematical/probabilistic approach[8] which goes beyond the scope of this article and requires some notions of +probability theory.<br /><br /><br /><strong>Considerations and opinions</strong><br />With this model in mind, it's now +possible to understand how (in a very simplified way) Google works: each month Google spiders search the web, and follow +links from a page to another, keeping track of the "votes". PageRank is then calculated for every page and updated. This +process normally takes a lot of time and, as a matter of fact, PageRank seems to be updated only every 4 months +nowadays: these trimester updates normally causes a page to increase its rank by one (or more if you're lucky) level on +the bar, or in some cases, lower it in the same way.<br /><br /> By taking a closer look at the formula proposed above, +you'll notice that the maximum value of PR(A) is by no means equal to 10, as it depends on how many pages link to A and +how many outbound links there are on such pages. As a matter of fact, people started speculating on the nature of the +scale used for PageRank: on the toolbar it ranges from 0 to 10, while in reality a PageRank 10 (take Microsoft.com for +example) should correspond to <em>some millions</em> in practice. <br /><br /> The most accredited theory is that the +PageRank displayed on the green bar is the result of a sort of correspondence between real values and such 0 to 10 +scale. Also, people suggested that such scale is in fact a base 5 (or 6) logarithmic scale. This would explain for +example why it takes much longer to acquire PageRank 7 from PageRank 6 than acquiring PageRank 3 from PageRank +2.<br />For the non-mathematical minds, a <em>logarithmic scale</em> is a succession of numbers NOT incremented by "1" +or a fixed quantity, but by an always-growing exponential factor: taking a base-10 logarithmic scale, values of 1,2,3 +would correspond respectively to 10^1, 10^2 and 10^3 (10, 100, 1000).<br /><br /> For a long time Google seemed to use +PageRank as an important factor for getting first places in search results, and it's still partly true: if you search +for the keyword "Italy" you're likely to find some high PR sites as first results.<br /><br /> This resulted in all the +possible forms of speculations: webmasters started asking money for publishing links on high PR pages, and similarly SEO +experts started adopting various infamous tactics to obtain a high PageRank for their customers: this includes, for +example, <em>link farms</em>[9].<br /><br />It's now clear that what is was believed to be a solution relying on the +<em>uniquely democratic nature of the web</em> turned out to be a complete failure in that sense, because the very basis +of the concept is wrong. Sad, but true, the WWW is by no means democratic at all. <br /><br /> Another complaint against +PageRank was that new sites took ages to acquire <em>respectable</em> PageRank and therefore appear on the top of search +results, no matter how wonderfully they were written. This is still partly true, as anyone can notice by searching +Google, but the algorithm itself is continuously being tweaked both for stopping spammers and link farms, and also to +favour those sites which provide relevant and appropriate content and are not up to some dodgy trick; I must admit that +the situation is gradually getting better.<br /><br /><br /><strong>Case Study: ItalySimply.com and + h3raLd.com</strong><br />I'm now going to discuss my own personal experience with PageRank applied to my two +websites, ItalySimply[10] and h3raLd Labs[11]. While the second one is not currently advertised or promoted, because at +the moment I don't have enough time for other web developing projects, with the first one I tried to follow a <em>SEO + Strategy</em> trying to acquire PageRank and good placement in search engines.<br />You can see the result yourself: +ItalySimply acquired PageRank 5 and h3raLd PageRank 4: not bad at all considering they are both two relatively new +websites, ItalySimply being officially born in August 2004 and h3raLd Labs actually had some serious content from April +2005 on. <br /><br /> For ItalySimply, I even experienced a period of <em>PageRank 0</em> which lasted about 2 months: +although according to Google all websites should have at least PR1, PR0 is used to penalize some <em>unusual</em> +behaviour which in my case was a <em>302 - Temporarily Moved</em> redirect which was necessary to redirect users to a +subfolder of the server. Later on I learned how this can be interpreted as a dodgy redirection by search engines[12], +and why I was penalized by Google for this with a PR0. After noticing the mistakes, I immediately started a strategic +link campaign; obtaining links from some good sites (also with high PR) related to mine, and PageRank for ItalySimply +began to grow, from 0 to 3, then 4, and just recently 5.<br /><br /> At the same time, I re-designed h3raLd.com and +noticed that it acquired PR1, because it was already listed in Google and didn't get any <em>vote</em> from other sites. +I then decided to put a link to h3raLd Labs on <em>every</em> page of ItalySimply, which are now ranging from PR5 to +PR2. <br /><br /> The result was an immediate growth of h3raLd.com in terms of PR, which reached an acceptable 4 without +<em>any</em> link swapped, banner displayed on behalf of other sites, or anything as such. <br /><br /> The difference +between the two sites though is much bigger than 1 point on PR, in terms of placement in search results: ItalySimply has +some relatively interesting content and various pages, and it ranks good enough on MSN and Yahoo, and even Google, to an +extent; h3raLd.com has just 4 pages and doesn't seem to appear at all in search engines, unless you search for something +like "h3raLd". Again, this is a proof that nowadays PR doesn't mean immediate placement on the top of search +results.<br /><br /><br /><strong>Final Considerations</strong><br /> Although PR is by no means the unique factor to +determine search engine placements, it's still certainly important as a <em>co-factor</em>. As I said, it's still +extremely difficult for a new page with low PageRank to place before a high-ranked one. Surely, if I decided to put +something more interesting on h3raLd.com I would get better results than buying a new domain and creating a new site: +old sites with high PR are still <em>naturally</em> inclined to rank better than new ones. Got that? Now, all you need +to do is buy a really stupid domain name and create some pages for it, then think about it like a bottle of whisky; let +it age for a while making it get some respectable rank: when you have a clever idea you'll have your ready-made place to +promote it!<br /><br /><em>In Google we trust!</em><br /><br /><br /><br /><strong>Sources and related + links:</strong><br /><br />[1] Google Toolbar, <a + href="http://toolbar.google.com/">http://toolbar.google.com/</a><br />[2] Stanford University, <a + href="http://www.stanford.edu/">http://www.stanford.edu/</a><br />[3] Lawrence Page and Sergey Brin, "The Anatomy of +a Large-Scale Hypertextual Web Search Engine", Computer Science Department, Stanford University, <a + href="http://www-db.stanford.edu/~backrub/google.html">http://www-db.stanford.edu/~backrub/google.html</a><br />[4] +Google, <a href="http://www.google.com/">http://www.google.com/</a><br />[5] Google Technology, <a + href="http://www.google.com/technology/">http://www.google.com/technology/</a><br />[6] List of PageRank 10 sites, +<a + href="http://www.searchenginegenie.com/pagerank-10-sites.htm">http://www.searchenginegenie.com/pagerank-10-sites.htm</a><br />[7] +Ian Rogers, "The Google Pagerank Algorithm and How It Works", IPR Computing Ltd. <a + href="http://www.iprcom.com/papers/pagerank/index.html">http://www.iprcom.com/papers/pagerank/index.html</a><br />[8] +Pagerank, Wikipedia page, <a href="http://en.wikipedia.org/wiki/Pagerank">http://en.wikipedia.org/wiki/Pagerank</a> +<br />[9] Link Farm, Wikipedia Page, <a + href="http://en.wikipedia.org/wiki/Link_farm">http://en.wikipedia.org/wiki/Link_farm</a><br />[10] ItalySimply - +Italy Real Estate Services and Relocation Help, <a + href="http://www.italysimply.com/">http://www.italysimply.com/</a><br />[11] h3raLd Labs - Freelance Web +Development, <a href="/">/</a><br />[12] "The Rundown on 301 and 302 redirects", September 10th, 2004, <br /><a + href="http://www.rankforsales.com/seo-articles/301-and-302-domain-name-redirects.html">http://www.rankforsales.com/seo-articles/301-and-302-domain-name-redirects.html</a><br />
@@ -6,65 +6,121 @@ popular: true
timestamp: 1146661020 tags: "frameworks|review|cakephp|rails" ----- -<p>There are various articles online examining many <span class="caps">PHP</span> frameworks, providing short reviews or comparative charts, but I could not find yet an article examining the so called <em>“Rails-inspired frameworks”</em> anywhere on the web, so I decided to write my own…</p> +<p>There are various articles online examining many <span class="caps">PHP</span> frameworks, providing short reviews or + comparative charts, but I could not find yet an article examining the so called <em>“Rails-inspired + frameworks”</em> anywhere on the web, so I decided to write my own…</p> <blockquote> -<p><strong><span class="caps">IMPORTANT</span> <span class="caps">UPDATE</span>:</strong> I do no longer recommend the CakePHP framework anymore due to the <a href="http://www.h3rald.com/blog/42">unprofessionalism of some member of its development team</a>. My site is now powered by Ruby on Rails and I totally lost interest in <span class="caps">PHP</span> and any <span class="caps">PHP</span> framework. If you are looking for a decent web framework, try <a href="http://www.rubyonrails.org">Ruby on Rails</a> (for Ruby), <a href="http://www.djangoproject.com/">Django</a> (for Python) or <a href="http://catalyst.perl.org/">Catalyst</a> (for Perl).<br /> -I’m talking about those <span class="caps">PHP</span> frameworks who give at least part of their success to Ruby on Rails<sup class="footnote" id="fnr2"><a href="#fn2">2</a></sup>, but don’t call them <em>clones</em> or <em>ports</em> as some of their creators may get offended.</p> + <p><strong><span class="caps">IMPORTANT</span> <span class="caps">UPDATE</span>:</strong> I do no longer recommend + the CakePHP framework anymore due to the <a href=/articles/42">unprofessionalism of some + member of its development team</a>. My site is now powered by Ruby on Rails and I totally lost interest in + <span class="caps">PHP</span> and any <span class="caps">PHP</span> framework. If you are looking for a decent + web framework, try <a href="http://www.rubyonrails.org">Ruby on Rails</a> (for Ruby), <a + href="http://www.djangoproject.com/">Django</a> (for Python) or <a + href="http://catalyst.perl.org/">Catalyst</a> (for Perl).<br /> + I’m talking about those <span class="caps">PHP</span> frameworks who give at least part of their success + to Ruby on Rails<sup class="footnote" id="fnr2"><a href="#fn2">2</a></sup>, but don’t call them + <em>clones</em> or <em>ports</em> as some of their creators may get offended. + </p> </blockquote> <p style="float:left;"><img src="/img/pictures/rails.gif" alt="" /></p> -<p>Since Rails shocked the world with an easy-to-use, powerful and semi-sentient web development framework, web development is not the same anymore: everything must be done efficiently, quickly and you <em>have</em> to produce a Web 2.0 compliant public beta after X days/weeks/months or your work is simply not useful to anybody. Try doing that with the traditional <span class="caps">PHP</span> spaghetti code: you can’t, it’s too much, it will be too tangled up and in the end you’ll lose your mind trying to find that <em>small insignificant bug</em> which makes your web application completely useless.</p> -<p>Yes, you could use Rails, but maybe you don’t know or don’t want to learn Ruby, your host doesn’t support it, your boss loves <span class="caps">PHP</span> etc. etc. If you’re in this situation or you simply would like to know what’s going on at the <span class="caps">PHP</span> front of the Rails Clone War, you should keep reading this article.</p> -<p>I’d like to introduce – briefly – six Rails-inspired <span class="caps">PHP</span> frameworks and compare them with each other, to point out their features, their pros and cons.</p> +<p>Since Rails shocked the world with an easy-to-use, powerful and semi-sentient web development framework, web + development is not the same anymore: everything must be done efficiently, quickly and you <em>have</em> to produce a + Web 2.0 compliant public beta after X days/weeks/months or your work is simply not useful to anybody. Try doing that + with the traditional <span class="caps">PHP</span> spaghetti code: you can’t, it’s too much, it will be + too tangled up and in the end you’ll lose your mind trying to find that <em>small insignificant bug</em> which + makes your web application completely useless.</p> +<p>Yes, you could use Rails, but maybe you don’t know or don’t want to learn Ruby, your host doesn’t + support it, your boss loves <span class="caps">PHP</span> etc. etc. If you’re in this situation or you simply + would like to know what’s going on at the <span class="caps">PHP</span> front of the Rails Clone War, you + should keep reading this article.</p> +<p>I’d like to introduce – briefly – six Rails-inspired <span class="caps">PHP</span> frameworks and + compare them with each other, to point out their features, their pros and cons.</p> <blockquote> -<p><em><strong>Disclaimer:</strong> I’m a CakePHP<sup class="footnote" id="fnr3"><a href="#fn3">3</a></sup> fan, this site has been built with CakePHP and I even wrote something<sup class="footnote" id="fnr4"><a href="#fn4">4</a></sup> about it in the past. This makes me inevitably partial and more familiar with this particular framework, but I’ll try my very best to provide a relatively objective analysis. Obviously frameworks which are not based on the <span class="caps">MVC</span> architechture and that weren’t inspired by Ruby on Rails have not been included, so forget things like <span class="caps">PRADO</span>, Qcodo, eZComponents, or even Mojavi: it’s not that they are “bad”, they’ve just been left out because they are not pertinent to this article</em></p> + <p><em><strong>Disclaimer:</strong> I’m a CakePHP<sup class="footnote" id="fnr3"><a href="#fn3">3</a></sup> + fan, this site has been built with CakePHP and I even wrote something<sup class="footnote" id="fnr4"><a + href="#fn4">4</a></sup> about it in the past. This makes me inevitably partial and more familiar + with this particular framework, but I’ll try my very best to provide a relatively objective analysis. + Obviously frameworks which are not based on the <span class="caps">MVC</span> architechture and that + weren’t inspired by Ruby on Rails have not been included, so forget things like <span + class="caps">PRADO</span>, Qcodo, eZComponents, or even Mojavi: it’s not that they are + “bad”, they’ve just been left out because they are not pertinent to this article</em></p> </blockquote> <h3>CakePHP</h3> <p style="float:right;"><img src="/img/pictures/CakePHP_1.0.png" alt="" /></p> <p><strong>Website:</strong> <a href="http://www.cakephp.org/">www.cakephp.org</a><br /> -<strong><span class="caps">PHP</span> version:</strong> PHP4 and PHP5<br /> -<strong>License:</strong> <span class="caps">MIT</span><sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup><br /> -<strong>Download size (.tar.gz):</strong> 184KB<br /> -<strong>Supported Databases:</strong> MySQL, PostgreSQL, SQlite, MS <span class="caps">SQL</span> + any other supported by ADOdb or <span class="caps">PEAR</span>::DB database abstraction layers<br /> -<strong>Beginner’s Tutorial</strong>: <a href="http://wiki.cakephp.org/tutorials:blog_tutorial_-_1">Blog Tutorial</a></p> + <strong><span class="caps">PHP</span> version:</strong> PHP4 and PHP5<br /> + <strong>License:</strong> <span class="caps">MIT</span><sup class="footnote" id="fnr5"><a + href="#fn5">5</a></sup><br /> + <strong>Download size (.tar.gz):</strong> 184KB<br /> + <strong>Supported Databases:</strong> MySQL, PostgreSQL, SQlite, MS <span class="caps">SQL</span> + any other + supported by ADOdb or <span class="caps">PEAR</span>::DB database abstraction layers<br /> + <strong>Beginner’s Tutorial</strong>: <a href="http://wiki.cakephp.org/tutorials:blog_tutorial_-_1">Blog + Tutorial</a> +</p> <p><strong>Official Description:</strong><br /> -<em>“Cake is a rapid development framework for <span class="caps">PHP</span> which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and <span class="caps">MVC</span>. Our primary goal is to provide a structured framework that enables <span class="caps">PHP</span> users at all levels to rapidly develop robust web applications, without any loss to flexibility.”</em></p> + <em>“Cake is a rapid development framework for <span class="caps">PHP</span> which uses commonly known design + patterns like ActiveRecord, Association Data Mapping, Front Controller and <span class="caps">MVC</span>. Our + primary goal is to provide a structured framework that enables <span class="caps">PHP</span> users at all levels + to rapidly develop robust web applications, without any loss to flexibility.”</em> +</p> <p><strong>PROs:</strong></p> <ul> <li>Lightweight, not bloated, containing only essential code</li> <li>Runs both on PHP4 and PHP5</li> - <li>No configuration needed – except for a stupidly short database configuration file and a few constants which <em>can</em> be modified. You can literally start baking in less than five minutes</li> + <li>No configuration needed – except for a stupidly short database configuration file and a few constants + which <em>can</em> be modified. You can literally start baking in less than five minutes</li> <li>Extended table association support, allowing the creation of complex database architechtures</li> <li>Extremely logical and functional directory structure: better than Rails, if you ask me.</li> - <li>Enhanced <span class="caps">AJAX</span> support through the <span class="caps">AJAX</span> and Javascript view helpers</li> - <li>useful “bake” command line script to generate parts of the code automatically</li> + <li>Enhanced <span class="caps">AJAX</span> support through the <span class="caps">AJAX</span> and Javascript view + helpers</li> + <li>useful “bake” command line script to generate parts of the code automatically</li> <li>Very active community and plenty of <em>satellite sites</em></li> <li>Suitable for every kind of website, from the small personal site to the advanced e-business application.</li> </ul> <p><strong>CONs:</strong></p> <ul> - <li>No “official” internationalization support for now, but it will be included in the next milestone.</li> + <li>No “official” internationalization support for now, but it will be included in the next milestone. + </li> <li>It does not take fully advantage of PHP5 features</li> - <li>Official documentation still needs some some improvement, although now it seems pretty complete and exhaustive.</li> + <li>Official documentation still needs some some improvement, although now it seems pretty complete and exhaustive. + </li> </ul> <p><strong>Comments:</strong><br /> -CakePHP is my personal favorite: easy to learn, easy to use,multi-purpose and not bloated. Cake’s philosophy is not to include unnecessary code in the framework unless it’s absolutely necessary for the framework itself, as a result, 3rd-party libraries are not included in the official releases, but may be seamlessly integrated with the framework <em>if developers need them</em>. <br /> -Cake’s success is partly determined – at least initially – by the fact that it can run fine with no limitations on PHP4, while other similar frameworks don’t. Although this may still be one of its most obvious strengths, it must be said that Cake seems to go in the right direction, taking only the best from Rails, without forcing developers into complex and pointless adaptations, and evolving into a great framework created <em>in <span class="caps">PHP</span>, for <span class="caps">PHP</span></em>.</p> + CakePHP is my personal favorite: easy to learn, easy to use,multi-purpose and not bloated. Cake’s philosophy + is not to include unnecessary code in the framework unless it’s absolutely necessary for the framework itself, + as a result, 3rd-party libraries are not included in the official releases, but may be seamlessly integrated with + the framework <em>if developers need them</em>. <br /> + Cake’s success is partly determined – at least initially – by the fact that it can run fine with + no limitations on PHP4, while other similar frameworks don’t. Although this may still be one of its most + obvious strengths, it must be said that Cake seems to go in the right direction, taking only the best from Rails, + without forcing developers into complex and pointless adaptations, and evolving into a great framework created + <em>in <span class="caps">PHP</span>, for <span class="caps">PHP</span></em>. +</p> <h3>Symfony</h3> <p style="float:right;"><img src="/img/pictures/symfony.gif" alt="" /></p> <p><strong>Website:</strong> <a href="http://www.symfony-project.com/">www.synfony.project.com</a><br /> -<strong><span class="caps">PHP</span> version:</strong> PHP5<br /> -<strong>License:</strong> Symfony<sup class="footnote" id="fnr6"><a href="#fn6">6</a></sup><br /> -<strong>Download size (.tgz):</strong> 1255KB<br /> -<strong>Supported Databases:</strong> MySQL, PostgreSQL, SQLite, Oracle, MS <span class="caps">SQL</span> + any other supported by Creole database abstraction layer<br /> -<strong>Beginner’s Tutorial</strong>: <a href="http://www.symfony-project.com/tutorial/my_first_project.html">My first project</a></p> + <strong><span class="caps">PHP</span> version:</strong> PHP5<br /> + <strong>License:</strong> Symfony<sup class="footnote" id="fnr6"><a href="#fn6">6</a></sup><br /> + <strong>Download size (.tgz):</strong> 1255KB<br /> + <strong>Supported Databases:</strong> MySQL, PostgreSQL, SQLite, Oracle, MS <span class="caps">SQL</span> + any + other supported by Creole database abstraction layer<br /> + <strong>Beginner’s Tutorial</strong>: <a + href="http://www.symfony-project.com/tutorial/my_first_project.html">My first project</a> +</p> <p><strong>Official Description:</strong><br /> -<em>“Based on the best practices of web development, thoroughly tried on several active websites, symfony aims to speed up the creation and maintenance of web applications, and to replace the repetitive coding tasks by power, control and pleasure. […]</em><br /> -<em>Symfony is an object-oriented PHP5 framework based on the <span class="caps">MVC</span> model. Symfony allows for the separation of business rules, server logic and presentation views of a web application. It also contains numerous tools and classes aimed at shortening the development time of a complex web application."</em></p> + <em>“Based on the best practices of web development, thoroughly tried on several active websites, symfony aims + to speed up the creation and maintenance of web applications, and to replace the repetitive coding tasks by + power, control and pleasure. […]</em><br /> + <em>Symfony is an object-oriented PHP5 framework based on the <span class="caps">MVC</span> model. Symfony allows + for the separation of business rules, server logic and presentation views of a web application. It also contains + numerous tools and classes aimed at shortening the development time of a complex web application."</em> +</p> <p><strong>PROs:</strong></p> <ul> <li>Fully featured framework, includes everything you might ever need (see CONs, below)</li> <li>Full native internationalization support</li> - <li>Truly excellent documentation, tutorials, wiki, book, screencasts, <span class="caps">API</span>, real-world examples, etc. etc.</li> + <li>Truly excellent documentation, tutorials, wiki, book, screencasts, <span class="caps">API</span>, real-world + examples, etc. etc.</li> <li>Code generators</li> <li>Various “pre-built” modules/libraries for the most common tasks</li> <li>It was not inspired only by Rails, but borrows concepts and practices from various other frameworks</li>@@ -72,24 +128,36 @@ <li>Good community support</li>
</ul> <p><strong>CONs:</strong></p> <ul> - <li>Seems too big compared to the others, too many “extras” which may not be useful to <em>all</em> developers</li> + <li>Seems too big compared to the others, too many “extras” which may not be useful to <em>all</em> + developers</li> <li>PHP5 only</li> <li>Confusing and disorganized directory structure</li> <li>Uses too many configuration files, not suitable for <em>simple</em> projects</li> <li>Steep learning curve</li> </ul> <p><strong>Comments:</strong><br /> -Symfony is really an interesting framework: it’s perhaps the most <em>complete</em> in terms for features and documentation. The only problem I have with it is that it just seems too complex and rather difficult to learn if compared to the others, which can do <em>almost</em> the same things (or will soon be able to) in a <em><span class="caps">MUCH</span></em> simpler way. A nice blend of <span class="caps">MVC</span>, pre-built components, command line generators and <span class="caps">YAML</span>/Propel configuration files, but perhaps a bit <em>disorganized</em> in its internal structure, unlike its wonderful documentation and support section.</p> + Symfony is really an interesting framework: it’s perhaps the most <em>complete</em> in terms for features and + documentation. The only problem I have with it is that it just seems too complex and rather difficult to learn if + compared to the others, which can do <em>almost</em> the same things (or will soon be able to) in a <em><span + class="caps">MUCH</span></em> simpler way. A nice blend of <span class="caps">MVC</span>, pre-built + components, command line generators and <span class="caps">YAML</span>/Propel configuration files, but perhaps a bit + <em>disorganized</em> in its internal structure, unlike its wonderful documentation and support section. +</p> <h3><span class="caps">PHP</span> on Trax</h3> <p style="float:right;"><img src="/img/pictures/phpontrax.jpg" alt="" /></p> <p><strong>Website:</strong> <a href="http://www.phpontrax.com/">www.phpontrax.com</a><br /> -<strong><span class="caps">PHP</span> version:</strong> PHP5<br /> -<strong>License:</strong> <span class="caps">MIT</span><br /> -<strong>Download size (.tgz):</strong> 843KB<br /> -<strong>Supported Databases:</strong> Any database supported by <span class="caps">PEAR</span>::DB<br /> -<strong>Beginner’s Tutorial</strong>: <a href="http://svn.phpontrax.com/wiki/HowToCreateATraxApplication">How to create a Trax application</a></p> + <strong><span class="caps">PHP</span> version:</strong> PHP5<br /> + <strong>License:</strong> <span class="caps">MIT</span><br /> + <strong>Download size (.tgz):</strong> 843KB<br /> + <strong>Supported Databases:</strong> Any database supported by <span class="caps">PEAR</span>::DB<br /> + <strong>Beginner’s Tutorial</strong>: <a href="http://svn.phpontrax.com/wiki/HowToCreateATraxApplication">How + to create a Trax application</a> +</p> <p><strong>Official Description:</strong><br /> -<em>“Php On Trax (formerly Php On Rails) is a web-application and persistance framework that is based on Ruby on Rails and includes everything needed to create database-backed web-applications according to the Model-View-Control pattern of separation.”</em></p> + <em>“Php On Trax (formerly Php On Rails) is a web-application and persistance framework that is based on Ruby + on Rails and includes everything needed to create database-backed web-applications according to the + Model-View-Control pattern of separation.”</em> +</p> <p><strong>PROs:</strong></p> <ul> <li>Simple, logical, essential: a true RoR port to PHP5</li>@@ -101,25 +169,44 @@ </ul>
<p><strong>CONs:</strong></p> <ul> <li>Lack of documentation compared to the others</li> - <li>Trying to port Ruby on Rails to <span class="caps">PHP</span>, ignoring why RoR was not built in <span class="caps">PHP</span> in the first place<sup class="footnote" id="fnr7"><a href="#fn7">7</a></sup></li> + <li>Trying to port Ruby on Rails to <span class="caps">PHP</span>, ignoring why RoR was not built in <span + class="caps">PHP</span> in the first place<sup class="footnote" id="fnr7"><a href="#fn7">7</a></sup></li> <li>No internationalization or other advanced functionalities</li> <li>PHP5 only</li> <li>Small community</li> <li><span class="caps">DBO</span> class based only on <span class="caps">PEAR</span>::DB</li> </ul> <p><strong>Comments:</strong><br /> -In my opinion this project aims too much to be a Rails-clone to acquire a proper consensus. Trying to port something to another language is not good, especially in the case of Rails and Ruby. This framework looks somehow like an old version of CakePHP, which evolved slightly but always remained anchored to its beliefs of building a Rails port for <span class="caps">PHP</span> (even in the name!). Some may say that this is a lost battle since the beginning – or better, since before it started – but others found that <span class="caps">PHP</span> on Trax can be the easiest way to switch from Ruby on Rails to a <span class="caps">PHP</span> equivalent. Who is going to do that? Well, Ruby programmers <em>forced</em> to develop in <span class="caps">PHP</span>, maybe. Not too good, but not too bad either.</p> + In my opinion this project aims too much to be a Rails-clone to acquire a proper consensus. Trying to port something + to another language is not good, especially in the case of Rails and Ruby. This framework looks somehow like an old + version of CakePHP, which evolved slightly but always remained anchored to its beliefs of building a Rails port for + <span class="caps">PHP</span> (even in the name!). Some may say that this is a lost battle since the beginning + – or better, since before it started – but others found that <span class="caps">PHP</span> on Trax can + be the easiest way to switch from Ruby on Rails to a <span class="caps">PHP</span> equivalent. Who is going to do + that? Well, Ruby programmers <em>forced</em> to develop in <span class="caps">PHP</span>, maybe. Not too good, but + not too bad either. +</p> <h3>Code Igniter</h3> <p style="float:right;"><img src="/img/pictures/codeigniter.jpg" alt="" /></p> <p><strong>Website:</strong> <a href="http://www.codeigniter.com/">www.codeigniter.org</a><br /> -<strong><span class="caps">PHP</span> version:</strong> PHP4 and PHP5<br /> -<strong>License:</strong> CodeIgniter<sup class="footnote" id="fnr8"><a href="#fn8">8</a></sup><br /> -<strong>Download size (.zip):</strong> 609KB<br /> -<strong>Supported Databases:</strong> MySQL, PostgreSQL, SQLite, MySQLi, MS <span class="caps">SQL</span> + <span class="caps">ODBC</span><br /> -<strong>Beginner’s Tutorial</strong>: <a href="http://www.codeigniter.com/videos/ci_intro.mov">Hello World! Introduction to Code Igniter</a> [video]</p> + <strong><span class="caps">PHP</span> version:</strong> PHP4 and PHP5<br /> + <strong>License:</strong> CodeIgniter<sup class="footnote" id="fnr8"><a href="#fn8">8</a></sup><br /> + <strong>Download size (.zip):</strong> 609KB<br /> + <strong>Supported Databases:</strong> MySQL, PostgreSQL, SQLite, MySQLi, MS <span class="caps">SQL</span> + <span + class="caps">ODBC</span><br /> + <strong>Beginner’s Tutorial</strong>: <a href="http://www.codeigniter.com/videos/ci_intro.mov">Hello World! + Introduction to Code Igniter</a> [video] +</p> <p><strong>Official Description:</strong><br /> -<em>“Code Igniter is an Open Source Web Application Framework that makes writing kick-ass <span class="caps">PHP</span> programs simple as apple pie. […] Designed to enable, not overwhelm, Code Igniter is a powerful <span class="caps">PHP</span> framework with a very small footprint, built for <span class="caps">PHP</span> coders who need a simple and elegant toolkit to create full-featured web applications.</em><br /> -<em>If you’re a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you’re tired of ponderously large and thoroughly undocumented frameworks that require rocket science to understand, Code Igniter might just be the right tool for you."</em></p> + <em>“Code Igniter is an Open Source Web Application Framework that makes writing kick-ass <span + class="caps">PHP</span> programs simple as apple pie. […] Designed to enable, not overwhelm, Code + Igniter is a powerful <span class="caps">PHP</span> framework with a very small footprint, built for <span + class="caps">PHP</span> coders who need a simple and elegant toolkit to create full-featured web + applications.</em><br /> + <em>If you’re a developer who lives in the real world of shared hosting accounts and clients with deadlines, + and if you’re tired of ponderously large and thoroughly undocumented frameworks that require rocket + science to understand, Code Igniter might just be the right tool for you."</em> +</p> <p><strong>PROs:</strong></p> <ul> <li>Good and organized documentation</li>@@ -137,17 +224,25 @@ <li>Relatively new to the scene, but growing</li>
<li>Does not seem to support table associations.</li> </ul> <p><strong>Comments:</strong><br /> -People on the Net seem to be rather enthusiastic about this framework: where there’s a thread about the <em>big ones</em> (Cake and Symfony), there’s always, someone who pops in suggesting to try out Code Igniter. I personally think this can be a true bless for small/medium sized projects, however, I’d opt for CakePHP or Symfony for a large scale application: something is missing, e.g., most notably, table associations.</p> + People on the Net seem to be rather enthusiastic about this framework: where there’s a thread about the + <em>big ones</em> (Cake and Symfony), there’s always, someone who pops in suggesting to try out Code Igniter. + I personally think this can be a true bless for small/medium sized projects, however, I’d opt for CakePHP or + Symfony for a large scale application: something is missing, e.g., most notably, table associations. +</p> <h3>Biscuit</h3> <p style="float:right;"><img src="/img/pictures/biscuit.gif" alt="" /></p> <p><strong>Website:</strong> <a href="http://biscuitproject.tigris.org/">biscuitproject.tigris.org</a><br /> -<strong><span class="caps">PHP</span> version:</strong> PHP4 and PHP5<br /> -<strong>License:</strong> <span class="caps">MIT</span><sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup> <br /> -<strong>Download size (.zip):</strong> 240KB<br /> -<strong>Supported Databases:</strong> Any database supported by <span class="caps">PEAR</span>::DB<br /> -<strong>Beginner’s Tutorial</strong>: <a href="http://bennolan.com/biscuit/tutorial.html">Creating a simple application using the Biscuit <span class="caps">MVC</span> framework</a></p> + <strong><span class="caps">PHP</span> version:</strong> PHP4 and PHP5<br /> + <strong>License:</strong> <span class="caps">MIT</span><sup class="footnote" id="fnr5"><a href="#fn5">5</a></sup> + <br /> + <strong>Download size (.zip):</strong> 240KB<br /> + <strong>Supported Databases:</strong> Any database supported by <span class="caps">PEAR</span>::DB<br /> + <strong>Beginner’s Tutorial</strong>: <a href="http://bennolan.com/biscuit/tutorial.html">Creating a simple + application using the Biscuit <span class="caps">MVC</span> framework</a> +</p> <p><strong>Official Description:</strong><br /> -<em>“The mission of this project is to port Ruby on Rails to PHP5 (minus the Ruby part ;-)”</em></p> + <em>“The mission of this project is to port Ruby on Rails to PHP5 (minus the Ruby part ;-)”</em> +</p> <p><strong>PROs:</strong></p> <ul> <li>Zero configuration, easy to deploy</li>@@ -157,20 +252,24 @@ </ul>
<p><strong>CONs:</strong></p> <ul> <li>Still under development and incomplete</li> - <li>Offers a limited subset of the features and functionalities offered by competitors: no internationalization, no table associations, no scaffolding…</li> + <li>Offers a limited subset of the features and functionalities offered by competitors: no internationalization, no + table associations, no scaffolding…</li> <li><em>“Documentation coming soon”</em></li> <li>Almost non-existent community</li> </ul> <p><strong>Comments:</strong><br /> -This project started as an attempt to create something simpler than CakePHP and more similar to Rails. I’m not sure whether the project is still active or not, since the last “release” on the former’s developer site is dated August 2005. Still in early stage – or dead.</p> + This project started as an attempt to create something simpler than CakePHP and more similar to Rails. I’m not + sure whether the project is still active or not, since the last “release” on the former’s + developer site is dated August 2005. Still in early stage – or dead.</p> <h3>Pipeline</h3> <p style="float:right;"><img src="/img/pictures/livepipe.jpg" alt="" /></p> <p><strong>Website:</strong> <a href="http://livepipe.net/pipeline/">livepipe.net/pipeline/</a><br /> -<strong><span class="caps">PHP</span> version:</strong> PHP5<br /> -<strong>License:</strong> Pipeline<sup class="footnote" id="fnr9"><a href="#fn9">9</a></sup><br /> -<strong>Download size (.zip):</strong> 288KB<br /> -<strong>Supported Databases:</strong> SQLite<br /> -<strong>Beginner’s Tutorial</strong>: none</p> + <strong><span class="caps">PHP</span> version:</strong> PHP5<br /> + <strong>License:</strong> Pipeline<sup class="footnote" id="fnr9"><a href="#fn9">9</a></sup><br /> + <strong>Download size (.zip):</strong> 288KB<br /> + <strong>Supported Databases:</strong> SQLite<br /> + <strong>Beginner’s Tutorial</strong>: none +</p> <p><strong>PROs:</strong></p> <ul> <li>Simple directory structure</li>@@ -181,32 +280,80 @@ </ul>
<p><strong>CONs:</strong></p> <ul> <li>PHP5-only</li> - <li>Too restrictive: only SQLite supported, <em>kindly suggests</em> developers to use its built-in features only</li> + <li>Too restrictive: only SQLite supported, <em>kindly suggests</em> developers to use its built-in features only + </li> <li>No documentation or tutorials, just the <span class="caps">API</span></li> <li>Not suitable for large projects</li> <li>Almost non-existent community</li> </ul> <p><strong>Comments:</strong><br /> -This project mainly borrowed the <span class="caps">MVC</span> architecture and some basic concepts from Rails, creating a simple PHP5 framework with personal/small websites in mind: it offers various built-in components which can be handy to most of us, supports <em>only</em> SQLite, and basically tells developers what to do. In my opinion it’s not flexible enough to be compared to the others, and it’s simply not suitable for anything other than small websites.</p> + This project mainly borrowed the <span class="caps">MVC</span> architecture and some basic concepts from Rails, + creating a simple PHP5 framework with personal/small websites in mind: it offers various built-in components which + can be handy to most of us, supports <em>only</em> SQLite, and basically tells developers what to do. In my opinion + it’s not flexible enough to be compared to the others, and it’s simply not suitable for anything other + than small websites.</p> <h3>Conclusions</h3> -<p>My favorite framework still remains CakePHP, it’s simple and yet powerful, easy to learn and use, mature, well supported and continuously improving. Symfony – at the moment – seems to be the one with most features and the best documentation, and it is an excellent and well supported project. The only problem I have with it is the scary amount of configuration files necessary to create an application: CakePHP doesn’t need any and can be used for (almost?) equally complex projects.<br /> -Although I didn’t have a chance to try them out, <span class="caps">PHP</span> on Trax is certainly the most faithful port of Ruby on Rails to <span class="caps">PHP</span>, but it lacks some of the features CakePHP and Symfony offer. Code Igniter may not be as advanced as the others, but its community seems to grow and its simplicity may appeal more users in the future…</p> -<p>At any rate, developers should <em>always</em> choose the best framework for their needs: I tried to write a quick comparative analysis of these six Rails’ “<span class="caps">PHP</span> children”, now it’s <em>your</em> turn, try out some of them, if you choose wisely you won’t be disappointed.</p> +<p>My favorite framework still remains CakePHP, it’s simple and yet powerful, easy to learn and use, mature, well + supported and continuously improving. Symfony – at the moment – seems to be the one with most features + and the best documentation, and it is an excellent and well supported project. The only problem I have with it is + the scary amount of configuration files necessary to create an application: CakePHP doesn’t need any and can + be used for (almost?) equally complex projects.<br /> + Although I didn’t have a chance to try them out, <span class="caps">PHP</span> on Trax is certainly the most + faithful port of Ruby on Rails to <span class="caps">PHP</span>, but it lacks some of the features CakePHP and + Symfony offer. Code Igniter may not be as advanced as the others, but its community seems to grow and its simplicity + may appeal more users in the future…</p> +<p>At any rate, developers should <em>always</em> choose the best framework for their needs: I tried to write a quick + comparative analysis of these six Rails’ “<span class="caps">PHP</span> children”, now it’s + <em>your</em> turn, try out some of them, if you choose wisely you won’t be disappointed. +</p> <h3>Notes</h3> -<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> They are all distributed according to various Open Source licenses.</p> -<p class="footnote" id="fn2"><a href="#fnr2"><sup>2</sup></a> <a href="http://www.rubyonrails.org">Ruby on Rails</a> – Ruby framework for web development</p> -<p class="footnote" id="fn3"><a href="#fnr3"><sup>3</sup></a> <a href="http://www.cakephp.org">CakePHP</a> – Rapid [<span class="caps">PHP</span>] Development Framework</p> -<p class="footnote" id="fn4"><a href="#fnr4"><sup>4</sup></a> <a href="/articles/view/cakephp">CakePHP – A ‘tasty’ solution for <span class="caps">PHP</span> programming</a>, originally published on <a href="http://www.zzine.org/articles/cakephp">zZine Magazine</a></p> -<p class="footnote" id="fn5"><a href="#fnr5"><sup>5</sup></a> Open Source <a href="http://www.opensource.org/licenses/mit-license.php"><span class="caps">MIT</span> License</a>.</p> +<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> They are all distributed according to various Open Source + licenses.</p> +<p class="footnote" id="fn2"><a href="#fnr2"><sup>2</sup></a> <a href="http://www.rubyonrails.org">Ruby on Rails</a> + – Ruby framework for web development</p> +<p class="footnote" id="fn3"><a href="#fnr3"><sup>3</sup></a> <a href="http://www.cakephp.org">CakePHP</a> – Rapid + [<span class="caps">PHP</span>] Development Framework</p> +<p class="footnote" id="fn4"><a href="#fnr4"><sup>4</sup></a> <a href="/articles/cakephp">CakePHP – A + ‘tasty’ solution for <span class="caps">PHP</span> programming</a>, originally published on <a + href="http://www.zzine.org/articles/cakephp">zZine Magazine</a></p> +<p class="footnote" id="fn5"><a href="#fnr5"><sup>5</sup></a> Open Source <a + href="http://www.opensource.org/licenses/mit-license.php"><span class="caps">MIT</span> License</a>.</p> <p class="footnote" id="fn6"><a href="#fnr6"><sup>6</sup></a> Symfony License:<br /> -<small><br /> -<blockquote><br /> -Copyright © 2004-2006 Fabien Potencier<br /> -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p> -<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p> -<p><span class="caps">THE</span> <span class="caps">SOFTWARE</span> IS <span class="caps">PROVIDED</span> “AS IS”, <span class="caps">WITHOUT</span> <span class="caps">WARRANTY</span> OF <span class="caps">ANY</span> <span class="caps">KIND</span>, <span class="caps">EXPRESS</span> OR <span class="caps">IMPLIED</span>, <span class="caps">INCLUDING</span> <span class="caps">BUT</span> <span class="caps">NOT</span> <span class="caps">LIMITED</span> TO <span class="caps">THE</span> <span class="caps">WARRANTIES</span> OF <span class="caps">MERCHANTABILITY</span>, <span class="caps">FITNESS</span> <span class="caps">FOR</span> A <span class="caps">PARTICULAR</span> <span class="caps">PURPOSE</span> <span class="caps">AND</span> <span class="caps">NONINFRINGEMENT</span>. IN NO <span class="caps">EVENT</span> <span class="caps">SHALL</span> <span class="caps">THE</span> <span class="caps">AUTHORS</span> OR <span class="caps">COPYRIGHT</span> <span class="caps">HOLDERS</span> BE <span class="caps">LIABLE</span> <span class="caps">FOR</span> <span class="caps">ANY</span> <span class="caps">CLAIM</span>, <span class="caps">DAMAGES</span> OR <span class="caps">OTHER</span> <span class="caps">LIABILITY</span>, <span class="caps">WHETHER</span> IN AN <span class="caps">ACTION</span> OF <span class="caps">CONTRACT</span>, <span class="caps">TORT</span> OR <span class="caps">OTHERWISE</span>, <span class="caps">ARISING</span> <span class="caps">FROM</span>, <span class="caps">OUT</span> OF OR IN <span class="caps">CONNECTION</span> <span class="caps">WITH</span> <span class="caps">THE</span> <span class="caps">SOFTWARE</span> OR <span class="caps">THE</span> <span class="caps">USE</span> OR <span class="caps">OTHER</span> <span class="caps">DEALINGS</span> IN <span class="caps">THE</span> <span class="caps">SOFTWARE</span>.</p> + <small><br /> + <blockquote><br /> + Copyright © 2004-2006 Fabien Potencier<br /> + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + documentation files (the “Software”), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the + following conditions: +</p> +<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + Software.</p> +<p><span class="caps">THE</span> <span class="caps">SOFTWARE</span> IS <span class="caps">PROVIDED</span> “AS + IS”, <span class="caps">WITHOUT</span> <span class="caps">WARRANTY</span> OF <span class="caps">ANY</span> + <span class="caps">KIND</span>, <span class="caps">EXPRESS</span> OR <span class="caps">IMPLIED</span>, <span + class="caps">INCLUDING</span> <span class="caps">BUT</span> <span class="caps">NOT</span> <span + class="caps">LIMITED</span> TO <span class="caps">THE</span> <span class="caps">WARRANTIES</span> OF <span + class="caps">MERCHANTABILITY</span>, <span class="caps">FITNESS</span> <span class="caps">FOR</span> A <span + class="caps">PARTICULAR</span> <span class="caps">PURPOSE</span> <span class="caps">AND</span> <span + class="caps">NONINFRINGEMENT</span>. IN NO <span class="caps">EVENT</span> <span class="caps">SHALL</span> <span + class="caps">THE</span> <span class="caps">AUTHORS</span> OR <span class="caps">COPYRIGHT</span> <span + class="caps">HOLDERS</span> BE <span class="caps">LIABLE</span> <span class="caps">FOR</span> <span + class="caps">ANY</span> <span class="caps">CLAIM</span>, <span class="caps">DAMAGES</span> OR <span + class="caps">OTHER</span> <span class="caps">LIABILITY</span>, <span class="caps">WHETHER</span> IN AN <span + class="caps">ACTION</span> OF <span class="caps">CONTRACT</span>, <span class="caps">TORT</span> OR <span + class="caps">OTHERWISE</span>, <span class="caps">ARISING</span> <span class="caps">FROM</span>, <span + class="caps">OUT</span> OF OR IN <span class="caps">CONNECTION</span> <span class="caps">WITH</span> <span + class="caps">THE</span> <span class="caps">SOFTWARE</span> OR <span class="caps">THE</span> <span + class="caps">USE</span> OR <span class="caps">OTHER</span> <span class="caps">DEALINGS</span> IN <span + class="caps">THE</span> <span class="caps">SOFTWARE</span>. +</p> </blockquote> <p></small></p> -<p class="footnote" id="fn7"><a href="#fnr7"><sup>7</sup></a> Read the comments by David Heinemeier Hansson on <a href="http://www.37signals.com/svn/archives/000606.php">Ruby on Rails to Basecamp</a></p> -<p class="footnote" id="fn8"><a href="#fnr8"><sup>8</sup></a> CodeIgniter <a href="http://www.codeigniter.com/user_guide/license.html">License Agreement</a></p> -<p class="footnote" id="fn9"><a href="#fnr9"><sup>9</sup></a> Pipeline is licensed under the same terms as the Symfony framework [Copyright © 2006 Picora Pipeworks <span class="caps">LLC</span>].</p> +<p class="footnote" id="fn7"><a href="#fnr7"><sup>7</sup></a> Read the comments by David Heinemeier Hansson on <a + href="http://www.37signals.com/svn/archives/000606.php">Ruby on Rails to Basecamp</a></p> +<p class="footnote" id="fn8"><a href="#fnr8"><sup>8</sup></a> CodeIgniter <a + href="http://www.codeigniter.com/user_guide/license.html">License Agreement</a></p> +<p class="footnote" id="fn9"><a href="#fnr9"><sup>9</sup></a> Pipeline is licensed under the same terms as the Symfony + framework [Copyright © 2006 Picora Pipeworks <span class="caps">LLC</span>].</p>
@@ -4,48 +4,108 @@ content-type: article
timestamp: 1264171236 tags: "ruby|books|review" ----- -<p>Refactoring, like testing, is an activity that should be very familiar to all programmers, especially Rubyists. Actually, programs written in Ruby don’t need as many refactorings as, say, Java programs. However Rubyists are traditionally more <span class="caps">TDD</span> oriented and they like writing clear and elegant code.</p> -<p><a href="http://www.informit.com/store/product.aspx?isbn=0321603508">Refactoring: Ruby Edition</a> is actually a rewrite of the more revolutionary — at the time — <a href="http://www.informit.com/store/product.aspx?isbn=0201485672">Refactoring: Improving the Design of Existing Code</a>, written by Martin Fowler & others to teach Java programmers about refactoring. Jay Fields and others decided to <em>port</em> this historical title to Ruby to fill a gap: there was no authoritative book about refactoring for this language, so what’s better than translating the Bible on the subject?</p> -<p>If you already own the Java book you shouldn’t buy this one. This is not my personal opinion (I never read the original), it’s actually written in the Preface of the book itself. I really like honest authors, and luckily this seems to have become a trend, lately: programmers don’t like reading bullshit after all. By the authors’ own admission, this book contains roughly the same material and the same examples of the original Java book, plus some slightly more Ruby-specific content.</p> +<p>Refactoring, like testing, is an activity that should be very familiar to all programmers, especially Rubyists. + Actually, programs written in Ruby don’t need as many refactorings as, say, Java programs. However Rubyists + are traditionally more <span class="caps">TDD</span> oriented and they like writing clear and elegant code.</p> +<p><a href="http://www.informit.com/store/product.aspx?isbn=0321603508">Refactoring: Ruby Edition</a> is actually a + rewrite of the more revolutionary — at the time — <a + href="http://www.informit.com/store/product.aspx?isbn=0201485672">Refactoring: Improving the Design of Existing + Code</a>, written by Martin Fowler & others to teach Java programmers about refactoring. Jay Fields and + others decided to <em>port</em> this historical title to Ruby to fill a gap: there was no authoritative book about + refactoring for this language, so what’s better than translating the Bible on the subject?</p> +<p>If you already own the Java book you shouldn’t buy this one. This is not my personal opinion (I never read the + original), it’s actually written in the Preface of the book itself. I really like honest authors, and luckily + this seems to have become a trend, lately: programmers don’t like reading bullshit after all. By the + authors’ own admission, this book contains roughly the same material and the same examples of the original + Java book, plus some slightly more Ruby-specific content.</p> <h3>Getting started</h3> <p style="float:right;"><img src="/img/pictures/refactoring-ruby-ed.jpg" alt="" /></p> -<p>The first chapter, <em>Refactoring, a first example</em>, is not a first chapter. Well, it is in a literal sense, but it doesn’t look like one: no theory, no padding, you’re immediately thrown in the middle of the battle, dealing with a small program in desperate need of refactoring. It literally contains quite a lot of code: the same program is rewritten over and over with changes in bold to teach you what refactoring means. The most intimidating thing is reading names of refactoring techniques capitalized and used in a natural way, like if the reader was supposed to know them already. In all fairness though, they are self-explanatory most of the time, e.g. <em>Replace Array with Object</em>.</p> -<p>What makes this chapter even more unusual is the clever usage of white space: <em>before</em> and <em>after</em> code snippets are shown on separate page, which makes it much more immediate to see the changes in code (but it won’t work very well if you bought the ebook instead of the hardback).</p> -<p>By contrast, the second chapter <em>Principles in Refactoring</em> is all about theory: it should have been the first chapter, but it’s better this way. Here you’ll learn the basics: a bit of history, when to refactor and when not to, and so on. I bet it was taken almost verbatim from the Java book; see for example: <em>“[…] If your building APIs for outsid consumption, as <strong>Sun</strong> does […]”</em>.</p> -<p>Chapter 3, <em>Bad Smells in Code</em>, is probably the most important and useful chapter in the entire book. It’s somethig you should read over and over until you can spot a code smell right after coding.</p> +<p>The first chapter, <em>Refactoring, a first example</em>, is not a first chapter. Well, it is in a literal sense, but + it doesn’t look like one: no theory, no padding, you’re immediately thrown in the middle of the battle, + dealing with a small program in desperate need of refactoring. It literally contains quite a lot of code: the same + program is rewritten over and over with changes in bold to teach you what refactoring means. The most intimidating + thing is reading names of refactoring techniques capitalized and used in a natural way, like if the reader was + supposed to know them already. In all fairness though, they are self-explanatory most of the time, e.g. <em>Replace + Array with Object</em>.</p> +<p>What makes this chapter even more unusual is the clever usage of white space: <em>before</em> and <em>after</em> code + snippets are shown on separate page, which makes it much more immediate to see the changes in code (but it + won’t work very well if you bought the ebook instead of the hardback).</p> +<p>By contrast, the second chapter <em>Principles in Refactoring</em> is all about theory: it should have been the first + chapter, but it’s better this way. Here you’ll learn the basics: a bit of history, when to refactor and + when not to, and so on. I bet it was taken almost verbatim from the Java book; see for example: <em>“[…] + If your building APIs for outsid consumption, as <strong>Sun</strong> does […]”</em>.</p> +<p>Chapter 3, <em>Bad Smells in Code</em>, is probably the most important and useful chapter in the entire book. + It’s somethig you should read over and over until you can spot a code smell right after coding.</p> <blockquote> -<p>“You should use this chapter and the table on the inside back cover as a way to give you inspiration whn you’re not sure what refactorings to do.”</p> + <p>“You should use this chapter and the table on the inside back cover as a way to give you inspiration whn + you’re not sure what refactorings to do.”</p> </blockquote> -<p>Precisely what you have to do. Except that there is no table on the inside back cover, so I guess <a href="http://docs.google.com/viewer?url=http://www.industriallogic.com/papers/smellstorefactorings.pdf">this one</a> will have to do. Pity.</p> -<p>Chapter 4, <em>Building Tests</em>, is the usual, compulsory chapter about unit testing, i.e. the usual intro to Test::Unit. As I said, it’s essential for the book to make sense, but you can safely skip it if you know how to test already.</p> -<p>Finally, chapter 5 (<em>Toward a Catalog of Refactoring</em>) is a 2.5 page intro to the bulk of the book, nothing more than glue to ease the transition. I would have removed it completely, but that’s because I’m a merciless technical writer I guess.</p> +<p>Precisely what you have to do. Except that there is no table on the inside back cover, so I guess <a + href="http://docs.google.com/viewer?url=http://www.industriallogic.com/papers/smellstorefactorings.pdf">this + one</a> will have to do. Pity.</p> +<p>Chapter 4, <em>Building Tests</em>, is the usual, compulsory chapter about unit testing, i.e. the usual intro to + Test::Unit. As I said, it’s essential for the book to make sense, but you can safely skip it if you know how + to test already.</p> +<p>Finally, chapter 5 (<em>Toward a Catalog of Refactoring</em>) is a 2.5 page intro to the bulk of the book, nothing + more than glue to ease the transition. I would have removed it completely, but that’s because I’m a + merciless technical writer I guess.</p> <h3>Diving in</h3> -<p>From chapter 6 onwards, specific refactoring techniques are described. Each chapter starts with a brief overview of the following sections (which should have been a list, but I’m just being pedantic now), so you know what to expect.</p> -<p>Each technique described has a very meaningful and immediate name that reflects its purpose, like Extract Method or Split Temporary Variable. A code example introduces the code smell and the proposed refactoring, followed by a <em>Mechanics</em> section with a list of actions to perform and an explanatory <em>Motivation</em> section.</p> -<p>Tipically, each refactoring has its own, self-contained code snippets. Depending on the complexity of the refactoring technique examined, the authors may spend half to five or six pages just to show all code iterations to get to the result. When things get too complicated, <span class="caps">UML</span> diagrams are used to make the technique easier to understand, but only when it’s strictly necessary.</p> -<p>Even if the original techniques were though for Java, the authors (in particlar Jay Fields, I guess) do a great job making sure that the Ruby code doensn’t look like Java code in disguise: the result of the refactoring always follows Ruby’s philosophy and idioms. I particularly liked the following:</p> +<p>From chapter 6 onwards, specific refactoring techniques are described. Each chapter starts with a brief overview of + the following sections (which should have been a list, but I’m just being pedantic now), so you know what to + expect.</p> +<p>Each technique described has a very meaningful and immediate name that reflects its purpose, like Extract Method or + Split Temporary Variable. A code example introduces the code smell and the proposed refactoring, followed by a + <em>Mechanics</em> section with a list of actions to perform and an explanatory <em>Motivation</em> section.</p> +<p>Tipically, each refactoring has its own, self-contained code snippets. Depending on the complexity of the refactoring + technique examined, the authors may spend half to five or six pages just to show all code iterations to get to the + result. When things get too complicated, <span class="caps">UML</span> diagrams are used to make the technique + easier to understand, but only when it’s strictly necessary.</p> +<p>Even if the original techniques were though for Java, the authors (in particlar Jay Fields, I guess) do a great job + making sure that the Ruby code doensn’t look like Java code in disguise: the result of the refactoring always + follows Ruby’s philosophy and idioms. I particularly liked the following:</p> <ul> <li>Replace Dynamic Receptor with Dynamic Method Definition (Chapter 6), a nice example of metaprogramming.</li> <li>Decompose Conditional/Recompose Conditional (Chapter 9), very useful and very common</li> - <li>Replace Nested Conditional with Guard Clause (Chapter 9), another way to deal with a very common problem with conditionals</li> + <li>Replace Nested Conditional with Guard Clause (Chapter 9), another way to deal with a very common problem with + conditionals</li> <li>Extract Module (Chapter 11), very Rubyesque way to tidy up busy classes</li> </ul> -<p>This doesn’t mean that <em>every</em> refactoring described in the book is a programmer’s epiphany, some of the techniques are indeed pretty obvious and some portion of code in need of refactoring indeed smell very, very bad! E.g.:</p> +<p>This doesn’t mean that <em>every</em> refactoring described in the book is a programmer’s epiphany, some + of the techniques are indeed pretty obvious and some portion of code in need of refactoring indeed smell very, very + bad! E.g.:</p> <ul> - <li>Inline Class (Chapter 7): Who on Earth would ever create a class containing a single method returning a telephone number?</li> - <li>Replace Magic Number with Symbolic Constant (Chapter 8): Why would you use integers for constants? Didn’t Matz give us Symbols to avoid just that?</li> + <li>Inline Class (Chapter 7): Who on Earth would ever create a class containing a single method returning a + telephone number?</li> + <li>Replace Magic Number with Symbolic Constant (Chapter 8): Why would you use integers for constants? Didn’t + Matz give us Symbols to avoid just that?</li> </ul> <h3>The big picture</h3> -<p>By the end of chapter 11 you should be familiar with nearly all the best possible way to get rid of code smells. That’s all good, but what happens if <em>the entire program</em> stinks? Chapter 12 (<em>Big Refactorings</em>) claims to have some answers to some common pitfalls. The techniques defined in this chapter are by no means sufficient to solve all problems caused by bad design, but they can help especially to rewrite legacy code, or programs developed by Ruby newbies:</p> +<p>By the end of chapter 11 you should be familiar with nearly all the best possible way to get rid of code smells. + That’s all good, but what happens if <em>the entire program</em> stinks? Chapter 12 (<em>Big + Refactorings</em>) claims to have some answers to some common pitfalls. The techniques defined in this chapter + are by no means sufficient to solve all problems caused by bad design, but they can help especially to rewrite + legacy code, or programs developed by Ruby newbies:</p> <ul> <li>Tease Apart Inheritance</li> <li>Convert procedural design to objects</li> <li>Separate domain from presentation</li> <li>Extract hierarchy</li> </ul> -<p>They are basically all about reducing bloat and unnecessary complexity, and — to me, that is — they all sounded pretty obvious. <em>Of course</em> I’m going to separate domain from presentation! Didn’t Rails teach us anything at all? I must say I was somehow disappointed by this chapter. I was going to bet there was something slightly more advanced, maybe something about replacing traditional object instantiation with an internal <span class="caps">DSL</span>? Nope, sorry.</p> -<p>Chapter 13, on the other hand, is an excellent conclusion to the book: it really helps the reader to understand when to refactor and how to do so, depending on the situation.</p> +<p>They are basically all about reducing bloat and unnecessary complexity, and — to me, that is — they all + sounded pretty obvious. <em>Of course</em> I’m going to separate domain from presentation! Didn’t Rails + teach us anything at all? I must say I was somehow disappointed by this chapter. I was going to bet there was + something slightly more advanced, maybe something about replacing traditional object instantiation with an internal + <span class="caps">DSL</span>? Nope, sorry.</p> +<p>Chapter 13, on the other hand, is an excellent conclusion to the book: it really helps the reader to understand when + to refactor and how to do so, depending on the situation.</p> <h3>Conclusion</h3> -<p>This and <a href="http://www.h3rald.com/articles/design-patterns-in-ruby-review/">Design Patterns in Ruby</a> are now my favorite Ruby books. I believe they complete each other: Russ Olsen’s book is more about designing your programs properly from the start, while <em>Refactoring: Ruby Edition</em> can help to make things better at a lower level. <br /> -Ruby developers don’t need to refactor as much as Java developers, mainly because of Ruby itself, nevertheless, this is an excellent read for anyone who wants to get serious about programming in Ruby, and is determined to do so by following the Ruby Way.</p> -<p>I’ll definitely keep this book near me when I’m coding: I do believe it is much more helpful when you start using it as a reference, when you already read about all the refactoring techniques and want to put them in practice. Also, I’ll probably re-read chapter 3 on a regular basis, to get accustomed to recognize code smells, and deal with them accordingly.</p> +<p>This and <a href="/articles/design-patterns-in-ruby-review/">Design Patterns in Ruby</a> are now my favorite Ruby + books. I believe they complete each other: Russ Olsen’s book is more about designing your programs properly + from the start, while <em>Refactoring: Ruby Edition</em> can help to make things better at a lower level. <br /> + Ruby developers don’t need to refactor as much as Java developers, mainly because of Ruby itself, + nevertheless, this is an excellent read for anyone who wants to get serious about programming in Ruby, and is + determined to do so by following the Ruby Way.</p> +<p>I’ll definitely keep this book near me when I’m coding: I do believe it is much more helpful when you + start using it as a reference, when you already read about all the refactoring techniques and want to put them in + practice. Also, I’ll probably re-read chapter 3 on a regular basis, to get accustomed to recognize code + smells, and deal with them accordingly.</p>
@@ -6,11 +6,21 @@ timestamp: 1312732912
tags: "ruby-compendium|books|ruby" ----- - <section class="section"> -<p>The Ruby Compendium has been updated, and it now lists the most up-to-date versions of various Ruby implementatios, even more web sites, books, podcasts, and Rubyists. In addition to the <span class="caps">PDF</span> version, the book can now be read online <a href="/ruby-compendium/book/">here on H3RALD.com</a>.</p> -<p>Overall, this is a relatively minor update; however, I felt it was a good time to release it to keep the book up-to-date.</p> +<section class="section"> + <p>The Ruby Compendium has been updated, and it now lists the most up-to-date versions of various Ruby + implementatios, even more web sites, books, podcasts, and Rubyists. In addition to the <span + class="caps">PDF</span> version, the book can now be read online <a href="/ruby-compendium/book/">here on + H3RALD.com</a>.</p> + <p>Overall, this is a relatively minor update; however, I felt it was a good time to release it to keep the book + up-to-date.</p> -<p>The <em>Ruby Compendium</em> is available free of charge, under the terms of the <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>, and you can help improving it! It was written using my very own <a href="http://www.h3rald.com/glyph">Glyph Framework</a>, and the entire source code is available on <a href="https://github.com/h3rald/ruby-compendium">GitHub</a>, for anyone to fork.</p> -<div style="text-align:center;margin:20px; auto;font-size: 18px; font-weight:bold;"><a href="https://github.com/downloads/h3rald/ruby-compendium/ruby-compendium.pdf">Download <span class="caps">PDF</span></a> | <a href="http://www.h3rald.com/ruby-compendium/book">Read Online</a></div> + <p>The <em>Ruby Compendium</em> is available free of charge, under the terms of the <a + href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported + License</a>, and you can help improving it! It was written using my very own <a href="/glyph">Glyph + Framework</a>, and the entire source code is available on <a + href="https://github.com/h3rald/ruby-compendium">GitHub</a>, for anyone to fork.</p> + <div style="text-align:center;margin:20px; auto;font-size: 18px; font-weight:bold;"><a + href="https://github.com/downloads/h3rald/ruby-compendium/ruby-compendium.pdf">Download <span + class="caps">PDF</span></a> | <a href="/ruby-compendium/book">Read Online</a></div> </section>
@@ -4,13 +4,37 @@ content-type: article
timestamp: 1184405220 tags: "rails|databases" ----- -<p>This week I attended a course for work on how to <em>Implement Databases with Microsoft <span class="caps">SQL</span> Server 2005</em>. An interesting course indeed, which made me realize how feature-rich Bill’s product is, compared to the Open Source alternatives like MySQL. It also made me realize how nice it is to implement database-related logic (read: Models) using a <em>proper</em> programming language rather than using triggers, stored procedures, functions and other goodies offered by Transact-<span class="caps">SQL</span>.</p> -<p>It’s all a matter of taste and of necessities: using MS <span class="caps">SQL</span> Server for one of my website is simply not going to happen anytime soon, and I’m more than happy to have a database which can be used <em>just</em> as a database and a programming language (Ruby, in this case) which can do wonders, rather than a procedural-only surrogate.</p> -<p>Anyhow, back to our weekly series. After creating a <a href="/blog/simply-on-rails-1-concepts-map">concept map</a>, it’s time of <em>get real</em> and try to figure out a database architecture. The tool of choice this week is obviously the widely popular <a href="http://fabforce.net/dbdesigner4/">DbDesigner 4</a>. It’s free, it’s easy to use, and the results are pretty enough. There:</p> -<p><a href="/files/italysimply_database-architecture.png"><img src="/files/italysimply_database-architecture_thumb.png" alt="" /></a></p> -<p>It’s amazing how a relatively simple concept map can lead to such a complex database architecture, isn’t it?<br /> -Well, it’s normal. One of the reasons of this is that I totally forgot about geographical information about the houses which will be featured on the site, or better, I thought about it as a <em>strings</em> typed in by the administrators, whereas it would be much better having dropdown boxes.</p> -<p>Countries, regions, privinces, areas and cities will be added to the database only once, rather than having to type them in every time a house is added. Obvious, but this lead to five tables more and nine (!) relationships more.</p> -<p>The other reason of why the number of tables is higher than the number of entities in the domain model is that I decided <em>not</em> to use the <span class="caps">ENUM</span> type. Firstly because <a href="http://wiki.rubyonrails.org/rails/pages/HowtoUseSetAndEnumColumns">it’s not handled very well by Rails</a><br /> - and also because there’s <a href="http://blog.arabx.com.au/?p=87">a number of reasons</a> why ENUMs should not be used.</p> -<p>The only problem now is that whenever I load a house, I’ll have to get data from a lot of tables at once (and this means a lot of joins underneath the model layer) or – worse – a lot of queries in case I decide to load related data “on the fly”. It looks like I’ll have to do a bit of <a href="http://railsexpress.de/blog/articles/2005/11/06/the-case-for-piggy-backed-attributes">piggy-backing</a> here and there. <a href="http://railsexpress.de/blog/articles/2006/05/29/simpler-piggy-backing">Someone</a> already thought about a way of doing this in a more “Model-friendly” way. Perhaps I’ll give it a shot.</p> +<p>This week I attended a course for work on how to <em>Implement Databases with Microsoft <span class="caps">SQL</span> + Server 2005</em>. An interesting course indeed, which made me realize how feature-rich Bill’s product is, + compared to the Open Source alternatives like MySQL. It also made me realize how nice it is to implement + database-related logic (read: Models) using a <em>proper</em> programming language rather than using triggers, + stored procedures, functions and other goodies offered by Transact-<span class="caps">SQL</span>.</p> +<p>It’s all a matter of taste and of necessities: using MS <span class="caps">SQL</span> Server for one of my + website is simply not going to happen anytime soon, and I’m more than happy to have a database which can be + used <em>just</em> as a database and a programming language (Ruby, in this case) which can do wonders, rather than a + procedural-only surrogate.</p> +<p>Anyhow, back to our weekly series. After creating a <a href=/articles/simply-on-rails-1-concepts-map">concept + map</a>, it’s time of <em>get real</em> and try to figure out a database architecture. The tool of choice + this week is obviously the widely popular <a href="http://fabforce.net/dbdesigner4/">DbDesigner 4</a>. It’s + free, it’s easy to use, and the results are pretty enough. There:</p> +<p><a href="/files/italysimply_database-architecture.png"><img src="/files/italysimply_database-architecture_thumb.png" + alt="" /></a></p> +<p>It’s amazing how a relatively simple concept map can lead to such a complex database architecture, isn’t + it?<br /> + Well, it’s normal. One of the reasons of this is that I totally forgot about geographical information about + the houses which will be featured on the site, or better, I thought about it as a <em>strings</em> typed in by the + administrators, whereas it would be much better having dropdown boxes.</p> +<p>Countries, regions, privinces, areas and cities will be added to the database only once, rather than having to type + them in every time a house is added. Obvious, but this lead to five tables more and nine (!) relationships more.</p> +<p>The other reason of why the number of tables is higher than the number of entities in the domain model is that I + decided <em>not</em> to use the <span class="caps">ENUM</span> type. Firstly because <a + href="http://wiki.rubyonrails.org/rails/pages/HowtoUseSetAndEnumColumns">it’s not handled very well by + Rails</a><br /> + and also because there’s <a href="http://blog.arabx.com.au/?p=87">a number of reasons</a> why ENUMs should not + be used.</p> +<p>The only problem now is that whenever I load a house, I’ll have to get data from a lot of tables at once (and + this means a lot of joins underneath the model layer) or – worse – a lot of queries in case I decide to + load related data “on the fly”. It looks like I’ll have to do a bit of <a + href="http://railsexpress.de/blog/articles/2005/11/06/the-case-for-piggy-backed-attributes">piggy-backing</a> + here and there. <a href="http://railsexpress.de/blog/articles/2006/05/29/simpler-piggy-backing">Someone</a> already + thought about a way of doing this in a more “Model-friendly” way. Perhaps I’ll give it a shot.</p>
@@ -4,13 +4,28 @@ content-type: article
timestamp: 1189854600 tags: "rails|ruby|databases" ----- -<p>In the <a href="http://www.h3rald.com/blog/simply-on-rails-3-shared-controller">last post</a> of this series I tried to find a <acronym title="Don't Repeat Yourself"><span class="caps">DRY</span></acronym> solution to deal with tables storing “ancillary” data, i.e. names of user roles, predefined categories, page state names and other similar things.<br /> -I personally chose to put this kind of data to make my application more dynamic, although I could have decided to use ENUMs or simply ordinary varchar fields — that would have been easier, but less flexible. For now, I’m sticking with my original choice.</p> -<p>The data in these tables is kind of a prerequisite for the application to run: I must be able to have a status to assign to a user when creating it, and the same applies to roles. Sure, I could spend 20 minutes populating these tables manually, but it would be nice if there was a less tedious way, wouldn’t it?</p> -<p>There is indeed. The inspiration came from a technique described in the book (which I highly recommend) <em>Agile Web Development With Rails</em>, in which the author outlines how it would be possible to use Rails’ fixtures and migrations to load data in the database automatically from <span class="caps">YAML</span> files. <br /> -All you have to do is create a migration to load the specified <span class="caps">YAML</span> files and you’re all set.</p> -<p>I wanted to take a little step further, allowing the migration to load data from <em>all <span class="caps">YAML</span> files in a specific directory</em>, automatically.Let’s start creating the <span class="caps">YAML</span> files then and place them all in one directory of the application like <code>/db/migrate/defaults</code>. Here’s the one I used for user roles, for example:</p> -<div class='yaml'><pre><code>visitor: +<p>In the <a href=/articles/simply-on-rails-3-shared-controller">last post</a> of this series I tried to find a <acronym + title="Don't Repeat Yourself"><span class="caps">DRY</span></acronym> solution to deal with tables storing + “ancillary” data, i.e. names of user roles, predefined categories, page state names and other similar + things.<br /> + I personally chose to put this kind of data to make my application more dynamic, although I could have decided to + use ENUMs or simply ordinary varchar fields — that would have been easier, but less flexible. For now, + I’m sticking with my original choice.</p> +<p>The data in these tables is kind of a prerequisite for the application to run: I must be able to have a status to + assign to a user when creating it, and the same applies to roles. Sure, I could spend 20 minutes populating these + tables manually, but it would be nice if there was a less tedious way, wouldn’t it?</p> +<p>There is indeed. The inspiration came from a technique described in the book (which I highly recommend) <em>Agile Web + Development With Rails</em>, in which the author outlines how it would be possible to use Rails’ fixtures + and migrations to load data in the database automatically from <span class="caps">YAML</span> files. <br /> + All you have to do is create a migration to load the specified <span class="caps">YAML</span> files and you’re + all set.</p> +<p>I wanted to take a little step further, allowing the migration to load data from <em>all <span + class="caps">YAML</span> files in a specific directory</em>, automatically.Let’s start creating the + <span class="caps">YAML</span> files then and place them all in one directory of the application like + <code>/db/migrate/defaults</code>. Here’s the one I used for user roles, for example: +</p> +<div class='yaml'> + <pre><code>visitor: id: 1 name: Visitor level: 0@@ -43,9 +58,13 @@
webmaster: id: 7 name: Webmaster - level: 1000</code></pre></div><p>The important thing to remember is to provide a unique string to identify each record, before specifying each fiels. The other files look similar, so I won’t bother listing them here.</p> + level: 1000</code></pre> +</div> +<p>The important thing to remember is to provide a unique string to identify each record, before specifying each fiels. + The other files look similar, so I won’t bother listing them here.</p> <p>And here’s the simple code for the migration:</p> -<div class='ruby'><pre><code>require 'active_record/fixtures' +<div class='ruby'> + <pre><code>require 'active_record/fixtures' class LoadDefaults < ActiveRecord::Migration@@ -78,5 +97,10 @@ []
end end -end</code></pre></div><p>Basically the migration will look in a directory named “defaults” for some <span class="caps">YAML</span> files named after a particular database table, and it will attempt to load all the records defined in each one of them. <br /> -The <code>down</code> method of the migration <em>deletes all the data in the specified tables</em>, so use with care…</p> +end</code></pre> +</div> +<p>Basically the migration will look in a directory named “defaults” for some <span class="caps">YAML</span> + files named after a particular database table, and it will attempt to load all the records defined in each one of + them. <br /> + The <code>down</code> method of the migration <em>deletes all the data in the specified tables</em>, so use with + care…</p>
@@ -7,64 +7,102 @@ timestamp: 1253014371
tags: "website|ruby|programming|writing" ----- <h3>Why I don’t need a blog platform</h3> -<p>There’s nothing inherently wrong with blog platforms like Wordpress: they allow <em>anyone</em> to publish content on the web using a user-friendly administration area. They were built with one thing in mind: make publishing content on the web something as simple as possible, even for people who don’t know anything about <span class="caps">HTML</span>, let alone server-side scripting.</p> -<p>What about people who <em>do</em> know about web development though? Do they still need a blog platform? Depends. If you are comfortable with editing files using a text editor, if you enjoy using the command-line on a daily basis, if you like programming and <em>hacking</em> a little bit, if you don’t really care about fancy and user-friendly administration backends… <em>then you probably don’t</em>.</p> -<p>All you need is a system to transform a bunch of source files into a web site. The good news is that such system exists – and you’re also spoiled for choices!</p> +<p>There’s nothing inherently wrong with blog platforms like Wordpress: they allow <em>anyone</em> to publish + content on the web using a user-friendly administration area. They were built with one thing in mind: make publishing + content on the web something as simple as possible, even for people who don’t know anything about <span + class="caps">HTML</span>, let alone server-side scripting.</p> +<p>What about people who <em>do</em> know about web development though? Do they still need a blog platform? Depends. If + you are comfortable with editing files using a text editor, if you enjoy using the command-line on a daily basis, if + you like programming and <em>hacking</em> a little bit, if you don’t really care about fancy and user-friendly + administration backends… <em>then you probably don’t</em>.</p> +<p>All you need is a system to transform a bunch of source files into a web site. The good news is that such system + exists – and you’re also spoiled for choices!</p> <h3>Introducing site compilers</h3> <p>The first <em>site compiler</em> I discovered was <a href="http://webby.rubyforge.org/">Webby</a>:</p> <blockquote> -<p>[…] Webby works by combining the contents of a page with a layout to produce <span class="caps">HTML</span>. The layout contains everything common to all the pages — <span class="caps">HTML</span> headers, navigation menu, footer, etc. — and the page contains just the information for that page. You can use your favorite markup language to write your pages; Webby supports quite a few.</p> + <p>[…] Webby works by combining the contents of a page with a layout to produce <span class="caps">HTML</span>. + The layout contains everything common to all the pages — <span class="caps">HTML</span> headers, navigation + menu, footer, etc. — and the page contains just the information for that page. You can use your favorite + markup language to write your pages; Webby supports quite a few.</p> </blockquote> <p>There are quite a few applications like Webby, such as:</p> <ul> - <li><a href="http://nanoc.stoneship.org/">nanoc</a></li> - <li><a href="http://snk.tuxfamily.org/lib/rassmalog/doc/guide.html">Rassmalog</a></li> - <li><a href="http://www.jekyllrb.com/">Jeckyll</a></li> - <li><a href="http://webgen.rubyforge.org/">WebGen</a></li> - <li><a href="http://rog.rubyforge.org/">Rog</a></li> - <li><a href="http://rote.rubyforge.org/">Rote</a></li> - <li><a href="http://hobix.com/">Hobix</a></li> - <li><a href="http://rakeweb.rubyforge.org/wiki/wiki.pl">RakeWeb</a></li> - <li><a href="http://www.apeth.com/RubyFrontierDocs/default.html">RubyFrontier</a></li> - <li><a href="http://staticmatic.rubyforge.org/">StaticMatic</a></li> - <li><a href="http://staticweb.rubyforge.org/">StaticWeb</a></li> - <li><a href="http://www.zenspider.com/ZSS/Products/ZenWeb/">ZenWeb</a></li> - <li><a href="http://yurtcms.roberthahn.ca/">YurtCMS</a></li> - <li><a href="http://nanoblogger.sourceforge.net/">NanoBlogger</a></li> + <li><a href="http://nanoc.stoneship.org/">nanoc</a></li> + <li><a href="http://snk.tuxfamily.org/lib/rassmalog/doc/guide.html">Rassmalog</a></li> + <li><a href="http://www.jekyllrb.com/">Jeckyll</a></li> + <li><a href="http://webgen.rubyforge.org/">WebGen</a></li> + <li><a href="http://rog.rubyforge.org/">Rog</a></li> + <li><a href="http://rote.rubyforge.org/">Rote</a></li> + <li><a href="http://hobix.com/">Hobix</a></li> + <li><a href="http://rakeweb.rubyforge.org/wiki/wiki.pl">RakeWeb</a></li> + <li><a href="http://www.apeth.com/RubyFrontierDocs/default.html">RubyFrontier</a></li> + <li><a href="http://staticmatic.rubyforge.org/">StaticMatic</a></li> + <li><a href="http://staticweb.rubyforge.org/">StaticWeb</a></li> + <li><a href="http://www.zenspider.com/ZSS/Products/ZenWeb/">ZenWeb</a></li> + <li><a href="http://yurtcms.roberthahn.ca/">YurtCMS</a></li> + <li><a href="http://nanoblogger.sourceforge.net/">NanoBlogger</a></li> </ul> -<p>There are probably even more, with different features, but they all try to solve the same problem: provide a way to generate static web sites in an automated way.</p> -<p>I spent some time reading about each one of them, <a href="http://github.com/h3rald/h3rald/issues/closed#issue/1">evaluating the pros and cons</a> and in the end I decided to go for <a href="http://nanoc.stoneship.org/">nanoc</a>, simply because it was the only one that seemed to fit all my needs.</p> +<p>There are probably even more, with different features, but they all try to solve the same problem: provide a way to + generate static web sites in an automated way.</p> +<p>I spent some time reading about each one of them, <a + href="http://github.com/h3rald/h3rald/issues/closed#issue/1">evaluating the pros and cons</a> and in the end I + decided to go for <a href="http://nanoc.stoneship.org/">nanoc</a>, simply because it was the only one that seemed to + fit all my needs.</p> <h3>A quick overview of nanoc</h3> -<p>nanoc is a nifty tool written in Ruby suitable for <em>[…] building small to medium-sized websites</em>. In other words, anything which doesn’t involve some fancy user interaction. For what concerns blogs, the only user interaction is <em>comments</em> – but that’s fine, because there’s more than one web service for that, such as <a href="http://disqus.com/">Disqus</a> or <a href="http://intensedebate.com/">IntenseDebate</a>.</p> +<p>nanoc is a nifty tool written in Ruby suitable for <em>[…] building small to medium-sized websites</em>. In + other words, anything which doesn’t involve some fancy user interaction. For what concerns blogs, the only user + interaction is <em>comments</em> – but that’s fine, because there’s more than one web service for + that, such as <a href="http://disqus.com/">Disqus</a> or <a href="http://intensedebate.com/">IntenseDebate</a>.</p> <h4>Some details on the project</h4> -<p>Compared to the alternatives, nanoc is one of the most mature and most maintained, having hit just a few weeks ago its 3.0 release. Its creator, Denis Defreyne, uses it for his own <a href="http://stoneship.org/">web site</a> and is involved with the project on a daily basis, both coding and offering support to nanoc users like myself who regularly ask questions on the <a href="http://groups.google.com/group/nanoc">nanoc user group</a>.</p> -<p>Denis also seems very concerned about keeping documentation up-to-date – something that really impressed me from a technical writer’s point of view. The <a href="http://nanoc.stoneship.org/tutorial/">tutorial</a> he put together will get you started in no time, and the <a href="http://nanoc.stoneship.org/manual/">manual</a> will explain everything else you may possibly want to know. When release 3.0 came out he even put together a <a href="http://nanoc.stoneship.org/migrating/">migration guide</a>. If this is still not enough and you don’t mind spending some time extending the system, nanoc’s <a href="http://nanoc.stoneship.org/doc/3.0.0/">RDoc documentation</a> is very comprehensive compared to other Ruby projects.</p> +<p>Compared to the alternatives, nanoc is one of the most mature and most maintained, having hit just a few weeks ago + its 3.0 release. Its creator, Denis Defreyne, uses it for his own <a href="http://stoneship.org/">web site</a> and is + involved with the project on a daily basis, both coding and offering support to nanoc users like myself who regularly + ask questions on the <a href="http://groups.google.com/group/nanoc">nanoc user group</a>.</p> +<p>Denis also seems very concerned about keeping documentation up-to-date – something that really impressed me + from a technical writer’s point of view. The <a href="http://nanoc.stoneship.org/tutorial/">tutorial</a> he put + together will get you started in no time, and the <a href="http://nanoc.stoneship.org/manual/">manual</a> will explain + everything else you may possibly want to know. When release 3.0 came out he even put together a <a + href="http://nanoc.stoneship.org/migrating/">migration guide</a>. If this is still not enough and you don’t + mind spending some time extending the system, nanoc’s <a href="http://nanoc.stoneship.org/doc/3.0.0/">RDoc + documentation</a> is very comprehensive compared to other Ruby projects.</p> <h4>Sites, Items and data sources</h4> <p style="float:right;"><img src="/img/pictures/nanoc-structure.png" alt="" /></p> -<p>nanoc ships with a really neat command line tool that can do most of the work for you. <code>Nanoc3 create_site h3rald</code> will create a new web site in a folder called h3rald. The contents of this folder are laid out according to a particular logic (<em>convention over configuration</em>, remember?) So:</p> +<p>nanoc ships with a really neat command line tool that can do most of the work for you. + <code>Nanoc3 create_site h3rald</code> will create a new web site in a folder called h3rald. The contents of this + folder are laid out according to a particular logic (<em>convention over configuration</em>, remember?) So:</p> <ul> - <li><strong>content</strong> – your articles, pages, stylesheets, images, …all the site content and assets.</li> - <li><strong>layouts</strong> – the site layouts (and partial layouts)</li> - <li><strong>lib</strong> – place your custom ruby code and vendor libraries here</li> - <li><strong>output</strong> – your “compiled” site, ready to be deployed</li> - <li><strong>config.yaml</strong> – your site’s configuration file. The only one (and it’s just a few lines)</li> - <li><strong>Rakefile</strong> – place any custom Rake task here</li> - <li><strong>Rules</strong> – defines the rules for compilation, layout and routing</li> + <li><strong>content</strong> – your articles, pages, stylesheets, images, …all the site content and + assets.</li> + <li><strong>layouts</strong> – the site layouts (and partial layouts)</li> + <li><strong>lib</strong> – place your custom ruby code and vendor libraries here</li> + <li><strong>output</strong> – your “compiled” site, ready to be deployed</li> + <li><strong>config.yaml</strong> – your site’s configuration file. The only one (and it’s just a few + lines)</li> + <li><strong>Rakefile</strong> – place any custom Rake task here</li> + <li><strong>Rules</strong> – defines the rules for compilation, layout and routing</li> </ul> <p>Here’s the default <code>config.yaml</code> file:</p> -<div class='yaml'><pre><code>--- +<div class='yaml'> + <pre><code>--- data_sources: - items_root: / layouts_root: / type: filesystem_compact - output_dir: output</code></pre></div><p>A <em>data source</em> in nanoc defines where data is retrieved from to create the web site. By default, the <a href="http://nanoc.stoneship.org/doc/3.0.0/Nanoc3/DataSources/FilesystemCompact.html">filesystem_compact</a> data source requires that you create two files in the /content folder for each article or page of your web page:</p> + output_dir: output</code></pre> +</div> +<p>A <em>data source</em> in nanoc defines where data is retrieved from to create the web site. By default, the <a + href="http://nanoc.stoneship.org/doc/3.0.0/Nanoc3/DataSources/FilesystemCompact.html">filesystem_compact</a> data + source requires that you create two files in the /content folder for each article or page of your web page:</p> <ul> - <li>One containing the actual content of the page</li> - <li>Another for the page’s arbitrary metadata</li> + <li>One containing the actual content of the page</li> + <li>Another for the page’s arbitrary metadata</li> </ul> -<p>By personal preference, I chose the <a href="http://nanoc.stoneship.org/doc/3.0/Nanoc3/DataSources/FilesystemCombined.html">filesystem_combined</a> data source, which allows you to combine the content and the metadata of a page in a single file.</p> +<p>By personal preference, I chose the <a + href="http://nanoc.stoneship.org/doc/3.0/Nanoc3/DataSources/FilesystemCombined.html">filesystem_combined</a> data + source, which allows you to combine the content and the metadata of a page in a single file.</p> <p>The source code for this very article, for example, starts like this:</p> -<div class='text'><pre><code>----- +<div class='text'> + <pre><code>----- type: article tags: - website@@ -80,10 +118,16 @@ Back in 2004, when I bought the h3rald.com domain, this site was static. At the time I hardly
knew HTML and CSS, nevermind server-side languages, so I remember creating a _pseudo-template_ for the web site layout and using it whenever I wanted to create a new page, to preserve the overall look-and-feel. This was a crude and inefficient strategy, of course: whenever I changed the layout I had to replicate the change - in all the pages of the site – the whole eight of them.</code></pre></div><p>At run time, the content goes through a Textile filter and the metadata is used in layouts, to generate tag links automatically, for example.</p> + in all the pages of the site – the whole eight of them.</code></pre> +</div> +<p>At run time, the content goes through a Textile filter and the metadata is used in layouts, to generate tag links + automatically, for example.</p> <h4>Layouts, filters, and helpers</h4> -<p>Layouts in nanoc are similar to layouts and views in Rails, but much simpler. The same applies to helpers. Here’s a snippet from my <a href="http://github.com/h3rald/h3rald/tree/master/layouts/default.erb">default layout</a>:</p> -<div class='text'><pre><code><div id="container"> +<p>Layouts in nanoc are similar to layouts and views in Rails, but much simpler. The same applies to helpers. + Here’s a snippet from my <a href="http://github.com/h3rald/h3rald/tree/master/layouts/default.erb">default + layout</a>:</p> +<div class='text'> + <pre><code><div id="container"> <!-- CONTENT START --> <div id="content" class="clearfix<%= (@item[:permalink] == 'home') ? ' home' : ' standard' %>"> <h2><%= @item[:title] %></h2>@@ -106,54 +150,74 @@ <% end %>
</div> <%= render 'article_buttons' if @item[:type] == 'article' %> </div> - </div></code></pre></div><p>This source code snippet shows quite a few features of nanoc’s layouts:</p> + </div></code></pre> +</div> +<p>This source code snippet shows quite a few features of nanoc’s layouts:</p> <ul> - <li>You can access the metadata of the page which is being rendered using the <code>@item</code>, so <code>@item[:title]</code> returns the page’s title, for example.</li> - <li>Layouts can be nested, and behave like Rails’s partials. The <code>render</code> takes a string parameter (the name of the layout to render) and an optional hash parameter to pass variables to the layout.</li> - <li>The <code>yield</code> method is used to include the content of a page.</li> - <li>Layouts support any kind of filter, like <span class="caps">ERB</span> for example. Go crazy.</li> + <li>You can access the metadata of the page which is being rendered using the <code>@item</code>, so + <code>@item[:title]</code> returns the page’s title, for example.</li> + <li>Layouts can be nested, and behave like Rails’s partials. The <code>render</code> takes a string parameter + (the name of the layout to render) and an optional hash parameter to pass variables to the layout.</li> + <li>The <code>yield</code> method is used to include the content of a page.</li> + <li>Layouts support any kind of filter, like <span class="caps">ERB</span> for example. Go crazy.</li> </ul> -<p>Helpers can be used in layouts to perform common tasks, like creating links, feeds, navigation elements and so on. Check the <a href="http://nanoc.stoneship.org/doc/3.0.0/">source code docs</a> for more info, and of course feel free to create your own as you see fit.</p> -<p>Finally, filters are used to filter content markup. nanoc ships with <a href="http://nanoc.stoneship.org/manual/#list-of-built-in-filters">almost everything you need</a>, from Textile to Haml to RDoc, but nobody forbids you to create your own, and it’s dead easy.</p> +<p>Helpers can be used in layouts to perform common tasks, like creating links, feeds, navigation elements and so on. + Check the <a href="http://nanoc.stoneship.org/doc/3.0.0/">source code docs</a> for more info, and of course feel free + to create your own as you see fit.</p> +<p>Finally, filters are used to filter content markup. nanoc ships with <a + href="http://nanoc.stoneship.org/manual/#list-of-built-in-filters">almost everything you need</a>, from Textile to + Haml to RDoc, but nobody forbids you to create your own, and it’s dead easy.</p> <h4>Rules and tasks</h4> -<p>While tasks (as in Rake tasks) do not constitute a huge part of nanoc (but as usual, you may need to create your own to perform custom operations), Rules became, as of version 3, one of the key concepts to grasp in order to make everything work. Rules are stored in the <code>Rules</code> file of your nanoc site, they can be used to:</p> +<p>While tasks (as in Rake tasks) do not constitute a huge part of nanoc (but as usual, you may need to create your own + to perform custom operations), Rules became, as of version 3, one of the key concepts to grasp in order to make + everything work. Rules are stored in the <code>Rules</code> file of your nanoc site, they can be used to:</p> <ul> - <li>Define routes, i.e. where pages are deployed in the output folder.</li> - <li>Define how pages are compiled, which filters to apply to a particular set of pages, which layouts to use, etc.</li> - <li>Define how layout are handled, which filters to apply to a particular layout, etc.</li> + <li>Define routes, i.e. where pages are deployed in the output folder.</li> + <li>Define how pages are compiled, which filters to apply to a particular set of pages, which layouts to use, etc. + </li> + <li>Define how layout are handled, which filters to apply to a particular layout, etc.</li> </ul> -<p>You can find more information in the <a href="http://nanoc.stoneship.org/manual/#rules">manual</a>, along with other important information, but for now, let’s say you should be familiar with <em>most</em> of nanoc’s jargon and how it works. Let’s see what you can do with it, in practice.</p> +<p>You can find more information in the <a href="http://nanoc.stoneship.org/manual/#rules">manual</a>, along with other + important information, but for now, let’s say you should be familiar with <em>most</em> of nanoc’s jargon + and how it works. Let’s see what you can do with it, in practice.</p> <h3>Migrating from your blog platform</h3> -<p>As of version 7, h3rald.com has been powered by the <a href="http://www.typosphere.org">Typo</a> blog platform. If you are not familiar with it, let’s just say it’s a sort of Wordpress built on top of Rails: database backend, pretty admin front-end, tags, comments, and all sort of things a blog may need. While Typo is pleasant enough to use, it has all the inherent disadvantages of any other similar platform:</p> +<p>As of version 7, h3rald.com has been powered by the <a href="http://www.typosphere.org">Typo</a> blog platform. If + you are not familiar with it, let’s just say it’s a sort of Wordpress built on top of Rails: database + backend, pretty admin front-end, tags, comments, and all sort of things a blog may need. While Typo is pleasant enough + to use, it has all the inherent disadvantages of any other similar platform:</p> <ul> - <li>It relies on a database</li> - <li>It relies on server-side scripting to render pages</li> - <li>It uses a complex caching mechanism to produce, ultimately, semi-static pages</li> - <li>It may be subject to exploits, attacks, high server loads, and similar</li> - <li>You can’t really customize it beyond a certain point</li> - <li>You have to upgrade your backend frequently, and often is not as painless as you may expect</li> - <li>You can’t use versioning tools like git for your content, as it’s stored in a database</li> + <li>It relies on a database</li> + <li>It relies on server-side scripting to render pages</li> + <li>It uses a complex caching mechanism to produce, ultimately, semi-static pages</li> + <li>It may be subject to exploits, attacks, high server loads, and similar</li> + <li>You can’t really customize it beyond a certain point</li> + <li>You have to upgrade your backend frequently, and often is not as painless as you may expect</li> + <li>You can’t use versioning tools like git for your content, as it’s stored in a database</li> </ul> <p>I’m not claiming that nanoc is blogging’s silver bullet (it was not created for that), but for sure:</p> <ul> - <li>It <em>does not</em> rely on a database</li> - <li>It <em>does not</em> rely on server-side scripting to render pages (not in real-time, anyway)</li> - <li>It <em>does not</em> need a complex caching mechanism simply because it produces static pages</li> - <li>It is definitely less prone to nasty things</li> - <li>It’s extremely flexible and hackable with very little effort</li> - <li>You don’t have to upgrade all the time, but it is <em>really</em> painless if you decide to</li> - <li>You can use git and similar: your content is in plain old text files</li> + <li>It <em>does not</em> rely on a database</li> + <li>It <em>does not</em> rely on server-side scripting to render pages (not in real-time, anyway)</li> + <li>It <em>does not</em> need a complex caching mechanism simply because it produces static pages</li> + <li>It is definitely less prone to nasty things</li> + <li>It’s extremely flexible and hackable with very little effort</li> + <li>You don’t have to upgrade all the time, but it is <em>really</em> painless if you decide to</li> + <li>You can use git and similar: your content is in plain old text files</li> </ul> -<p>Rants are beside the point, suffice to say I recently convinced myself that switching from Typo to nanoc was a <em>good thing</em>, so let’s see how it worked out.</p> +<p>Rants are beside the point, suffice to say I recently convinced myself that switching from Typo to nanoc was a + <em>good thing</em>, so let’s see how it worked out.</p> <h4>Posts, pages and comments</h4> <p>Out of Typo’s MySQL database, I just wanted to get the following data:</p> <ul> - <li>Pages and posts</li> - <li>Tags</li> - <li>Comments</li> + <li>Pages and posts</li> + <li>Tags</li> + <li>Comments</li> </ul> -<p>Following the approach used by <a href="http://github.com/mojombo/jekyll">Jekyll</a>, I decided to use the simple and powerful <a href="http://sequel.rubyforge.org/">Sequel</a> gem. I’m sorry to disappoint you, but the whole migration process can be summarize with the following Rake task:</p> -<div class='ruby'><pre><code>task :migrate, :db, :usr, :pwd, :host do |t, args| +<p>Following the approach used by <a href="http://github.com/mojombo/jekyll">Jekyll</a>, I decided to use the simple and + powerful <a href="http://sequel.rubyforge.org/">Sequel</a> gem. I’m sorry to disappoint you, but the whole + migration process can be summarize with the following Rake task:</p> +<div class='ruby'> + <pre><code>task :migrate, :db, :usr, :pwd, :host do |t, args| raise RuntimeError, "Please provide :db, :usr, :pass" unless args[:db] && args[:usr] && args[:pwd] db = Sequel.mysql args[:db], :user => args[:usr], :password => args[:pwd], :host => args[:host] || 'localhost' # Remove all existing pages!@@ -180,10 +244,20 @@ contents = convert_code_blocks meta, a[:body]+a[:extended].to_s
write_page meta, contents, extension c = c+1 end - end</code></pre></div><p>That’s it. Well, almost: you can find the <code>get_comments</code>, <code>get_tags</code> and <code>get_filter</code> methods in a separate <a href="http://github.com/h3rald/h3rald/tree/master/lib/utils.rb">utility file</a>. Nothing special really, just a few convenience methods wrapping queries or simply processing data. Note how all information, including tags and legacy comments, is saved in each page’s metadata. The <code>write_page</code> method simply creates a file in the <code>/contents</code> folder.</p> + end</code></pre> +</div> +<p>That’s it. Well, almost: you can find the <code>get_comments</code>, <code>get_tags</code> and + <code>get_filter</code> methods in a separate <a + href="http://github.com/h3rald/h3rald/tree/master/lib/utils.rb">utility file</a>. Nothing special really, just a few + convenience methods wrapping queries or simply processing data. Note how all information, including tags and legacy + comments, is saved in each page’s metadata. The <code>write_page</code> method simply creates a file in the + <code>/contents</code> folder.</p> <h4>Filters and highlighters</h4> -<p>On my old site, I used mainly Textile and Markdown to write posts. However, some of my really old articles used BBCode, whose corresponding filter is not available in nanoc. No worries, I soon found out that creating a new nanoc filter came down to this:</p> -<div class='ruby'><pre><code>require 'rubygems' +<p>On my old site, I used mainly Textile and Markdown to write posts. However, some of my really old articles used + BBCode, whose corresponding filter is not available in nanoc. No worries, I soon found out that creating a new nanoc + filter came down to this:</p> +<div class='ruby'> + <pre><code>require 'rubygems' require 'bb-ruby' class BbcodeFilter < Nanoc3::Filter@@ -193,10 +267,21 @@ def run(content, args)
content.bbcode_to_html end -end</code></pre></div><p>Yes, that’s it. Granted, the <code>bb-ruby</code> gem does all the work, but notice how easy it is to just plug in new Ruby code into nanoc’s architecture!</p> -<p>The next big challange was code highlighting. After a quick research, I found at least a half dozen of possible solutions to highlight source code. Some were javascript based, others were based on a server-side language like <span class="caps">PHP</span>, Ruby or Python. Again, I looked at Jekyll for inspiration and discovered they integrated the <a href="http://www.pygments.org">Pygments</a> <em>Python</em> library. Why use a Python library for code highlighting in a Ruby-based project? Because there’s nothing to stop you (if you can run Python on your server, that is), because it looks very neat and because it supports a lot of different programming languages.</p> -<p>Lazy as I am, I more or less dropped <a href="http://github.com/h3rald/h3rald/blob/master/lib/albino.rb">Chris Wanstrath’s Ruby wrapper</a> into my <code>/lib</code> folder (I just used Open3 instead of Open4 for Windows compatibility), and monkey-patched nanoc’s filtering helper as follows:</p> -<div class='ruby'><pre><code>module Nanoc3::Helpers::Filtering +end</code></pre> +</div> +<p>Yes, that’s it. Granted, the <code>bb-ruby</code> gem does all the work, but notice how easy it is to just plug + in new Ruby code into nanoc’s architecture!</p> +<p>The next big challange was code highlighting. After a quick research, I found at least a half dozen of possible + solutions to highlight source code. Some were javascript based, others were based on a server-side language like <span + class="caps">PHP</span>, Ruby or Python. Again, I looked at Jekyll for inspiration and discovered they integrated + the <a href="http://www.pygments.org">Pygments</a> <em>Python</em> library. Why use a Python library for code + highlighting in a Ruby-based project? Because there’s nothing to stop you (if you can run Python on your server, + that is), because it looks very neat and because it supports a lot of different programming languages.</p> +<p>Lazy as I am, I more or less dropped <a href="http://github.com/h3rald/h3rald/blob/master/lib/albino.rb">Chris + Wanstrath’s Ruby wrapper</a> into my <code>/lib</code> folder (I just used Open3 instead of Open4 for Windows + compatibility), and monkey-patched nanoc’s filtering helper as follows:</p> +<div class='ruby'> + <pre><code>module Nanoc3::Helpers::Filtering def highlight(syntax, &block) # Seamlessly ripped off from the filter method...@@ -213,10 +298,15 @@ end
end -include Nanoc3::Helpers::Filtering</code></pre></div><p>There you go, another thing sorted.</p> +include Nanoc3::Helpers::Filtering</code></pre> +</div> +<p>There you go, another thing sorted.</p> <h4>Tags and Feeds</h4> -<p>Adding tagging support was a tiny bit more tricky. nanoc supports content tagging out-of-the-box though metadata and a simple helper, but I wanted to create tag pages (with feeds). Nothing too difficult though, it all came down to a simple Rake task:</p> -<div class='ruby'><pre><code>task :tags do +<p>Adding tagging support was a tiny bit more tricky. nanoc supports content tagging out-of-the-box though metadata and + a simple helper, but I wanted to create tag pages (with feeds). Nothing too difficult though, it all came down to a + simple Rake task:</p> +<div class='ruby'> + <pre><code>task :tags do site = Nanoc3::Site.new('.') site.load_data dir = Pathname(Dir.pwd)/'content/tags'@@ -240,9 +330,14 @@ write_tag_page dir, k, v
write_tag_feed_page dir, k, 'RSS' write_tag_feed_page dir, k, 'Atom' end - end</code></pre></div><p>Again, you can find all the other simple utility methods in my <a href="http://github.com/h3rald/h3rald/tree/master/lib/utils.rb">utility file</a>.</p> -<p>When it came to feeds, I decided to create a new method for the Blogging helper to create <span class="caps">RSS</span> feeds, although nanoc does come with an Atom feed generator:</p> -<div class='ruby'><pre><code>def rss_feed(params={}) + end</code></pre> +</div> +<p>Again, you can find all the other simple utility methods in my <a + href="http://github.com/h3rald/h3rald/tree/master/lib/utils.rb">utility file</a>.</p> +<p>When it came to feeds, I decided to create a new method for the Blogging helper to create <span + class="caps">RSS</span> feeds, although nanoc does come with an Atom feed generator:</p> +<div class='ruby'> + <pre><code>def rss_feed(params={}) require 'builder' require 'time' prepare_feed params@@ -276,25 +371,49 @@ end
end buffer end - end</code></pre></div><p>Nothing too daunting, once you get used to Ruby’s <span class="caps">XML</span> builder. I followed a similar approach for my <a href="/archives">monthly archives</a></p> + end</code></pre> +</div> +<p>Nothing too daunting, once you get used to Ruby’s <span class="caps">XML</span> builder. I followed a similar + approach for my <a href="/articles">monthly archives</a></p> <h4>3rd-party services</h4> -<p>Finally, the interactive bits. I basically turned to third-party services and a bit of jQuery for everything which required user-interaction or pulling data from other web sites. Here’s a list of services and APIs I currently use:</p> +<p>Finally, the interactive bits. I basically turned to third-party services and a bit of jQuery for everything which + required user-interaction or pulling data from other web sites. Here’s a list of services and APIs I currently + use:</p> <ul> - <li><a href="http://intensedebate.com/">IntenseDebate</a>, for comments.</li> - <li><a href="http://code.google.com/apis/ajaxsearch/web.html">Google <span class="caps">AJAX</span> Search <span class="caps">API</span></a> for internal site-wide search.</li> - <li><a href="http://apiwiki.twitter.com/">Twitter <span class="caps">JSON</span> <span class="caps">API</span></a> to fetch tweets.</li> - <li><a href="http://delicious.com/help/json">Delicious <span class="caps">JSON</span> <span class="caps">API</span></a> to fetch delicious bookmarks.</li> - <li><a href="http://www.backtype.com/developers">BackType <span class="caps">JSON</span> <span class="caps">API</span></a> to fetch comments from other sites.</li> - <li><a href="http://develop.github.com/">GitHub <span class="caps">JSON</span> <span class="caps">API</span></a> to fetch GitHub commits for most of my <a href="/projects">projects</a></li> + <li><a href="http://intensedebate.com/">IntenseDebate</a>, for comments.</li> + <li><a href="http://code.google.com/apis/ajaxsearch/web.html">Google <span class="caps">AJAX</span> Search <span + class="caps">API</span></a> for internal site-wide search.</li> + <li><a href="http://apiwiki.twitter.com/">Twitter <span class="caps">JSON</span> <span class="caps">API</span></a> to + fetch tweets.</li> + <li><a href="http://delicious.com/help/json">Delicious <span class="caps">JSON</span> <span + class="caps">API</span></a> to fetch delicious bookmarks.</li> + <li><a href="http://www.backtype.com/developers">BackType <span class="caps">JSON</span> <span + class="caps">API</span></a> to fetch comments from other sites.</li> + <li><a href="http://develop.github.com/">GitHub <span class="caps">JSON</span> <span class="caps">API</span></a> to + fetch GitHub commits for most of my <a href="/projects">projects</a></li> </ul> -<p>If you want to know how I integrated them, check out my <a href="http://github.com/h3rald/h3rald/tree/master/content/js">/js folder</a>, it was very simple, really.</p> +<p>If you want to know how I integrated them, check out my <a + href="http://github.com/h3rald/h3rald/tree/master/content/js">/js folder</a>, it was very simple, really.</p> <h3>Conclusion</h3> -<p>I was very happy of switching to nanoc. It didn’t take me long, and I spent most of the time with non-nanoc issues (brushing up jQuery, <span class="caps">CSS</span>, graphics, etc.). Of course knowing the Ruby programming language helps, and if you’re not comfortable with hacking your way a little bit, then maybe it’s not for you.</p> +<p>I was very happy of switching to nanoc. It didn’t take me long, and I spent most of the time with non-nanoc + issues (brushing up jQuery, <span class="caps">CSS</span>, graphics, etc.). Of course knowing the Ruby programming + language helps, and if you’re not comfortable with hacking your way a little bit, then maybe it’s not for + you.</p> <p style="float:left;"><img src="/img/pictures/nanoc-compile.png" alt="" /></p> -<p>Personally, I’ve been waiting for something like nanoc for a long time: its simple and yet powerful architecture makes you able to do virtually anything with it. For the first time in a long time, I feel like I’m in complete control of my web site, I know every bits of it and if I want to change the way it works or looks I only have to touch a few files.</p> -<p>nanoc’s metadata is mindblowing for its simplicity and power: although you’re not dealing with a database, you can query your content in the easiest ways possible. Whenever I needed a way to easily access pages, filter them, add extra logic to them, I just added metadata. If you forget something, you don’t have to change your database tables, create new relationships or anything of the sort, you simply add metadata to pages.</p> -<p>Be warned that tweaking nanoc gets addictive very quickly: you soon end up creating silly little tasks for making things just the way you want. For me, adding a new article to my blog now just means this:</p> -<div class='text'><pre><code>$ rake site:article name=take-back-your-site-with-nanoc +<p>Personally, I’ve been waiting for something like nanoc for a long time: its simple and yet powerful + architecture makes you able to do virtually anything with it. For the first time in a long time, I feel like I’m + in complete control of my web site, I know every bits of it and if I want to change the way it works or looks I only + have to touch a few files.</p> +<p>nanoc’s metadata is mindblowing for its simplicity and power: although you’re not dealing with a + database, you can query your content in the easiest ways possible. Whenever I needed a way to easily access pages, + filter them, add extra logic to them, I just added metadata. If you forget something, you don’t have to change + your database tables, create new relationships or anything of the sort, you simply add metadata to pages.</p> +<p>Be warned that tweaking nanoc gets addictive very quickly: you soon end up creating silly little tasks for making + things just the way you want. For me, adding a new article to my blog now just means this:</p> +<div class='text'> + <pre><code>$ rake site:article name=take-back-your-site-with-nanoc $ vim content/articles/take-back-your-site-with-nanoc ... write & close the file ... -$ Nanoc3 compile</code></pre></div><p>…Exactly what I need. Nothing more, nothing less.</p> +$ Nanoc3 compile</code></pre> +</div> +<p>…Exactly what I need. Nothing more, nothing less.</p>
@@ -60,7 +60,7 @@ ### Organization and writing style
> "Before going on, I should mention that part of what makes Rails exceptional is that it is opinionated software, written by opinionated programmers. Likewise, this is an opinionated book, written by opinionated writers." -This sentence in the _Introduction_ sounded very familiar. Almost an echo of Zed Shaw's own words in the _[Mongrel Digital Shortcut](http://www.h3rald.com/articles/mongrel-shortcut-review)_. After all this book is part of the _[Addison-Wesley Professional Ruby Series](http://www.informit.com/imprint/series_detail.aspx?ser=2124042)_, of which Obie is the Series Editor. +This sentence in the _Introduction_ sounded very familiar. Almost an echo of Zed Shaw's own words in the _[Mongrel Digital Shortcut](/articles/mongrel-shortcut-review)_. After all this book is part of the _[Addison-Wesley Professional Ruby Series](http://www.informit.com/imprint/series_detail.aspx?ser=2124042)_, of which Obie is the Series Editor. Like the other books in the series, this book contains all the stylistic conventions and distinctive features which make them very enjoyable to read: * *Informal, almost personal style* – reading this book is almost like hearing Obie telling you what _he_ thinks about Rails, and sharing with you his own tips and tricks.
@@ -7,57 +7,149 @@ tags: "review|books|rails"
pdf: true ----- - <section class="section"> -<p>Obie did it, again. With the second edition of his former masterpiece, <em>The Rails Way</em>, he managed to outdo himself delivering a new, even more useful, Rails Bible. Wether you’re a Ruby on Rails professional like him or just an enthusiast, this book is pretty much everything you need to learn how to master the third release of DHH’s Ruby web framework.</p> -<p><a href="http://tr3w.com/">The Rails 3 Way</a> is no ordinary second edition. If you already own <em>The Rails Way</em>, you’ll be pleasantly surprised that this is a different, more polished book. While something had to remain the same, there’s a lot of new content in its 708 pages, and even the old content has been rewritten or at least revised.</p> -<p>It doesn’t matter whether you already know Rails 2.x or you’re jumping straight into the Rails 3 world, if you use Rails, you can’t miss this book.</p> -<p>I started the <a href="http://www.h3rald.com/articles/the-rails-way-review/">review of the first edition</a> with a quote from my fiancée (now wife) on how pointless programming books are, especially those dealing with newish technologies: they tend to go out of date fairly quickly. While this still holds true, there’s not much you can do about it, except maybe purchasing a digital edition of the book instead. However, if you want to keep a good Rails reference book by your side, this has to be the one.</p> +<section class="section"> + <p>Obie did it, again. With the second edition of his former masterpiece, <em>The Rails Way</em>, he managed to + outdo himself delivering a new, even more useful, Rails Bible. Wether you’re a Ruby on Rails professional + like him or just an enthusiast, this book is pretty much everything you need to learn how to master the third + release of DHH’s Ruby web framework.</p> + <p><a href="http://tr3w.com/">The Rails 3 Way</a> is no ordinary second edition. If you already own <em>The Rails + Way</em>, you’ll be pleasantly surprised that this is a different, more polished book. While something + had to remain the same, there’s a lot of new content in its 708 pages, and even the old content has been + rewritten or at least revised.</p> + <p>It doesn’t matter whether you already know Rails 2.x or you’re jumping straight into the Rails 3 + world, if you use Rails, you can’t miss this book.</p> + <p>I started the <a href="/articles/the-rails-way-review/">review of the first edition</a> with a quote from my + fiancée (now wife) on how pointless programming books are, especially those dealing with newish technologies: + they tend to go out of date fairly quickly. While this still holds true, there’s not much you can do about + it, except maybe purchasing a digital edition of the book instead. However, if you want to keep a good Rails + reference book by your side, this has to be the one.</p> -<section class="section"> -<header><h1 id="h_1" class="toc">What's New</h1></header> -<figure style="float:left;"><img src="/img/pictures/books/rails3way/compare.jpg" /><figcaption>The Rails Way vs. The Rails 3 Way</figcaption></figure> -<p>If you put <em>The Rails 3 Way</em> and the original <em>The Rails Way</em> one next to the other, you can see that the new book is considerably shorter: about 200 pages less. This doesn’t mean it contains less information, quite the opposite: the new book contains a lot more stuff with less <em>fluff</em>. Obie managed to reduce digressions to a bare minimum and focus on providing more informative content to the readers using less text. Think of it as a <em>fat-free</em> book.</p> -<p>While no <em>What’s new in Rails 3</em> section is included in the book, Obie points out the new stuff when needed (but not always). An example is chapter 12, <em>Ajax on Rails</em>, in which changes introduced by Rails 3 clearly stand out, especially the section on Unobtrusive JavaScript (<span class="caps">UJS</span>).</p> -<p>Although the book is divided into chapters, it can also be divided into parts (each dealing with a specific theme) simply by looking at the front edge. According to this theme-based partitioning, Active Record makes up for nearly <em>a quarter</em> of the book (173 pages), followed by <em>Active Support <span class="caps">API</span></em> appendix and the <em>All About Helpers</em> chapter.</p> -<p>Another nice addition that can really make the difference when you’re in a hurry is the <em>Method Index</em>, which is separate from the main Index. It seems to account for all the methods in all (or at least the most important) classes in Rails. I didn’t check method by method, but it is pretty comprehensive nonetheless, based on some quick spot checking.</p> + <section class="section"> + <header> + <h1 id="h_1" class="toc">What's New</h1> + </header> + <figure style="float:left;"><img src="/img/pictures/books/rails3way/compare.jpg" /> + <figcaption>The Rails Way vs. The Rails 3 Way</figcaption> + </figure> + <p>If you put <em>The Rails 3 Way</em> and the original <em>The Rails Way</em> one next to the other, you can + see that the new book is considerably shorter: about 200 pages less. This doesn’t mean it contains + less information, quite the opposite: the new book contains a lot more stuff with less <em>fluff</em>. Obie + managed to reduce digressions to a bare minimum and focus on providing more informative content to the + readers using less text. Think of it as a <em>fat-free</em> book.</p> + <p>While no <em>What’s new in Rails 3</em> section is included in the book, Obie points out the new stuff + when needed (but not always). An example is chapter 12, <em>Ajax on Rails</em>, in which changes introduced + by Rails 3 clearly stand out, especially the section on Unobtrusive JavaScript (<span + class="caps">UJS</span>).</p> + <p>Although the book is divided into chapters, it can also be divided into parts (each dealing with a specific + theme) simply by looking at the front edge. According to this theme-based partitioning, Active Record makes + up for nearly <em>a quarter</em> of the book (173 pages), followed by <em>Active Support <span + class="caps">API</span></em> appendix and the <em>All About Helpers</em> chapter.</p> + <p>Another nice addition that can really make the difference when you’re in a hurry is the <em>Method + Index</em>, which is separate from the main Index. It seems to account for all the methods in all (or at + least the most important) classes in Rails. I didn’t check method by method, but it is pretty + comprehensive nonetheless, based on some quick spot checking.</p> -</section> -<section class="section"> -<header><h1 id="h_2" class="toc">Contents</h1></header> -<figure style="float:right;"><img src="/img/pictures/books/rails3way/sections.jpg" /><figcaption>Active Record makes up for over 24% of the book</figcaption></figure> -<p>The first thing you notice once you read the first few pages, is that this book is <em>even more opinioned</em> than its predecessor.</p> -<blockquote> -<p>Even though Rails 3 is less opinionated than early versions, in that it allows for easy reconfiguration of Rails assumptions, this book is more opinionated than ever.</p> -</blockquote> - <p style="margin-left: 4em">– Obie Fernandez, <cite>Introduction to <em>The Rails Way</em></cite></p> -<p>In other words, you won’t find an ERb view in the whole book (Haml rulez!) and if you don’t like RSpec… well, you’d better skip Chapter 18 altogether.</p> -<p>The other big difference with traditional Ruby and Rails books is the amount of reference to third-party code, mainly rubygems. Rails comes with no authentication functionality? So what: <a href="https://github.com/binarylogic/authlogic">Authlogic</a> and <a href="https://github.com/plataformatec/devise">Devise</a> are great for the job, go check them out! Do you need to test your Active Mailer emails? <a href="https://github.com/bmabey/email-spec">email-spec</a> is all you need.</p> -<p>I was actually surprised to find so much content not strictly related to Rails in this book: the first chapter starts off with <a href="http://gembundler.com/">Bundler</a> (now a Rails dependency, however), Chapter 2 (Routes) mentions <a href="http://rack.rubyforge.org/">Rack</a>, and so does Chapter 4 (Controllers). If you want a nice and to-the-point practical introduction to <a href="http://relishapp.com/rspec">RSpec</a>, the first part of Chapter 18 covers that.</p> + </section> + <section class="section"> + <header> + <h1 id="h_2" class="toc">Contents</h1> + </header> + <figure style="float:right;"><img src="/img/pictures/books/rails3way/sections.jpg" /> + <figcaption>Active Record makes up for over 24% of the book</figcaption> + </figure> + <p>The first thing you notice once you read the first few pages, is that this book is <em>even more + opinioned</em> than its predecessor.</p> + <blockquote> + <p>Even though Rails 3 is less opinionated than early versions, in that it allows for easy reconfiguration + of Rails assumptions, this book is more opinionated than ever.</p> + </blockquote> + <p style="margin-left: 4em">– Obie Fernandez, <cite>Introduction to <em>The Rails Way</em></cite></p> + <p>In other words, you won’t find an ERb view in the whole book (Haml rulez!) and if you don’t like + RSpec… well, you’d better skip Chapter 18 altogether.</p> + <p>The other big difference with traditional Ruby and Rails books is the amount of reference to third-party + code, mainly rubygems. Rails comes with no authentication functionality? So what: <a + href="https://github.com/binarylogic/authlogic">Authlogic</a> and <a + href="https://github.com/plataformatec/devise">Devise</a> are great for the job, go check them out! Do + you need to test your Active Mailer emails? <a href="https://github.com/bmabey/email-spec">email-spec</a> is + all you need.</p> + <p>I was actually surprised to find so much content not strictly related to Rails in this book: the first + chapter starts off with <a href="http://gembundler.com/">Bundler</a> (now a Rails dependency, however), + Chapter 2 (Routes) mentions <a href="http://rack.rubyforge.org/">Rack</a>, and so does Chapter 4 + (Controllers). If you want a nice and to-the-point practical introduction to <a + href="http://relishapp.com/rspec">RSpec</a>, the first part of Chapter 18 covers that.</p> - <figure style="float:left;"><img src="/img/pictures/books/rails3way/reference.jpg" /><figcaption>About 40% of the book is reference material</figcaption></figure> -<p>Then there’s reference material. Plenty of it, a good 40% I daresay. The good thing is that (unlike the first edition) it won’t bore you to death: take Chapter 5 (Working with Active Record) for example, you’ll fly through find-related methods so swiftly you’ll regret when it’s over. Active Support? I didn’t read every line of Appendix B, but when I want to know something about inflection methods I will know exactly where to find them, and what to expect: the method signature, a few lines of text, and a short example at most.</p> -<p>My only regret? Cheat sheets. Or better, the lack of them. More tables, please! Granted, the web is full of Rails cheat sheets, but a few of them at the end of the book or even in a separate foldable add-on like in the <a href="http://www.pragprog.com/titles/tpp/the-pragmatic-programmer">Pragmatic Programmer</a> can’t hurt.</p> -<p>Finally, some words about the code examples. The code/text ratio is almost 1:1, but Obie’s choice of <em>not</em> turning this book into a huge tutorial by implementing a single example application was absolutely right: The code snippets used in throughout the book are concise and relevant to the text around them and won’t distrupt your reading. If you want to play with them, they’re even <a href="https://github.com/obie/tr3w_time_and_expenses">on GitHub</a> for you to clone and fork.</p> + <figure style="float:left;"><img src="/img/pictures/books/rails3way/reference.jpg" /> + <figcaption>About 40% of the book is reference material</figcaption> + </figure> + <p>Then there’s reference material. Plenty of it, a good 40% I daresay. The good thing is that (unlike the + first edition) it won’t bore you to death: take Chapter 5 (Working with Active Record) for example, + you’ll fly through find-related methods so swiftly you’ll regret when it’s over. Active + Support? I didn’t read every line of Appendix B, but when I want to know something about inflection + methods I will know exactly where to find them, and what to expect: the method signature, a few lines of + text, and a short example at most.</p> + <p>My only regret? Cheat sheets. Or better, the lack of them. More tables, please! Granted, the web is full of + Rails cheat sheets, but a few of them at the end of the book or even in a separate foldable add-on like in + the <a href="http://www.pragprog.com/titles/tpp/the-pragmatic-programmer">Pragmatic Programmer</a> + can’t hurt.</p> + <p>Finally, some words about the code examples. The code/text ratio is almost 1:1, but Obie’s choice of + <em>not</em> turning this book into a huge tutorial by implementing a single example application was + absolutely right: The code snippets used in throughout the book are concise and relevant to the text around + them and won’t distrupt your reading. If you want to play with them, they’re even <a + href="https://github.com/obie/tr3w_time_and_expenses">on GitHub</a> for you to clone and fork.</p> -</section> -<section class="section"> -<header><h1 id="h_3" class="toc">Organization and Writing Style</h1></header> -<figure style="float:right;"><img src="/img/pictures/books/rails3way/flick.jpg" /><figcaption>Yes, it’s a long book. But you don’t<br/>have to read it from start to finish!</figcaption></figure> -<p><em>The Rails 3 Way</em> is a book for Rails professionals. If you don’t know Ruby or if you never heard of Ruby on Rails, this book is <em>not</em> for you. It won’t teach you what <span class="caps">MVC</span> is, it won’t waste time on explaining <em>convention over configuration</em>, it won’t even describe the structure of a Rails app! If you’re newcomer to Rails… well, that’s what <a href="http://ruby.railstutorial.org/">The Rails Tutorial</a> is for.</p> -<p>To be honest, I’m with Obie on this. If this book had been beginner-friendly, it would have been even longer than the previous edition, and probably more boring. Instead, by assuming that the reader has been already initiated to the world of Ruby and Rails, the author can dive into the framework straight away. Moreover, chapters are not ordered by difficulty: they don’t need to be, they need to be ordered in a way that makes sense for a Rails developer.</p> -<p>Once again, this book includes personal sidebars used to voice the opinion of one of the co-authors or Rails gurus: there are plenty of “<em>Yehuda</em> says”, “<em>Xavier</em> says”, “<em>Durran</em> says”, and so on. Nothing new there, it’s just a nice way to provide the reader with authoritative opinions on some matters.</p> -<p>As I progressed through the book, I started noticing how Obie anticipated my questions and doubts: I found this to be a remarkable feature of this book, and an excellent way to make the readers feel they are on the same page with the author. If something should not be done because it may cause you problems, the author won’t hold back. See page 214, “Extra Columns on <strong>has_and_belongs_to_many</strong> Join Tables”, for example: it’s a cool feature, but it can cause all sort of annoyances, and the bottom line is: use <strong>has_many :through</strong> instead, if you need extra columns on join tables.</p> + </section> + <section class="section"> + <header> + <h1 id="h_3" class="toc">Organization and Writing Style</h1> + </header> + <figure style="float:right;"><img src="/img/pictures/books/rails3way/flick.jpg" /> + <figcaption>Yes, it’s a long book. But you don’t<br />have to read it from start to finish! + </figcaption> + </figure> + <p><em>The Rails 3 Way</em> is a book for Rails professionals. If you don’t know Ruby or if you never + heard of Ruby on Rails, this book is <em>not</em> for you. It won’t teach you what <span + class="caps">MVC</span> is, it won’t waste time on explaining <em>convention over + configuration</em>, it won’t even describe the structure of a Rails app! If you’re newcomer + to Rails… well, that’s what <a href="http://ruby.railstutorial.org/">The Rails Tutorial</a> is + for.</p> + <p>To be honest, I’m with Obie on this. If this book had been beginner-friendly, it would have been even + longer than the previous edition, and probably more boring. Instead, by assuming that the reader has been + already initiated to the world of Ruby and Rails, the author can dive into the framework straight away. + Moreover, chapters are not ordered by difficulty: they don’t need to be, they need to be ordered in a + way that makes sense for a Rails developer.</p> + <p>Once again, this book includes personal sidebars used to voice the opinion of one of the co-authors or Rails + gurus: there are plenty of “<em>Yehuda</em> says”, “<em>Xavier</em> says”, + “<em>Durran</em> says”, and so on. Nothing new there, it’s just a nice way to provide the + reader with authoritative opinions on some matters.</p> + <p>As I progressed through the book, I started noticing how Obie anticipated my questions and doubts: I found + this to be a remarkable feature of this book, and an excellent way to make the readers feel they are on the + same page with the author. If something should not be done because it may cause you problems, the author + won’t hold back. See page 214, “Extra Columns on <strong>has_and_belongs_to_many</strong> Join + Tables”, for example: it’s a cool feature, but it can cause all sort of annoyances, and the + bottom line is: use <strong>has_many :through</strong> instead, if you need extra columns on join tables. + </p> -</section> -<section class="section"> -<header><h1 id="h_4" class="toc">Conclusion</h1></header> -<p><em>The Rails 3 Way</em> remains the <em>de facto</em> reference book for Rails. I was quite pleased to see that Obie improved it so much, compared to the first edition. Sure, it cannot be recommended to absolute beginners, but it’s not a big problem: if you’re new to Rails, all you have to do is browse around and read a few basic tutorials first.</p> -<p>What I really missed was a <em>What’s New</em> section, or something like that. The new stuff that was introduced in Ruby on Rails v3 is seamlessly blended with all the rest, which is great if you’re tackling the framework for the first time, but not so much when you already read tons of books on Rails 2.×. I would have tagged content specific to Rails 3 in some way at least, for example with labels on the side of each page. Or maybe have a short introductory chapter covering the new features, and directions on where to find them in the book.</p> -<p>Overall, <em>The Rails 3 Way</em> is a great book, and if you plan on using Rails 3 for your next web site, it deserves a special place on your desk.</p> + </section> + <section class="section"> + <header> + <h1 id="h_4" class="toc">Conclusion</h1> + </header> + <p><em>The Rails 3 Way</em> remains the <em>de facto</em> reference book for Rails. I was quite pleased to see + that Obie improved it so much, compared to the first edition. Sure, it cannot be recommended to absolute + beginners, but it’s not a big problem: if you’re new to Rails, all you have to do is browse + around and read a few basic tutorials first.</p> + <p>What I really missed was a <em>What’s New</em> section, or something like that. The new stuff that was + introduced in Ruby on Rails v3 is seamlessly blended with all the rest, which is great if you’re + tackling the framework for the first time, but not so much when you already read tons of books on Rails + 2.×. I would have tagged content specific to Rails 3 in some way at least, for example with labels on + the side of each page. Or maybe have a short introductory chapter covering the new features, and directions + on where to find them in the book.</p> + <p>Overall, <em>The Rails 3 Way</em> is a great book, and if you plan on using Rails 3 for your next web site, + it deserves a special place on your desk.</p> -</section> + </section> </section>
@@ -5,57 +5,99 @@ timestamp: 1213327080
tags: "browsers|review|firefox|opera" ----- <p>Opera 9.5 is out, Firefox 3 too (more or less), so, which browser are you going to use today?<br /> -This new generatio of browsers offers plenty of new, innovative features and improvements over the past, in both cases:</p> + This new generatio of browsers offers plenty of new, innovative features and improvements over the past, in both + cases:</p> <ul> <li>You can finally use Firefox because it finally doesn’t eat up all your <span class="caps">RAM</span></li> <li>You can finally use Opera because it is finally “understand” ajaxified web sites like Gmail</li> </ul> <p>Amazingly, these two releases have a lot in common…<img src="/files/opera_sharp.png" alt="" /></p> <h3>A fresh new look</h3> -<p>Both browsers needed a new look, let’s be honest. Both didn’t really care that much in the past releases, but suddenly things changed: the new Opera theme, Sharp, looks truly awesome on any platform, and the Mozilla development team came up with <span class="caps">FOUR</span> different themes, aiming to camouflage Firefox as a native application for all the major OSes.</p> -<p>Personally, while I was really impressed by the new Opera theme, I was not too sure of the new direction taken for Firefox UI. Why a different theme for each different major operating system? In particular the XP theme could have been better, in my opinion. <br /> -Not a huge deal though, as both browsers are skinnable (although I’m not gonna alter the way Opera looks!).<br /> -<br /> -<br /> -<br /></p> +<p>Both browsers needed a new look, let’s be honest. Both didn’t really care that much in the past releases, + but suddenly things changed: the new Opera theme, Sharp, looks truly awesome on any platform, and the Mozilla + development team came up with <span class="caps">FOUR</span> different themes, aiming to camouflage Firefox as a + native application for all the major OSes.</p> +<p>Personally, while I was really impressed by the new Opera theme, I was not too sure of the new direction taken for + Firefox UI. Why a different theme for each different major operating system? In particular the XP theme could have + been better, in my opinion. <br /> + Not a huge deal though, as both browsers are skinnable (although I’m not gonna alter the way Opera + looks!).<br /> + <br /> + <br /> + <br /> +</p> <h3>The speed of light</h3> -<p>My main complaint about Firefox 2 was its slow startup and generally slowness due to several memory leaks. This eventually led me to “switch to Opera” for my daily browsing a while ago.</p> -<p>Firefox 3, luckily, is much faster and more memory-efficient than its predecessor, as the development team squashed most of the memory-related bugs. The introduction of jemalloc as the new memory allocator and also the new cycle collectory improved things quite a bit.</p> -<p>Opera 9.5 still “feels” faster at startup and also the <span class="caps">GUI</span> is a bit more snappy than Firefox’s, but Firefox 3 is <em>terribly</em> fast at interpreting Javascript.<br /> -As a result, sites like Gmail or Google Reader are rendered almost instantaneously in Firefox 3, while Opera 9.5 is slightly slower.</p> +<p>My main complaint about Firefox 2 was its slow startup and generally slowness due to several memory leaks. This + eventually led me to “switch to Opera” for my daily browsing a while ago.</p> +<p>Firefox 3, luckily, is much faster and more memory-efficient than its predecessor, as the development team squashed + most of the memory-related bugs. The introduction of jemalloc as the new memory allocator and also the new cycle + collectory improved things quite a bit.</p> +<p>Opera 9.5 still “feels” faster at startup and also the <span class="caps">GUI</span> is a bit more snappy + than Firefox’s, but Firefox 3 is <em>terribly</em> fast at interpreting Javascript.<br /> + As a result, sites like Gmail or Google Reader are rendered almost instantaneously in Firefox 3, while Opera 9.5 is + slightly slower.</p> <h3>Address Bar 2.0</h3> -<p>Both browser struggled to add more features to the Address Bar: Opera now supports search-as-you-type history search and Firefox… well, let’s just say that Firefox Developers built something truly wonderful with the new “AwesomeBar”: it is now possible to search history items <em>tagged pages and bookmarks</em>.</p> +<p>Both browser struggled to add more features to the Address Bar: Opera now supports search-as-you-type history search + and Firefox… well, let’s just say that Firefox Developers built something truly wonderful with the new + “AwesomeBar”: it is now possible to search history items <em>tagged pages and bookmarks</em>.</p> <p><img src="/files/awesomebar.png" alt="" /></p> -<p>But there’s more: you’ll notice that the AwesomeBar does an outstanding job in retrieving results ordered by relevance, frequency and access time, and it also allows the user to restrict search to specific page types.</p> -<p>As an Opera user, I must admit that Firefox is really way ahead with this. Unfortunately, Opera toolbar still is not that smart.</p> +<p>But there’s more: you’ll notice that the AwesomeBar does an outstanding job in retrieving results ordered + by relevance, frequency and access time, and it also allows the user to restrict search to specific page types.</p> +<p>As an Opera user, I must admit that Firefox is really way ahead with this. Unfortunately, Opera toolbar still is not + that smart.</p> <h3>Sync’ing up</h3> -<p>Opera offers the ability to sync your bookmarks, notes, custom toolbars and Quick Dial pages via the new <a href="http://link.opera.com/">Link</a> service.<br /> -It looks awfully similar to <a href="https://services.mozilla.com/">Mozilla Weave</a>, an experimental extension aiming to synchronize the whole Firefox profile.</p> -<p>Currently, Weave allows users to sync bookmarks, history and passwords in a very secure way: this truly preserve the “state” of your browser across multiple computers.</p> -<p>On the other hand, Opera is virtually on <em>any device or platform</em>, so Link can be handy if you use Opera as your mobile browser. Unfortunately, we’ll still have to wait a bit for a proper Mozilla competitor for mobile device, but it already <a href="http://arstechnica.com/news.ars/post/20080409-first-look-mozilla-fennec-targets-handheld-browser-market.html">looks very promising</a>.</p> +<p>Opera offers the ability to sync your bookmarks, notes, custom toolbars and Quick Dial pages via the new <a + href="http://link.opera.com/">Link</a> service.<br /> + It looks awfully similar to <a href="https://services.mozilla.com/">Mozilla Weave</a>, an experimental extension + aiming to synchronize the whole Firefox profile.</p> +<p>Currently, Weave allows users to sync bookmarks, history and passwords in a very secure way: this truly preserve the + “state” of your browser across multiple computers.</p> +<p>On the other hand, Opera is virtually on <em>any device or platform</em>, so Link can be handy if you use Opera as + your mobile browser. Unfortunately, we’ll still have to wait a bit for a proper Mozilla competitor for mobile + device, but it already <a + href="http://arstechnica.com/news.ars/post/20080409-first-look-mozilla-fennec-targets-handheld-browser-market.html">looks + very promising</a>.</p> <h3>Be nice, be open</h3> -<p>Firefox is <span class="caps">THE</span> (only?) open source browser. Opera has always been (and always will be?) a proprietary, freeware, <em>closed source</em> app.<br /> -Some people are really bothered by this, especially Linux users of course: it really comes down to how religious you are about the software running on your machine.</p> -<p>Being open source, Firefox is more hacker-friendly: this release, especially, also delivers an awful lot of useful APIs which can be used to develop extensions in a much easier way. This of course isn’t an option for Opera.</p> -<p>From a different point of view, Opera actually implements <a href="http://dev.opera.com/articles/view/opera-9-5-the-next-generation-of-web-s/">more ‘next generation’ open standards</a> than Firefox, and it scores more than Firefox in the <a href="http://acid3.acidtests.org/">Acid 3</a> test.</p> -<p>Does this matter in the end? Well, yes and no: it’s nice that Opera struggles to be way ahead than others in this, but in the end, until Firefox 3 (and Internet Explorer too!) catch up, web developers won’t dare using any of the new features.</p> -<p>Do you have a web site optimized for Opera? No, probably not: you’re normally aiming at Firefox or IE (sigh!) when it comes to development, because they are still more widely used.</p> +<p>Firefox is <span class="caps">THE</span> (only?) open source browser. Opera has always been (and always will be?) a + proprietary, freeware, <em>closed source</em> app.<br /> + Some people are really bothered by this, especially Linux users of course: it really comes down to how religious you + are about the software running on your machine.</p> +<p>Being open source, Firefox is more hacker-friendly: this release, especially, also delivers an awful lot of useful + APIs which can be used to develop extensions in a much easier way. This of course isn’t an option for Opera. +</p> +<p>From a different point of view, Opera actually implements <a + href="http://dev.opera.com/articles/opera-9-5-the-next-generation-of-web-s/">more ‘next generation’ + open standards</a> than Firefox, and it scores more than Firefox in the <a + href="http://acid3.acidtests.org/">Acid 3</a> test.</p> +<p>Does this matter in the end? Well, yes and no: it’s nice that Opera struggles to be way ahead than others in + this, but in the end, until Firefox 3 (and Internet Explorer too!) catch up, web developers won’t dare using + any of the new features.</p> +<p>Do you have a web site optimized for Opera? No, probably not: you’re normally aiming at Firefox or IE (sigh!) + when it comes to development, because they are still more widely used.</p> <p>All this is very sad, but still terribly true. But at least, other browsers will feel more compelled to catch up.</p> <h3>Usability is the key</h3> -<p>Personally, I prefer Opera’s philosophy of “everything in tabs” rather than having many dialog boxes floating around for downloads, history, bookmarks etc.</p> -<p>From this point of view, Firefox is arguably not as usable as Opera. Before Firefox <span class="caps">GUI</span> purists start screaming insults, I repeat that this is entirely up to your taste.</p> -<p>While Opera’s <span class="caps">GUI</span> didn’t undergo any major change, Firefox 3 definitely did:</p> +<p>Personally, I prefer Opera’s philosophy of “everything in tabs” rather than having many dialog + boxes floating around for downloads, history, bookmarks etc.</p> +<p>From this point of view, Firefox is arguably not as usable as Opera. Before Firefox <span class="caps">GUI</span> + purists start screaming insults, I repeat that this is entirely up to your taste.</p> +<p>While Opera’s <span class="caps">GUI</span> didn’t undergo any major change, Firefox 3 definitely did: +</p> <ul> <li>A new <em>Library</em> now holds all your bookmarks, history and feeds</li> <li>The new Downloads dialog supports (finally!) download resumes, even across different browsing sessions</li> - <li>It is very easy to access information on web site, especially with the new identity button (that’s where the web site favicon is displayed).</li> + <li>It is very easy to access information on web site, especially with the new identity button (that’s where + the web site favicon is displayed).</li> </ul> <p><img src="/files/places.png" alt="" /></p> -<p>Another trend introduced by Firefox 3 is the ability to <em>search-as-you-type</em> in all these dialogs and in many others (like the Cookie Manager). This makes finding information much easier.</p> -<p>Opera didn’t need any major overhaul, but I would have liked to have cookies and preference in tabs, too (they are pretty much the only dialog boxes left).</p> +<p>Another trend introduced by Firefox 3 is the ability to <em>search-as-you-type</em> in all these dialogs and in many + others (like the Cookie Manager). This makes finding information much easier.</p> +<p>Opera didn’t need any major overhaul, but I would have liked to have cookies and preference in tabs, too (they + are pretty much the only dialog boxes left).</p> <h3>To extend or not extend?</h3> <p>This is always the eternal dilemma when it comes to Firefox vs. other browsers.</p> -<p>The major strength of Firefox 3, like <em>all</em> its predecessors, lies in the hundreds of free extensions which can be installed by user to enhance browser’s functionality. You can turn Firefox into almost anything you like.</p> +<p>The major strength of Firefox 3, like <em>all</em> its predecessors, lies in the hundreds of free extensions which + can be installed by user to enhance browser’s functionality. You can turn Firefox into almost anything you + like.</p> <p>Because I’m trying to be browser-independent, I like to keep my Firefox extensions to a bare minimum:</p> <ul> <li>Weave</li>@@ -67,19 +109,32 @@ <li>StumbleUpon</li>
<li>ColorZilla</li> <li>Secure Login</li> </ul> -<p>Opera fans always boost that Opera can do pretty much everything you’d ever need <em>out of the box</em>, so you don’t need any extension at all. Part of this is true (does Firefox have an e-mail client? No. Does Firefox offer a Wand out-of-the-box? No., …read <a href="http://my.opera.com/Rijk/blog/2006/07/04/top-150-popular-firefox-extensions-and-opera">this</a> for the details)</p> -<p>In the past release, Opera added widget to let developers unleash their creativity. And I must admit that they are quite cute and work well enough (a few of them at least).</p> -<p>One of the most frequently-missed feature was a Firebug equivalent for Opera. Luckily, this was fixed in this release with the introduction of <a href="http://www.opera.com/products/dragonfly/">DragonFly</a>, which is already bundled with the browser itself. <br /> -I’m pretty sure this will make <em>a lot</em> of web developers very happy.</p> +<p>Opera fans always boost that Opera can do pretty much everything you’d ever need <em>out of the box</em>, so + you don’t need any extension at all. Part of this is true (does Firefox have an e-mail client? No. Does + Firefox offer a Wand out-of-the-box? No., …read <a + href="http://my.opera.com/Rijk/blog/2006/07/04/top-150-popular-firefox-extensions-and-opera">this</a> for the + details)</p> +<p>In the past release, Opera added widget to let developers unleash their creativity. And I must admit that they are + quite cute and work well enough (a few of them at least).</p> +<p>One of the most frequently-missed feature was a Firebug equivalent for Opera. Luckily, this was fixed in this release + with the introduction of <a href="http://www.opera.com/products/dragonfly/">DragonFly</a>, which is already bundled + with the browser itself. <br /> + I’m pretty sure this will make <em>a lot</em> of web developers very happy.</p> <p><img src="/files/opera_dragonfly.png" alt="" /></p> -<p>Personally, I still miss an equivalent of the del.icio.us extension in Opera, but I guess I can survive with just a bookmarklet, if needed.</p> +<p>Personally, I still miss an equivalent of the del.icio.us extension in Opera, but I guess I can survive with just a + bookmarklet, if needed.</p> <h3>Choose your winner</h3> -<p>It is really up to you. I don’t have a true favorite as for now: Firefox 3 is very, very tempting because of three things:</p> +<p>It is really up to you. I don’t have a true favorite as for now: Firefox 3 is very, very tempting because of + three things:</p> <ul> <li>The AwesomeBar: I feel I’m already becoming addicted to it</li> <li>Some of its extensions, including Weave</li> - <li>The performance improvements, especially concerning memory management and the rendering of pages making extensive use of Javascript</li> + <li>The performance improvements, especially concerning memory management and the rendering of pages making + extensive use of Javascript</li> </ul> -<p>Opera, on the other hand, charmes me for what it can do out-of-the-box: it’s fast, sleek, has almost everything I need with no configuration at all. It’s ideal if you use multiple systems, including mobile devices.</p> -<p>Definitely I will not abandon any of the two as for now: I’ll probaly use Firefox for a more enhanced browsing experience, but I’ll definitely use Opera when I’m in a hurry to look something up for example, and every time my fiancée is using Firefox on the same account.</p> +<p>Opera, on the other hand, charmes me for what it can do out-of-the-box: it’s fast, sleek, has almost everything + I need with no configuration at all. It’s ideal if you use multiple systems, including mobile devices.</p> +<p>Definitely I will not abandon any of the two as for now: I’ll probaly use Firefox for a more enhanced browsing + experience, but I’ll definitely use Opera when I’m in a hurry to look something up for example, and + every time my fiancée is using Firefox on the same account.</p> <p>There’s no absolute winner in the Browser Wars yet: just different browsers for different occasions!</p>
@@ -4,15 +4,38 @@ content-type: article
timestamp: 1256408819 tags: "cakephp|rant|php|li3" ----- -<p>Like <a href="http://www.h3rald.com/articles/too-many-cooks-take-2/">its predecessor</a>, this is another rant about the (end of the) <a href="http://www.cakephp.org">CakePHP framework</a>. Not that I particularly enjoy writing about the misfortune of others, but after reading <a href="http://bakery.cakephp.org/articles/view/the-cake-is-still-rising">this official announcement</a> I felt compelled to post.</p> -<p>It has been two years since my last post on this subject and yes, the cake is still rising, but at what price? Will it still taste sweet now that two of its main ingredients are not part of it anymore? As <a href="http://cakebaker.42dh.com/2009/10/23/the-end-of-cakephp/">Daniel</a> puts it, <em>probably the best thing to do now is to drink tea and to wait until the dust settles…</em></p> -<p>As far as I’m concerned, what really matters is that Garrett Woodworth (former CakePHP Project Manager) and Nate Abele (former CakePHP Lead Developer) are <em>gone</em>. They realized they had enough Nuts over the years and they decided to switch to a more <a href="http://irc.cakephp.org/logs/link/1110092#message1110102">Lithium-rich</a> diet. More helthy and depression-proof, too!</p> -<p>Stupid metaphors and painful jokes aside, this is probably the best piece of news the CakePHP community received in a long time: the birth of <em>a fork of the CakePHP framework</em>, more precisely of the so-called Cake3 branch.</p> -<p><em>Cake3</em>? I didn’t keep up-to-date with the buzz, so I didn’t know anything about this until today, when I decided to finally start catching up.</p> +<p>Like <a href="/articles/too-many-cooks-take-2/">its predecessor</a>, this is another rant about + the (end of the) <a href="http://www.cakephp.org">CakePHP framework</a>. Not that I particularly enjoy writing about + the misfortune of others, but after reading <a + href="http://bakery.cakephp.org/articles/the-cake-is-still-rising">this official announcement</a> I felt + compelled to post.</p> +<p>It has been two years since my last post on this subject and yes, the cake is still rising, but at what price? Will + it still taste sweet now that two of its main ingredients are not part of it anymore? As <a + href="http://cakebaker.42dh.com/2009/10/23/the-end-of-cakephp/">Daniel</a> puts it, <em>probably the best thing + to do now is to drink tea and to wait until the dust settles…</em></p> +<p>As far as I’m concerned, what really matters is that Garrett Woodworth (former CakePHP Project Manager) and + Nate Abele (former CakePHP Lead Developer) are <em>gone</em>. They realized they had enough Nuts over the years and + they decided to switch to a more <a href="http://irc.cakephp.org/logs/link/1110092#message1110102">Lithium-rich</a> + diet. More helthy and depression-proof, too!</p> +<p>Stupid metaphors and painful jokes aside, this is probably the best piece of news the CakePHP community received in a + long time: the birth of <em>a fork of the CakePHP framework</em>, more precisely of the so-called Cake3 branch.</p> +<p><em>Cake3</em>? I didn’t keep up-to-date with the buzz, so I didn’t know anything about this until today, + when I decided to finally start catching up.</p> <blockquote> -<p>“Cake 3.0, on the other hand, is pretty different from the existing core code in a few notable ways. Mainly, it’s been re-written from the ground up for <span class="caps">PHP</span> 5.3.”</p> + <p>“Cake 3.0, on the other hand, is pretty different from the existing core code in a few notable ways. + Mainly, it’s been re-written from the ground up for <span class="caps">PHP</span> 5.3.”</p> </blockquote> -<p style="padding-right:6em;">from <a href="http://debuggable.com/posts/Cake_3_interview_with_Nate_Abele:4a665a5e-5bfc-4e42-96ee-6d284834cda3">Cake 3 interview with Nate Abele</a>, debuggable.com</p> -<p>Of course, in these three years of my full immersion in the Ruby language, I almost completely forgot about <span class="caps">PHP</span> too. <span class="caps">PHP</span> 5.3 means namespace and closures, i.e. the Rubyist’s daily bread. A more modular CakePHP, properly object-oriented, with an ActiveRecord-like <span class="caps">API</span> for models (finally!) is definitely worth a look, especially if it’s Nut-free as well.</p> -<p>The new framework will be called <strong>Lithium</strong> (sounds more professional already), and it’s due to launch next monday, here: <a href="http://li3.rad-dev.org/">http://li3.rad-dev.org/</a> (at the time of writing, this link is password-protected).</p> -<p>Personally, I am <em>very</em> excited about this new project. It should have happened three years ago, really, but there’s no point in being greedy: the time has finally come. I would like to (pre-)thank Garrett and Nate for their (upcoming) amazing work, I’ll definitely keep a closer eye on it.</p> +<p style="padding-right:6em;">from <a + href="http://debuggable.com/posts/Cake_3_interview_with_Nate_Abele:4a665a5e-5bfc-4e42-96ee-6d284834cda3">Cake 3 + interview with Nate Abele</a>, debuggable.com</p> +<p>Of course, in these three years of my full immersion in the Ruby language, I almost completely forgot about <span + class="caps">PHP</span> too. <span class="caps">PHP</span> 5.3 means namespace and closures, i.e. the + Rubyist’s daily bread. A more modular CakePHP, properly object-oriented, with an ActiveRecord-like <span + class="caps">API</span> for models (finally!) is definitely worth a look, especially if it’s Nut-free as + well.</p> +<p>The new framework will be called <strong>Lithium</strong> (sounds more professional already), and it’s due to + launch next monday, here: <a href="http://li3.rad-dev.org/">http://li3.rad-dev.org/</a> (at the time of writing, + this link is password-protected).</p> +<p>Personally, I am <em>very</em> excited about this new project. It should have happened three years ago, really, but + there’s no point in being greedy: the time has finally come. I would like to (pre-)thank Garrett and Nate for + their (upcoming) amazing work, I’ll definitely keep a closer eye on it.</p>
@@ -4,25 +4,35 @@ content-type: project
subtitle: "A Rapid Document Authoring Framework" github: glyph home: /glyph/ -summary: "A Rapid Document Authoring Framework written in Ruby that can be used to create and manage books and articles." +summary: "A Rapid Document Authoring Framework written in Ruby to create and manage books and articles." inactive: true docs: /glyph/book/ version: 0.5.3.1 ----- <p>Glyph is a <em>Rapid Document Authoring Framework</em>.</p> -<p>With Glyph, creating and maintaining any kind of document becomes as easy as… <em>programming</em>. Glyph enables you to minimize text duplication, focus on content rather than presentation, manage references seamlessly and automate tedious tasks through a simple but effective macro language, specifically geared towards customization and extensibility.</p> +<p>With Glyph, creating and maintaining any kind of document becomes as easy as… <em>programming</em>. Glyph + enables you to minimize text duplication, focus on content rather than presentation, manage references seamlessly and + automate tedious tasks through a simple but effective macro language, specifically geared towards customization and + extensibility.</p> <h3>Main Features</h3> <h4>Command-line Interface</h4> -<p>Glyph is 100% command line. Its interface resambles <a href="http://git-scm.com/">Git’s</a> for its simplicity and power (thanks to the <a href="http://github.com/davetron5000/gli">gli</a> gem). Here are some example commands:</p> +<p>Glyph is 100% command line. Its interface resembles <a href="http://git-scm.com/">Git’s</a> for its simplicity + and power (thanks to the <a href="http://github.com/davetron5000/gli">gli</a> gem). Here are some example commands: +</p> <ul> <li><code>glyph init</code> — to initialize a new Glyph project in the current (empty) directory.</li> - <li><code>glyph add introduction.textile</code> — to create a new file called <em>introduction.textile</em>.</li> - <li><code>glyph compile</code> — to compile the current document into a single <span class="caps">HTML</span> file.</li> - <li><code>glyph compile --auto</code> — to keep recompiling the current document every time a file is changed.</li> - <li><code>glyph compile -f pdf</code> — to compile the current document into <span class="caps">HTML</span> and then transform it into <span class="caps">PDF</span>.</li> - <li><code>glyph compile readme.glyph</code> — to compile a <em>readme.glyph</em> located in the current directory into a single <span class="caps">HTML</span> file.</li> + <li><code>glyph add introduction.textile</code> — to create a new file called <em>introduction.textile</em>. + </li> + <li><code>glyph compile</code> — to compile the current document into a single <span class="caps">HTML</span> + file.</li> + <li><code>glyph compile --auto</code> — to keep recompiling the current document every time a file is changed. + </li> + <li><code>glyph compile -f pdf</code> — to compile the current document into <span class="caps">HTML</span> and + then transform it into <span class="caps">PDF</span>.</li> + <li><code>glyph compile readme.glyph</code> — to compile a <em>readme.glyph</em> located in the current + directory into a single <span class="caps">HTML</span> file.</li> <li><code>glyph outline -l 2</code> — Display the document outline, up to second-level headers.</li> <li><code>glyph stats</code> — Display project statistics.</li> </ul>@@ -83,7 +93,9 @@ </div>
</code></pre> <h4>Content Reuse</h4> -<p>Finding yourself repeating the same sentence over an over? Glyph allows you to create snippets. Within snippets. Within other snippets (and so on, for a long long time…) as long as you don’t define a snippet by defining itself, which would be kinda nasty (and Glyph would complain!):</p> +<p>Finding yourself repeating the same sentence over an over? Glyph allows you to create snippets. Within snippets. + Within other snippets (and so on, for a long long time…) as long as you don’t define a snippet by defining + itself, which would be kinda nasty (and Glyph would complain!):</p> <pre><code> snippet:[entities|snippets and macros]@@ -99,45 +111,66 @@ <pre><code>
<p>Glyph allows you to define your own snippets and macros.</p> </code></pre> -<p>If yourself dreaming about <em>parametric</em> snippets, just create your own macros (see the <a href="http://github.com/h3rald/glyph/blob/master/book/text/changelog.glyph">source</a> of Glyph’s changelog, just to have an idea).</p> +<p>If yourself dreaming about <em>parametric</em> snippets, just create your own macros (see the <a + href="http://github.com/h3rald/glyph/blob/master/book/text/changelog.glyph">source</a> of Glyph’s changelog, + just to have an idea).</p> <h4>Automation of Common Tasks</h4> -<p>If you’re writing a book, you shouldn’t have to worry about pagination, headers, footers, table of contents, section numbering or similar. Glyph understands you, and will take care of everything for you (with a little help from CSS3, sometimes).</p> +<p>If you’re writing a book, you shouldn’t have to worry about pagination, headers, footers, table of + contents, section numbering or similar. Glyph understands you, and will take care of everything for you (with a little + help from CSS3, sometimes).</p> <h4>Reference Validation</h4> -<p>Feel free to add plenty of links, snippets, bookmarks, … if Glyph doesn’t find something, it will definitely complain. Broken references are a thing on the past, and you don’t need to worry about it.</p> +<p>Feel free to add plenty of links, snippets, bookmarks, … if Glyph doesn’t find something, it will + definitely complain. Broken references are a thing on the past, and you don’t need to worry about it.</p> <h4>Extreme Extensibility</h4> <ul> - <li>You miss a <code>!!!</code> macro to format really, <em>really</em> important things? Create it. In under 3 seconds, in Ruby or Glyph itself. And yes, you can use special characters, too.</li> - <li>You want your own, very special special <code>glyph create --everything</code> command to create all <em>you</em> need in a Glyph project? You can do it. Using your own Rake tasks, too.</li> - <li>You want Glyph to output <span class="caps">ODF</span> files? You can do it, and you’ll be able to run <code>glyph generate -f odf</code>. This would probably require a little more time, but it’s trivial, from a technical point of view.</li> + <li>You miss a <code>!!!</code> macro to format really, <em>really</em> important things? Create it. In under 3 + seconds, in Ruby or Glyph itself. And yes, you can use special characters, too.</li> + <li>You want your own, very special special <code>glyph create --everything</code> command to create all <em>you</em> + need in a Glyph project? You can do it. Using your own Rake tasks, too.</li> + <li>You want Glyph to output <span class="caps">ODF</span> files? You can do it, and you’ll be able to run + <code>glyph generate -f odf</code>. This would probably require a little more time, but it’s trivial, from a + technical point of view. + </li> </ul> <h4>Convention over Configuration</h4> -<p>Put your text files in <code>/text</code>, your images in <code>/images</code>, add custom macros in a <code>macro</code> folder within your <code>/lib</code> folder… you get the picture: Glyph has its special places.</p> -<p>Nonetheless, you also have 1 (<em>one</em>) configuration file to customize to your heart’s content (with smart defaults).</p> +<p>Put your text files in <code>/text</code>, your images in <code>/images</code>, add custom macros in a + <code>macro</code> folder within your <code>/lib</code> folder… you get the picture: Glyph has its special + places. +</p> +<p>Nonetheless, you also have 1 (<em>one</em>) configuration file to customize to your heart’s content (with smart + defaults).</p> <h4>Free and Open Source</h4> -<p>Glyph is 100% Open Source Software, developed using the Ruby Programming Language and licensed under the very permissive terms of the <a href="http://www.opensource.org/licenses/mit-license.php"><span class="caps">MIT</span> License</a>.</p> +<p>Glyph is 100% Open Source Software, developed using the Ruby Programming Language and licensed under the very + permissive terms of the <a href="http://www.opensource.org/licenses/mit-license.php"><span class="caps">MIT</span> + License</a>.</p> <p>If you have Ruby installed, just run <code>gem install glyph</code>. That’s all it takes.</p> <h3>Resources</h3> <ul> <li>Repository: <a href="http://www.github.com/h3rald/glyph/">http://www.github.com/h3rald/glyph/</a></li> - <li>Bug Tracking: <a href="http://www.github.com/h3rald/glyph/issues">http://www.github.com/h3rald/glyph/issues</a></li> + <li>Bug Tracking: <a href="http://www.github.com/h3rald/glyph/issues">http://www.github.com/h3rald/glyph/issues</a> + </li> <li>Development Wiki <a href="http://wiki.github.com/h3rald/glyph">http://wiki.github.com/h3rald/glyph</a></li> <li>RubyGem Download <a href="http://www.rubygems.org/gems/glyph">http://www.rubygems.org/gems/glyph</a></li> - <li>Book (<span class="caps">PDF</span>): <a href="http://github.com/downloads/h3rald/glyph/glyph.pdf">http://github.com/downloads/h3rald/glyph/glyph.pdf</a></li> - <li>Book (Web): <a href="http://www.h3rald.com/glyph/book/">http://www.h3rald.com/glyph/book/</a></li> + <li>Book (<span class="caps">PDF</span>): <a + href="http://github.com/downloads/h3rald/glyph/glyph.pdf">http://github.com/downloads/h3rald/glyph/glyph.pdf</a> + </li> + <li>Book (Web): <a href="/glyph/book/">/glyph/book/</a></li> <li>Reference Documentation: <a href="http://rubydoc.info/gems/glyph/">http://rubydoc.info/gems/glyph/</a></li> - <li>User Group: <a href="http://groups.google.com/group/glyph-framework">http://groups.google.com/group/glyph-framework</a></li> + <li>User Group: <a + href="http://groups.google.com/group/glyph-framework">http://groups.google.com/group/glyph-framework</a></li> </ul> <h3>Latest Updates</h3> -<ul><li><a href="/articles/glyph-050-released/">Glyph 0.5.0 Released</a> </li> +<ul> + <li><a href="/articles/glyph-050-released/">Glyph 0.5.0 Released</a> </li> <li><a href="/articles/glyph-040-released/">Glyph 0.4.0 Released</a></li> <li><a href="/articles/glyph-030-released/">Glyph 0.3.0 Released</a></li> - <li><a href="/articles/glyph-020-released/">Glyph 0.2.0 Released</a></li> + <li><a href="/articles/glyph-020-released/">Glyph 0.2.0 Released</a></li> <li><a href="/articles/introducing-glyph/">Introducing Glyph</a></li> </ul>
@@ -2,22 +2,26 @@ -----
title: "Glyph – <code>options.*</code>" content-type: page ----- -<nav class="navigation"><a href="/glyph/book/config/filters.html">← <code>filters.*</code></a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/config/output.html"><code>output.*</code> →</a></nav> +<nav class="navigation"><a href="/glyph/book/config/filters.html">← <code>filters.*</code></a> | <a + href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/config/output.html"><code>output.*</code> + →</a></nav> The following configuration settings are used to enable or disable specific Glyph functionalities and behaviors. <table> - <tr> - <th>Name</th> - <th>Description</th> - <th>Default</th> - </tr> - <tr> + <tr> + <th>Name</th> + <th>Description</th> + <th>Default</th> + </tr> + <tr> <td> -<code>options.filters_by_file_extension</code> <a id="s_options_filters_by_file_extension"></a> -</td> + <code>options.filters_by_file_extension</code> <a id="s_options_filters_by_file_extension"></a> + </td> <td> -<p>If set to <code>true</code>, a filter macro is applied to included files, based on their extensions (<span class="fmi">for more information on <mark>including files</mark>, see <a href="/glyph/book/text_editing/inclusions.html#incl">Content Reuse</a></span>).</p> -</td> + <p>If set to <code>true</code>, a filter macro is applied to included files, based on their extensions + (<span class="fmi">for more information on <mark>including files</mark>, see <a + href="/glyph/book/text_editing/inclusions.html#incl">Content Reuse</a></span>).</p> + </td> <td> <code> nil@@ -26,16 +30,18 @@ </td>
</tr> <tr> <td> -<code>options.macro_set</code> <a id="s_options_macro_set"></a> -</td> + <code>options.macro_set</code> <a id="s_options_macro_set"></a> + </td> <td> -<p>Determines which macro set will be loaded. It can be set to:</p> -<ul> - <li>glyph — Loads core, filter, xml macros plus all macros necessary for the <a href="/glyph/book/config/document.html#s_document_output"><code>document.output</code></a> setting.</li> - <li>xml — Loads core and xml macros.</li> - <li>core — Loads core macros only.</li> -</ul> -</td> + <p>Determines which macro set will be loaded. It can be set to:</p> + <ul> + <li>glyph — Loads core, filter, xml macros plus all macros necessary for the <a + href="/glyph/book/config/document.html#s_document_output"><code>document.output</code></a> + setting.</li> + <li>xml — Loads core and xml macros.</li> + <li>core — Loads core macros only.</li> + </ul> + </td> <td> <code> "glyph"@@ -44,11 +50,12 @@ </td>
</tr> <tr> <td> -<code>options.safe_mode</code> <a id="s_options_safe_mode"></a> -</td> + <code>options.safe_mode</code> <a id="s_options_safe_mode"></a> + </td> <td> -<p>Enables Safe Mode (<span class="fmi">for more information on <mark>Glyph modes</mark>, see <a href="/glyph/book/compiling/programmatic_usage.html#modes">Modes</a></span>).</p> -</td> + <p>Enables Safe Mode (<span class="fmi">for more information on <mark>Glyph modes</mark>, see <a + href="/glyph/book/compiling/programmatic_usage.html#modes">Modes</a></span>).</p> + </td> <td> <code> false@@ -57,11 +64,12 @@ </td>
</tr> <tr> <td> -<code>options.url_validation</code> <a id="s_options_url_validation"></a> -</td> + <code>options.url_validation</code> <a id="s_options_url_validation"></a> + </td> <td> -<p>If set to <em>true_, every external link will be validated (see </em>editing/links.html#links">Links and Bookmarks</a>).</p> -</td> + <p>If set to <em>true_, every external link will be validated (see + </em>editing/links.html#links">Links and Bookmarks</a>).</p> + </td> <td> <code> false@@ -70,11 +78,11 @@ </td>
</tr> <tr> <td> -<code>options.xml_blacklist</code> <a id="s_options_xml_blacklist"></a> -</td> + <code>options.xml_blacklist</code> <a id="s_options_xml_blacklist"></a> + </td> <td> -<p>The <span class="caps">XML</span> tags listed here cannot be generated using Glyph code.</p> -</td> + <p>The <span class="caps">XML</span> tags listed here cannot be generated using Glyph code.</p> + </td> <td> <code> ["applet", "base", "basefont", "embed", "frame", "frameset", "iframe", "isindex", "meta", "noframes", "noscript", "object", "param", "title"]@@ -83,11 +91,13 @@ </td>
</tr> <tr> <td> -<code>options.xml_fallback</code> <a id="s_options_xml_fallback"></a> -</td> + <code>options.xml_fallback</code> <a id="s_options_xml_fallback"></a> + </td> <td> -<p>If set to true, any unknown macro name will considered an <span class="caps">XML</span> element (see <a href="/glyph/book/document.html#other_elements">Other <span class="caps">HTML</span> Elements</a>).</p> -</td> + <p>If set to true, any unknown macro name will considered an <span class="caps">XML</span> element (see <a + href="/glyph/book/config/document.html#other_elements">Other <span class="caps">HTML</span> + Elements</a>).</p> + </td> <td> <code> true@@ -96,16 +106,18 @@ </td>
</tr> <tr> <td> -<code>options.ebook.converter</code> <a id="s_options_ebook_converter"></a> -</td> + <code>options.ebook.converter</code> <a id="s_options_ebook_converter"></a> + </td> <td> -<p>The full path name of the ebook-convert command. Defaults to /usr/bin/ebook-convert.</p> -</td> + <p>The full path name of the ebook-convert command. Defaults to /usr/bin/ebook-convert.</p> + </td> <td> <code> nil </code> </td> </tr> - </table> -<nav class="navigation"><a href="/glyph/book/config/filters.html">← <code>filters.*</code></a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/config/output.html"><code>output.*</code> →</a></nav> +</table> +<nav class="navigation"><a href="/glyph/book/config/filters.html">← <code>filters.*</code></a> | <a + href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/config/output.html"><code>output.*</code> + →</a></nav>
@@ -2,15 +2,26 @@ -----
title: "Glyph – Custom Output Formats" content-type: page ----- -<nav class="navigation"><a href="/glyph/book/extending/task.html">← Defining Custom Tasks</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/extending/command.html">Defining Custom Commands →</a></nav> -<p>As shown in <a href="/glyph/book/extending/commands_tasks.html#cmd_tasks_arch">How Commands and Tasks work</a>, the <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command command calls specific tasks defined in the <code>generate:</code> Rake namespace to generate output files in a particular format.</p> -<p>More specifically, when a <code>--format</code> option is specified, the command looks for a task with the same name within the <code>generate:</code> namespace. This makes adding new output formats to Glyph a fairly easy task, without the need to specify custom commands or similar.</p> -<p>The following sections explain how the <code>h3rald</code> output format was created to integrate this book into the <a href="http://www.h3rald.com">H3RALD.com</a> website.</p> +<nav class="navigation"><a href="/glyph/book/extending/task.html">← Defining Custom Tasks</a> | <a + href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/extending/command.html">Defining Custom + Commands →</a></nav> +<p>As shown in <a href="/glyph/book/extending/commands_tasks.html#cmd_tasks_arch">How Commands and Tasks work</a>, the + <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command command calls specific tasks + defined in the <code>generate:</code> Rake namespace to generate output files in a particular format.</p> +<p>More specifically, when a <code>--format</code> option is specified, the command looks for a task with the same name + within the <code>generate:</code> namespace. This makes adding new output formats to Glyph a fairly easy task, + without the need to specify custom commands or similar.</p> +<p>The following sections explain how the <code>h3rald</code> output format was created to integrate this book into the + <a href="http://www.h3rald.com">H3RALD.com</a> website.</p> <section class="section"> -<header><h1 id="h_105" class="toc">Output Configuration</h1></header> -<p>The first step required to add a new output format to Glyph is extending Glyph’s configuration by adding the appropriate output hash, as follows:</p> + <header> + <h1 id="h_105" class="toc">Output Configuration</h1> + </header> + <p>The first step required to add a new output format to Glyph is extending Glyph’s configuration by adding + the appropriate output hash, as follows:</p> <div class="CodeRay"> - <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span><span class="symbol">:output</span>: + <div class="code"> + <pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span><span class="symbol">:output</span>: <span class="line-numbers"> <a href="#n2" name="n2">2</a></span> <span class="symbol">:h3rald</span>: <span class="line-numbers"> <a href="#n3" name="n3">3</a></span> <span class="symbol">:multifile</span>: <span class="error">true</span> <span class="line-numbers"> <a href="#n4" name="n4">4</a></span> <span class="symbol">:extension</span>: <span class="error">'.html'</span>@@ -20,25 +31,31 @@ <span class="line-numbers"> <a href="#n7" name="n7">7</a></span> <span class="symbol">:macro_dirs</span>: [<span class="error">'html', 'html5']</span>
<span class="line-numbers"> <a href="#n8" name="n8">8</a></span> <span class="symbol">:layout_dirs</span>: [<span class="error">'web5']</span> <span class="line-numbers"> <a href="#n9" name="n9">9</a></span> <span class="symbol">:layouts</span>: <span class="line-numbers"><strong><a href="#n10" name="n10">10</a></strong></span> <span class="symbol">:topic</span>: <span class="error">bookpage</span> -<span class="line-numbers"><a href="#n11" name="n11">11</a></span> <span class="symbol">:index</span>: <span class="error">bookindex</span></pre></div> -</div> +<span class="line-numbers"><a href="#n11" name="n11">11</a></span> <span class="symbol">:index</span>: <span class="error">bookindex</span></pre> + </div> + </div> <p>In particular, the following keys are mandatory:</p> -<ul> - <li>multifile</li> - <li>extension</li> - <li>filter_target</li> - <li>base</li> - <li>macro_dirs</li> - <li>layout_dirs</li> -</ul> + <ul> + <li>multifile</li> + <li>extension</li> + <li>filter_target</li> + <li>base</li> + <li>macro_dirs</li> + <li>layout_dirs</li> + </ul> </section> <section class="section"> -<header><h1 id="h_106" class="toc">Creating a 'generate:h3rald' task</h1></header> -<p>The next (and final) step involves creating a custom <code>h3rald</code> task within the <code>generate:</code> namespace. This task can be placed in any <code>.rake</code> file within the <code>lib/tasks</code> directory:</p> + <header> + <h1 id="h_106" class="toc">Creating a 'generate:h3rald' task</h1> + </header> + <p>The next (and final) step involves creating a custom <code>h3rald</code> task within the <code>generate:</code> + namespace. This task can be placed in any <code>.rake</code> file within the <code>lib/tasks</code> directory: + </p> <div class="CodeRay"> - <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>namespace <span class="symbol">:generate</span> <span class="keyword">do</span> + <div class="code"> + <pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>namespace <span class="symbol">:generate</span> <span class="keyword">do</span> <span class="line-numbers"> <a href="#n2" name="n2">2</a></span> desc <span class="string"><span class="delimiter">"</span><span class="content">Create output for h3rald.com integration</span><span class="delimiter">"</span></span> <span class="line-numbers"> <a href="#n3" name="n3">3</a></span> task <span class="symbol">:h3rald</span> => [<span class="symbol">:web5</span>] <span class="keyword">do</span> <span class="line-numbers"> <a href="#n4" name="n4">4</a></span> dir = <span class="constant">Glyph</span>::<span class="constant">PROJECT</span>/<span class="string"><span class="delimiter">'</span><span class="content">output/h3rald</span><span class="delimiter">'</span></span>@@ -67,11 +84,16 @@ <span class="line-numbers"><a href="#n26" name="n26">26</a></span><span class="string"><span class="content"> @contents[</span><span class="inline"><span class="inline-delimiter">#{</span>file_load(<span class="constant">Glyph</span>::<span class="constant">PROJECT</span>/<span class="string"><span class="delimiter">'</span><span class="content">text/introduction.glyph</span><span class="delimiter">'</span></span>)<span class="inline-delimiter">}</span></span><span class="content">]</span></span>
<span class="line-numbers"><a href="#n27" name="n27">27</a></span><span class="string"><span class="content"> ]</span><span class="delimiter">}</span></span> <span class="line-numbers"><a href="#n28" name="n28">28</a></span> file_write dir/<span class="string"><span class="delimiter">"</span><span class="content">glyph.textile</span><span class="delimiter">"</span></span>, project <span class="line-numbers"><a href="#n29" name="n29">29</a></span> <span class="keyword">end</span> -<span class="line-numbers"><strong><a href="#n30" name="n30">30</a></strong></span><span class="keyword">end</span></pre></div> -</div> +<span class="line-numbers"><strong><a href="#n30" name="n30">30</a></strong></span><span class="keyword">end</span></pre> + </div> + </div> - <p>In this case, this task does not actually renders files in a different format, it just moves the files generated by the @generate:web5@ task in different subdirectories.</p> - <p>Additionally, it also generates the <a href="http://www.h3rald.com/glyph/">Glyph project page</a> from the book's introduction (note the usage of a raw custom layout macro).</p> + <p>In this case, this task does not actually renders files in a different format, it just moves the files generated + by the @generate:web5@ task in different subdirectories.</p> + <p>Additionally, it also generates the <a href="/glyph/">Glyph project page</a> from the book's introduction (note + the usage of a raw custom layout macro).</p> </section> -<nav class="navigation"><a href="/glyph/book/extending/task.html">← Defining Custom Tasks</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/extending/command.html">Defining Custom Commands →</a></nav> +<nav class="navigation"><a href="/glyph/book/extending/task.html">← Defining Custom Tasks</a> | <a + href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/extending/command.html">Defining Custom + Commands →</a></nav>
@@ -2,43 +2,65 @@ -----
title: "Glyph – Project Configuration" content-type: page ----- -<nav class="navigation"><a href="/glyph/book/getting_started/structure.html">← Document Structure</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/text_editing/glyph_files.html"><code>.glyph</code> files →</a></nav> +<nav class="navigation"><a href="/glyph/book/getting_started/structure.html">← Document Structure</a> | <a + href="/glyph/book/index.html">Contents</a> | <a + href="/glyph/book/text_editing/glyph_files.html"><code>.glyph</code> files →</a></nav> - <p>Glyph stores configuration settings in the following <span class="caps">YAML</span> files:</p> +<p>Glyph stores configuration settings in the following <span class="caps">YAML</span> files:</p> <ol> - <li>Your <em>Project Configuration</em> is stored in the <code>config.yml</code> file, included in each Glyph Project.</li> - <li>Your <em>Global Configuration</em> is stored in a <code>.glyphrc</code> file in your <code>$HOME</code> (or <code>%HOMEPATH%</code> on Windows) directory (not created by default).</li> + <li>Your <em>Project Configuration</em> is stored in the <code>config.yml</code> file, included in each Glyph + Project.</li> + <li>Your <em>Global Configuration</em> is stored in a <code>.glyphrc</code> file in your <code>$HOME</code> (or + <code>%HOMEPATH%</code> on Windows) directory (not created by default).</li> <li>The <em>System Configuration</em> is stored in the source directory of Glyph itself.</li> </ol> <p>When compiling, Glyph loads all these configuration files and merges them according to the following rules:</p> <ul> - <li>A setting configured in the <em>Project Configuration</em> overrides the same setting in both Global and System configuration.</li> - <li>A setting configured in the <em>Global Configuration</em> overrides the same setting in the <em>System Configuration</em>.</li> + <li>A setting configured in the <em>Project Configuration</em> overrides the same setting in both Global and System + configuration.</li> + <li>A setting configured in the <em>Global Configuration</em> overrides the same setting in the <em>System + Configuration</em>.</li> </ul> -<p>Typically, you should use the <em>Project Configuration</em> for all project-specific settings and the <em>Global Configuration</em> for settings affecting all your projects (for example, you may want to set the <a href="/glyph/book/config/document.html#s_document_author"><code>document.author</code></a> setting in the Global Configuration instead of setting it in the Project Configuration of all your Glyph projects). The <em>System Configuration</em> is best left untouched.</p> -<p>Instead of editing your configuration settings directly, you can use the <a href="/glyph/book/ref_commands.html#c_config"><code>config</code></a> command, as follows:</p> +<p>Typically, you should use the <em>Project Configuration</em> for all project-specific settings and the <em>Global + Configuration</em> for settings affecting all your projects (for example, you may want to set the <a + href="/glyph/book/config/document.html#s_document_author"><code>document.author</code></a> setting in the Global + Configuration instead of setting it in the Project Configuration of all your Glyph projects). The <em>System + Configuration</em> is best left untouched.</p> +<p>Instead of editing your configuration settings directly, you can use the <a + href="/glyph/book/ref_commands.html#c_config"><code>config</code></a> command, as follows:</p> <p><code>glyph config</code> <em>setting</em> <em>[value]</em></p> -<p>If no <em>value</em> is specified, Glyph prints the value of the configuration setting, so typing <code>glyph config document.author</code> right after creating a project (assuming you didn’t set this in the Global Configuration) will print nothing, because this setting is blank by default.</p> +<p>If no <em>value</em> is specified, Glyph prints the value of the configuration setting, so typing + <code>glyph config document.author</code> right after creating a project (assuming you didn’t set this in the + Global Configuration) will print nothing, because this setting is blank by default.</p> <p>To change the value of a configuration setting, specify a value right after the setting, like this:</p> <p><code>glyph config document.author "John Smith"</code></p> <aside class="tip"> -<p><span class="note-title">Tip</span>It is also possible to change configuration settings inside your document, using the <a href="/glyph/book/macros/macros_core.html#m_config_"><code>config:</code></a> macro.</p> + <p><span class="note-title">Tip</span>It is also possible to change configuration settings inside your document, + using the <a href="/glyph/book/macros/macros_core.html#m_config_"><code>config:</code></a> macro.</p> </aside> -<p>In this way, the document author will be set to <em>John Smith</em> for the current project. To save this setting globally, add a <code>-g</code> option, like this:</p> +<p>In this way, the document author will be set to <em>John Smith</em> for the current project. To save this setting + globally, add a <code>-g</code> option, like this:</p> <p><code>glyph config -g document.author "John Smith"</code></p> <aside class="box"> -<div class="box-title">Regarding configuration values and data types…</div> -<p>Glyph attempts to “guess” the data type of a configuration value by evaluation (<code>Kernel#instance_eval</code>) if the value:</p> -<ul> - <li>is wrapped in quotes (<code>"</code> or <code>'</code>) → <code>String</code></li> - <li>starts with a colon (<code>:</code>) → <code>Symbol</code></li> - <li>is wrapped in square brackets (<code>[</code> and <code>]</code>) → <code>Array</code></li> - <li>is wrapped in curly brackets (<code>{</code> and <code>}</code>) → <code>Hash</code></li> - <li>is <em>true</em> or <em>false</em> → <code>Boolean</code></li> - <li>is <em>nil</em> → <code>NilClass</code></li> -</ul> -<p>Note that this guessing is far from being foolproof: If you type something like <em>{:test, 2}</em>, for example, you’ll get an error.</p> + <div class="box-title">Regarding configuration values and data types…</div> + <p>Glyph attempts to “guess” the data type of a configuration value by evaluation + (<code>Kernel#instance_eval</code>) if the value:</p> + <ul> + <li>is wrapped in quotes (<code>"</code> or <code>'</code>) → <code>String</code></li> + <li>starts with a colon (<code>:</code>) → <code>Symbol</code></li> + <li>is wrapped in square brackets (<code>[</code> and <code>]</code>) → <code>Array</code></li> + <li>is wrapped in curly brackets (<code>{</code> and <code>}</code>) → <code>Hash</code></li> + <li>is <em>true</em> or <em>false</em> → <code>Boolean</code></li> + <li>is <em>nil</em> → <code>NilClass</code></li> + </ul> + <p>Note that this guessing is far from being foolproof: If you type something like <em>{:test, 2}</em>, for example, + you’ll get an error.</p> </aside> -<p>There are plenty of configuration settings that can be modified, but most of them are best if left alone (and in the System Configuration file).</p> -<p>For a complete reference, see <a href="/glyph/book/document.html#cfg_ref">Configuration Reference</a>. For everyday use, you may just want to change the settings defined in the <a href="/glyph/book/config/document.html#cfg_document"><code>document.*</code></a> namespace.</p> -<nav class="navigation"><a href="/glyph/book/getting_started/structure.html">← Document Structure</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/text_editing/glyph_files.html"><code>.glyph</code> files →</a></nav> +<p>There are plenty of configuration settings that can be modified, but most of them are best if left alone (and in the + System Configuration file).</p> +<p>For a complete reference, see <a href="/glyph/book/config/document.html#cfg_ref">Configuration Reference</a>. For + everyday use, you may just want to change the settings defined in the <a + href="/glyph/book/config/document.html#cfg_document"><code>document.*</code></a> namespace.</p> +<nav class="navigation"><a href="/glyph/book/getting_started/structure.html">← Document Structure</a> | <a + href="/glyph/book/index.html">Contents</a> | <a + href="/glyph/book/text_editing/glyph_files.html"><code>.glyph</code> files →</a></nav>
@@ -2,35 +2,55 @@ -----
title: "Glyph – Introduction" content-type: page ----- -<nav class="navigation"> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/license.html">License →</a></nav> +<nav class="navigation"> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/license.html">License + →</a></nav> <section class="section"> -<p>Glyph is a <em>Rapid Document Authoring Framework</em>.</p> -<p>With Glyph, creating and maintaining any kind of document becomes as easy as… <em>programming</em>. Glyph enables you to minimize text duplication, focus on content rather than presentation, manage references seamlessly and automate tedious tasks through a simple but effective macro language, specifically geared towards customization and extensibility.</p> + <p>Glyph is a <em>Rapid Document Authoring Framework</em>.</p> + <p>With Glyph, creating and maintaining any kind of document becomes as easy as… <em>programming</em>. Glyph + enables you to minimize text duplication, focus on content rather than presentation, manage references + seamlessly and automate tedious tasks through a simple but effective macro language, specifically geared towards + customization and extensibility.</p> <section class="section"> -<header><h1 id="h_2" class="toc">Main Features</h1></header> -<section class="section"> -<header><h1 id="h_3" class="toc">Command Line Interface</h1></header> -<p>Glyph is 100% command line. Its interface resambles <a href="http://git-scm.com/">Git’s</a> for its simplicity and power (thanks to the <a href="http://github.com/davetron5000/gli">gli</a> gem). Here are some example commands:</p> -<ul> - <li><code>glyph init</code> — to initialize a new Glyph project in the current (empty) directory.</li> - <li><code>glyph add introduction.textile</code> — to create a new file called <em>introduction.textile</em>.</li> - <li><code>glyph compile</code> — to compile the current document into a single <span class="caps">HTML</span> file.</li> - <li><code>glyph compile --auto</code> — to keep recompiling the current document every time a file is changed.</li> - <li><code>glyph compile -f pdf</code> — to compile the current document into <span class="caps">HTML</span> and then transform it into <span class="caps">PDF</span>.</li> - <li><code>glyph compile readme.glyph</code> — to compile a <em>readme.glyph</em> located in the current directory into a single <span class="caps">HTML</span> file.</li> - <li><code>glyph outline -l 2</code> — Display the document outline, up to second-level headers.</li> - <li><code>glyph stats</code> — Display project statistics.</li> -</ul> + <header> + <h1 id="h_2" class="toc">Main Features</h1> + </header> + <section class="section"> + <header> + <h1 id="h_3" class="toc">Command Line Interface</h1> + </header> + <p>Glyph is 100% command line. Its interface resambles <a href="http://git-scm.com/">Git’s</a> for its + simplicity and power (thanks to the <a href="http://github.com/davetron5000/gli">gli</a> gem). Here are + some example commands:</p> + <ul> + <li><code>glyph init</code> — to initialize a new Glyph project in the current (empty) directory. + </li> + <li><code>glyph add introduction.textile</code> — to create a new file called + <em>introduction.textile</em>.</li> + <li><code>glyph compile</code> — to compile the current document into a single <span + class="caps">HTML</span> file.</li> + <li><code>glyph compile --auto</code> — to keep recompiling the current document every time a file + is changed.</li> + <li><code>glyph compile -f pdf</code> — to compile the current document into <span + class="caps">HTML</span> and then transform it into <span class="caps">PDF</span>.</li> + <li><code>glyph compile readme.glyph</code> — to compile a <em>readme.glyph</em> located in the + current directory into a single <span class="caps">HTML</span> file.</li> + <li><code>glyph outline -l 2</code> — Display the document outline, up to second-level headers. + </li> + <li><code>glyph stats</code> — Display project statistics.</li> + </ul> -</section> + </section> <section class="section"> -<header><h1 id="h_4" class="toc">Minimalist Syntax</h1></header> -<p>Glyph syntax rules can be explained using Glyph itself:</p> + <header> + <h1 id="h_4" class="toc">Minimalist Syntax</h1> + </header> + <p>Glyph syntax rules can be explained using Glyph itself:</p> <div class="CodeRay"> - <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>section[ + <div class="code"> + <pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span>section[ <span class="line-numbers"> <a href="#n2" name="n2">2</a></span> @title[Something about Glyph] <span class="line-numbers"> <a href="#n3" name="n3">3</a></span> txt[ <span class="line-numbers"> <a href="#n4" name="n4">4</a></span>You can use Glyph macros in conjunction@@ -49,12 +69,14 @@ <span class="line-numbers"><a href="#n16" name="n16">16</a></span>renderer like =>[http://www.princexml.com|Prince]
<span class="line-numbers"><a href="#n17" name="n17">17</a></span>or =>[http://code.google.com/p/wkhtmltopdf/|wkhtmltopdf]. <span class="line-numbers"><a href="#n18" name="n18">18</a></span> ] <span class="line-numbers"><a href="#n19" name="n19">19</a></span> ] -<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span>]</pre></div> -</div> +<span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span>]</pre> + </div> + </div> -<p>The Glyph code above corresponds to the following HTML code:</p> - <div class="CodeRay"> - <div class="code"><pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span><span class="tag"><div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">"</span><span class="content">section</span><span class="delimiter">"</span></span><span class="tag">></span> + <p>The Glyph code above corresponds to the following HTML code:</p> + <div class="CodeRay"> + <div class="code"> + <pre><span class="line-numbers"> <a href="#n1" name="n1">1</a></span><span class="tag"><div</span> <span class="attribute-name">class</span>=<span class="string"><span class="delimiter">"</span><span class="content">section</span><span class="delimiter">"</span></span><span class="tag">></span> <span class="line-numbers"> <a href="#n2" name="n2">2</a></span> <span class="tag"><h2</span> <span class="attribute-name">id</span>=<span class="string"><span class="delimiter">"</span><span class="content">h_10</span><span class="delimiter">"</span></span><span class="tag">></span>Something about Glyph<span class="tag"></h2></span> <span class="line-numbers"> <a href="#n3" name="n3">3</a></span> <span class="tag"><p></span> <span class="line-numbers"> <a href="#n4" name="n4">4</a></span> You can use Glyph macros in conjunction with@@ -75,78 +97,123 @@ <span class="line-numbers"><a href="#n18" name="n18">18</a></span> like <span class="tag"><a</span> <span class="attribute-name">href</span>=<span class="string"><span class="delimiter">"</span><span class="content">http://www.princexml.com</span><span class="delimiter">"</span></span><span class="tag">></span>Prince<span class="tag"></a></span>
<span class="line-numbers"><a href="#n19" name="n19">19</a></span> or <span class="tag"><a</span> <span class="attribute-name">href</span>=<span class="string"><span class="delimiter">"</span><span class="content">http://code.google.com/p/wkhtmltopdf/</span><span class="delimiter">"</span></span><span class="tag">></span>wkhtmltopdf<span class="tag"></a></span>. <span class="line-numbers"><strong><a href="#n20" name="n20">20</a></strong></span> <span class="tag"></p></span> <span class="line-numbers"><a href="#n21" name="n21">21</a></span> <span class="tag"></div></span> -<span class="line-numbers"><a href="#n22" name="n22">22</a></span><span class="tag"></div></span></pre></div> -</div> +<span class="line-numbers"><a href="#n22" name="n22">22</a></span><span class="tag"></div></span></pre> + </div> + </div> -</section> + </section> <section class="section"> -<header><h1 id="h_5" class="toc">Content Reuse</h1></header> -<p>Finding yourself repeating the same sentence over an over? Glyph allows you to create snippets. Within snippets. Within other snippets (and so on, for a long long time…) as long as you don’t define a snippet by defining itself, which would be kinda nasty (and Glyph would complain!):</p> + <header> + <h1 id="h_5" class="toc">Content Reuse</h1> + </header> + <p>Finding yourself repeating the same sentence over an over? Glyph allows you to create snippets. Within + snippets. Within other snippets (and so on, for a long long time…) as long as you don’t + define a snippet by defining itself, which would be kinda nasty (and Glyph would complain!):</p> <div class="CodeRay"> - <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>snippet:[entities|snippets and macros] + <div class="code"> + <pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span>snippet:[entities|snippets and macros] <span class="line-numbers"><a href="#n2" name="n2">2</a></span>snippet:[custom_definitions| <span class="line-numbers"><a href="#n3" name="n3">3</a></span> p[Glyph allows you to define your own &[entities].] <span class="line-numbers"><a href="#n4" name="n4">4</a></span>] -<span class="line-numbers"><a href="#n5" name="n5">5</a></span>&[custom_definitions]</pre></div> -</div> +<span class="line-numbers"><a href="#n5" name="n5">5</a></span>&[custom_definitions]</pre> + </div> + </div> - <p>...which results in:</p> + <p>...which results in:</p> <div class="CodeRay"> - <div class="code"><pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="tag"><p></span>Glyph allows you to define your own snippets and macros.<span class="tag"></p></span></pre></div> -</div> + <div class="code"> + <pre><span class="line-numbers"><a href="#n1" name="n1">1</a></span><span class="tag"><p></span>Glyph allows you to define your own snippets and macros.<span class="tag"></p></span></pre> + </div> + </div> - <p>If yourself dreaming about <em>parametric</em> snippets, just create your own macros (see the <a href="http://github.com/h3rald/glyph/blob/master/book/text/changelog.glyph">source</a> of Glyph’s changelog, just to have an idea).</p> + <p>If yourself dreaming about <em>parametric</em> snippets, just create your own macros (see the <a + href="http://github.com/h3rald/glyph/blob/master/book/text/changelog.glyph">source</a> of + Glyph’s changelog, just to have an idea).</p> -</section> + </section> <section class="section"> -<header><h1 id="h_6" class="toc">Automation of Common Tasks</h1></header> -<p>If you’re writing a book, you shouldn’t have to worry about pagination, headers, footers, table of contents, section numbering or similar. Glyph understands you, and will take care of everything for you (with a little help from CSS3, sometimes).</p> + <header> + <h1 id="h_6" class="toc">Automation of Common Tasks</h1> + </header> + <p>If you’re writing a book, you shouldn’t have to worry about pagination, headers, footers, + table of contents, section numbering or similar. Glyph understands you, and will take care of everything + for you (with a little help from CSS3, sometimes).</p> -</section> + </section> <section class="section"> -<header><h1 id="h_7" class="toc">Reference Validation</h1></header> -<p>Feel free to add plenty of links, snippets, bookmarks, … if Glyph doesn’t find something, it will definitely complain. Broken references are a thing on the past, and you don’t need to worry about it.</p> + <header> + <h1 id="h_7" class="toc">Reference Validation</h1> + </header> + <p>Feel free to add plenty of links, snippets, bookmarks, … if Glyph doesn’t find something, it + will definitely complain. Broken references are a thing on the past, and you don’t need to worry + about it.</p> -</section> + </section> <section class="section"> -<header><h1 id="h_8" class="toc">Extreme Extensibility</h1></header> -<ul> - <li>You miss a <code>!!!</code> macro to format really, <em>really</em> important things? Create it. In under 3 seconds, in Ruby or Glyph itself. And yes, you can use special characters, too.</li> - <li>You want your own, very special special <code>glyph create --everything</code> command to create all <em>you</em> need in a Glyph project? You can do it. Using your own Rake tasks, too.</li> - <li>You want Glyph to output <span class="caps">ODF</span> files? You can do it, and you’ll be able to run <code>glyph generate -f odf</code>. This would probably require a little more time, but it’s trivial, from a technical point of view.</li> -</ul> + <header> + <h1 id="h_8" class="toc">Extreme Extensibility</h1> + </header> + <ul> + <li>You miss a <code>!!!</code> macro to format really, <em>really</em> important things? Create it. In + under 3 seconds, in Ruby or Glyph itself. And yes, you can use special characters, too.</li> + <li>You want your own, very special special <code>glyph create --everything</code> command to create all + <em>you</em> need in a Glyph project? You can do it. Using your own Rake tasks, too.</li> + <li>You want Glyph to output <span class="caps">ODF</span> files? You can do it, and you’ll be + able to run <code>glyph generate -f odf</code>. This would probably require a little more time, but + it’s trivial, from a technical point of view.</li> + </ul> -</section> + </section> <section class="section"> -<header><h1 id="h_9" class="toc">Convention over Configuration</h1></header> -<p>Put your text files in <code>/text</code>, your images in <code>/images</code>, add custom macros in a <code>macro</code> folder within your <code>/lib</code> folder… you get the picture: Glyph has its special places.</p> -<p>Nonetheless, you also have 1 (<em>one</em>) configuration file to customize to your heart’s content (with smart defaults).</p> + <header> + <h1 id="h_9" class="toc">Convention over Configuration</h1> + </header> + <p>Put your text files in <code>/text</code>, your images in <code>/images</code>, add custom macros in a + <code>macro</code> folder within your <code>/lib</code> folder… you get the picture: Glyph has its + special places.</p> + <p>Nonetheless, you also have 1 (<em>one</em>) configuration file to customize to your heart’s content + (with smart defaults).</p> -</section> + </section> <section class="section"> -<header><h1 id="h_10" class="toc">Free and Open Source</h1></header> -<p>Glyph is 100% Open Source Software, developed using the Ruby Programming Language and licensed under the very permissive terms of the <a href="http://www.opensource.org/licenses/mit-license.php"><span class="caps">MIT</span> License</a>.</p> -<p>If you have Ruby installed, just run <code>gem install glyph</code>. That’s all it takes.</p> + <header> + <h1 id="h_10" class="toc">Free and Open Source</h1> + </header> + <p>Glyph is 100% Open Source Software, developed using the Ruby Programming Language and licensed under the + very permissive terms of the <a href="http://www.opensource.org/licenses/mit-license.php"><span + class="caps">MIT</span> License</a>.</p> + <p>If you have Ruby installed, just run <code>gem install glyph</code>. That’s all it takes.</p> -</section> + </section> -</section> + </section> <section class="section"> -<header><h1 id="h_11" class="toc">Resources</h1></header> -<ul> - <li>Home Page: <a href="http://www.h3rald.com/glyph/">http://www.h3rald.com/glyph/</a></li> - <li>Repository: <a href="http://www.github.com/h3rald/glyph/">http://www.github.com/h3rald/glyph/</a></li> - <li>Bug Tracking: <a href="http://www.github.com/h3rald/glyph/issues">http://www.github.com/h3rald/glyph/issues</a></li> - <li>Development Wiki <a href="http://wiki.github.com/h3rald/glyph">http://wiki.github.com/h3rald/glyph</a></li> - <li>RubyGem Download <a href="http://www.rubygems.org/gems/glyph">http://www.rubygems.org/gems/glyph</a></li> - <li>Book (<span class="caps">PDF</span>): <a href="http://github.com/downloads/h3rald/glyph/glyph.pdf">http://github.com/downloads/h3rald/glyph/glyph.pdf</a></li> - <li>Book (Web): <a href="http://www.h3rald.com/glyph/book/">http://www.h3rald.com/glyph/book/</a></li> - <li>Reference Documentation: <a href="http://rubydoc.info/gems/glyph/">http://rubydoc.info/gems/glyph/</a></li> - <li>User Group: <a href="http://groups.google.com/group/glyph-framework">http://groups.google.com/group/glyph-framework</a></li> -</ul> + <header> + <h1 id="h_11" class="toc">Resources</h1> + </header> + <ul> + <li>Home Page: <a href="/glyph/">/glyph/</a></li> + <li>Repository: <a href="http://www.github.com/h3rald/glyph/">http://www.github.com/h3rald/glyph/</a></li> + <li>Bug Tracking: <a + href="http://www.github.com/h3rald/glyph/issues">http://www.github.com/h3rald/glyph/issues</a></li> + <li>Development Wiki <a href="http://wiki.github.com/h3rald/glyph">http://wiki.github.com/h3rald/glyph</a> + </li> + <li>RubyGem Download <a href="http://www.rubygems.org/gems/glyph">http://www.rubygems.org/gems/glyph</a> + </li> + <li>Book (<span class="caps">PDF</span>): <a + href="http://github.com/downloads/h3rald/glyph/glyph.pdf">http://github.com/downloads/h3rald/glyph/glyph.pdf</a> + </li> + <li>Book (Web): <a href="/glyph/book/">/glyph/book/</a></li> + <li>Reference Documentation: <a href="http://rubydoc.info/gems/glyph/">http://rubydoc.info/gems/glyph/</a> + </li> + <li>User Group: <a + href="http://groups.google.com/group/glyph-framework">http://groups.google.com/group/glyph-framework</a> + </li> + </ul> -</section> + </section> </section> -<nav class="navigation"> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/license.html">License →</a></nav> +<nav class="navigation"> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/license.html">License + →</a></nav>
@@ -2,364 +2,430 @@ -----
title: "Glyph – Command Reference" content-type: page ----- -<nav class="navigation"><a href="/glyph/book/troubleshooting/errors_macro.html">← Macro Errors</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/macros/macros_core.html">Core Macros →</a></nav> -<p>Glyph’s command-line interface has been built using the <a href="http://github.com/davetron5000/gli">gli</a> (Git-like interface) gem. Therefore, Glyph commands are all written like this:</p> +<nav class="navigation"><a href="/glyph/book/troubleshooting/errors_macro.html">← Macro Errors</a> | <a + href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/macros/macros_core.html">Core Macros →</a> +</nav> +<p>Glyph’s command-line interface has been built using the <a href="http://github.com/davetron5000/gli">gli</a> + (Git-like interface) gem. Therefore, Glyph commands are all written like this:</p> <p><strong>glyph</strong> <em>global_options</em> <strong>command</strong> <em>options</em> <em>parameters</em></p> <p>Where:</p> <ul> - <li><em>global_options</em> and <em>options</em> are in the form: <code>-n</code> <em>value</em> or <code>--name=</code><em>value</em>, e.g. <code>-f pdf</code> or <code>--format=pdf</code></li> + <li><em>global_options</em> and <em>options</em> are in the form: <code>-n</code> <em>value</em> or + <code>--name=</code><em>value</em>, e.g. <code>-f pdf</code> or <code>--format=pdf</code> + </li> <li><em>parameters</em> are separated by whitespaces, and can be wrapped in quotes.</li> </ul> <section class="section"> -<header><h1 id="h_115" class="toc">Global Options</h1></header> -<section class="section"> -<header><h1 id="debug_switch" class="toc"><code>-d</code>, <code>--debug</code></h1></header> -<p>If specified, the command is executed in debug mode and additional diagnostic information is printed on the screen.</p> + <header> + <h1 id="h_115" class="toc">Global Options</h1> + </header> + <section class="section"> + <header> + <h1 id="debug_switch" class="toc"><code>-d</code>, <code>--debug</code></h1> + </header> + <p>If specified, the command is executed in debug mode and additional diagnostic information is printed on the + screen.</p> -</section> - <section class="section"> -<header><h1 id="help_switch" class="toc"><code>-h</code>, <code>--help</code></h1></header> -<p>Displays help on the program.</p> + </section> + <section class="section"> + <header> + <h1 id="help_switch" class="toc"><code>-h</code>, <code>--help</code></h1> + </header> + <p>Displays help on the program.</p> -</section> + </section> </section> <section class="section"> -<header><h1 id="c_add" class="toc"><code>add</code></h1></header> -<p>Creates a new text file in the <code>text/</code> folder.</p> - <p><strong>Example:</strong> <code>glyph add introduction.textile</code></p> - - <section class="section"> -<header><h1 id="h_119" class="notoc">Parameters</h1></header> -<table style="width:100%;"> + <header> + <h1 id="c_add" class="toc"><code>add</code></h1> + </header> + <p>Creates a new text file in the <code>text/</code> folder.</p> + <p><strong>Example:</strong> <code>glyph add introduction.textile</code></p> + + <section class="section"> + <header> + <h1 id="h_119" class="notoc">Parameters</h1> + </header> + <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th> <th>Description</th> </tr> -<tr> - <td><em>file_name</em></td> - <td>The name (or relative path) of the new file to be created.</td> - </tr> + <tr> + <td><em>file_name</em></td> + <td>The name (or relative path) of the new file to be created.</td> + </tr> </table> -</section> + </section> </section> <section class="section"> -<header><h1 id="c_compile" class="toc"><code>compile</code></h1></header> -<p>Compiles a Glyph document into an output file. If no options are specified, the <code>document.glyph</code> file is used as source to produce a standalone HTML file.</p> - <p><strong>Example:</strong> <code>glyph compile -f pdf</code></p> - - <section class="section"> -<header><h1 id="h_121" class="notoc">Parameters</h1></header> -<table style="width:100%;"> + <header> + <h1 id="c_compile" class="toc"><code>compile</code></h1> + </header> + <p>Compiles a Glyph document into an output file. If no options are specified, the <code>document.glyph</code> file + is used as source to produce a standalone HTML file.</p> + <p><strong>Example:</strong> <code>glyph compile -f pdf</code></p> + + <section class="section"> + <header> + <h1 id="h_121" class="notoc">Parameters</h1> + </header> + <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th> <th>Description</th> </tr> -<tr> - <td><em>source</em></td> - <td>The source glyph file to compile <em>(Optional)</em>.</td> - </tr> - - - <tr> - <td><em>destination</em></td> - <td>The destination file <em>(Optional)</em>.</td> - </tr> + <tr> + <td><em>source</em></td> + <td>The source glyph file to compile <em>(Optional)</em>.</td> + </tr> + + + <tr> + <td><em>destination</em></td> + <td>The destination file <em>(Optional)</em>.</td> + </tr> </table> -</section> - - - <section class="section"> -<header><h1 id="h_122" class="notoc">Options</h1></header> -<table style="width:100%;"> + </section> + + + <section class="section"> + <header> + <h1 id="h_122" class="notoc">Options</h1> + </header> + <table style="width:100%;"> <tr> <th style="width:30%">Option</th> <th>Description</th> </tr> -<tr> - <td><code>-s</code> (<code>--source</code>)</td> - <td> -The source file to compile. - <strong>Default Value:</strong> <code>document.glyph</code> - </td> - </tr> - - - <tr> - <td><code>-f</code> (<code>--format</code>)</td> - <td> -The format of the output file. - <strong>Default Value:</strong> <code>html</code> - *Possible Values:* @html, pdf@ - </td> - </tr> - - - <tr> - <td><code>-a</code> (<code>--auto</code>)</td> - <td> -If specified, enable <a href="/glyph/book/compiling/compiling.html#auto_regeneration">auto regeneration</a> (requires the <a href="http://rubygems.org/gems/directory_watcher">directory_watcher</a> gem to be installed). - </td> - </tr> + <tr> + <td><code>-s</code> (<code>--source</code>)</td> + <td> + The source file to compile. + <strong>Default Value:</strong> <code>document.glyph</code> + </td> + </tr> + + + <tr> + <td><code>-f</code> (<code>--format</code>)</td> + <td> + The format of the output file. + <strong>Default Value:</strong> <code>html</code> + *Possible Values:* @html, pdf@ + </td> + </tr> + + + <tr> + <td><code>-a</code> (<code>--auto</code>)</td> + <td> + If specified, enable <a href="/glyph/book/compiling/compiling.html#auto_regeneration">auto + regeneration</a> (requires the <a + href="http://rubygems.org/gems/directory_watcher">directory_watcher</a> gem to be installed). + </td> + </tr> </table> -</section> + </section> </section> <section class="section"> -<header><h1 id="c_config" class="toc"><code>config</code></h1></header> -Gets or sets a configuration setting in the project or global configuration file (<span class="fmi">for more information on <mark>configuration files</mark>, see <a href="/glyph/book/getting_started/configuration.html#cfg">Project Configuration</a></span>). - <section class="section"> -<header><h1 id="h_124" class="notoc">Examples</h1></header> -<p> -<code>glyph config document.filename</code> -</p> - <p> -<code>glyph config -g document.author "Fabio Cevasco"</code> -</p> + <header> + <h1 id="c_config" class="toc"><code>config</code></h1> + </header> + Gets or sets a configuration setting in the project or global configuration file (<span class="fmi">for more + information on <mark>configuration files</mark>, see <a + href="/glyph/book/getting_started/configuration.html#cfg">Project Configuration</a></span>). + <section class="section"> + <header> + <h1 id="h_124" class="notoc">Examples</h1> + </header> + <p> + <code>glyph config document.filename</code> + </p> + <p> + <code>glyph config -g document.author "Fabio Cevasco"</code> + </p> + + </section> -</section> - - <section class="section"> -<header><h1 id="h_125" class="notoc">Options</h1></header> -<table style="width:100%;"> + <section class="section"> + <header> + <h1 id="h_125" class="notoc">Options</h1> + </header> + <table style="width:100%;"> <tr> <th style="width:30%">Option</th> <th>Description</th> </tr> -<tr> - <td><code>-g</code> (<code>--global</code>)</td> - <td> -If specified, the global configuration file is processed instead of the project file. - <strong>Default Value:</strong> <code>false</code> - </td> - </tr> + <tr> + <td><code>-g</code> (<code>--global</code>)</td> + <td> + If specified, the global configuration file is processed instead of the project file. + <strong>Default Value:</strong> <code>false</code> + </td> + </tr> </table> -</section> - - - <section class="section"> -<header><h1 id="h_126" class="notoc">Parameters</h1></header> -<table style="width:100%;"> + </section> + + + <section class="section"> + <header> + <h1 id="h_126" class="notoc">Parameters</h1> + </header> + <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th> <th>Description</th> </tr> -<tr> - <td><em>setting</em></td> - <td>The name of a valid <a href="/glyph/book/document.html#cfg_ref">configuration setting</a>.</td> - </tr> - - - <tr> - <td><em>value</em></td> - <td>The new value of the configuration setting.</td> - </tr> + <tr> + <td><em>setting</em></td> + <td>The name of a valid <a href="/glyph/book/config/document.html#cfg_ref">configuration setting</a>. + </td> + </tr> + + + <tr> + <td><em>value</em></td> + <td>The new value of the configuration setting.</td> + </tr> </table> -</section> + </section> </section> <section class="section"> -<header><h1 id="c_help" class="toc"><code>help</code></h1></header> -Prints information about all Glyph commands or about one specific command. - <section class="section"> -<header><h1 id="h_128" class="notoc">Examples</h1></header> -<p> -<code>glyph help</code> -</p> - <p> -<code>glyph help compile</code> -</p> + <header> + <h1 id="c_help" class="toc"><code>help</code></h1> + </header> + Prints information about all Glyph commands or about one specific command. + <section class="section"> + <header> + <h1 id="h_128" class="notoc">Examples</h1> + </header> + <p> + <code>glyph help</code> + </p> + <p> + <code>glyph help compile</code> + </p> -</section> - - <section class="section"> -<header><h1 id="h_129" class="notoc">Parameters</h1></header> -<table style="width:100%;"> + </section> + + <section class="section"> + <header> + <h1 id="h_129" class="notoc">Parameters</h1> + </header> + <table style="width:100%;"> <tr> <th style="width:30%">Parameter</th> <th>Description</th> </tr> -<tr> - <td><em>command</em></td> - <td>A valid Glyph command.</td> - </tr> + <tr> + <td><em>command</em></td> + <td>A valid Glyph command.</td> + </tr> </table> -</section> + </section> </section> <section class="section"> -<header><h1 id="c_init" class="toc"><code>init</code></h1></header> -Creates a new Glyph project in the current directory (if empty). - <p><strong>Example:</strong> <code>glyph init</code></p> + <header> + <h1 id="c_init" class="toc"><code>init</code></h1> + </header> + Creates a new Glyph project in the current directory (if empty). + <p><strong>Example:</strong> <code>glyph init</code></p> </section> <section class="section"> -<header><h1 id="c_outline" class="toc"><code>outline</code></h1></header> -Display an outline of the current document. - - <section class="section"> -<header><h1 id="h_132" class="notoc">Options</h1></header> -<table style="width:100%;"> + <header> + <h1 id="c_outline" class="toc"><code>outline</code></h1> + </header> + Display an outline of the current document. + + <section class="section"> + <header> + <h1 id="h_132" class="notoc">Options</h1> + </header> + <table style="width:100%;"> <tr> <th style="width:30%">Option</th> <th>Description</th> </tr> -<tr> - <td><code>-l</code> (<code>--limit</code>)</td> - <td> -Only display headers until the specified level. - </td> - </tr> - - - <tr> - <td><code>-i</code> (<code>--ids</code>)</td> - <td> -Display section IDs. - </td> - </tr> - - - <tr> - <td><code>-f</code> (<code>--files</code>)</td> - <td> -Display file names. - </td> - </tr> - - - <tr> - <td><code>-t</code> (<code>--titles</code>)</td> - <td> -Display section titles. - </td> - </tr> + <tr> + <td><code>-l</code> (<code>--limit</code>)</td> + <td> + Only display headers until the specified level. + </td> + </tr> + + + <tr> + <td><code>-i</code> (<code>--ids</code>)</td> + <td> + Display section IDs. + </td> + </tr> + + + <tr> + <td><code>-f</code> (<code>--files</code>)</td> + <td> + Display file names. + </td> + </tr> + + + <tr> + <td><code>-t</code> (<code>--titles</code>)</td> + <td> + Display section titles. + </td> + </tr> </table> -</section> - - <section class="section"> -<header><h1 id="h_133" class="notoc">Examples</h1></header> -<p> -<code>glyph outline -it -l 1</code> -</p> - <p> -<code>glyph outline -l 2</code> -</p> - <p> -<code>glyph outline -f</code> -</p> + </section> + + <section class="section"> + <header> + <h1 id="h_133" class="notoc">Examples</h1> + </header> + <p> + <code>glyph outline -it -l 1</code> + </p> + <p> + <code>glyph outline -l 2</code> + </p> + <p> + <code>glyph outline -f</code> + </p> -</section> + </section> </section> <section class="section"> -<header><h1 id="c_stats" class="toc"><code>stats</code></h1></header> -<p>Displays project statistics (<span class="fmi">for more information on <mark>this command</mark>, see <a href="/glyph/book/document.html#stats">Document Statistics</a></span>).</p> - <section class="section"> -<header><h1 id="h_135" class="notoc">Examples</h1></header> -<p> -<code>glyph stats -m</code> -</p> - <p> -<code>glyph stats --link=h3rald.com</code> -</p> + <header> + <h1 id="c_stats" class="toc"><code>stats</code></h1> + </header> + <p>Displays project statistics (<span class="fmi">for more information on <mark>this command</mark>, see <a + href="/glyph/book/config/document.html#stats">Document Statistics</a></span>).</p> + <section class="section"> + <header> + <h1 id="h_135" class="notoc">Examples</h1> + </header> + <p> + <code>glyph stats -m</code> + </p> + <p> + <code>glyph stats --link=h3rald.com</code> + </p> -</section> - - <section class="section"> -<header><h1 id="h_136" class="notoc">Options</h1></header> -<table style="width:100%;"> + </section> + + <section class="section"> + <header> + <h1 id="h_136" class="notoc">Options</h1> + </header> + <table style="width:100%;"> <tr> <th style="width:30%">Option</th> <th>Description</th> </tr> -<tr> - <td><code>-b</code> (<code>--bookmarks</code>)</td> - <td> -If specified, general statistics about bookmarks are displayed (see <a href="/glyph/book/stats/bookmarks.html#stats_bookmarks">Bookmark Statistics</a>). - </td> - </tr> - - - <tr> - <td><code>--bookmark</code></td> - <td> -Display detailed statistics about the specified bookmark. - </td> - </tr> - - - <tr> - <td><code>-f</code> (<code>--files</code>)</td> - <td> -If specified, general statistics about project files are displayed. - </td> - </tr> - - - <tr> - <td><code>-l</code> (<code>--links</code>)</td> - <td> -If specified, general statistics about links are displayed (see <a href="/glyph/book/stats/links.html#stats_links">Link Statistics</a>). - </td> - </tr> - - - <tr> - <td><code>--link</code></td> - <td> -Display detailed statistics about all links whose target matches the specified regular expression. - </td> - </tr> - - - <tr> - <td><code>-m</code> (<code>--macros</code>)</td> - <td> -If specified, general statistics about macros are displayed (see <a href="/glyph/book/stats/macros.html#stats_macros">Macro Statistics</a>). - </td> - </tr> - - - <tr> - <td><code>--macro</code></td> - <td> -Display detailed statistics about the specified macro. - </td> - </tr> - - - <tr> - <td><code>-s</code> (<code>--snippets</code>)</td> - <td> -If specified, general statistics about snippets are displayed (see <a href="/glyph/book/stats/snippets.html#stats_snippets">Snippet Statistics</a>). - </td> - </tr> - - - <tr> - <td><code>--snippet</code></td> - <td> -Display detailed statistics about the specified snippet. - </td> - </tr> + <tr> + <td><code>-b</code> (<code>--bookmarks</code>)</td> + <td> + If specified, general statistics about bookmarks are displayed (see <a + href="/glyph/book/stats/bookmarks.html#stats_bookmarks">Bookmark Statistics</a>). + </td> + </tr> + + + <tr> + <td><code>--bookmark</code></td> + <td> + Display detailed statistics about the specified bookmark. + </td> + </tr> + + + <tr> + <td><code>-f</code> (<code>--files</code>)</td> + <td> + If specified, general statistics about project files are displayed. + </td> + </tr> + + + <tr> + <td><code>-l</code> (<code>--links</code>)</td> + <td> + If specified, general statistics about links are displayed (see <a + href="/glyph/book/stats/links.html#stats_links">Link Statistics</a>). + </td> + </tr> + + + <tr> + <td><code>--link</code></td> + <td> + Display detailed statistics about all links whose target matches the specified regular expression. + </td> + </tr> + + + <tr> + <td><code>-m</code> (<code>--macros</code>)</td> + <td> + If specified, general statistics about macros are displayed (see <a + href="/glyph/book/stats/macros.html#stats_macros">Macro Statistics</a>). + </td> + </tr> + + + <tr> + <td><code>--macro</code></td> + <td> + Display detailed statistics about the specified macro. + </td> + </tr> + + + <tr> + <td><code>-s</code> (<code>--snippets</code>)</td> + <td> + If specified, general statistics about snippets are displayed (see <a + href="/glyph/book/stats/snippets.html#stats_snippets">Snippet Statistics</a>). + </td> + </tr> + + + <tr> + <td><code>--snippet</code></td> + <td> + Display detailed statistics about the specified snippet. + </td> + </tr> </table> -</section> + </section> </section> <section class="section"> -<header><h1 id="c_todo" class="toc"><code>todo</code></h1></header> -Prints all the todo items saved using the <a href="/glyph/book/macros/macros_inline.html#m_todo"><code>todo</code></a> macro. - <p><strong>Example:</strong> <code>glyph todo</code></p> + <header> + <h1 id="c_todo" class="toc"><code>todo</code></h1> + </header> + Prints all the todo items saved using the <a + href="/glyph/book/macros/macros_inline.html#m_todo"><code>todo</code></a> macro. + <p><strong>Example:</strong> <code>glyph todo</code></p> </section> -<nav class="navigation"><a href="/glyph/book/troubleshooting/errors_macro.html">← Macro Errors</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/macros/macros_core.html">Core Macros →</a></nav> +<nav class="navigation"><a href="/glyph/book/troubleshooting/errors_macro.html">← Macro Errors</a> | <a + href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/macros/macros_core.html">Core Macros →</a> +</nav>
@@ -2,107 +2,127 @@ -----
title: "Glyph – Generic Errors" content-type: page ----- -<nav class="navigation"><a href="/glyph/book/extending/command.html">← Defining Custom Commands</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/troubleshooting/errors_parser.html">Parsing Errors →</a></nav> - - <table style="width:100%;"> - <tr> - <th style="width:30%">Error Message</th> - <th>Description</th> - </tr> - <tr> - <td>Invalid alias: macro '<em>macro_name</em>' already exists</td> - <td>The alias name supplied to the <code>macro_alias</code> method has already been used for another macro or alias.</td> - </tr> - - - <tr> - <td>Undefined macro '<em>macro_name</em>'</td> - <td>The document contains a macro that does not exist, i.e. it is not a standard or used-defined <a href="/glyph/book/document.html#macro_ref">Glyph macro or alias</a>.</td> - </tr> - - - <tr> - <td>No macro representation for '<em>macro_name</em>'</td> - <td>There is no valid macro representation for the specified macro.</td> - </tr> - - - <tr> - <td>An error occurred when generating _file-name_.pdf</td> - <td>Returned if Prince could not generate the PDF file or if Prince is not installed. Normally, Prince provides additional details on the specific error(s).</td> - </tr> - - - <tr> - <td>Glyph cannot generate PDF. Please specify a valid output.pdf.generator setting</td> - <td>Returned if the <a href="/glyph/book/config/output.html#s_output_pdf_generator"><code>output.pdf.generator</code></a> setting has not be set to a valid PDF renderer. Currently, the only supported values for this setting are <code>prince</code> and <code>wkhtmltopdf</code>.</td> - </tr> - - - <tr> - <td>Glyph cannot generate e-book. At present, output.<em>ebook_format</em>.generator can only be set to 'calibre'.</td> - <td>Returned if the output.<em>ebook_format</em>.generator setting has not be set to @calibre@.</td> - </tr> - - - <tr> - <td>The current directory is not a valid Glyph project</td> - <td>Returned if a glyph command was executed outside a valid glyph project directory.</td> - </tr> - - - <tr> - <td>Invalid snippet file</td> - <td>The <code>snippet.yml</code> file contains invalid data. Most likely, it does not evaluate to a Ruby <code>Hash</code>.</td> - </tr> - - - <tr> - <td>Directory '<em>directory_name</em>' is not empty</td> - <td>Returned when executing the <a href="/glyph/book/ref_commands.html#c_init"><code>init</code></a> command in a directory that is not empty.</td> - </tr> - - - <tr> - <td>File '<em>file_name</em>' already exists</td> - <td>Returned if the name of an existing file was specified as a parameter for the <a href="/glyph/book/ref_commands.html#c_add"><code>add</code></a> command.</td> - </tr> - - - <tr> - <td>Unknown macro '<em>macro_name</em>'</td> - <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the specified macro was not found.</td> - </tr> - - - <tr> - <td>Macro '<em>macro_name</em>' is not used in this document</td> - <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the specified macro is defined but unused.</td> - </tr> - - - <tr> - <td>Bookmark '<em>bookmark_name</em>' does not exist</td> - <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the specified bookmark does not exist.</td> - </tr> - - - <tr> - <td>No link matching /<em>regexp</em>/ was found</td> - <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the no link target matches the supplied regular expression.</td> - </tr> - - - <tr> - <td>Unknown snippet '<em>snippet_name</em>'</td> - <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the specified snippet was not found.</td> - </tr> - - - <tr> - <td>Snippet '<em>snippet_name</em>' is not used in this document</td> - <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the specified snippet is defined but unused.</td> - </tr> - </table> - -<nav class="navigation"><a href="/glyph/book/extending/command.html">← Defining Custom Commands</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/troubleshooting/errors_parser.html">Parsing Errors →</a></nav> +<nav class="navigation"><a href="/glyph/book/extending/command.html">← Defining Custom Commands</a> | <a + href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/troubleshooting/errors_parser.html">Parsing + Errors →</a></nav> + +<table style="width:100%;"> + <tr> + <th style="width:30%">Error Message</th> + <th>Description</th> + </tr> + <tr> + <td>Invalid alias: macro '<em>macro_name</em>' already exists</td> + <td>The alias name supplied to the <code>macro_alias</code> method has already been used for another macro or + alias.</td> + </tr> + + + <tr> + <td>Undefined macro '<em>macro_name</em>'</td> + <td>The document contains a macro that does not exist, i.e. it is not a standard or used-defined <a + href="/glyph/book/config/document.html#macro_ref">Glyph macro or alias</a>.</td> + </tr> + + + <tr> + <td>No macro representation for '<em>macro_name</em>'</td> + <td>There is no valid macro representation for the specified macro.</td> + </tr> + + + <tr> + <td>An error occurred when generating _file-name_.pdf</td> + <td>Returned if Prince could not generate the PDF file or if Prince is not installed. Normally, Prince provides + additional details on the specific error(s).</td> + </tr> + + + <tr> + <td>Glyph cannot generate PDF. Please specify a valid output.pdf.generator setting</td> + <td>Returned if the <a + href="/glyph/book/config/output.html#s_output_pdf_generator"><code>output.pdf.generator</code></a> + setting has not be set to a valid PDF renderer. Currently, the only supported values for this setting are + <code>prince</code> and <code>wkhtmltopdf</code>.</td> + </tr> + + + <tr> + <td>Glyph cannot generate e-book. At present, output.<em>ebook_format</em>.generator can only be set to + 'calibre'.</td> + <td>Returned if the output.<em>ebook_format</em>.generator setting has not be set to @calibre@.</td> + </tr> + + + <tr> + <td>The current directory is not a valid Glyph project</td> + <td>Returned if a glyph command was executed outside a valid glyph project directory.</td> + </tr> + + + <tr> + <td>Invalid snippet file</td> + <td>The <code>snippet.yml</code> file contains invalid data. Most likely, it does not evaluate to a Ruby + <code>Hash</code>.</td> + </tr> + + + <tr> + <td>Directory '<em>directory_name</em>' is not empty</td> + <td>Returned when executing the <a href="/glyph/book/ref_commands.html#c_init"><code>init</code></a> command in + a directory that is not empty.</td> + </tr> + + + <tr> + <td>File '<em>file_name</em>' already exists</td> + <td>Returned if the name of an existing file was specified as a parameter for the <a + href="/glyph/book/ref_commands.html#c_add"><code>add</code></a> command.</td> + </tr> + + + <tr> + <td>Unknown macro '<em>macro_name</em>'</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the + specified macro was not found.</td> + </tr> + + + <tr> + <td>Macro '<em>macro_name</em>' is not used in this document</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the + specified macro is defined but unused.</td> + </tr> + + + <tr> + <td>Bookmark '<em>bookmark_name</em>' does not exist</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the + specified bookmark does not exist.</td> + </tr> + + + <tr> + <td>No link matching /<em>regexp</em>/ was found</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the no + link target matches the supplied regular expression.</td> + </tr> + + + <tr> + <td>Unknown snippet '<em>snippet_name</em>'</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the + specified snippet was not found.</td> + </tr> + + + <tr> + <td>Snippet '<em>snippet_name</em>' is not used in this document</td> + <td>Returned by the <a href="/glyph/book/ref_commands.html#c_stats"><code>stats</code></a> command if the + specified snippet is defined but unused.</td> + </tr> +</table> + +<nav class="navigation"><a href="/glyph/book/extending/command.html">← Defining Custom Commands</a> | <a + href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/troubleshooting/errors_parser.html">Parsing + Errors →</a></nav>
@@ -2,185 +2,226 @@ -----
title: "Glyph – Macro Errors" content-type: page ----- -<nav class="navigation"><a href="/glyph/book/troubleshooting/errors_command.html">← Command Errors</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/ref_commands.html">Command Reference →</a></nav> - <p>The following errors are displayed in the form:</p> +<nav class="navigation"><a href="/glyph/book/troubleshooting/errors_command.html">← Command Errors</a> | <a + href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/ref_commands.html">Command Reference →</a> +</nav> +<p>The following errors are displayed in the form:</p> <p><em>message</em><br /> - source: <em>macro_source</em><br /> - path: <em>macro_path</em></p> + source: <em>macro_source</em><br /> + path: <em>macro_path</em></p> <p><em>macro_value</em></p> <p>Where:</p> <ul> <li><em>message</em> is the error message.</li> <li><em>macro_source</em> is the file or snippet where the error occurred.</li> - <li><em>macro_path</em> is the full path to the macro that returned the error, within the document syntax tree, e.g. <code>document/body/bodymatter/chapter/section/header/&</code> if the error occurrent in a snippet within the header of a section in the <code>bodymatter</code> part of the document.</li> - <li><em>macro_value</em> is the value of the macro (shown only if Glyph is running in <a href="/glyph/book/ref_commands.html#debug_switch">debug mode</a>).</li> + <li><em>macro_path</em> is the full path to the macro that returned the error, within the document syntax tree, e.g. + <code>document/body/bodymatter/chapter/section/header/&</code> if the error occurrent in a snippet within + the header of a section in the <code>bodymatter</code> part of the document.</li> + <li><em>macro_value</em> is the value of the macro (shown only if Glyph is running in <a + href="/glyph/book/ref_commands.html#debug_switch">debug mode</a>).</li> </ul> - - <table style="width:100%;"> - <tr> - <th style="width:30%">Error Message</th> - <th>Description</th> - </tr> - <tr> - <td>Macro '<em>name</em>' takes up to <em>x</em> parameter(s) (<em>y</em> given)</td> - <td>Returned if the macro was called with extra parameters.</td> - </tr> - - - <tr> - <td>Macro '<em>name</em>' takes at least <em>x</em> parameter(s) (<em>y</em> given)</td> - <td>Returned if the macro was called with fewer parameters than expected.</td> - </tr> - - - <tr> - <td>Macro '<em>name</em>' takes exactly <em>x</em> parameter(s) (<em>y</em> given)</td> - <td>Returned if the macro was called with a different number of parameters than.</td> - </tr> - - - <tr> - <td>Macro not available when compiling a single file.</td> - <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro if used in <a href="/glyph/book/compiling/lite_mode.html#lite_mode">lite mode</a>.</td> - </tr> - - - <tr> - <td>Filter macro '<em>extension</em>' not available</td> - <td>Returned by a filter macro if <a href="/glyph/book/config/options.html#s_options_filters_by_file_extension"><code>options.filters_by_file_extension</code></a> setting is set to @true@, but the extension was not recognized.</td> - </tr> - - - <tr> - <td>Invalid regular expression: <em>regexp</em></td> - <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_match"><code>match</code></a> macro if an invalid regular expression was supplied.</td> - </tr> - - - <tr> - <td>Macro '<em>name</em>' takes no parameters (<em>x</em> given)</td> - <td>Returned if the macro was called with parameters but none are requested.</td> - </tr> - - - <tr> - <td>No highlighter installed. Please run: gem install coderay</td> - <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro if no highlighters are installed.</td> - </tr> - - - <tr> - <td>CodeRay highlighter not installed. Please run: gem install coderay</td> - <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro if <a href="/glyph/book/config/filters.html#s_filters_highlighter"><code>filters.highlighter</code></a> setting is set to @coderay@ but <a href="http://coderay.rubychan.de/">Coderay</a> is not installed.</td> - </tr> - - - <tr> - <td>UltraViolet highlighter not installed. Please run: gem install ultraviolet</td> - <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> macro if <a href="/glyph/book/config/filters.html#s_filters_highlighter"><code>filters.highlighter</code></a> setting is set to @ultraviolet@ but <a href="http://ultraviolet.rubyforge.org/">Ultraviolet</a> is not installed.</td> - </tr> - - - <tr> - <td>Mutual Inclusion in parameter/attribute(<em>name</em>): '<em>value</em>'</td> - <td>Returned if a catch-22 situation occurs with macro inclusion, for example if the value of a snippet includes a reference to the same snippet.</td> - </tr> - - - <tr> - <td>Snippet '<em>snippet_id</em>' does not exist</td> - <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_snippet"><code>snippet</code></a> macro if an invalid snippet ID was supplied.</td> - </tr> - - - <tr> - <td>File '<em>file_name</em>' not found</td> - <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro if an invalid file was supplied.</td> - </tr> - - - <tr> - <td>Filter macro '<em>macro_name</em>' not found</td> - <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro if the <a href="/glyph/book/config/options.html#s_options_filters_by_file_extension"><code>options.filters_by_file_extension</code></a> setting is set to @true@ but the file extension of the included file is not recognized as a filter macro.</td> - </tr> - - - <tr> - <td>RedCloth gem not installed. Please run: gem install RedCloth</td> - <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_textile"><code>textile</code></a> macro if the RedCloth gem is not installed.</td> - </tr> - - - <tr> - <td>No MarkDown converter installed. Please run: gem install bluecloth</td> - <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_markdown"><code>markdown</code></a> macro if no valid Markdown converter gem is installed. Glyph checks for: BlueCloth, Maruku, Kramdown and RDiscount.</td> - </tr> - - - <tr> - <td>Image/Figure not found</td> - <td>Retured by the <a href="/glyph/book/macros/macros_block.html#m_image"><code>image</code></a> macro or the <a href="/glyph/book/macros/macros_block.html#m_figure"><code>figure</code></a> macro respectively, if the specified image file could not be found within the <code>images/</code> folder.</td> - </tr> - - - <tr> - <td>Bookmark '<em>bookmark_name</em>' already exists</td> - <td>Returned by the <a href="/glyph/book/macros/macros_inline.html#m_anchor"><code>anchor</code></a> macro or by the <a href="/glyph/book/macros/macros_structure.html#m_section"><code>section</code></a> macro if the anchor ID supplied as attribute has already been used in the document.</td> - </tr> - - - <tr> - <td>Bookmark '<em>bookmark_name</em>' already exists</td> - <td>Returned by the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro if the anchor ID supplied as parameter has not been used in the document.</td> - </tr> - - - <tr> - <td>Stylesheet '<em>file_name</em>' not found</td> - <td>Returned by the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro if the <code>.css</code> or <code>.sass</code> file supplied as parameter was not found in the <code>styles/</code> directory.</td> - </tr> - - - <tr> - <td>Haml is not installed. Please run: gem install haml</td> - <td>Returned by the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro if a <code>.sass</code> file was passed as parameter but the Haml gem is not installed.</td> - </tr> - - - <tr> - <td>Invalid XML element: '<em>element_name</em>'</td> - <td>An invalid XML element name was supplied to the <code>|xml|</code> system macro (see <a href="/glyph/book/document.html#other_elements">Other HTML Elements</a>).</td> - </tr> - - - <tr> - <td>Invalid XML element: '<em>element_name</em>'</td> - <td>An invalid XML attribute name was supplied to the <code>|xml|</code> system macro (see <a href="/glyph/book/document.html#other_elements">Other HTML Elements</a>).</td> - </tr> - - - <tr> - <td>Macro '<em>macro_name</em>' cannot be used in safe mode</td> - <td>Returned if a forbidden macro was used in safe mode (see <a href="/glyph/book/compiling/programmatic_usage.html#modes">Modes</a>).</td> - </tr> - - - <tr> - <td>Cannot reset 'system.<em>setting_name</em>' setting (system use only).</td> - <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_config_"><code>config:</code></a> when attempting to override a setting in the <code>system.*</code> namespace.</td> - </tr> - - - <tr> - <td>Macro '<em>macro_a</em>' must be within a '<em>macro_b</em>' macro</td> - <td>Returned if a macro was used in the wrong place.</td> - </tr> - - - <tr> - <td>Macro '<em>macro_a</em>' must not be within a '<em>macro_b</em>' macro</td> - <td>Returned if a macro was used in the wrong place.</td> - </tr> - </table> - -<nav class="navigation"><a href="/glyph/book/troubleshooting/errors_command.html">← Command Errors</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/ref_commands.html">Command Reference →</a></nav> + +<table style="width:100%;"> + <tr> + <th style="width:30%">Error Message</th> + <th>Description</th> + </tr> + <tr> + <td>Macro '<em>name</em>' takes up to <em>x</em> parameter(s) (<em>y</em> given)</td> + <td>Returned if the macro was called with extra parameters.</td> + </tr> + + + <tr> + <td>Macro '<em>name</em>' takes at least <em>x</em> parameter(s) (<em>y</em> given)</td> + <td>Returned if the macro was called with fewer parameters than expected.</td> + </tr> + + + <tr> + <td>Macro '<em>name</em>' takes exactly <em>x</em> parameter(s) (<em>y</em> given)</td> + <td>Returned if the macro was called with a different number of parameters than.</td> + </tr> + + + <tr> + <td>Macro not available when compiling a single file.</td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro if + used in <a href="/glyph/book/compiling/lite_mode.html#lite_mode">lite mode</a>.</td> + </tr> + + + <tr> + <td>Filter macro '<em>extension</em>' not available</td> + <td>Returned by a filter macro if <a + href="/glyph/book/config/options.html#s_options_filters_by_file_extension"><code>options.filters_by_file_extension</code></a> + setting is set to @true@, but the extension was not recognized.</td> + </tr> + + + <tr> + <td>Invalid regular expression: <em>regexp</em></td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_match"><code>match</code></a> macro if an + invalid regular expression was supplied.</td> + </tr> + + + <tr> + <td>Macro '<em>name</em>' takes no parameters (<em>x</em> given)</td> + <td>Returned if the macro was called with parameters but none are requested.</td> + </tr> + + + <tr> + <td>No highlighter installed. Please run: gem install coderay</td> + <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> + macro if no highlighters are installed.</td> + </tr> + + + <tr> + <td>CodeRay highlighter not installed. Please run: gem install coderay</td> + <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> + macro if <a + href="/glyph/book/config/filters.html#s_filters_highlighter"><code>filters.highlighter</code></a> + setting is set to @coderay@ but <a href="http://coderay.rubychan.de/">Coderay</a> is not installed.</td> + </tr> + + + <tr> + <td>UltraViolet highlighter not installed. Please run: gem install ultraviolet</td> + <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_highlight"><code>highlight</code></a> + macro if <a + href="/glyph/book/config/filters.html#s_filters_highlighter"><code>filters.highlighter</code></a> + setting is set to @ultraviolet@ but <a href="http://ultraviolet.rubyforge.org/">Ultraviolet</a> is not + installed.</td> + </tr> + + + <tr> + <td>Mutual Inclusion in parameter/attribute(<em>name</em>): '<em>value</em>'</td> + <td>Returned if a catch-22 situation occurs with macro inclusion, for example if the value of a snippet includes + a reference to the same snippet.</td> + </tr> + + + <tr> + <td>Snippet '<em>snippet_id</em>' does not exist</td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_snippet"><code>snippet</code></a> macro if an + invalid snippet ID was supplied.</td> + </tr> + + + <tr> + <td>File '<em>file_name</em>' not found</td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro if an + invalid file was supplied.</td> + </tr> + + + <tr> + <td>Filter macro '<em>macro_name</em>' not found</td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro if + the <a + href="/glyph/book/config/options.html#s_options_filters_by_file_extension"><code>options.filters_by_file_extension</code></a> + setting is set to @true@ but the file extension of the included file is not recognized as a filter macro. + </td> + </tr> + + + <tr> + <td>RedCloth gem not installed. Please run: gem install RedCloth</td> + <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_textile"><code>textile</code></a> macro if + the RedCloth gem is not installed.</td> + </tr> + + + <tr> + <td>No MarkDown converter installed. Please run: gem install bluecloth</td> + <td>Returned by the <a href="/glyph/book/macros/macros_filters.html#m_markdown"><code>markdown</code></a> macro + if no valid Markdown converter gem is installed. Glyph checks for: BlueCloth, Maruku, Kramdown and + RDiscount.</td> + </tr> + + + <tr> + <td>Image/Figure not found</td> + <td>Retured by the <a href="/glyph/book/macros/macros_block.html#m_image"><code>image</code></a> macro or the <a + href="/glyph/book/macros/macros_block.html#m_figure"><code>figure</code></a> macro respectively, if the + specified image file could not be found within the <code>images/</code> folder.</td> + </tr> + + + <tr> + <td>Bookmark '<em>bookmark_name</em>' already exists</td> + <td>Returned by the <a href="/glyph/book/macros/macros_inline.html#m_anchor"><code>anchor</code></a> macro or by + the <a href="/glyph/book/macros/macros_structure.html#m_section"><code>section</code></a> macro if the + anchor ID supplied as attribute has already been used in the document.</td> + </tr> + + + <tr> + <td>Bookmark '<em>bookmark_name</em>' already exists</td> + <td>Returned by the <a href="/glyph/book/macros/macros_inline.html#m_link"><code>link</code></a> macro if the + anchor ID supplied as parameter has not been used in the document.</td> + </tr> + + + <tr> + <td>Stylesheet '<em>file_name</em>' not found</td> + <td>Returned by the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro if + the <code>.css</code> or <code>.sass</code> file supplied as parameter was not found in the + <code>styles/</code> directory.</td> + </tr> + + + <tr> + <td>Haml is not installed. Please run: gem install haml</td> + <td>Returned by the <a href="/glyph/book/macros/macros_structure.html#m_style"><code>style</code></a> macro if a + <code>.sass</code> file was passed as parameter but the Haml gem is not installed.</td> + </tr> + + + <tr> + <td>Invalid XML element: '<em>element_name</em>'</td> + <td>An invalid XML element name was supplied to the <code>|xml|</code> system macro (see <a + href="/glyph/book/config/document.html#other_elements">Other HTML Elements</a>).</td> + </tr> + + + <tr> + <td>Invalid XML element: '<em>element_name</em>'</td> + <td>An invalid XML attribute name was supplied to the <code>|xml|</code> system macro (see <a + href="/glyph/book/config/document.html#other_elements">Other HTML Elements</a>).</td> + </tr> + + + <tr> + <td>Macro '<em>macro_name</em>' cannot be used in safe mode</td> + <td>Returned if a forbidden macro was used in safe mode (see <a + href="/glyph/book/compiling/programmatic_usage.html#modes">Modes</a>).</td> + </tr> + + + <tr> + <td>Cannot reset 'system.<em>setting_name</em>' setting (system use only).</td> + <td>Returned by the <a href="/glyph/book/macros/macros_core.html#m_config_"><code>config:</code></a> when + attempting to override a setting in the <code>system.*</code> namespace.</td> + </tr> + + + <tr> + <td>Macro '<em>macro_a</em>' must be within a '<em>macro_b</em>' macro</td> + <td>Returned if a macro was used in the wrong place.</td> + </tr> + + + <tr> + <td>Macro '<em>macro_a</em>' must not be within a '<em>macro_b</em>' macro</td> + <td>Returned if a macro was used in the wrong place.</td> + </tr> +</table> + +<nav class="navigation"><a href="/glyph/book/troubleshooting/errors_command.html">← Command Errors</a> | <a + href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/ref_commands.html">Command Reference →</a> +</nav>
@@ -18,12 +18,12 @@ *HastySite* is a static-site generator written in [Nim](https://nim-lang.org). Unlike most static site generators, it is only comprised of a single file -- the **hastysite** executable.
It provides: -* Built-in rich markdown support via [HastyScribe](https://h3rald.com/hastyscribe). +* Built-in rich markdown support via [HastyScribe](/hastyscribe). * Built-in [mustache](https://mustache.github.io/) support for page templates. * Limited support for standard [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables). * Fully configurable content and asset processing pipeline, using the [min](https://min-lang.org) programming language. * Custom script definition, using the [min](https://min-lang.org) programming language. -* Default stylesheet and fonts from [HastyScribe](https://h3rald.com/hastyscribe). +* Default stylesheet and fonts from [HastyScribe](/hastyscribe). * Default scripts and rules to get started quickly. * All packed in a single executable file, with no dependencies, available for the most common desktop platforms.
@@ -15,7 +15,7 @@ -----
{{n -> *nifty*}} is a simple, self-contained program that can be used as a bare-bones, decentralized (pseudo) package manager and script runner. -It was born out of the necessity of building {{nim -> [Nim](https://nim-lang.org)}} programs with several dependencies like [min](https://h3rald.com/min) or [hastysite](https://h3rald.com/hastysite) on machines with low memory (i.e. a VPS running x86 Linux with 500MB of RAM). The main problem was that on such low-end machine it [may not even be possible](https://github.com/nim-lang/nimble/issues/278) to compile the [Nimble](https://github.com/nim-lang/nimble) package manager, because apparently it requires more RAM to compile than Nim itself. +It was born out of the necessity of building {{nim -> [Nim](https://nim-lang.org)}} programs with several dependencies like [min](/min) or [hastysite](/hastysite) on machines with low memory (i.e. a VPS running x86 Linux with 500MB of RAM). The main problem was that on such low-end machine it [may not even be possible](https://github.com/nim-lang/nimble/issues/278) to compile the [Nimble](https://github.com/nim-lang/nimble) package manager, because apparently it requires more RAM to compile than Nim itself. Nimble offers a lot of features that *proper* package managers do, like dependency management, package creation and publishing, support for semantic versioning, etc. while {{n}} does not. Hence {{n}} is only a _pseudo-_package manager and script runner, but it could be useful in certain situations nonetheless.
@@ -13,7 +13,7 @@ version: 1.0.0
docs: /pls/Pls_UserGuide.htm ----- -_pls_ is a simple, general-purpose task runner that aims at making common tasks easier to manage and execute. It was inspired by some of the functionalities provided by the [nifty](https://h3rald.com/nifty) package manager, only without the package manager part. +_pls_ is a simple, general-purpose task runner that aims at making common tasks easier to manage and execute. It was inspired by some of the functionalities provided by the [nifty](/nifty) package manager, only without the package manager part. ### Main Features
@@ -6,13 +6,18 @@ github: ruby-compendium
inactive: true home: /ruby-compendium/ docs: /ruby-compendium/book/ -summary: "A free book aiming to help beginners learn about Ruby. It doesn’t focus on learning the language, but rather on its vast ecosystem and freely available resources." +summary: "A free book aiming to help beginners learn about Ruby, focusing on its vast ecosystem and resources." version: 0.2.0 ----- -<p>This book was written by Fabio Cevasco and it is licensed under a <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</p> -<p>This book was authored using <a href="http://www.h3rald.com/glyph">Glyph</a> and the <span class="caps">PDF</span> version was produced with <a href="http://www.princexml.org">Prince <span class="caps">XML</span></a>.</p> -<p>The Ruby logo is copyright © 2006, Yukihiro Matsumoto, and used under the terms of the <a href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.</p> +<p>This book was written by Fabio Cevasco and it is licensed under a <a + href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported + License</a>.</p> +<p>This book was authored using <a href="/glyph">Glyph</a> and the <span class="caps">PDF</span> version was produced + with <a href="http://www.princexml.org">Prince <span class="caps">XML</span></a>.</p> +<p>The Ruby logo is copyright © 2006, Yukihiro Matsumoto, and used under the terms of the <a + href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>. +</p> <p>Special thanks to the following individuals who contributed to the project, in some ways:</p> <ul> <li><a href="http://blog.dio.jp/">Akira Matsuda</a></li>@@ -22,9 +27,7 @@
<h3>Latest Updates</h3> -<ul><li><a href="/articles/ruby-compendium-020/">Ruby Compendium v0.2.0 released</a></li> - <li><a href="/articles/introducing-ruby-compendium/">Introducing the Ruby Compendium</a></li> +<ul> + <li><a href="/articles/ruby-compendium-020/">Ruby Compendium v0.2.0 released</a></li> + <li><a href="/articles/introducing-ruby-compendium/">Introducing the Ruby Compendium</a></li> </ul> - - -
@@ -2,351 +2,540 @@ -----
title: "Ruby Compendium – What you can use for..." content-type: page ----- -<nav class="navigation"><a href="/ruby-compendium/book/gems.html">← Ruby Gems</a> | <a href="/ruby-compendium/book/index.html">Contents</a> | <a href="/ruby-compendium/book/resources.html">Resources →</a></nav> -<p>You could spend hours on the RubyGems web site to find what you’re looking for sometimes. Not because you can’t find it, but because often there are too many alternative libraries that overlap in terms of functionalities offered.</p> -<p>A site to check when you don’t know much of what has been done in a particular domain is <a href="http://ruby-toolbox.com/">The Ruby Toolbox</a>, which organizes quite a lot of gems into <a href="http://ruby-toolbox.com/categories.html">categories</a>. This section is somewhat similar, but it focuses on just a few common tasks and a small set of hand-picked gems.</p> +<nav class="navigation"><a href="/ruby-compendium/book/gems.html">← Ruby Gems</a> | <a + href="/ruby-compendium/book/index.html">Contents</a> | <a href="/ruby-compendium/book/resources.html">Resources + →</a></nav> +<p>You could spend hours on the RubyGems web site to find what you’re looking for sometimes. Not because you + can’t find it, but because often there are too many alternative libraries that overlap in terms of + functionalities offered.</p> +<p>A site to check when you don’t know much of what has been done in a particular domain is <a + href="http://ruby-toolbox.com/">The Ruby Toolbox</a>, which organizes quite a lot of gems into <a + href="http://ruby-toolbox.com/categories.html">categories</a>. This section is somewhat similar, but it focuses + on just a few common tasks and a small set of hand-picked gems.</p> <section class="section"> -<header><h1 id="h_18" class="toc">Command Line Applications</h1></header> -<p><strong>cmdparse</strong> <blockquote>“cmdparse provides classes for parsing commands on the command line; command line options are parsed using optparse or any other option parser implementation.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://cmdparse.rubyforge.org/">http://cmdparse.rubyforge.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/cmdparse">http://www.rubygems.org/gems/cmdparse</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/cmdparse">http://www.rubydoc.info/gems/cmdparse</a></li> -</ul> - - <p><strong>gli</strong> <blockquote>“An application and <span class="caps">API</span> for describing command line interfaces that can be used to quickly create a shell for executing command-line tasks.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://davetron5000.github.com/gli">http://davetron5000.github.com/gli</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/gli">http://www.rubygems.org/gems/gli</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/gli">http://www.rubydoc.info/gems/gli</a></li> -</ul> - - <p><strong>highline</strong> <blockquote>“A high-level IO library that provides validation, type conversion, and more for command-line interfaces. HighLine also includes a complete menu system that can crank out anything from simple list selection to complete shells with just minutes of work.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://highline.rubyforge.org/">http://highline.rubyforge.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/highline">http://www.rubygems.org/gems/highline</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/highline">http://www.rubydoc.info/gems/highline</a></li> -</ul> - - <p><strong>hirb</strong> <blockquote>“A mini view framework for console/irb that’s easy to use, even while under its influence. Console goodies include a no-wrap table, auto-pager, tree and menu”</blockquote></p> -<ul> - <li>Web Page: <a href="https://github.com/cldwalker/hirb">https://github.com/cldwalker/hirb</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/hirb">http://www.rubygems.org/gems/hirb</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/hirb">http://www.rubydoc.info/gems/hirb</a></li> -</ul> + <header> + <h1 id="h_18" class="toc">Command Line Applications</h1> + </header> + <p><strong>cmdparse</strong> + <blockquote>“cmdparse provides classes for parsing commands on the command line; command line options are + parsed using optparse or any other option parser implementation.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://cmdparse.rubyforge.org/">http://cmdparse.rubyforge.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/cmdparse">http://www.rubygems.org/gems/cmdparse</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/cmdparse">http://www.rubydoc.info/gems/cmdparse</a> + </li> + </ul> + + <p><strong>gli</strong> + <blockquote>“An application and <span class="caps">API</span> for describing command line interfaces that can + be used to quickly create a shell for executing command-line tasks.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://davetron5000.github.com/gli">http://davetron5000.github.com/gli</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/gli">http://www.rubygems.org/gems/gli</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/gli">http://www.rubydoc.info/gems/gli</a></li> + </ul> + + <p><strong>highline</strong> + <blockquote>“A high-level IO library that provides validation, type conversion, and more for command-line + interfaces. HighLine also includes a complete menu system that can crank out anything from simple list selection + to complete shells with just minutes of work.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://highline.rubyforge.org/">http://highline.rubyforge.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/highline">http://www.rubygems.org/gems/highline</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/highline">http://www.rubydoc.info/gems/highline</a> + </li> + </ul> + + <p><strong>hirb</strong> + <blockquote>“A mini view framework for console/irb that’s easy to use, even while under its influence. + Console goodies include a no-wrap table, auto-pager, tree and menu”</blockquote> + </p> + <ul> + <li>Web Page: <a href="https://github.com/cldwalker/hirb">https://github.com/cldwalker/hirb</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/hirb">http://www.rubygems.org/gems/hirb</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/hirb">http://www.rubydoc.info/gems/hirb</a></li> + </ul> </section> <section class="section"> -<header><h1 id="h_19" class="toc">Documentation</h1></header> -<p><strong>glyph</strong> <blockquote>“Glyph is a framework for structured document authoring.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://www.h3rald.com/glyph/">http://www.h3rald.com/glyph/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/glyph">http://www.rubygems.org/gems/glyph</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/glyph">http://www.rubydoc.info/gems/glyph</a></li> -</ul> - - <p><strong>rdoc</strong> <blockquote>“RDoc produces <span class="caps">HTML</span> and online documentation for Ruby projects. RDoc includes the rdoc and ri tools for generating and displaying online documentation.”</blockquote></p> -<ul> - <li>Web Page: <a href="https://github.com/rdoc/rdoc/">https://github.com/rdoc/rdoc/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/rdoc">http://www.rubygems.org/gems/rdoc</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/rdoc">http://www.rubydoc.info/gems/rdoc</a></li> -</ul> - - <p><strong>yard</strong> <blockquote>“<span class="caps">YARD</span> is a documentation generation tool for the Ruby programming language. It enables the user to generate consistent, usable documentation that can be exported to a number of formats very easily, and also supports extending for custom Ruby constructs such as custom class level definitions.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://yardoc.org/">http://yardoc.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/yard">http://www.rubygems.org/gems/yard</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/yard">http://www.rubydoc.info/gems/yard</a></li> -</ul> + <header> + <h1 id="h_19" class="toc">Documentation</h1> + </header> + <p><strong>glyph</strong> + <blockquote>“Glyph is a framework for structured document authoring.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="/glyph/">/glyph/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/glyph">http://www.rubygems.org/gems/glyph</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/glyph">http://www.rubydoc.info/gems/glyph</a></li> + </ul> + + <p><strong>rdoc</strong> + <blockquote>“RDoc produces <span class="caps">HTML</span> and online documentation for Ruby projects. RDoc + includes the rdoc and ri tools for generating and displaying online documentation.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="https://github.com/rdoc/rdoc/">https://github.com/rdoc/rdoc/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/rdoc">http://www.rubygems.org/gems/rdoc</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/rdoc">http://www.rubydoc.info/gems/rdoc</a></li> + </ul> + + <p><strong>yard</strong> + <blockquote>“<span class="caps">YARD</span> is a documentation generation tool for the Ruby programming + language. It enables the user to generate consistent, usable documentation that can be exported to a number of + formats very easily, and also supports extending for custom Ruby constructs such as custom class level + definitions.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://yardoc.org/">http://yardoc.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/yard">http://www.rubygems.org/gems/yard</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/yard">http://www.rubydoc.info/gems/yard</a></li> + </ul> </section> <section class="section"> -<header><h1 id="h_20" class="toc">Gem Management</h1></header> -<p><strong>bundler</strong> <blockquote>“Bundler manages an application’s dependencies through its entire life, across many machines, systematically and repeatably.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://gembundler.com/">http://gembundler.com/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/bundler">http://www.rubygems.org/gems/bundler</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/bundler">http://www.rubydoc.info/gems/bundler</a></li> -</ul> - - <p><strong>jeweler</strong> <blockquote>“Simple and opinionated helper for creating Rubygem projects on GitHub”</blockquote></p> -<ul> - <li>Web Page: <a href="http://github.com/technicalpickles/jeweler">http://github.com/technicalpickles/jeweler</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/jeweler">http://www.rubygems.org/gems/jeweler</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/jeweler">http://www.rubydoc.info/gems/jeweler</a></li> -</ul> - - <p><strong>bones</strong> <blockquote>“Mr Bones is a handy tool that creates new projects from a code skeleton.”</blockquote></p> -<ul> - <li>Web Page: <a href="https://github.com/TwP/bones">https://github.com/TwP/bones</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/bones">http://www.rubygems.org/gems/bones</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/bones">http://www.rubydoc.info/gems/bones</a></li> -</ul> + <header> + <h1 id="h_20" class="toc">Gem Management</h1> + </header> + <p><strong>bundler</strong> + <blockquote>“Bundler manages an application’s dependencies through its entire life, across many + machines, systematically and repeatably.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://gembundler.com/">http://gembundler.com/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/bundler">http://www.rubygems.org/gems/bundler</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/bundler">http://www.rubydoc.info/gems/bundler</a></li> + </ul> + + <p><strong>jeweler</strong> + <blockquote>“Simple and opinionated helper for creating Rubygem projects on GitHub”</blockquote> + </p> + <ul> + <li>Web Page: <a + href="http://github.com/technicalpickles/jeweler">http://github.com/technicalpickles/jeweler</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/jeweler">http://www.rubygems.org/gems/jeweler</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/jeweler">http://www.rubydoc.info/gems/jeweler</a></li> + </ul> + + <p><strong>bones</strong> + <blockquote>“Mr Bones is a handy tool that creates new projects from a code skeleton.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="https://github.com/TwP/bones">https://github.com/TwP/bones</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/bones">http://www.rubygems.org/gems/bones</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/bones">http://www.rubydoc.info/gems/bones</a></li> + </ul> </section> <section class="section"> -<header><h1 id="h_21" class="toc">GUI Programming</h1></header> -<p><strong>bowline</strong> <blockquote>“Ruby/JS <span class="caps">GUI</span> framework”</blockquote></p> -<ul> - <li>Web Page: <a href="http://bowlineapp.com/">http://bowlineapp.com/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/bowline">http://www.rubygems.org/gems/bowline</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/bowline">http://www.rubydoc.info/gems/bowline</a></li> -</ul> - - <p><strong>fxruby</strong> <blockquote>“FXRuby is the Ruby binding to the <span class="caps">FOX</span> <span class="caps">GUI</span> toolkit”</blockquote></p> -<ul> - <li>Web Page: <a href="http://www.fxruby.org/">http://www.fxruby.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/fxruby">http://www.rubygems.org/gems/fxruby</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/fxruby">http://www.rubydoc.info/gems/fxruby</a></li> -</ul> - - <p><strong>wxruby</strong> <blockquote>“wxRuby allows the creation of graphical user interface (<span class="caps">GUI</span>) applications via the wxWidgets library. wxRuby provides native-style <span class="caps">GUI</span> windows, dialogs and controls on platforms including Windows, OS X and Linux.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://wxruby.org/">http://wxruby.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/wxruby">http://www.rubygems.org/gems/wxruby</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/wxruby">http://www.rubydoc.info/gems/wxruby</a></li> -</ul> - - <p><strong>qtruby4</strong> <blockquote>“Qt4 Bindings for Ruby.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://rubyforge.org/projects/korundum/">http://rubyforge.org/projects/korundum/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/qtruby4">http://www.rubygems.org/gems/qtruby4</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/qtruby4">http://www.rubydoc.info/gems/qtruby4</a></li> -</ul> - - <p><strong>rugui</strong> <blockquote>“RuGUI is a framework which aims to help building desktop applications. RuGUI was mostly inspired by the Ruby on Rails framework, taking most of its features from it.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://rugui.org/">http://rugui.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/rugui">http://www.rubygems.org/gems/rugui</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/rugui">http://www.rubydoc.info/gems/rugui</a></li> -</ul> + <header> + <h1 id="h_21" class="toc">GUI Programming</h1> + </header> + <p><strong>bowline</strong> + <blockquote>“Ruby/JS <span class="caps">GUI</span> framework”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://bowlineapp.com/">http://bowlineapp.com/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/bowline">http://www.rubygems.org/gems/bowline</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/bowline">http://www.rubydoc.info/gems/bowline</a></li> + </ul> + + <p><strong>fxruby</strong> + <blockquote>“FXRuby is the Ruby binding to the <span class="caps">FOX</span> <span class="caps">GUI</span> + toolkit”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://www.fxruby.org/">http://www.fxruby.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/fxruby">http://www.rubygems.org/gems/fxruby</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/fxruby">http://www.rubydoc.info/gems/fxruby</a></li> + </ul> + + <p><strong>wxruby</strong> + <blockquote>“wxRuby allows the creation of graphical user interface (<span class="caps">GUI</span>) + applications via the wxWidgets library. wxRuby provides native-style <span class="caps">GUI</span> windows, + dialogs and controls on platforms including Windows, OS X and Linux.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://wxruby.org/">http://wxruby.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/wxruby">http://www.rubygems.org/gems/wxruby</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/wxruby">http://www.rubydoc.info/gems/wxruby</a></li> + </ul> + + <p><strong>qtruby4</strong> + <blockquote>“Qt4 Bindings for Ruby.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://rubyforge.org/projects/korundum/">http://rubyforge.org/projects/korundum/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/qtruby4">http://www.rubygems.org/gems/qtruby4</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/qtruby4">http://www.rubydoc.info/gems/qtruby4</a></li> + </ul> + + <p><strong>rugui</strong> + <blockquote>“RuGUI is a framework which aims to help building desktop applications. RuGUI was mostly inspired + by the Ruby on Rails framework, taking most of its features from it.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://rugui.org/">http://rugui.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/rugui">http://www.rubygems.org/gems/rugui</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/rugui">http://www.rubydoc.info/gems/rugui</a></li> + </ul> <aside class="box"> -<div class="box-title">What about Shoes?</div> -<a href="http://shoesrb.com/">Shoes</a> is a cross-platform, easy-to-use Ruby toolkit originally created by <a href="/ruby-compendium/book/rubyists.html#_why"></a>. Unfortunately, it is distributed as a standalone application rather than a gem (yet), due to its internal architecture and dependencies. + <div class="box-title">What about Shoes?</div> + <a href="http://shoesrb.com/">Shoes</a> is a cross-platform, easy-to-use Ruby toolkit originally created by <a + href="/ruby-compendium/book/rubyists.html#_why"></a>. Unfortunately, it is distributed as a standalone + application rather than a gem (yet), due to its internal architecture and dependencies. -</aside> + </aside> </section> <section class="section"> -<header><h1 id="h_22" class="toc">Markup and Template Languages</h1></header> -<p><strong>bluecloth</strong> <blockquote>“BlueCloth is a Ruby implementation of Markdown, a text-to-<span class="caps">HTML</span> conversion tool for web writers. To quote from the project page: Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid <span class="caps">XHTML</span> (or <span class="caps">HTML</span>).”</blockquote></p> -<ul> - <li>Web Page: <a href="http://www.deveiate.org/projects/BlueCloth">http://www.deveiate.org/projects/BlueCloth</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/bluecloth">http://www.rubygems.org/gems/bluecloth</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/bluecloth">http://www.rubydoc.info/gems/bluecloth</a></li> -</ul> - - <p><strong>github-markup</strong> <blockquote>“This gem is used by GitHub to render any fancy markup such as Markdown, Textile, Org-Mode, etc. Fork it and add your own!”</blockquote></p> -<ul> - <li>Web Page: <a href="http://github.com/github/markup">http://github.com/github/markup</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/github-markup">http://www.rubygems.org/gems/github-markup</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/github-markup">http://www.rubydoc.info/gems/github-markup</a></li> -</ul> - - <p><strong>haml</strong> <blockquote>“Haml (<span class="caps">HTML</span> Abstraction Markup Language) is a layer on top of <span class="caps">XHTML</span> or <span class="caps">XML</span> that’s designed to express the structure of <span class="caps">XHTML</span> or <span class="caps">XML</span> documents in a non-repetitive, elegant, easy way, using indentation rather than closing tags and allowing Ruby to be embedded with ease. It was originally envisioned as a plugin for Ruby on Rails, but it can function as a stand-alone templating engine.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://haml-lang.com/">http://haml-lang.com/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/haml">http://www.rubygems.org/gems/haml</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/haml">http://www.rubydoc.info/gems/haml</a></li> -</ul> - - <p><strong>liquid</strong> <blockquote>“A secure, non-evaling end user template engine with aesthetic markup.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://www.liquidmarkup.org/">http://www.liquidmarkup.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/liquid">http://www.rubygems.org/gems/liquid</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/liquid">http://www.rubydoc.info/gems/liquid</a></li> -</ul> - - <p><strong>mustache</strong> <blockquote>"Inspired by ctemplate, Mustache is a framework-agnostic way to render logic-free views. As ctemplates says, “It emphasizes separating logic from presentation: it is impossible to embed application logic in this template language. Think of Mustache as a replacement for your views. Instead of views consisting of <span class="caps">ERB</span> or <span class="caps">HAML</span> with random helpers and arbitrary logic, your views are broken into two parts: a Ruby class and an <span class="caps">HTML</span> template.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://github.com/defunkt/mustache">http://github.com/defunkt/mustache</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/mustache">http://www.rubygems.org/gems/mustache</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/mustache">http://www.rubydoc.info/gems/mustache</a></li> -</ul> - - <p><strong>rdiscount</strong> <blockquote>“Fast Implementation of Gruber’s Markdown in C”</blockquote></p> -<ul> - <li>Web Page: <a href="http://github.com/rtomayko/rdiscount/">http://github.com/rtomayko/rdiscount/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/rdiscount">http://www.rubygems.org/gems/rdiscount</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/rdiscount">http://www.rubydoc.info/gems/rdiscount</a></li> -</ul> - - <p><strong>redcloth</strong> <blockquote>“RedCloth is a Ruby library for converting Textile into <span class="caps">HTML</span>.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://redcloth.org/">http://redcloth.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/redcloth">http://www.rubygems.org/gems/redcloth</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/redcloth">http://www.rubydoc.info/gems/redcloth</a></li> -</ul> + <header> + <h1 id="h_22" class="toc">Markup and Template Languages</h1> + </header> + <p><strong>bluecloth</strong> + <blockquote>“BlueCloth is a Ruby implementation of Markdown, a text-to-<span class="caps">HTML</span> + conversion tool for web writers. To quote from the project page: Markdown allows you to write using an + easy-to-read, easy-to-write plain text format, then convert it to structurally valid <span + class="caps">XHTML</span> (or <span class="caps">HTML</span>).”</blockquote> + </p> + <ul> + <li>Web Page: <a + href="http://www.deveiate.org/projects/BlueCloth">http://www.deveiate.org/projects/BlueCloth</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/bluecloth">http://www.rubygems.org/gems/bluecloth</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/bluecloth">http://www.rubydoc.info/gems/bluecloth</a> + </li> + </ul> + + <p><strong>github-markup</strong> + <blockquote>“This gem is used by GitHub to render any fancy markup such as Markdown, Textile, Org-Mode, etc. + Fork it and add your own!”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://github.com/github/markup">http://github.com/github/markup</a></li> + <li>Download: <a + href="http://www.rubygems.org/gems/github-markup">http://www.rubygems.org/gems/github-markup</a></li> + <li>Documentation: <a + href="http://www.rubydoc.info/gems/github-markup">http://www.rubydoc.info/gems/github-markup</a></li> + </ul> + + <p><strong>haml</strong> + <blockquote>“Haml (<span class="caps">HTML</span> Abstraction Markup Language) is a layer on top of <span + class="caps">XHTML</span> or <span class="caps">XML</span> that’s designed to express the structure of + <span class="caps">XHTML</span> or <span class="caps">XML</span> documents in a non-repetitive, elegant, easy + way, using indentation rather than closing tags and allowing Ruby to be embedded with ease. It was originally + envisioned as a plugin for Ruby on Rails, but it can function as a stand-alone templating engine.” + </blockquote> + </p> + <ul> + <li>Web Page: <a href="http://haml-lang.com/">http://haml-lang.com/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/haml">http://www.rubygems.org/gems/haml</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/haml">http://www.rubydoc.info/gems/haml</a></li> + </ul> + + <p><strong>liquid</strong> + <blockquote>“A secure, non-evaling end user template engine with aesthetic markup.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://www.liquidmarkup.org/">http://www.liquidmarkup.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/liquid">http://www.rubygems.org/gems/liquid</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/liquid">http://www.rubydoc.info/gems/liquid</a></li> + </ul> + + <p><strong>mustache</strong> + <blockquote>"Inspired by ctemplate, Mustache is a framework-agnostic way to render logic-free views. As + ctemplates says, “It emphasizes separating logic from presentation: it is impossible to embed application + logic in this template language. Think of Mustache as a replacement for your views. Instead of views consisting + of <span class="caps">ERB</span> or <span class="caps">HAML</span> with random helpers and arbitrary logic, your + views are broken into two parts: a Ruby class and an <span class="caps">HTML</span> template.” + </blockquote> + </p> + <ul> + <li>Web Page: <a href="http://github.com/defunkt/mustache">http://github.com/defunkt/mustache</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/mustache">http://www.rubygems.org/gems/mustache</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/mustache">http://www.rubydoc.info/gems/mustache</a> + </li> + </ul> + + <p><strong>rdiscount</strong> + <blockquote>“Fast Implementation of Gruber’s Markdown in C”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://github.com/rtomayko/rdiscount/">http://github.com/rtomayko/rdiscount/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/rdiscount">http://www.rubygems.org/gems/rdiscount</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/rdiscount">http://www.rubydoc.info/gems/rdiscount</a> + </li> + </ul> + + <p><strong>redcloth</strong> + <blockquote>“RedCloth is a Ruby library for converting Textile into <span class="caps">HTML</span>.” + </blockquote> + </p> + <ul> + <li>Web Page: <a href="http://redcloth.org/">http://redcloth.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/redcloth">http://www.rubygems.org/gems/redcloth</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/redcloth">http://www.rubydoc.info/gems/redcloth</a> + </li> + </ul> </section> <section class="section"> -<header><h1 id="h_23" class="toc">Static Web Site Generators</h1></header> -<p><strong>jekyll</strong> <blockquote>“Jekyll is a simple, blog aware, static site generator.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://jekyllrb.com/">http://jekyllrb.com/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/jekyll">http://www.rubygems.org/gems/jekyll</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/jekyll">http://www.rubydoc.info/gems/jekyll</a></li> -</ul> - - <p><strong>nanoc</strong> <blockquote>“a web publishing system written in Ruby for building small to medium-sized websites.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://nanoc.stoneship.org/">http://nanoc.stoneship.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/nanoc">http://www.rubygems.org/gems/nanoc</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/nanoc">http://www.rubydoc.info/gems/nanoc</a></li> -</ul> - - <p><strong>toto</strong> <blockquote>“the tiniest blog-engine in Oz.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://cloudhead.io/toto">http://cloudhead.io/toto</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/toto">http://www.rubygems.org/gems/toto</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/toto">http://www.rubydoc.info/gems/toto</a></li> -</ul> - - <p><strong>webby</strong> <blockquote>“Webby is a fantastic little website management system. It would be called a content management system if it were a bigger kid. But, it’s just a runt with a special knack for transforming text. And that’s really all it does – manages the legwork of turning text into something else, an <span class="caps">ASCII</span> Alchemist if you will.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://webby.rubyforge.org/">http://webby.rubyforge.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/webby">http://www.rubygems.org/gems/webby</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/webby">http://www.rubydoc.info/gems/webby</a></li> -</ul> + <header> + <h1 id="h_23" class="toc">Static Web Site Generators</h1> + </header> + <p><strong>jekyll</strong> + <blockquote>“Jekyll is a simple, blog aware, static site generator.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://jekyllrb.com/">http://jekyllrb.com/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/jekyll">http://www.rubygems.org/gems/jekyll</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/jekyll">http://www.rubydoc.info/gems/jekyll</a></li> + </ul> + + <p><strong>nanoc</strong> + <blockquote>“a web publishing system written in Ruby for building small to medium-sized websites.” + </blockquote> + </p> + <ul> + <li>Web Page: <a href="http://nanoc.stoneship.org/">http://nanoc.stoneship.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/nanoc">http://www.rubygems.org/gems/nanoc</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/nanoc">http://www.rubydoc.info/gems/nanoc</a></li> + </ul> + + <p><strong>toto</strong> + <blockquote>“the tiniest blog-engine in Oz.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://cloudhead.io/toto">http://cloudhead.io/toto</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/toto">http://www.rubygems.org/gems/toto</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/toto">http://www.rubydoc.info/gems/toto</a></li> + </ul> + + <p><strong>webby</strong> + <blockquote>“Webby is a fantastic little website management system. It would be called a content management + system if it were a bigger kid. But, it’s just a runt with a special knack for transforming text. And + that’s really all it does – manages the legwork of turning text into something else, an <span + class="caps">ASCII</span> Alchemist if you will.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://webby.rubyforge.org/">http://webby.rubyforge.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/webby">http://www.rubygems.org/gems/webby</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/webby">http://www.rubydoc.info/gems/webby</a></li> + </ul> </section> <section class="section"> -<header><h1 id="h_24" class="toc">Testing</h1></header> -<p><strong>bacon</strong> <blockquote>“Bacon is a small RSpec clone weighing less than 350 LoC but nevertheless providing all essential features.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://github.com/chneukirchen/bacon">http://github.com/chneukirchen/bacon</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/bacon">http://www.rubygems.org/gems/bacon</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/bacon">http://www.rubydoc.info/gems/bacon</a></li> -</ul> - - <p><strong>cucumber</strong> <blockquote>“Behaviour Driven Development with elegance and joy”</blockquote></p> -<ul> - <li>Web Page: <a href="http://cukes.info/">http://cukes.info/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/cucumber">http://www.rubygems.org/gems/cucumber</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/cucumber">http://www.rubydoc.info/gems/cucumber</a></li> -</ul> - - <p><strong>minitest</strong> <blockquote>“minitest provides a complete suite of testing facilities supporting <span class="caps">TDD</span>, <span class="caps">BDD</span>, mocking, and benchmarking. minitest/unit is a small and incredibly fast unit testing framework.”</blockquote></p> -<ul> - <li>Web Page: <a href="https://github.com/seattlerb/minitest">https://github.com/seattlerb/minitest</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/minitest">http://www.rubygems.org/gems/minitest</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/minitest">http://www.rubydoc.info/gems/minitest</a></li> -</ul> - - <p><strong>rspec</strong> <blockquote>“RSpec is a Behaviour-Driven Development tool for Ruby programmers. <span class="caps">BDD</span> is an approach to software development that combines Test-Driven Development, Domain Driven Design, and Acceptance Test-Driven Planning. RSpec helps you do the <span class="caps">TDD</span> part of that equation, focusing on the documentation and design aspects of <span class="caps">TDD</span>.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://relishapp.com/rspec">http://relishapp.com/rspec</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/rspec">http://www.rubygems.org/gems/rspec</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/rspec">http://www.rubydoc.info/gems/rspec</a></li> -</ul> - - <p><strong>shoulda</strong> <blockquote>“Making tests easy on the fingers and eyes”</blockquote></p> -<ul> - <li>Web Page: <a href="http://www.thoughtbot.com/projects/shoulda">http://www.thoughtbot.com/projects/shoulda</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/shoulda">http://www.rubygems.org/gems/shoulda</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/shoulda">http://www.rubydoc.info/gems/shoulda</a></li> -</ul> + <header> + <h1 id="h_24" class="toc">Testing</h1> + </header> + <p><strong>bacon</strong> + <blockquote>“Bacon is a small RSpec clone weighing less than 350 LoC but nevertheless providing all essential + features.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://github.com/chneukirchen/bacon">http://github.com/chneukirchen/bacon</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/bacon">http://www.rubygems.org/gems/bacon</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/bacon">http://www.rubydoc.info/gems/bacon</a></li> + </ul> + + <p><strong>cucumber</strong> + <blockquote>“Behaviour Driven Development with elegance and joy”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://cukes.info/">http://cukes.info/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/cucumber">http://www.rubygems.org/gems/cucumber</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/cucumber">http://www.rubydoc.info/gems/cucumber</a> + </li> + </ul> + + <p><strong>minitest</strong> + <blockquote>“minitest provides a complete suite of testing facilities supporting <span + class="caps">TDD</span>, <span class="caps">BDD</span>, mocking, and benchmarking. minitest/unit is a small + and incredibly fast unit testing framework.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="https://github.com/seattlerb/minitest">https://github.com/seattlerb/minitest</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/minitest">http://www.rubygems.org/gems/minitest</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/minitest">http://www.rubydoc.info/gems/minitest</a> + </li> + </ul> + + <p><strong>rspec</strong> + <blockquote>“RSpec is a Behaviour-Driven Development tool for Ruby programmers. <span class="caps">BDD</span> + is an approach to software development that combines Test-Driven Development, Domain Driven Design, and + Acceptance Test-Driven Planning. RSpec helps you do the <span class="caps">TDD</span> part of that equation, + focusing on the documentation and design aspects of <span class="caps">TDD</span>.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://relishapp.com/rspec">http://relishapp.com/rspec</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/rspec">http://www.rubygems.org/gems/rspec</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/rspec">http://www.rubydoc.info/gems/rspec</a></li> + </ul> + + <p><strong>shoulda</strong> + <blockquote>“Making tests easy on the fingers and eyes”</blockquote> + </p> + <ul> + <li>Web Page: <a + href="http://www.thoughtbot.com/projects/shoulda">http://www.thoughtbot.com/projects/shoulda</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/shoulda">http://www.rubygems.org/gems/shoulda</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/shoulda">http://www.rubydoc.info/gems/shoulda</a></li> + </ul> </section> <section class="section"> -<header><h1 id="h_25" class="toc">Web Development</h1></header> -<p><strong>rails</strong> <blockquote>“Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity. It encourages beautiful code by favoring convention over configuration.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://rubyonrails.org/">http://rubyonrails.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/rails">http://www.rubygems.org/gems/rails</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/rails">http://www.rubydoc.info/gems/rails</a></li> -</ul> - - <p><strong>sinatra</strong> <blockquote>“Classy web-development dressed in a <span class="caps">DSL</span>”</blockquote></p> -<ul> - <li>Web Page: <a href="http://www.sinatrarb.com/">http://www.sinatrarb.com/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/sinatra">http://www.rubygems.org/gems/sinatra</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/sinatra">http://www.rubydoc.info/gems/sinatra</a></li> -</ul> - - <p><strong>padrino-framework</strong> <blockquote>“The Godfather of Sinatra provides a full-stack agnostic framework on top of Sinatra”</blockquote></p> -<ul> - <li>Web Page: <a href="http://www.padrinorb.com/">http://www.padrinorb.com/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/padrino-framework">http://www.rubygems.org/gems/padrino-framework</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/padrino-framework">http://www.rubydoc.info/gems/padrino-framework</a></li> -</ul> - - <p><strong>merb-core</strong> <blockquote>“Merb. Pocket rocket web framework.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://www.merbivore.com/">http://www.merbivore.com/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/merb-core">http://www.rubygems.org/gems/merb-core</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/merb-core">http://www.rubydoc.info/gems/merb-core</a></li> -</ul> - - <p><strong>ramaze</strong> <blockquote>“Ramaze is a simple and modular web framework”</blockquote></p> -<ul> - <li>Web Page: <a href="http://ramaze.net/">http://ramaze.net/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/ramaze">http://www.rubygems.org/gems/ramaze</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/ramaze">http://www.rubydoc.info/gems/ramaze</a></li> -</ul> - - <p><strong>camping</strong> <blockquote>“miniature rails for stay-at-home moms”</blockquote></p> -<ul> - <li>Web Page: <a href="http://camping.rubyforge.org/">http://camping.rubyforge.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/camping">http://www.rubygems.org/gems/camping</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/camping">http://www.rubydoc.info/gems/camping</a></li> -</ul> + <header> + <h1 id="h_25" class="toc">Web Development</h1> + </header> + <p><strong>rails</strong> + <blockquote>“Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable + productivity. It encourages beautiful code by favoring convention over configuration.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://rubyonrails.org/">http://rubyonrails.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/rails">http://www.rubygems.org/gems/rails</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/rails">http://www.rubydoc.info/gems/rails</a></li> + </ul> + + <p><strong>sinatra</strong> + <blockquote>“Classy web-development dressed in a <span class="caps">DSL</span>”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://www.sinatrarb.com/">http://www.sinatrarb.com/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/sinatra">http://www.rubygems.org/gems/sinatra</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/sinatra">http://www.rubydoc.info/gems/sinatra</a></li> + </ul> + + <p><strong>padrino-framework</strong> + <blockquote>“The Godfather of Sinatra provides a full-stack agnostic framework on top of Sinatra” + </blockquote> + </p> + <ul> + <li>Web Page: <a href="http://www.padrinorb.com/">http://www.padrinorb.com/</a></li> + <li>Download: <a + href="http://www.rubygems.org/gems/padrino-framework">http://www.rubygems.org/gems/padrino-framework</a> + </li> + <li>Documentation: <a + href="http://www.rubydoc.info/gems/padrino-framework">http://www.rubydoc.info/gems/padrino-framework</a> + </li> + </ul> + + <p><strong>merb-core</strong> + <blockquote>“Merb. Pocket rocket web framework.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://www.merbivore.com/">http://www.merbivore.com/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/merb-core">http://www.rubygems.org/gems/merb-core</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/merb-core">http://www.rubydoc.info/gems/merb-core</a> + </li> + </ul> + + <p><strong>ramaze</strong> + <blockquote>“Ramaze is a simple and modular web framework”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://ramaze.net/">http://ramaze.net/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/ramaze">http://www.rubygems.org/gems/ramaze</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/ramaze">http://www.rubydoc.info/gems/ramaze</a></li> + </ul> + + <p><strong>camping</strong> + <blockquote>“miniature rails for stay-at-home moms”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://camping.rubyforge.org/">http://camping.rubyforge.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/camping">http://www.rubygems.org/gems/camping</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/camping">http://www.rubydoc.info/gems/camping</a></li> + </ul> </section> <section class="section"> -<header><h1 id="h_26" class="toc">Web and App Servers</h1></header> -<p><strong>passenger</strong> <blockquote>“Easy and robust Ruby web application deployment.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://www.modrails.com/">http://www.modrails.com/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/passenger">http://www.rubygems.org/gems/passenger</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/passenger">http://www.rubydoc.info/gems/passenger</a></li> -</ul> - - <p><strong>rack</strong> <blockquote>“Rack provides a minimal interface between webservers supporting Ruby and Ruby frameworks.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://rack.rubyforge.org/">http://rack.rubyforge.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/rack">http://www.rubygems.org/gems/rack</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/rack">http://www.rubydoc.info/gems/rack</a></li> -</ul> - - <p><strong>thin</strong> <blockquote>“A thin and fast web server”</blockquote></p> -<ul> - <li>Web Page: <a href="http://code.macournoyer.com/thin/">http://code.macournoyer.com/thin/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/thin">http://www.rubygems.org/gems/thin</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/thin">http://www.rubydoc.info/gems/thin</a></li> -</ul> - - <p><strong>unicorn</strong> <blockquote>“Unicorn is an <span class="caps">HTTP</span> server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://unicorn.bogomips.org/">http://unicorn.bogomips.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/unicorn">http://www.rubygems.org/gems/unicorn</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/unicorn">http://www.rubydoc.info/gems/unicorn</a></li> -</ul> + <header> + <h1 id="h_26" class="toc">Web and App Servers</h1> + </header> + <p><strong>passenger</strong> + <blockquote>“Easy and robust Ruby web application deployment.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://www.modrails.com/">http://www.modrails.com/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/passenger">http://www.rubygems.org/gems/passenger</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/passenger">http://www.rubydoc.info/gems/passenger</a> + </li> + </ul> + + <p><strong>rack</strong> + <blockquote>“Rack provides a minimal interface between webservers supporting Ruby and Ruby frameworks.” + </blockquote> + </p> + <ul> + <li>Web Page: <a href="http://rack.rubyforge.org/">http://rack.rubyforge.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/rack">http://www.rubygems.org/gems/rack</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/rack">http://www.rubydoc.info/gems/rack</a></li> + </ul> + + <p><strong>thin</strong> + <blockquote>“A thin and fast web server”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://code.macournoyer.com/thin/">http://code.macournoyer.com/thin/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/thin">http://www.rubygems.org/gems/thin</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/thin">http://www.rubydoc.info/gems/thin</a></li> + </ul> + + <p><strong>unicorn</strong> + <blockquote>“Unicorn is an <span class="caps">HTTP</span> server for Rack applications designed to only serve + fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like + kernels.”</blockquote> + </p> + <ul> + <li>Web Page: <a href="http://unicorn.bogomips.org/">http://unicorn.bogomips.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/unicorn">http://www.rubygems.org/gems/unicorn</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/unicorn">http://www.rubydoc.info/gems/unicorn</a></li> + </ul> </section> <section class="section"> -<header><h1 id="h_27" class="toc">XML Parsing</h1></header> -<p><strong>hpricot</strong> <blockquote>“a swift, liberal <span class="caps">HTML</span> parser with a fantastic library”</blockquote></p> -<ul> - <li>Web Page: <a href="http://code.whytheluckystiff.net/hpricot/">http://code.whytheluckystiff.net/hpricot/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/hpricot">http://www.rubygems.org/gems/hpricot</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/hpricot">http://www.rubydoc.info/gems/hpricot</a></li> -</ul> - - <p><strong>nokogiri</strong> <blockquote>“An <span class="caps">HTML</span>, <span class="caps">XML</span>, <span class="caps">SAX</span>, & Reader parser with the ability to search documents via XPath or CSS3 selectors… and much more”</blockquote></p> -<ul> - <li>Web Page: <a href="http://nokogiri.org/">http://nokogiri.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/nokogiri">http://www.rubygems.org/gems/nokogiri</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/nokogiri">http://www.rubydoc.info/gems/nokogiri</a></li> -</ul> - - <p><strong>xml-simple</strong> <blockquote>“A simple <span class="caps">API</span> for <span class="caps">XML</span> processing.”</blockquote></p> -<ul> - <li>Web Page: <a href="http://xml-simple.rubyforge.org/">http://xml-simple.rubyforge.org/</a></li> - <li>Download: <a href="http://www.rubygems.org/gems/xml-simple">http://www.rubygems.org/gems/xml-simple</a></li> - <li>Documentation: <a href="http://www.rubydoc.info/gems/xml-simple">http://www.rubydoc.info/gems/xml-simple</a></li> -</ul> + <header> + <h1 id="h_27" class="toc">XML Parsing</h1> + </header> + <p><strong>hpricot</strong> + <blockquote>“a swift, liberal <span class="caps">HTML</span> parser with a fantastic library” + </blockquote> + </p> + <ul> + <li>Web Page: <a href="http://code.whytheluckystiff.net/hpricot/">http://code.whytheluckystiff.net/hpricot/</a> + </li> + <li>Download: <a href="http://www.rubygems.org/gems/hpricot">http://www.rubygems.org/gems/hpricot</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/hpricot">http://www.rubydoc.info/gems/hpricot</a></li> + </ul> + + <p><strong>nokogiri</strong> + <blockquote>“An <span class="caps">HTML</span>, <span class="caps">XML</span>, <span class="caps">SAX</span>, + & Reader parser with the ability to search documents via XPath or CSS3 selectors… and much more” + </blockquote> + </p> + <ul> + <li>Web Page: <a href="http://nokogiri.org/">http://nokogiri.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/nokogiri">http://www.rubygems.org/gems/nokogiri</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/nokogiri">http://www.rubydoc.info/gems/nokogiri</a> + </li> + </ul> + + <p><strong>xml-simple</strong> + <blockquote>“A simple <span class="caps">API</span> for <span class="caps">XML</span> processing.” + </blockquote> + </p> + <ul> + <li>Web Page: <a href="http://xml-simple.rubyforge.org/">http://xml-simple.rubyforge.org/</a></li> + <li>Download: <a href="http://www.rubygems.org/gems/xml-simple">http://www.rubygems.org/gems/xml-simple</a></li> + <li>Documentation: <a href="http://www.rubydoc.info/gems/xml-simple">http://www.rubydoc.info/gems/xml-simple</a> + </li> + </ul> </section> -<nav class="navigation"><a href="/ruby-compendium/book/gems.html">← Ruby Gems</a> | <a href="/ruby-compendium/book/index.html">Contents</a> | <a href="/ruby-compendium/book/resources.html">Resources →</a></nav> +<nav class="navigation"><a href="/ruby-compendium/book/gems.html">← Ruby Gems</a> | <a + href="/ruby-compendium/book/index.html">Contents</a> | <a href="/ruby-compendium/book/resources.html">Resources + →</a></nav>
@@ -2,13 +2,22 @@ -----
title: "Ruby Compendium – About this Book" content-type: page ----- -<nav class="navigation"><a href="/ruby-compendium/book/intro.html">← So you want to learn Ruby...</a> | <a href="/ruby-compendium/book/index.html">Contents</a> | <a href="/ruby-compendium/book/language.html">Quick Tour →</a></nav> -<p>This book was written by Fabio Cevasco and it is licensed under a <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</p> -<p>This book was authored using <a href="http://www.h3rald.com/glyph">Glyph</a> and the <span class="caps">PDF</span> version was produced with <a href="http://www.princexml.org">Prince <span class="caps">XML</span></a>.</p> -<p>The Ruby logo is copyright © 2006, Yukihiro Matsumoto, and used under the terms of the <a href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.</p> +<nav class="navigation"><a href="/ruby-compendium/book/intro.html">← So you want to learn Ruby...</a> | <a + href="/ruby-compendium/book/index.html">Contents</a> | <a href="/ruby-compendium/book/language.html">Quick Tour + →</a></nav> +<p>This book was written by Fabio Cevasco and it is licensed under a <a + href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported + License</a>.</p> +<p>This book was authored using <a href="/glyph">Glyph</a> and the <span class="caps">PDF</span> version was produced + with <a href="http://www.princexml.org">Prince <span class="caps">XML</span></a>.</p> +<p>The Ruby logo is copyright © 2006, Yukihiro Matsumoto, and used under the terms of the <a + href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>. +</p> <p>Special thanks to the following individuals who contributed to the project, in some ways:</p> <ul> <li><a href="http://blog.dio.jp/">Akira Matsuda</a></li> <li><a href="http://www.bitcetera.com/">Sven Schwyn</a></li> </ul> -<nav class="navigation"><a href="/ruby-compendium/book/intro.html">← So you want to learn Ruby...</a> | <a href="/ruby-compendium/book/index.html">Contents</a> | <a href="/ruby-compendium/book/language.html">Quick Tour →</a></nav> +<nav class="navigation"><a href="/ruby-compendium/book/intro.html">← So you want to learn Ruby...</a> | <a + href="/ruby-compendium/book/index.html">Contents</a> | <a href="/ruby-compendium/book/language.html">Quick Tour + →</a></nav>
@@ -1,4 +1,4 @@
-"output" ls-r ("\.html?" match?) filter :html-files +"output" ls-r ("\.html" match?) filter :html-files ( symbol check-links@@ -30,13 +30,13 @@ )
when ) when - (href "^https?:\/\/(?:www.)?h3rald.com" match?) + #|(href "^https?:\/\/(?:www.)?h3rald.com" match?) ( (result href in? not) (href result append @result) when ) - when + when|# ) foreach ) ) ::