Re: Alternatives to CGI perl module
Clive Eisen <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <[email protected]> |
I ca only speak for Dancer2 - I imagine they are all similar > On 11 Sep 2016, at 15:55, Igor Chudov <[email protected]> wrote: > > Eugene, sorry for my ignorant questions. > > I see several of these frameworks. > > Is that correct that the result of setting up and programming the framework is a running perl script? > Yes - usually a psgi so you run it under something like starman > It needs a reverse proxy in front of it? (I use nginx as a reverse proxy). > IMHO this is the best way - you can use the proxy to handle the ssl if required > Does nginx proxy to those? > It does so very well > Do you need separate instances of those frameworks for every virtual host? > Whilst you could do it ‘all in one’ I prefer to run a separate instance per vhost > Can they run multithreaded? I need to run multithreaded as I need to utilize multiple CPUs. > Starman will run as many workers as you request so - yes > Is that true that the frameworks serve the entire website and, for example, I cannot have static files like JPEGs? > No Dancer2 serves static content very well, although I tend to server it directly out of nginx as it’s faster and does not require the proxy call > Do I have to handle all URL rewriting? > You can do that very well in nginx HTH — Clive > On Sun, Sep 11, 2016 at 6:08 AM, Eugen Konkov <[email protected] <mailto:[email protected]>> wrote: > Hi, Igor. > > You may try http://mojolicious.org/ <http://mojolicious.org/> > > Вы писали 10 сентября 2016 г., 15:54:44: > > > I hope that this message would not be considered off topic. > > I have been developing web apps since 1996 and have about 84,000 lines of perl code implementing various websites that I own. I do not work for anybody, own all websites that I work on, and these sites feed my family. > > The largest website is www.algebra.com <http://www.algebra.com/> and I have plenty of other websites, some to be used inside my own company, and some niche websites like liberatedmanuals.com <http://liberatedmanuals.com/>. All these sites work, and all use the CGI perl module. > > I always considered the CGI perl module to be a work of a genius. How it does forms, prefilling of form values, working with arguments, headers, cookies, html generation and so on were outstanding. The criticism of CGI as far as importing HTML generating functions in the main namespace is valid, but can be answered in a simple way, do not use the functionality if you do not like it (which is what I do), and use templates in your own code when necessary (as I do). > > OK, so now, as of ubuntu 16.04, CGI is considered obsolete and is being phased out. I cannot change it. I am literally freaking out for two reasons, one is that I have 84,000 lines of code using it, and another is that I have hard times finding a suitable alternative. > > One concern is that I want any alternatives to be maintained for the next 20 years. I can start using something new now if I can find a suitable system. I read CGI::Alternatives and I am left with a feeling that none of these will survive for 20 years. Second, while templating is important for any big consumer facing websites, it is not necessary for intranet and niche websites and makes things difficult to maintain. Additionally, templating involves more than just HTML templates and sometimes needs to be done in perl scripts, using perl functions to generate HTML as part of templating, not just HTML files. > > So, I am looking for some web app framework that is sensible, has good support going forward and lets people use it "the easy way" (without a bazillion of files supporting a simple script) or the "hard way" (with templates etc). I want a module where HTML can be expressed as a perl statement. > > Are these any realistically good modules made for people such as myself? > > thanks > > > > > -- > С уважением, > Eugen mailto:[email protected] <mailto:[email protected]>
signature.asc
(application/pgp-signature, 495 B)
-----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQEcBAEBCAAGBQJX1XXbAAoJEAMM6Hl1BW3QQZgH/iKMImld3nqS84Z/I7FS628R m8jxhas7E2rbnOPDDhzV7fkNS/dl0TYS/7u/x5wR95aJbBs+ABUuNIRciDSYtBW6 budSgRnq4BYiVfEaS4O5glQu2WWLIFT+vzM3FI0/o7O9/IPA2mQGtnoXDY8fS3wG X/EksgzReLXBMPwUjE32niGpopGfNi6aGS++Op9ugneA9jOCaICkAHarCahF5lhT w4B0ez7C33U1sp11yZRzV8hak35fwfui9ZGTW1VBQlei0LSUpruKV0urV7cgMniL sBZ7m2YmlU3omgJoRY3WRCfTIbWzMuCsUod1ksF5cLSdJtd7oMgXEKQne6rvD6E= =jpHQ -----END PGP SIGNATURE-----