<div dir="ltr">Alan, thanks for the tip. What if I were to use dreamweaver to create the HTML part? Would that make things easier for me?<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-30 8:24 GMT-05:00 Alan Mead <span dir="ltr"><<a href="mailto:amead2@alanmead.org" target="_blank">amead2@alanmead.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Richard,<br>
    <br>
    In my earlier reply, I should have emphasized a point:  if you
    decide to write a CGI, you'll be using Perl (and you'll need to
    learn a bit about how Apache works).  If you choose a framework,
    then you will probably be working with that framework or with
    smaller amounts of Perl to manipulate the objects of that
    framework.   In other words, Perl isn't the most important area of
    expertise for a framework; in order to get advice about a framework,
    you'd do better to ask folks who use that framework.<br>
    <br>
    And if you are using a framework, then I recommend you start by
    installing the framework on the server or a comparable server; there
    is no point in studying a framework unless you have it to play with
    and you may find differences in how easily you can install these
    frameworks.  Once you have one installed, then I'd see if there's a
    book available for it (even if it's somewhat out-of-date).  The kind
    of thing you're doing, is pretty common.<br>
    <br>
    If you decide to go the CGI route, you could start with this old
    book: <a href="http://www.oreilly.com/openbook/cgi/ch09_03.html" target="_blank">http://www.oreilly.com/openbook/cgi/ch09_03.html</a> , but I would
    fill in the table using HTML::Temlplate:
    <a href="http://search.cpan.org/~wonko/HTML-Template-2.95/lib/HTML/Template.pm#TMPL_LOOP" target="_blank">http://search.cpan.org/~wonko/HTML-Template-2.95/lib/HTML/Template.pm#TMPL_LOOP</a>
    . Or, you could find many examples online:
    <a href="http://www.google.com/search?q=perl+CGI+present+SQL+data+table+example" target="_blank">http://www.google.com/search?q=perl+CGI+present+SQL+data+table+example</a>,
    like this one:
    <a href="http://www.easysoft.com/developer/languages/perl/tutorial_data_web.html" target="_blank">http://www.easysoft.com/developer/languages/perl/tutorial_data_web.html</a><span class="HOEnZb"><font color="#888888"><br>
    <br>
    -Alan</font></span><div><div class="h5"><br>
    <br>
    <div>On 3/30/2015 7:56 AM, Richard Reina
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>Hey Everybody,<br>
            <br>
          </div>
          Thanks for all the replies.  Looks a little overwhelming but I
          will get to studying and see if I can find my way. I'm sure
          I'll be back with more questions but thanks again for all the
          ideas.<br>
          <br>
        </div>
        <div>Richard<br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2015-03-26 15:38 GMT-05:00 Joel Berger
          <span dir="ltr"><<a href="mailto:joel.a.berger@gmail.com" target="_blank">joel.a.berger@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
              <p dir="ltr"><br>
                On Mar 26, 2015 10:53 AM, "Jim Thomason" <<a href="mailto:jim@jimandkoka.com" target="_blank">jim@jimandkoka.com</a>>
                wrote:<br>
                ><br>
                > I'd say that using Catalyst or any other MVC
                framework (my camp in this religious debate would be
                Mojolicious) is way overkill, especially for an initial
                simple pass. If you just want to get something braindead
                simple up and running lightning fast...<br>
                ></p>
            </span>
            <p dir="ltr">I have to strongly disagree. </p>
            <span>
              <p dir="ltr">> 1) Get some sort of web server installed
                and configured. apache/nginx/one of the myriad perl
                servers, whatever. Ask your friendly local sysadmin for
                help and/or suggestions, if necessary. And as always, be
                concerned about security if this is public facing.</p>
            </span>
            <p dir="ltr">Mojolicious or the PSGI compliant frameworks
              don't need any special servers, just modules which either
              come bundled or are installable from cpan. </p>
            <span>
              <p dir="ltr">><br>
                > 2) Enable CGI in some manner - this is usually
                either enabling scripts in a certain directory, or
                things with a .cgi extension to be executable.</p>
            </span>
            <p dir="ltr">Configuring CGI is painful, the above servers
              should "just work".</p>
            <span>
              <p dir="ltr">><br>
                > 3) your cgi script is more or less the same as a
                command line script. If you're going to output just
                plain text (as you would have if you were sending to the
                screen or piping it to a file), just add this to the
                top:<br>
                ><br>
                > print "Content-type: text/plain\n\n";<br>
                ></p>
            </span>
            <p dir="ltr">Whaaaa? Why print your own headers? That's what
              frameworks are for! </p>
            <span>
              <p dir="ltr">> And you're done. That'll spit it out to
                the web and it'll look exactly the same as if you were
                sending it to a file. HTTP communication is really easy
                if you skirt a few of the rules - it really just needs a
                Content-type header so the browser knows the type of
                data it's receiving. There's more that you -should- do,
                and I don't suggest you do the above as a production
                run, but to get your feet wet and up and going, this'll
                have you spitting out text to the browser in under an
                hour.</p>
            </span>
            <p dir="ltr">A mojolicious "hello world" is right on the
              main site and work need to be modified very little to make
              work in the manner you suggest. If it takes you an hour
              you might be doing it wrong. </p>
            <span>
              <p dir="ltr">><br>
                > ...and now that the simple start up pleasantries
                are out of the way...<br>
                ><br>
                > First of all, you need to worry about security -
                make sure that the user can't send in arbitrary SQL
                queries to your server, ESPECIALLY if it's not
                firewalled off for only authorized users. The last thing
                you'd need is an open arbitrary SQL gateway that allows
                any black hat to come in and run an insert/update/drop
                table/alter table statement. This task is potentially
                non-trivial, but at a minimum, don't write it to accept
                arbitrary SQL from the browser.<br>
                ><br>
                > The CGI module is pretty popular for the IO
                requirements here. There are myriad other derivatives -
                CGI::Lite, CGI::Minimal, etc. Use whatever's handy.
                That'll give you better header handling, and simpler
                processing for reading in options passed by the user.<br>
                ><br>
                > Next, to pretty it up, templating libraries like
                Text::Template or HTML::Template can help layout an
                interface for you.<br>
                ><br>
                > You may need login/user capabilities. You can do
                that with CGI and templating yourself, but it's a lot of
                infrastructure you need to set up. One of the frameworks
                may be more useful for you at this point.<br>
                ><br>
                > Nowadays, it's also very trendy to have your web
                front ends be javascript apps that handle all the layout
                and interface, and your communication back and forth to
                the server is all done by handing JSON objects or XML.
                So you might want to look into that as well. On the one
                hand, it makes the web front end more complicated and
                brings in different languages, but on the other it can
                keep the server side a lot simpler if you're only
                handing data structures back and forth to the client and
                letting the client side handle all the interaction.<br>
                ><br>
                > -Jim...<br>
              </p>
            </span>
            <p dir="ltr">Nothing personal, but cgi is really passe. Joel</p>
            <div>
              <div>
                <p dir="ltr">><br>
                  ><br>
                  > On Thu, Mar 26, 2015 at 9:30 AM, Alan Mead <<a href="mailto:amead2@alanmead.org" target="_blank">amead2@alanmead.org</a>>
                  wrote:<br>
                  >><br>
                  >> Richard,<br>
                  >><br>
                  >> I think that most people will tell you to use
                  a web-based framework and some of them are optimized
                  for this.  <br>
                  >><br>
                  >> But it's pretty simple to create a
                  single-page CGI that displays some data and there are
                  many examples available online.  I find HTML::Template
                  to have a fairly easy interface for creating HTML
                  tables from DBI queries. Probably a key issue is how
                  much other infrastrcture you need.  For example, if
                  people need to login, that's going to make a simple
                  CGI a bad idea.<br>
                  >><br>
                  >> -Alan<br>
                  >><br>
                  >><br>
                  >><br>
                  >> On 3/26/2015 8:59 AM, Richard Reina wrote:<br>
                  >>><br>
                  >>><br>
                  >>> ---------- Forwarded message ----------<br>
                  >>> From: Richard Reina <<a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>><br>
                  >>> Date: 2015-03-26 8:15 GMT-05:00<br>
                  >>> Subject: Perl MySQL question<br>
                  >>> To: <a href="mailto:chicago-talk@pm.org" target="_blank">chicago-talk@pm.org</a><br>
                  >>><br>
                  >>><br>
                  >>> Hello All,<br>
                  >>><br>
                  >>> What would be the easiest way to display
                  query results from a MySQL database -- running on a
                  Debian machine -- onto a webpage. What I would like is
                  to allow a user to log in and be able to do a few
                  simple queries. I know enough perl and SQL to write
                  the queries via perl->DBI but I have never done any
                  web programing. What I mean is that I have written a
                  lot of perl programs that query databases and display
                  the results on a console screen via curses but never
                  displayed results onto the www. I'm guessing that I
                  might need to install Apache but really have no clue
                  beyond that. <br>
                  >>><br>
                  >>><br>
                  >>> PS It does not have to be anything fancy.<br>
                  >>><br>
                  >>> Any help would be greatly appreciated.<br>
                  >>><br>
                  >>> Richard<br>
                  >>><br>
                  >>><br>
                  >>><br>
                  >>>
                  _______________________________________________<br>
                  >>> Chicago-talk mailing list<br>
                  >>> <a href="mailto:Chicago-talk@pm.org" target="_blank">Chicago-talk@pm.org</a><br>
                  >>> <a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
                  >><br>
                  >><br>
                  >> -- <br>
                  >><br>
                  >> Alan D. Mead, Ph.D.<br>
                  >> President, Talent Algorithms Inc.<br>
                  >><br>
                  >> science + technology = better workers<br>
                  >><br>
                  >> +815.588.3846 (Office)<br>
                  >> +267.334.4143 (Mobile)<br>
                  >><br>
                  >> <a href="http://www.alanmead.org" target="_blank">http://www.alanmead.org</a><br>
                  >><br>
                  >> Announcing the Journal of Computerized
                  Adaptive Testing (JCAT), a<br>
                  >> peer-reviewed electronic journal designed to
                  advance the science and<br>
                  >> practice of computerized adaptive testing: <a href="http://www.iacat.org/jcat" target="_blank">http://www.iacat.org/jcat</a><br>
                  >><br>
                  >><br>
                  >>
                  _______________________________________________<br>
                  >> Chicago-talk mailing list<br>
                  >> <a href="mailto:Chicago-talk@pm.org" target="_blank">Chicago-talk@pm.org</a><br>
                  >> <a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
                  ><br>
                  ><br>
                  ><br>
                  > _______________________________________________<br>
                  > Chicago-talk mailing list<br>
                  > <a href="mailto:Chicago-talk@pm.org" target="_blank">Chicago-talk@pm.org</a><br>
                  > <a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
                </p>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Chicago-talk mailing list<br>
            <a href="mailto:Chicago-talk@pm.org" target="_blank">Chicago-talk@pm.org</a><br>
            <a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Chicago-talk mailing list
<a href="mailto:Chicago-talk@pm.org" target="_blank">Chicago-talk@pm.org</a>
<a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a></pre>
    </blockquote>
    <br>
    <pre cols="72">-- 

Alan D. Mead, Ph.D.
President, Talent Algorithms Inc.

science + technology = better workers

+815.588.3846 (Office)
+267.334.4143 (Mobile)

<a href="http://www.alanmead.org" target="_blank">http://www.alanmead.org</a>

Announcing the Journal of Computerized Adaptive Testing (JCAT), a
peer-reviewed electronic journal designed to advance the science and
practice of computerized adaptive testing: <a href="http://www.iacat.org/jcat" target="_blank">http://www.iacat.org/jcat</a></pre>
  </div></div></div>

</blockquote></div><br></div>