Ask a Question related to PERL Beginners, Design and Development.
-
Yannick Warnier #1
Re: Face lift survey
Le jeu 30/10/2003 à 23:59, Dan Muey a écrit :
But PHP, I think, integrates html code a better way. You can just type> Here's a thought I'd like to get opinions on...
> ---Who cares you say, it's not Perl's job to make it look nice?
> Right but it's not PHP's job either and some of them look very nice.
your html code and then say
<?php code ?>
and there you put the varying code. This is a good solution when you
want to separate content and presentation. I don't know but you'll tell
me... does that exist in perl.
As far as I know, you still have to do a perl script and then put
print <<"EOF";
code
EOF
to get some html easily. Isn't that ugly? (beeeeeeh! :-D).
I use both Perl and PHP. None of them seems ugly to me. I think the> --OK again, who cares what does it matter?
> It matters because people will begin look at PHP as a "pretty" language and Perl as an "Ugly"
> Language suitable only for scary nerd in the dark work while they use PHPfor what the public
> sees. And then shy away from Perl.
learning curve is a little nicer with PHP. PHP is more comfortable when
you don't know what you're doing :-p because it offers less dangerous
possibilities like file system access and because having a look at
php.net and the user's comments there generally gets you immediately the
kind of answer you would like to have.
To find any answer about some common matter in Perl, you have to crawl
the web. Or ask here (which is the simplest way I have found, but
sometimes nobody can answer and then...).
-- But there are some things that you might need to know about PHP which
are not on their website! (surely there is!?)
Well yes, but then you just find your way alone...
The thing is PHP is more restricted, so for developing web scripts you
don't have to bother about what module is needed. 99% of the times it is
there.
When I have something really complex to do (like parsing xml, presenting
an XML structure right with the indentation; like looking at processes
execution status on a multi-platform system; like changing the registry
under WinNT to register a new service...) then I do it in Perl, but the
"outside look" of the script is really harder to do.
Another thing might be the tools I use to program, but the fact is I use
vim commonly and when you use a print <<"EOF", what comes next is
colored as a simple string and the html is not recognized in there,
which is then more complex when you are used to syntax colouring that
indicates clearly the html tags and attributes in different colors.
-- But there surely is some tool which can make your life easier with
Perl CGI programming!
Which one? Show me...
Right. How much time do you need to learn perl web scripting to be sure> --But the world will not end if I make ugly html as long as it works likea tank!
it works like a tank? Zend (PHP developer?) has published a survey on
their website about the use of PHP worldwide. Maybe comparing to a
similar survey from Perl would just give some answers we didn't think
about.
Well, I know that you are one of the most active persons here Dan, so I> --And what evil will this lead up to besides?
> For one, people recommending PHP scripts on a Perl list, the last place
> you'd think such a thing would happen.
wouldn't want to hurt your feelings, but the purpose of any programming
mailing list should be to help people out. If somebody answers with a
PHP recommendation... well... maybe it's worth comparing. For example in
this matter, would you have a quick answer to give to William about his
web calendar? That's the thing, if you want to achieve great things
fast, you'll have to rely on already done solutions sometime, I don't
mean you don't know it, I'm just considering the point in this context.
I say I could be really with you if I were stronger in Perl programming.> -- Ok I'm with you but what to do?
>
> I say we each put more personal emphasis on the look of the output
> of things we develop and stress that to people the same way we stress
> using strict, using modules instead of reinventing stuff, and making
> things platform independent.
In fact I'm just starting my programming life at the moment and I am
waiting for some job to give a language direction to my career.
Now I do a lot of web development and I've never yet come to a company
which asked me to do it in Perl. How comes? Well... I think nature does
its job of selection and if PHP (I'll say beeeuuur about ASP just for
the pleasure of the troll:-)) is more widely present for web
development, it is that it's faster to do what you want.
Now if I were to be paid to do the same in Perl, I wouldn't mind. But
then I'll have to use the things I learned for another project so as to
get stronger and stronger in Perl. I really don't mind, I just wonder if
enough companies will ask me to develop in Perl so as to let me eat...
Being easier to learn (which I think is the case for PHP only because
it's restricted and that their website is nicely done) is also a
recurrent thing. When you haven't done some Perl or PHP for a while,
it's also harder to recover your skills in Perl.
--But then how could it be sorted?
I think people should concentrate more around one website and make more
documentation about Perl. Also, if that doesn't exist, somebody should
make something to be able to embed Perl into html instead of embedding
html into Perl.
Once this is done, I'm sure Perl would just be light like a feather and
solid as a tank in the same time (and then beat PHP on its own ground).
I doubt this would happen fast enough to catch up PHP on its ground. I
hope so however.
Thanks for asking. The same applies to my answers.> Thoughts, feelings, pros, cons, pummeling?
Yannick
Yannick Warnier Guest
-
New Forum Needs a Lift! We Need Programmers!
Hi everyone, www.webdesignmagic.com.au/forum.asp <BLOCKED::BLOCKED::BLOCKED::BLOCKED::http://www.webdesignmagic.com.au/fo rum.asp> I am... -
dial face
I am laying out a dial face for an indicator. How do I layout gradation lines 360 degrees in specific increments? Are there any shortcuts? I am... -
how is this face done?
this is neat how the head appears 3D like. http://www.oddcast.com/vhost/bush/host.php?id=1 I looked on Flashkit for anything similar but can't... -
Face Animation
When modeling in 3D Studio Max, the animation for the face and body become the same animation set. The result I am looking for in Macromedia director... -
New AMD Logo needs a face lift.
For those in the know, AMD has just come out with a new logo, found here. ... -
Jenda Krynicky #2
Re: Face lift survey
From: "Dan Muey" <dmuey@infiniplex.com>
Maybe the whole point is that most PHP guys have a different> Here's a thought I'd like to get opinions on...
>
> A recent post that talked about a php calendar script got me thinking.
> One thing that draws people who don't know better to PHP over Perl is
> that the php scripts they can get look really really nice, phpbb, for
> instance. Those developers have spent much time in making it look very
> nice which is good.
background than most Perl people. So I would actually expect PHP
stuff to look better from the outside and worse in the inside.
Maybe.> The point is, does anyone think that with systems developed in Perl
> (especially web based ones) we should consciously place more emphasis
> on the skin as well as the guts?
Wanna get rid of me? The best I can do in this regard is to ask> I say we each put more personal emphasis on the look of the output of
> things we develop and stress that to people the same way we stress
> using strict, using modules instead of reinventing stuff, and making
> things platform independent.
someone to do the design for me. :-)
Jenda
===== [email]Jenda@Krynicky.cz[/email] === [url]http://Jenda.Krynicky.cz[/url] =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
Jenda Krynicky Guest
-
Charles K. Clarkson #3
RE: Face lift survey
Yannick Warnier <ywarnier@beeznest.org> wrote:
:
: But PHP, I think, integrates html code a better way. You can
: just type your html code and then say <?php code ?> and there
: you put the varying code. This is a good solution when you
: want to separate content and presentation. I don't know but
: you'll tell me... does that exist in perl.
The Good Things about separate content and presentation on
a web site also apply to programming. Embedded programs require
either a special editor or the tedious searching of every file
to update and maintain code. New programmers who start with PHP
learn from the beginning this Bad Thing. Down the line, many
realize the mistake of not separating programming from content
just as many web site designers are jumping on CSS to separate
content from design.
: As far as I know, you still have to do a perl script and
: then put
: print <<"EOF";
: code
: EOF
: to get some html easily. Isn't that ugly? (beeeeeeh! :-D).
Let me introduce you to HTML::Template. Here's part of a
bare bones content management system I just wrote for an ASP
system. Notice the complete lack of xhtml.
my $query = CGI->new();
if ( $query->param() ) {
# Update content-right.asp
update( '/content-right.asp', '/cgi-bin/content-right.tmpl' );
# Update the original form
update( '/site/admin/frontpage.html', '/cgi-bin/frontpage.tmpl' );
# Update the member article
update( '/site/code/MemberArticle.asp', '/cgi-bin/MemberArticle.tmpl' );
# Update the content-left
update( '/content-left.asp', '/cgi-bin/content-left.tmpl' );
}
print $query->redirect( "/site/admin/" );
sub update {
my $query = CGI->new();
my $root = 'D:/hshome/dfwrein/dfwrein.com';
my $template = HTML::Template->new(
filename => "$root$_[1]",
associate => $query,
die_on_bad_params => 0,
);
my $file = $_[0];
open my $fh, ">$root/$file" or die "Cannot open '$file': $!";
print $fh $template->output;
close $fh;
return 1;
}
No html in the script at all. Got a complicated application?
Check out CGI::Application. Got a designer or a webmaster who
can't stand the utilitarian approach you used in form design?
Let them edit the templates which contain no perl whatsoever.
When I embed ASP in html, I try to isolate the programming
from content as much as possible. I'll create either a "constants"
script that is included with the Global.asa file or specific
functions that need inclusion (SSI) to run. That way content
writers get functions like: <% = TopUsersByPosts( 20 ) %>,
instead of long strings of code that content writers probably
don't need to see or to understand.
PHP tends to teach new programmers to embed their scripts
directly into their web pages. This makes maintenance difficult
and supports an idiom that will become even more of a problem
as xhtml starts being replaced by its successor (whatever that
might be). Changing a site that uses embedded PHP in html to
PHP embedded in xhtml would be tedious at best.
: To find any answer about some common matter in Perl, you have
: to crawl the web. Or ask here (which is the simplest way I
: have found, but sometimes nobody can answer and then...).
Or use perlmonks.com. I use a search for answers to most
of my server side vbscript questions. I find it very effective.
: -- But there surely is some tool which can make your life
: easier with Perl CGI programming! Which one? Show me...
Search CPAN for "template".
: I say I could be really with you if I were stronger in
: Perl programming. In fact I'm just starting my programming
: life at the moment and I am waiting for some job to give a
: language direction to my career. Now I do a lot of web
: development and I've never yet come to a company which
: asked me to do it in Perl. How come? Well... I think
: nature does its job of selection and if PHP (I'll say
: beeeuuur about ASP just for the pleasure of the troll:-))
: is more widely present for web development, it is that it's
: faster to do what you want.
It depends, though, what you want. My clients tend to be
less sophisticated than yours in their demands. Few potential
clients have ask me for projects in specific languages. They,
like you, just want it to work as soon as possible.
Here's where I switch to teacher mode and explain that
an approach like that will mean more expense when (not if)
you decide to change or update in the future. I then tell
them that a planned approach allows it to work now *and* in
the future. PHP, for the most part, provides answers that
promote poor programming skills. Much the same as early
programming in perl.
It is my responsibility as a contractor or consultant
to sell appropriate products to my customers. If that means
educating them along the way, then that it what I must do. I
am the expert, not my customer. If their expertise were in
programming they wouldn't call on me.
: I think people should concentrate more around one website
: and make more documentation about Perl. Also, if that
: doesn't exist, somebody should make something to be able
: to embed Perl into html instead of embedding html into Perl.
I believe the HTML::Mason module does this.
: Once this is done, I'm sure Perl would just be light like
: a feather and solid as a tank in the same time (and then
: beat PHP on its own ground). I doubt this would happen
: fast enough to catch up PHP on its ground. I hope so
: however.
Actually, I think it happened *before* PHP became
popular.
: > Thoughts, feelings, pros, cons, pummeling?
:
: Thanks for asking. The same applies to my answers.
Not to mine, Bucko! I am always right and disagreeing
with me will lead to dire consequences.
Charles K. Clarkson
--
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists
254 968-8328
Charles K. Clarkson Guest
-
Yannick Warnier #4
RE: Face lift survey
Le dim 02/11/2003 à 04:58, Charles K. Clarkson a écrit :
I hear you well, I won't comment on this, just put it aside and go> Not to mine, Bucko! I am always right and disagreeing
> with me will lead to dire consequences.
carefully check the references before I begin the next project.
Thanks
Yannick>
> Charles K. Clarkson
Yannick Warnier Guest



Reply With Quote

