Improving page layout when doing elementary CGI programming.

Discussion in 'Perl Misc' started by Ted Byers, Aug 5, 2009.

  1. Ted Byers

    Ted Byers Guest

    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.
     
    Ted Byers, Aug 5, 2009
    #1
    1. Advertising

  2. Ted Byers

    Nathan Keel Guest

    Ted Byers wrote:

    > 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).
     
    Nathan Keel, Aug 5, 2009
    #2
    1. Advertising

  3. Ted Byers

    Scott Bryce Guest

    Ted Byers wrote:
    > 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.
     
    Scott Bryce, Aug 6, 2009
    #3
  4. Ted Byers

    Justin C Guest

    On 2009-08-05, Ted Byers <> wrote:
    > 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.

    --
    Justin C, by the sea.
     
    Justin C, Aug 6, 2009
    #4
  5. Ted Byers

    smallpond Guest

    On Aug 6, 4:46 am, Justin C <> wrote:
    > On 2009-08-05, Ted Byers <> wrote:
    >
    >
    >
    > > 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.
    >


    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.
     
    smallpond, Aug 6, 2009
    #5
  6. Ted Byers

    Scott Bryce Guest

    smallpond wrote:
    > 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.
     
    Scott Bryce, Aug 6, 2009
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Last Timer

    Elementary question on const

    Last Timer, Jan 30, 2005, in forum: C++
    Replies:
    5
    Views:
    368
    Mike Wahler
    Jan 30, 2005
  2. Lionel B
    Replies:
    5
    Views:
    464
    Gianni Mariani
    Mar 3, 2005
  3. Replies:
    1
    Views:
    618
    John Timney \(MVP\)
    Jun 19, 2006
  4. Sathyaish

    Elementary questions from a beginner

    Sathyaish, Mar 1, 2004, in forum: C Programming
    Replies:
    12
    Views:
    591
    Richard Bos
    Mar 4, 2004
  5. Replies:
    3
    Views:
    297
    osmium
    Feb 25, 2007
Loading...

Share This Page