Results tagged “catalyst” from The Cattle Grid

È disponibile il calendario dei corsi di formazione che si terranno a Pisa prima e dopo YAPC::Europe 2010.

Tenuti da esperti di fama mondiale che per la conferenza si troveranno a Pisa, questi corsi rappresentano l'occasione ideale per approfondire la conoscenza del linguaggio Perl, ad un costo peraltro alquanto contenuto.

I corsi disponibili, tutti in lingua inglese, sono:

  • Understanding Regular Expressions, di Damian Conway
  • Introducing Modern Perl, di Dave Cross
  • Presentation Aikido, di Damian Conway
  • Introduction to Moose, di Dave Rolsky
  • Catalyst 5.80 Master Class, di Matt S. Trout (Shadowcat Systems Ltd.)
  • WxPerl in Details, di herbert breunung
  • Effective Perl Programming, di brian d foy

Più o meno per tutti i corsi, il livello di conoscenza necessario per i partecipanti è "intermedio": bisogna cioè conoscere le basi di Perl o almeno quelle di programmazione in un linguaggio dinamico. Fa eccezione Presentation Aikido, adatto a chiunque.

Ogni corso ha durata di una giornata. Il costo spazia dal 180 ai 220 Euro (IVA inclusa), ed include il pranzo. La sede è la stessa della conferenza, cioè il My One Hotel Conference Centre a Pisa.

Per ulteriori informazioni, visitate la pagina web con i dettagli di ciascun corso.

There are quotation marks and quotation marks, apostrophes and apostrophes, etc: they're just not all alike. A web application (sometimes) needs to deal with this situation.

In ASCII you only have one quotation mark, one backtick, one double quotation mark, etc. In UTF-8 you have (of course) the same ones as ASCII plus some which are outside the ASCII set. These allow for more eye-candy characters, and also for distinctions between (for example) right double quotation mark and left double quotation mark.

Along the same lines, the horizontal ellipses is a character in UTF-8, which in ASCII you have to enter three dots (...) to create it.

All these new and good-looking characters are good, but they can also prove to be problematic to deal with when you are using some piece of software which doesn't work that well with UTF-8). For instance, htmldoc works with latin1: when you convert from UTF-8 to ISO-8859-1 you just lose those characters. In theory you can just not use them, but if you have a web application that takes its input from a form, users could just paste those chars in (it's especially common when pasting from Microsoft Word or other word processing software).

So, you need to get rid of them - that is, convert them to their ASCII equivalents in order to still see something useful. If you use Catalyst, there is Catalyst::Plugin::Params::Demoronize, by Mike Eldridge, a plugin which does the proper conversion of form parameters (it can also deal with the same problems with Windows-1252 charset if necessary).

This plugin works just fine for me, even though it suffers from a couple of minor problems. First, it still uses NEXT as opposed to MRO::Compat, but I already submitted a patch to the author for that. Then, the name just sucks, even though it has historic reasons to be as such; said that, I'm still not able to think of a better one. ;-)

L'utilizzo di FastCGI rappresenta un modo abbastanza semplice per configurare un ambiente di produzione per un'applicazione Catalyst su un buon numero di web server (qui vedremo come fare su Apache e lighttpd).

Questo tutorial presume che vogliate gestire l'applicazione esternamente rispetto al web server: in pratica non lasciate gestire ad Apache/lighttpd l'avvio e la chiusura di essa. Ciò ha alcuni vantaggi, tra i quali quello di poter facilmente riavviare l'applicazione senza riavviare il web server stesso (quindi senza interferire con altro che viene eventualmente gestito dallo stesso server). Se preferite far gestire l'applicazione Catalyst al server, qui trovate un tutorial su come farlo con Apache.

MojoMojo wiki software on Gentoo

|

MojoMojo is a great wiki software based on Catalyst. Installation, however, can be quite a nightmare if you want to do it through the package manager of your operating system because of the many Perl libraries it depends on. Using the package manager is actually a good idea, unless you decide to install all dependencies locally through local::lib, as it doesn't pollute your system and makes upgrade operations much more linear.

Although almost no Linux distribution has packages for all all those libraries, Gentoo has a project which already provides ebuilds for them and for MojoMojo itself. They can be found in the Perl overlay:

http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=summary

The overlay can be easily synced using the layman Gentoo tool (see this wiki page for more information). You can then just add the overlay with:

layman -a perl-experimental

and you're nearly ready to emerge dev-perl/MojoMojo. Yeah, nearly. You have to perform some (potentially) boring operations before, which include the unmasking of all the ebuilds in the overlay (300 or so): autounmask or a combination awk, perl and/or some other tool will help you adding them to /etc/package.keywords. Hopefully, portage will allow us to use wildcards for unmasking soon or after.

MojoMojo itself is currently hard masked because a dependency of it, dev-perl/Encode has conflicting files with perl 5.8.8. So, first of all you need to add MojoMojo and Encode to /etc/portage/package.unmask and then decide what to do regarding the conflict. You can either ignore it and install Encode with perl 5.8.8 or (best of all) unmask perl as well and upgrade it to 5.10.1 (it's in the same overlay). In my experience, perl 5.10.1 is very stable on Gentoo, and upgrading to it will also help testing it and speed its inclusion in mainstream Portage.

Once you sorted out the perl thing (don't forget to run perl-cleaner if you upgrade... ;-)), take a look at the MojoMojo USE flags and enable what you need. Here's an excerpt from the metadata.xml file:


<flag name="createdb">Create new Database automatically</flag>
<flag name="docbook">DocBook formatter</flag>
<flag name="tocgen">Table Of Contents Generator</flag>
<flag name="podformatter">POD formatterr</flag>
<flag name="syntaxhighlight">Syntax Highlightert</flag>
<flag name="transclusion">Transclusion support</flag>
<flag name="amazonboxes">Amazon boxes</flag>
<flag name="rssformatter">RSS Formatter</flag>
<flag name="emoticons">Emoticons</flag>
<flag name="recaptcha">reCAPTCHA for anonymous edits</flag>

There are two other entries in the file ( markdown and autodeploy ) which refer to older version of the software and are not to be used anymore.

When emerging, portage will surely ask you to unmask some more packages: it's boring, bot once done... it's done. When everything is unmasked, just relax while MojoMojo installs. ;-)

At this point you have everything you need, and you can just unwrap a MojoMojo package anywhere you like and customize it to create your wiki. At present time this is the only option, although ideally one should be able to use webapp-config to create a new blog in the future.

Catalyst
Jonathan Rockway
Packt Publishing, 2007
ISBN-13: 978-1-847190-95-6
US$ 39.99 - UK£ 24.99

Rating: 4/5 (very good)

This is the first Catalyst-related book to be published, and I'm very happy of this as Catalyst is my platform of choice for web application development. Packt seems like a great publisher, as it provides books on very specific topics that otherwise might end up being uncovered by the printed media.

Catalyst is a killer Perl application, and brings MVC web development to a new level. The main other available frameworks (i.e. Rails) try to impose the framework authors' choices on the developer (i.e. which templating system to use, which database abstraction library to prefer, ...); Catalyst simply provides a basic structure, along with a wide range of different choices which play well with this basic structure. This approach greatly improves the developer's opportunities to create customized and high-quality software, but it also has a downside: newbies find it difficult to enter the Catalyst world, as they have to make choices they're not yet ready to make, and so they might tend to walk away from Catalyst, leaning towards a different framework. Jonathan Rockway's book attempts to solve this problem, providing a beginner's guide to Catalyst where all the relevant choices have already been made by the author. This book tells you: "there's more than one way to do things, and this is my way; follow it, and then you might decide to stick with it or make changes but, in the meanwhile, you will have learned Catalyst".

Catalyst - Accelerating Perl Web Application Development begins with an introduction to MVC concepts and with an overview of the Catalyst installation. The main focus of the book is, however, development of applications, from simple to more advanced ones which involve complex database operations and authentication. The book assumes the developer already knows object oriented Perl fairly well, and follows a smooth path which allows him to learn Catalyst and the author's preferred modules: DBIx::Class for the database Model, Template Toolkit for the template View, and a selection of plugins. This selection isn't - however - a group of obscure Perl modules: they are the ones most widely used by the Catalyst community. So, what this book offers is also a series of "best practice" suggestions on what to use. The chapters on testing and deployment are a much appreciated addition.

Not everything is perfect. Code formatting, which doesn't feature any empty line to separate code blocks, might sometimes make it difficult to read examples - but it's minor thing. The part regarding the Authentication plugin is a bit outdated because of API changes - but things like this happen in every programming book. The chapter on the installation of the framework is just a few pages long, and doesn't cover the problems one might encounter - but it points to IRC chat and mailing lists where to ask for help.

All in all, this a good-to-excellent introduction to the Catalyst framework, and great first book on a framework which is becoming better and better every day. Rockway's work is the starting point for anyone seriously interested in building modern and scalable web applications, and in having some fun while doing that as well.

The Catalyst hosting web page

|

Finding reliable hosting for Catalyst applications can sometimes be tricky, and choosing bad providers can create several problems to you and/or your company. I therefore started to maintain a page on the Catalyst community wiki devoted to web hosting of Cat applications:

http://dev.catalystframework.org/wiki/annotated_list_of_catalyst-friendly_web_hosting_providers

It's still in the works, but features a commented and rated list of providers for shared, VPS and dedicated hosting. Contribution if open to everybody, so if you have write access to the Catalyst wiki you can just add you providers and comments (if you add comments, put yours as the first and update the rating on the main page). If you don't have write access you can contact a Catalyst dev to get it, or send me the data and I'll update the page.

I hope it'll become a useful resource!

There's a shop now on CafePress which sells some nice things with the Catalyst logo on them, so now I can but a polo and bring my faith with me everywhere. ;-)

By the way, there's also a new Catalyst vs RoR "article".

So here's yet another success story for Catalyst: it now powers the new Manchester Evening News web site. Manchester Evening News is UK's most popular regional newspaper outside London.

The Catalyst planet

|

It's quite new and it's getting better and better every day: Planet Catalyst. This is a site that aggregates all Catalyst-related entries from blogs of several people. So, it's the #1 place to keep up with everything related to the most elegant web framework out there.

Don't miss it!

Happy Easter folks!

So, what's into the egg? The Catalyst Framwork HOWTO I recently published on Gentoo Wiki. It explains what to do to make Catalyst Framework work on you Gentoo Linux in a fairly detailed way.

Enjoy Catalyst, and enjoy Gentoo: the best fucking Linux distribution out there.

Catalyst + Gentoo, la vendetta

|

Dopo un paio di giorni di smanettamento sono riuscito a creare alcuni ebuild che permettono (o almeno dovrebbero, sono ancora un po' sperimentali...) di installare Catalyst sotto Gentoo in gran scioltezza.

Qui trovate la discussione completa e le istruzioni per l'uso (in inglese).

Tags

Find recent content on the main index or look in the archives to find all content.

Categories

Pages

Powered by Movable Type 4.23-en