[Catalyst] Anyone with PHP / Smarty Background

Brian catalyst at gzmarketing.com
Fri Dec 29 05:06:59 GMT 2006


Thanks for the quick reply.  Very helpful and encouraging.

What is the best way to go from PHP to Catalyst?  I used to program in 
Perl, so I'll learn / remember that fast.

Are there any open source applications running on Catalyst / TT that I 
could install and poke around in to get a feel for it?

Any tutorials or introductions that were helpful for you, or that you 
wish you had when you made the transition?

I really appreciate the feedback and direction.

Thanks,
Brian


Christopher Heschong wrote:
> Hi Brian, I spent years as a successful PHP programmer with some 
> pretty complicated apps out there.  I've found that with Catalyst I 
> can write much cleaner code in a few lines that do what I used to do 
> with pages and pages of PHP.  Plus, with Perl you get all the great 
> libraries from CPAN available to you.
>
> Stability is great, I've handled hundreds of thousands of hits in a 
> day with no issues (mod_perl).  I haven't had any problems with speed, 
> although I would say that raw PHP is probably faster if you were to 
> benchmark it on simple things.
>
> The things to get used to are:
>
> - The MVC pattern isn't how most PHP apps are constructed.  It takes 
> some major getting used to, but is worth it in the long run.
>
> - Everything is Object Oriented (or should be) in Catalyst.  This is a 
> big shift if you haven't been living that life in PHP.  Database 
> access is nicer with things like DBIx::Class or Class::DBI, but 
> different somewhat than what you may be used to.  Ends up being more 
> elegant, imho.
>
> - If you're using mod_perl on Apache it takes a while to get used to 
> the fact that you can't just copy some files into some directory 
> somewhere, you have to actually *install* (or add the libs to your 
> path).  This is more of a PHP vs Perl thing, and maybe fastcgi 
> addresses this.
>
> - Mapping URLs to actions and subroutines in Catalyst is SO EASY, it's 
> like falling down.  Grabbing stuff from the database is SO EASY.  
> Session management is SO EASY, etc.  You'll end up wondering how your 
> apps got so small and took such a short time to create.
>
> Template Toolkit (TT) has a lot of the same feel as Smarty.  Instead of:
>
>    {$something}
>
> You would write:
>
>   [% something %]
>
> Also, TT allows plugins like Smarty does, so extending it is pretty 
> easy to do if you like that.
>
>
> On Dec 28, 2006, at 10:12 PM, Brian wrote:
>
>> Hi,
>>
>> I've been programming in PHP for about 6 years, and using the Smarty 
>> template engine for about 3 years, so I've gotten pretty proficient 
>> at them.
>>
>> I can see the need for something like Catalyst or Ruby on Rails, but 
>> it's a big shift.
>>
>> Anyone here with a background in PHP / Smarty that can share their 
>> perspective and whether the switch has been worth it?
>>
>> How does the speed and stability compare?  Can you develop faster in 
>> Catalyst than you could in PHP / Smarty?
>>
>> Thanks!
>> Brian
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>   




More information about the Catalyst mailing list