Why Perl is appropriate language for CGI? [closed]

I heard many people around still saying Perl is great language for CGI. But i think it is not as much as popular as now growing languages such as Python, Ruby.

Is there any solid reason for Perl still being the appropriate language for CGI.

Perl is not a great language for CGI. Or rather, CGI isn’t great.

The Perl language was designed by Larry Wall to make his sysadmin tasks easier. It is interpreted, highly portable, has deep Unix integration, and unparalleled text handling facilities (especially when compared with C). When the Web came around, Perl was at the right place at the right time, and became popular as an easy to learn language which was available on virtually any server. This allowed people to easily cobble together simple forms or other kinds of dynamic content. Originally, many people used cgi-lib.pl to abstract over the CGI protocol, later CGI.pm was used.

Today, Perl isn’t used very much in this area, as other languages like PHP have taken over this specific niche. While Perl is a general-purpose programming language that was used for the Web, PHP was specifically built for creating websites via CGI.

While Perl still is a great language, CGI has become unpopular: This protocol requires a new interpreter to be started for each request, which is too slow for anything but low-traffic websites. The FastCGI protocol is better in this regard as one interpreter instance handles multiple requests. Certain servers like Apache have tried to reduce overhead by integrating the languages deeper into the server, via plugins like mod_perl or mod_php. They have a ton of issues themselves.

Today, most programming languages define a specific server interface, e.g. Perl has PSGI, Python has WSGI. This interface defines how a server can pass on requests to a web application and allows a variety of efficient or backwards-compatible middlewares.

Web programming today has been irreversibly shaped (no, improved) by the innovative Ruby web frameworks Ruby on Rails and Sinatra. Since then many projects have scrambled to bring this ease of creating webapps to other languages. In Perl, these projects are

  • Dancer (basically just a simple way to map routes to templates)
  • Mojolicious (a very complete, low-dependency web framework)
  • There’s also the older Catalyst framework, but it’s far more complex.

As these frameworks are built on PSGI, they can be deployed via CGI or via any other interface where appropriate middleware exists (there are also a few specialized PSGI servers).

Perl isn’t the only language that has such awesome stuff: Ruby was already mentioned, and Python has a few nice frameworks of it’s own, the most well-known being Django. While PHP is very much invested in being usable via mod_php without much further ceremony, it too has a number of modern frameworks. Actually, any language that has been used in the past twenty years has some kind of web framework, and Wikipedia has a nice list of them.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật