LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 02-25-2009, 12:22 AM   #1
slackert
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Rep: Reputation: 1
Using perl and possibly ajax, need help getting started


Hello,

I've been writing perl scripts and perl CGIs for quite a while now. But all of my scripts/pages/cgi follow the design of:

1) get something from user
2) do something with that data
3) generate and display html

Nothing fancy, and I don't use CGI.pm. I've just always generated and printed my own html, what can I say? I'm a control freak.

Some newer projects I'm working on could benefit from not doing constant GETs or constantly refreshing a page. For example, I'd like to have a page that could be broken up using frames or tables or whatever and stream text to each one of those frames/cells without doing constant GETs/refreshes. Something like multitail for a web page. That's just an example, not necessarily what I'm doing though. I'm just trying to get around the constant requests for data from the client, same thing with refreshes.

Ajax seems to be the tool to use for this sort of thing but I've never really dug into javascript, so I'd have to jump in to that if it's the way to go. I've checked out CGI::Ajax, but it seems to hide me from the 'code' the same way CGI.pm does....I'd rather stay away from that.

So my question is, what's the best way to approach this?

Thanks!
 
Old 02-25-2009, 03:44 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,456

Rep: Reputation: 104Reputation: 104
you could take a look at script.aculo.us for and include these javascript libraries in your site. It's a professional framework for handling AJAX and fancy effects that are working on most browsers...


And as you call yourself a control freak: mod_perl will provide you with much more detailed control over the http request and its handling so this may be an interesting option. I'm working in web development for some years now and mod_perl is my favourite technology, unfortunately not very common.

Last edited by j-ray; 02-25-2009 at 05:22 AM.
 
Old 02-25-2009, 08:11 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,314

Rep: Reputation: 175Reputation: 175
control freak?

no CGI.pm
not very perl.

sounds like you like typing
A lot!

:-)
 
Old 02-25-2009, 08:52 AM   #4
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 59
If you want that much control, I think you will have to learn Javascript and write those parts that way. If you want a little help, jQuery is a great library. But if you won't even use CGI.pm (much less any of the hundreds of more modern, excellent Perl modules for web applications, then you probably want to do it by hand.
 
Old 02-27-2009, 02:12 AM   #5
slackert
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 1
Thanks to everyone for your replies.

I've been working with CGI and CGI::Ajax and have the beginnings of what I want. I think it will definitly be beneficial to me to use one of the templating modules as well.

CGI::Ajax seems like it will hide me from the gory stuff, but I should still role up my sleeves and just learn javascript and/or jquery...along with how to work ajax in to that.

Well I've got some learning to do ....
 
  


Reply

Tags
ajax, html, perl


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Started nautilus as root....problems started Chaosbringer Suse/Novell 0 11-05-2008 04:00 AM
LXer: Solid Ajax applications, Part 2: Building Ajax back ends LXer Syndicated Linux News 0 01-22-2008 01:30 PM
LXer: Eclipse Ajax Toolkit Framework and Ajax tools LXer Syndicated Linux News 0 05-12-2006 01:21 PM
LXer: Mastering Ajax, Part 3: Advanced requests and responses in Ajax LXer Syndicated Linux News 0 02-16-2006 07:46 AM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 09:09 PM


All times are GMT -5. The time now is 04:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration