5

Currently i'm using pretty much Unix + Mysql + Perl + Apache with some javascript to make it more ajax like. and i've been looking at sites which are web 2.0 and stackoverflow and really like the simple design and the smooth flow from pages and action, etc.

i'm trying to decide if learning catalyst, mason and the likes are going to be able to provide me with the capability to build powerful and smooth web 2.0 website with less effort and easier and cleaner code to maintain later.

as of right now, i don't really like the website that i built as it's pretty much stale and slow. but i've read from here that if i want to build a career out of it, then LAMP would be a better choice?

just wondering in terms of these three criterias, what would be my best step forward?

  1. career development
  2. ease of building powerful web 2.0 websites
  3. in what way is the Catalyst actually better than LAMP?

thanks. ~steve

Community
  • 1
  • 1
melaos
  • 8,386
  • 4
  • 56
  • 93

5 Answers5

11

Answers to your questions....

  1. "career development" - MVC is a good programming practice so gaining knowledge and experience of it would definitely enhance your career potential.

  2. "ease of building powerful web 2.0 website" - Catalyst certainly make this a lot easier because there are already people that have been there and done it (ie. modules on CPAN).

  3. "in what way is Catalyst actually better than LAMP?" - Well really they're just different. However Catalyst does enforce a clear programming paradigm (MVC) which makes testing, refactoring, producing reusable code and much more a lot easier... IMHO ;-)

Hope this helps.

PS. Catalyst is the daddy of web (MVC) frameworks on Perl and I highly recommend it. However do check out the alternatives... Suggest some Good MVC Framework in Perl.

PPS. A good list of web frameworks (not just MVC ones) can be found on Perl5 Wiki.

PPPS. Perl is and will continue be a good choice for web (2.0) development (ie. ignore the FUD). If by chance I'm wrong then learning something like Catalyst / MVC will provide you with necessary skills which are easily adaptable elsewhere.

Community
  • 1
  • 1
draegtun
  • 22,441
  • 5
  • 48
  • 71
  • but currently we're using mod_perl + apache + axkit, will trying to use Catalyst require any big fundamentals change or do i need to learn this myself on the side? thanks. – melaos Dec 18 '08 at 12:34
  • AxKit is nice.. I remember using it a while back. Perhaps u don't need to move? (however saying that I seem to recall AxKit 2.0 never appearing.. shame). Catalyst / LAMP / other frameworks aren't XML app servers so they're "different" and so will require some amount of work. – draegtun Dec 18 '08 at 12:56
  • re: above. I think Catalyst is probably your best choice. Catalyst works with mod_perl and also is agnostic when it comes to what Models & Views its uses so its possible that u maybe able to integrate with your current code (for eg. XSP view) at least during a transition. – draegtun Dec 18 '08 at 13:01
  • ok sounds awesome as i've been hearing a lot of good things about Catalyst and i do want to improve my web development capabilities and options. thanks. – melaos Dec 18 '08 at 23:56
7

LAMP is Linux, Apache, Mysql, and Perl. That's just a stack. If you use a Perl web framework, you're still using Perl. You're not really choosing between LAMP and Catalyst or Mason.

brian d foy
  • 129,424
  • 31
  • 207
  • 592
4

Catalyst seems to be a very good framework, especially when coupled with Template Toolkit. If you want to learn Catalyst, I would definitely read through the Catalyst tutorial.

Template Toolkit seems to me to be a more capable template processing system than Mason.

Personally, I think Template Toolkit is worth learning, even if you don't use it for the web.

Code copied from Template-Toolkit.org

[% FOREACH person IN people %]
[%   IF loop.first %]
<table>
  <tr>
    <th>Rank</th>
    <th>Name</th>
    <th>Email</th>
  </tr>
[%   END %]
  <tr>
    <td>[% loop.count %]</td>
    <td>[% person.name %]</td>
    <td>[% person.email %]</td>
  </tr>
[%   IF loop.last %]
</table>
[%   END %]
[% END %]

You can even embed Perl code directly into your templates. The EVAL_PERL option must be enabled for Perl code to be evaluated.

[% TRY %]
   [% PERL %]
      die "nothing to live for\n";
   [% END %]
[% CATCH %]
   error: [% error.info %]
[% END %]
Brad Gilbert
  • 33,846
  • 11
  • 78
  • 129
  • Currently we are using axkit, so with that i can embed variables into my xsl and transform them dynamically, so with xslt and xpath i feel i can achieve the same thing. so is there an advantage if i learn up template::toolkit? – melaos Dec 20 '08 at 08:19
  • Template Toolkit example
    http://stackoverflow.com/questions/383403/code-golf-print-the-entire-12-days-of-christmas-song-in-the-fewest-lines-of-code#383544
    – Brad Gilbert Dec 20 '08 at 22:24
  • 1
    "Template Toolkit seems to me to be a more capable template processing system than Mason." Huh? Mason lets you embed Perl in templates, and gives you the full power of Perl. TT is a mini-language! Now, many people _prefer_ a mini-language, but you have things completely backwards here. – Dave Rolsky Dec 26 '08 at 13:58
  • 2
    You can embed Perl code in TT. You basically have to know Perl to get anything done with Mason, which is bad if you have someone else design your site. In TT TIMTOWTDI, which actually makes it more like Perl, in spirit. – Brad Gilbert Dec 26 '08 at 16:34
  • 1
    I will even dare to say that TT has more "polish" than Mason does. – Brad Gilbert Dec 26 '08 at 16:54
2

I know this thread is quite old, but I'll contribute one thought. IMHO it's always worthwhile learning something new, even if you think you won't use it professionally. The exposure to new code almost always leads to new insight. The insights might be negative: "Why did they do it that way? That makes no sense?". But I think more often you'll come out with a new way of looking at things, or a new approach to solving a common problem.

These insights are what help to keep programmers from getting stale. Perhaps this is why so many people write their own programming languages, or are re-inventing the wheel, and so on.

Drew Taylor
  • 514
  • 4
  • 6
0

I agree with Dave Rolsky: calling TT "more capable" than Mason is a poor choice of words. People who like TT appear to like it because it's supposed to be "cleaner". Coming to TT from Mason, TT feels like a fairly tight straight-jacket. Hypothetically you may very well "have the full power of perl" inside of TT as well as inside of Mason, but access to it is buried, and indeed if it weren't buried it would lose it's one real selling point: it wouldn't seem "cleaner" any more.

Myself, I'm not sure I would conceed that TT is "cleaner" (it would be kind of cool if perl people would stop internalizing the rhetoric from the anti-perl smear campaign, and get over this inferiority complex). If the idea is that web-monkeys are supposed to be better at munging control structures in TT rather than in Mason, I would suggest that that's not established: I would expect that typically they'd need help from a Real Programmer in any case.

joseph brenner
  • 321
  • 1
  • 2