Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
PerlMonks - Dreamweaver or somesuch?

by Anonymous Monk
on Apr 27, 2001 at 21:36 UTC ( [id://76182]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I've happily got the basics of mod-perl, DBI, and down...

Now I'd like to make some nice looking webpages, not just the uglies that I am currently auto-generating with

How can I do this? allows me to do so much programatically: populate pop-up boxes based on database lookups, decide whether or not to print certain elements of the page based on database lookups...

Can I still do these wonderful things and yet have it come out slick looking? Thanks for any advice!

Phil R Lawrence

Replies are listed 'Best First'.
Re: - Dreamweaver or somesuch?
by Masem (Monsignor) on Apr 27, 2001 at 21:41 UTC
    As we've talked about recently (such as here), you want to try separate perl code from HTML as much as possible, and the various templating solutions that exist (HTML::Mason, HTML::Template, or Template, to name a few) help you do this.

    The key is to collect all the data that you need in the perl part of the program, and then throw that to the template file. Once you have the perl logic down, it's very easy to play whatever pretty-ing games you need to do with the HTML to make the output look good. You just simply need to embed the data from perl into the appropriate places.

    This approach makes the job of programming web sites for both function and appearence very simple.

    Dr. Michael K. Neylon - || "You've left the lens cap of your mind on again, Pinky" - The Brain
(jeffa) Re: - Dreamweaver or somesuch?
by jeffa (Bishop) on Apr 27, 2001 at 21:39 UTC
    How about a templating system? I wrote a tutorial on HTML::Template here.

    There is also Template-Toolkit which is more powerful, and consequently more complex.


Re: - Dreamweaver or somesuch?
by rchiav (Deacon) on Apr 27, 2001 at 21:45 UTC
    Anything you can do with a WYSIWYG HTML editor like "Dreamweaver" or other bulky programs, you can do with a text editor. The only diffeence is that you have to know what you're doing when you do it by hand. All Dreamweaver does is generate the HTML for you. There's nothing special about the files that it generates, well except for the fact that they are much bigger than they should be because it inserts a lot of HTML that isn't needed.

    If you're willing, I'd highly recomend learning how to write the HTML yourself. Take a look at W3C's Tutorials for starters. There's also a good refrence here from Microsoft. Then you can take that knowledge and use to create what you want. It's not's fault that the pages don't come out the way that you want. It's just generating the HTML that you're telling it to.

    Hope this helps..

Re: - Dreamweaver or somesuch?
by tphyahoo (Vicar) on Feb 23, 2005 at 13:09 UTC

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://76182]
Approved by root
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-07-15 08:58 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.