Improving page layout when doing elementary CGI programming.

T

Ted Byers

OK, I am using several CGI packages. This is relatively easy and
quick. And the pages are much much faster than similar web pages made
using JSP/JSF in NetBeans.

However, one thing I miss from when I am developing web pages using
JSP/JSF/Java servlets is that Netbeans makes it trivially easy to
place controls anywhere on the web page.

No, I am not looking for a perl development environment that will
duplicate Netbeans! What I am looking for is an easy way to do things
like place that login button in the top right corner, a quarter inch
from the top and a quarter inch from the side, regardless of the
geometry of the users' screens, or place this chart in the middle of
the screen with a client side image map that displays the correct info
when the mouse is over the chart; and to do these things writing perl
code.

Therefore, my question is, "Is there a package related to the CGI
package, or complimentary to it, that makes it easy to handle page
layout for the web pages produced?"

I am using Activestate Perl 5.10 on both Windows XP and Windows Server
2003, if that matters.
 
N

Nathan Keel

Ted said:
K, I am using several CGI packages.  This is relatively easy and
quick.  And the pages are much much faster than similar web pages made
using JSP/JSF in NetBeans.

I don't know about all of the CGI/Perl modules out there, but you might
want to browse over CPAN or try and search for something with the
appropriate key words or phrase using your favorite search engine. The
only thing that comes to mind, is something like HTML::Template, but
I've never used it myself. I know things like mod_perl w/ Mason and
templates some years ago that I had worked with allow you to just use
placeholder type of tags or just use a different syntax that embeds the
code in the page. I've not used JSP much at all, so I can't say if
that's really even what you are looking for. I've never had an issue
with just creating my own template system w/ placeholders in the actual
HTML pages it processes, so I've never felt the need to do anything
else (it's easy enough in my view).
 
S

Scott Bryce

Ted said:
What I am looking for is an easy way to do things like place that
login button in the top right corner, a quarter inch from the top and
a quarter inch from the side, regardless of the geometry of the
users' screens, or place this chart in the middle of the screen with
a client side image map that displays the correct info when the mouse
is over the chart; and to do these things writing perl code.

Page layout in the browser is done in HTML, not Perl. So build your
HTML, use Perl to drop in your dynamic content, and send that to the
browser.
Therefore, my question is, "Is there a package related to the CGI
package, or complimentary to it, that makes it easy to handle page
layout for the web pages produced?"

HTML::Template. There are others, but HTML::Template should allow you to
do what you want. I'd look at that first.
 
J

Justin C

OK, I am using several CGI packages. This is relatively easy and
quick. And the pages are much much faster than similar web pages made
using JSP/JSF in NetBeans.

However, one thing I miss from when I am developing web pages using
JSP/JSF/Java servlets is that Netbeans makes it trivially easy to
place controls anywhere on the web page.

No, I am not looking for a perl development environment that will
duplicate Netbeans! What I am looking for is an easy way to do things
like place that login button in the top right corner, a quarter inch
from the top and a quarter inch from the side, regardless of the
geometry of the users' screens, or place this chart in the middle of
the screen with a client side image map that displays the correct info
when the mouse is over the chart; and to do these things writing perl
code.

Therefore, my question is, "Is there a package related to the CGI
package, or complimentary to it, that makes it easy to handle page
layout for the web pages produced?"

Surely that's what the HTML/CSS does for you, and is nothing to do with
the CGI?

Justin.
 
S

smallpond

Surely that's what the HTML/CSS does for you, and is nothing to do with
the CGI?

        Justin.

There are a lot of perl modules for parsing CSS. It would be handy
if there was some WYSIWYG tool for generating CSS. The last perl
UI that I worked on had paper & pencil layout, then a lot of
tweaking and testing of CSS in an editor, then viewing the result
in a browser and guessing how to make it look like you want.

Changing "75px" to "100px" in a file, saving it, and reloading it
in a browser is much lower productivity then just grabbing it with
the mouse and sliding it an inch to the right.
 
S

Scott Bryce

smallpond said:
It would be handy if there was some WYSIWYG tool for generating CSS.
The last perl UI that I worked on had paper & pencil layout, then a
lot of tweaking and testing of CSS in an editor, then viewing the
result in a browser and guessing how to make it look like you want.

Changing "75px" to "100px" in a file, saving it, and reloading it in
a browser is much lower productivity then just grabbing it with the
mouse and sliding it an inch to the right.

OK, but this has nothing to do with Perl. Use whatever editor/generator
you want to create your HTML and CSS. Perl is not an HTML editor.

When you have the HTML, use it to build a template, then you can use
Perl to drop your dynamic content into the template and send it to the
browser.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top