[Hampshire] web script suggestions

2010-02-26 Thread Adrian Bridgett
NB: I'm not after starting a my language is better than yours
flamewar!

I need to write a small web script (basically a simple front end to
populating an LDAP database).  

Normally I'd do this in Perl (and CGI library) because of PHP's pretty
horrific security record, however I think it's time I took a fresh
look to see what to use for the next N years.

I'd like to write it in Ruby if possible, or Python as a second choice
(sorry Adam).  I don't really want a huge massive framework with all
the hassle that involves - really I'm after a use ... library.

For example looking at Ruby, there is a CGI library which allows you
to perform the usual set/get forms helpers I want.  There is also
eruby to assist with the templates, however integrating the two seems
a bit yucky.  Using ERB seems perhaps slightly easier.  Rails is just
way too much framework for me.

I probably want to end up with something similar to:

- script which has the controller logic in it and displays one of two
templates
- template with the form in it
- template with the result in it

Thanks for any advice/suggestions.

Adrian
-- 
bitcube.co.uk - Expert Linux infrastructure consultancy
Puppet, Debian, Red Hat, Ubuntu, CentOS

-- 
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--


Re: [Hampshire] web script suggestions

2010-02-26 Thread Dr Adam J Trickett
Adrian,

 Normally I'd do this in Perl (and CGI library) because of PHP's pretty
 horrific security record, however I think it's time I took a fresh
 look to see what to use for the next N years.
 
 I'd like to write it in Ruby if possible, or Python as a second choice
 (sorry Adam).  I don't really want a huge massive framework with all
 the hassle that involves - really I'm after a use ... library.
 
 For example looking at Ruby, there is a CGI library which allows you
 to perform the usual set/get forms helpers I want.  There is also
 eruby to assist with the templates, however integrating the two seems
 a bit yucky.  Using ERB seems perhaps slightly easier.  Rails is just
 way too much framework for me.

It doesn't metter which language you pick, all have high and low quality 
modules to use. Pick your language and chose the best of breed 
module/framework and you should be okay.
 
 I probably want to end up with something similar to:
 
 - script which has the controller logic in it and displays one of two
 templates
 - template with the form in it
 - template with the result in it

Everything has a MVC framework, take you pick, even SAP supports that 
thesedays.

If you use Perl then there is Catalyst which is popular, I'm sure each 
other language has it's own prefered MVC. The one caveat I'd say with 
MVCs in general is that they don't scale well, they are overly large and 
complex for small apps and very slow when the load gets high.

If you application is very small then perhaps a conventional program 
using conventional modules may be in order.

E.g. in Perl you'd use CGI and TT, I'm sure that other languages have 
their own.

One final point I'd say is that whatever you decided to do, there is 
logic in using the langauge you are strongest in on an exposed web 
application...

-- 
Adam

-- 
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--