Setup local website on OS X

I am developing a website using LAMP, a dev toolkit of a combination of free and open source software. In particular, I am using Perl-based MVC framework Catalyst. Catalyst comes with PSGI server, i.e. you can run your web app without Apache. However, when I try to integrate my web app with MeidaWiki, a wiki engined based on PHP, I still need to setup  LAMP. Here are two posts I found particularly useful.

Perl for Web Dev

Is Perl still a viable language for web dev?

Catalyst

Catalyst Tips & Tricks

  • Diff between uri_for() and uri_for_action(). uri_for() is usually used for static files like images, css and js. uri_for_action() as its name implies, is usually used for action, such as redirect to a controller’s route, which paths may be changed. See here.
  • Use c.uri_for(“your/path”) rather than “your/path” in Template::Toolkit template
  • Catalyst::Plugin::PageCache – Cache the output of entire pages
  • What’s the difference between :Args and :CaptureArgs in Catalyst? (here)

:CaptureArgs(N) matches if there there at least N args left. It is used for non-terminal Chained handlers.
:Args(N) only matches if there are exactly N args left.

Other Frameworks

  • Mojolicious (doc and wiki). Why not Mojo (here and here)? Personally, I usually need to connect to MySQL/SQLite database, but Mojo is agnostic to database 😦
  • Dancer: lightweight

CGI

  • How to execute CGI through HTML’s HREF link (here).