MySQL and Perl for the Web
Who is this book for? Developers looking for a quality book on Perl and database development should not pass this book up. While the title of this book is MySQL & Perl for the Web, it could have easily been called DBD/DBI & Perl for the Web. The SQL examples may or may not work with various databases, but the DBI interface code should remain the same. This book will also do well as a reference for experienced coders looking for well-crafted examples of web-based applications. What's good? The second chapter should be enough to get anyone up to speed with using Perl, DBI, CGI, Apache, and MySQL. After a brief introduction and configuration of MySQL and Apache, the author settles in to discuss coding DBI and Perl. The remainder of the chapter details the best practices for using Perl and DBI together. Near the end of the second chapter, the author creates a fully functional to-do list, demonstrating ways to add, update, and delete information from the database using Perl and DBI. Instead of taking small baby steps over many chapters, the author shows important concepts and best practices for those concepts quickly. Even seasoned (hardened?) programmers may learn new tricks or methodologies from the second chapter of this book.
Is that the end? Are we left with one very well written tutorial chapter? Thankfully, the rest of the book has plenty to offer. Subsequent chapters include:
- Improving performance with mod_perl
- Generating and processing forms
- Writing form-based applications
- Automating the form-handling process
- Performing searches
- Session management
- Security and privacy issues
- E-commerce applications
Each chapter is clearly written, with several examples used to demonstrate the concepts presented. The examples are clearly written, and the author makes the whole learning process enjoyable and fun. The examples range from a give-away contest (including a random drawing), an electronic greeting card program, polling programs, and a shopping cart program. Each of the examples is presented completely, but are introduced in pieces (subroutines, modules, etc.) The full source code is available from the author's website at http://www.kitebird.com/mysql-perl/
What's in it for me? MySQL & Perl for the Web is the book that Perl programmers on any project will wish The Other Guy had read. The examples are clear, the writing is engaging, and the code is maintainable. This is a practical book and should not be overlooked in any serious Perl programmer's library.You can purchase MySQL and Perl for the Web from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
MyFP?
For gay men and straight women.
:)
Document history:
Apr. 23, 2004 Added information about the hormonal content of semen
Nov. 30, 2003 First version
Aug. 6, 2003 Initial rough draft
I love blow jobs. Not just getting them, but giving them. It's an amazing experience. Being gay, I may not be typical for a man, however straight women generally have an even stronger aversion from dick sucking than straight men. Females not only don't know how to suck dick, they don't want to learn. They don't own the equipment, they don't understand the male drive, they don't know how a blow job feels, and they don't know how penises work. In fact, while many women have experimented with dick sucking, 90% of them don't like or don't want to try sucking dick. That's unfortunate because they are missing out on a rewarding experience. Likewise, their men are missing out on a very exciting experience. Let's face it, if you want to receive not just a blowjob, but a blowjob, you probably want a guy for a partner. Unless, of course, this guide helps transfer the carnal knowledge of pleasuring a man from a gay man to the straight women out there. If not, I hope to at least transfer this knowledge to another gay man out there.
The penis is one of the most wonderful parts of the body to suck. Nothing can compare to its size, shape, texture, warmth, taste, and its response to touch. Female breasts are rather inanimate in comparison. Their only redeeming qualities are the nipples that respond to touch, but guys have nipples too, so it's not an exclusively feminine part of the body.
It is important to give yourself a weekend of privacy the first time you try to suck off a guy. You may not be able to the first time and will need extra time the next day or two to try again. If you don't give yourself a weekend, you can end up failing and then next time you will make the same mistakes again because you will not remember what you did wrong the previous time.
You probably have noticed it's much harder to masturbate while standing up. It is much more difficult to get a guy off if he's standing up, especially if you've never sucked off a guy before. Although blowjobs are stereotypically associated with a kneeling giver, in practice, that is an uncomfortable position for the receiver as he must either sit or stand. Instead, have your partner lie down on his back on a bed (or somewhere soft and flat). Here's a good (censored cartoon) example of such a position. Note how both bodies are aligned. Note also that it will get very hot underneath a blanket of any thickness, so lose the blanket unless the room is uncomfortably cold. Use your own experiences of masturbation in private to guide you as much as possible.
Notice how the dick is not completely cylindrical, but is slightly flattened? That shape is designed to fit perfectly in the mouth. There's no way evolution could have better designed a part for sucking. Note that the most sensitive portion of the penis is the length underneath the shaft. This should clue you in on how to position yourself to suck him. You will want to scoot yourself down so that you are 1) straddling one or both of his legs or 2) kneeling beside him or between his legs. Find out what works for the both of you.
The underneath of his shaft should rest on your tongue and his penis should lie flat in your mouth. Once you take him into your mouth, try turning your head 90 degrees around his cock and you will notice that you will have to open wider to accomodate him. The wider you have open your mouth, the quicker you will tire, so make sure you align yourself for the most comfort. Likewise, your partner will enjoy it more if your tongue is in the right place.
Lick along the length of the shaft and give the tip a few licks around the ridge of the tip. Have fun. Take his tip in your mouth and suck. You may want to hold his shaft d
gain
Two snaps down!!!
Perl (also love it or hate it) was almost synonymous with website programming.
Love Perl for most anything, hate it for web "programming". There's a good reason it was synonymous with website programming. It's because there now exist more flexible, robust, easy-to-use platforms for web development.
Linux, Apache, Mysql, and Perl. They changed the world forever.
Tee-hee. I still laugh when I see that phrase.
Shutting down free speech with violence isn't fighting fascism. It IS fascism!
Why should I log in?
;)
Logged in users have a variety of benefits on Slashdot that are unavailable to users who don't bother logging in. Among these benefits are:
* The ability to save user preferences from visit to visit.
* Your own Journal in which to share your innermost feelings.
* The ability to define Friends & Foes to aid in reading discussions.
* A chance to participate in Slashdot's Moderation and Meta Moderation System.
* Posting in Discussions at Score:1 instead of Score:0 means twice as many people will see your comments.
So do it! Log In Already!
Answered by: Rob "CmdrTaco" Malda
Last Modified: 6/16/03
Can I change my nickname?
You can't. Sorry. It's just too prone to abuse. You can't delete your own comments. You can't change your name. There are no exceptions to this.
Answered by: Samzenpus
Last Modified: 12/19/01
How do I change my password or email address?
Go to the User Info Editing Page while you are logged in and use the form provided there.
Answered by: CowboyNeal
Last Modified: 4/03/03
How can I delete my account?
You can't. The system needs to keep track of the users, so accounts are permanent. Don't sweat leaving unused accounts hanging around. It doesn't hurt anything.
Answered by: CmdrTaco
Last Modified: 6/13/00
I forgot/can't get my password!
You should be able to get it from the user login page. Just type in your nickname and hit 'mailpasswd' and your password will be whisked off to your email address. If, however, this doesn't seem to be working, email passwords@slashdot.org for help.
Answered by: CowboyNeal
Last Modified: 3/4/02
I'm having trouble logging in.
Make sure you have cookies turned on. If you don't, it won't work. Also make sure that the date and time on your computer is correct. In an handful of cases, the problem could be related to a problem with a proxy server, but this is very unlikely. If you've turned cookies on and tried again to log in, and it still doesn't work, drop CowboyNeal a note and he'll try to help you.
Really, though, the system works for thousands of people every day, so the problem is most likely on your end
Answered by: CmdrTaco
Last Modified: 6/13/00
I'm having trouble logging into Slashdot Sections (Like Apple, YRO, or BSD)
You can be logged into slashdot while you view any of the subsections. All you need to do is hit any of the sections, and log in. Logging into one of them logs you into all. But you need to log into at least one section seperate from logging into http://slashdot.org.
Yeah, we know this is confusing, but we didn't write the RFC for cookies. Sorry for the inconvenience.
Answered by: CmdrTaco
Last Modified: 3/30/02
I don't want to accept a cookie!
A lot of people are paranoid about cookies, and not without reason, but the simple fact is that this is how you create persistence in a stateless protocol. I've heard all the arguments and all the debates on the subject, and this is how we're doing it.
If you don't want to use cookies, you don't have to. You can still post (either anonymously, or by entering your password each time you submit a comment) but you will not be able to use all of the advanced features of Slashdot (story filtering, customized Slashboxes, user preferences etc.). If your paranoia requires you not to use cookies, this is the sacrifice you'll have to make.
Answered by: CmdrTaco
Last Modified: 6/13/00
Someone is posting under a false identity, or an account designed to look like someone else
There are many accounts in the system that were created for malicious purposes. There are dozens of variations on names like 'CmdrTaco' and 'Hemos' as well as heads of many corporations, writers, etc. We don't tamper with existing accounts though, so there's nothing we can do about it. Over the last few years, numerous restrictions have been placed on a
troll
..isn't meant to be used for whole paragraphs, because it is hard to read.
I find there are a lot of books and resources which each Perl, or teach SQL, but don't teach you how to use Perl, or use SQL. For example, it is perfectly possible to read a book, learn Perl, and not be able to actually use it for anything useful (in regard to websites). Not many books that I've seen have addresses this. My personal knowledge of Perl for use in webpages is scraped together. Perldoc.com helps a lot, however. Books like this seem useful as a starting ground. PHP is gaining a lot of ground on PHP (It's overtaken it, I hear). This may be because it is more suited to suited to web development, or it may be more because all it does is web development: As soon as you know PHP, you know how to make a website using PHP. Most Slashdot readers will be past this point in learning a language I should imagine, so, without reading anymore than this book review, I might suggest it wouldn't be worth buying, but this is certainly the sort of book which should be on the bookselves in shops. A lot more helpful than 101 books about how to use IOSTREAMs in C++.
- Jax
Translation please?
It could be programmed to tell you when you forget a closing tag.
PerlScript ASP is available for Apache on Linux, ready to work with MySQL through a REAL scripting language, ASP. Makes PHP look like a kids' toy, really.
I have been using a MySQL / Perl solution called WebGUI for quite a while
now. It is a full CMS system that is truly open source and cross
platform, running on *nix, Windows and MacOS.
It truly is powerful yet very easy to use. Plenty of features such as Submissions system, Bulletin Board, Calendar, Syndicated Content and much more.
If you are looking for such a solution, feel free to give it a try.
Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
Does the whole thing have to appear like this?
I discovered PHP. It just seems to be such a natural language when it come to designing a dynamic website.
But PHP is far better suited for webpage development than Perl. For starters, PHP is understood by more people, meaning there are more existing projects that you can implement or just borrow code from.
bwhahaha cuntface died
;)
Why should I log in?
Logged in users have a variety of benefits on Slashdot that are unavailable to users who don't bother logging in. Among these benefits are:
* The ability to save user preferences from visit to visit.
* Your own Journal in which to share your innermost feelings.
* The ability to define Friends & Foes to aid in reading discussions.
* A chance to participate in Slashdot's Moderation and Meta Moderation System.
* Posting in Discussions at Score:1 instead of Score:0 means twice as many people will see your comments.
So do it! Log In Already!
Answered by: Rob "CmdrTaco" Malda
Last Modified: 6/16/03
Can I change my nickname?
You can't. Sorry. It's just too prone to abuse. You can't delete your own comments. You can't change your name. There are no exceptions to this.
Answered by: Samzenpus
Last Modified: 12/19/01
How do I change my password or email address?
Go to the User Info Editing Page while you are logged in and use the form provided there.
Answered by: CowboyNeal
Last Modified: 4/03/03
How can I delete my account?
You can't. The system needs to keep track of the users, so accounts are permanent. Don't sweat leaving unused accounts hanging around. It doesn't hurt anything.
Answered by: CmdrTaco
Last Modified: 6/13/00
I forgot/can't get my password!
You should be able to get it from the user login page. Just type in your nickname and hit 'mailpasswd' and your password will be whisked off to your email address. If, however, this doesn't seem to be working, email passwords@slashdot.org for help.
Answered by: CowboyNeal
Last Modified: 3/4/02
I'm having trouble logging in.
Make sure you have cookies turned on. If you don't, it won't work. Also make sure that the date and time on your computer is correct. In an handful of cases, the problem could be related to a problem with a proxy server, but this is very unlikely. If you've turned cookies on and tried again to log in, and it still doesn't work, drop CowboyNeal a note and he'll try to help you.
Really, though, the system works for thousands of people every day, so the problem is most likely on your end
Answered by: CmdrTaco
Last Modified: 6/13/00
I'm having trouble logging into Slashdot Sections (Like Apple, YRO, or BSD)
You can be logged into slashdot while you view any of the subsections. All you need to do is hit any of the sections, and log in. Logging into one of them logs you into all. But you need to log into at least one section seperate from logging into http://slashdot.org.
Yeah, we know this is confusing, but we didn't write the RFC for cookies. Sorry for the inconvenience.
Answered by: CmdrTaco
Last Modified: 3/30/02
I don't want to accept a cookie!
A lot of people are paranoid about cookies, and not without reason, but the simple fact is that this is how you create persistence in a stateless protocol. I've heard all the arguments and all the debates on the subject, and this is how we're doing it.
If you don't want to use cookies, you don't have to. You can still post (either anonymously, or by entering your password each time you submit a comment) but you will not be able to use all of the advanced features of Slashdot (story filtering, customized Slashboxes, user preferences etc.). If your paranoia requires you not to use cookies, this is the sacrifice you'll have to make.
Answered by: CmdrTaco
Last Modified: 6/13/00
Someone is posting under a false identity, or an account designed to look like someone else
There are many accounts in the system that were created for malicious purposes. There are dozens of variations on names like 'CmdrTaco' and 'Hemos' as well as heads of many corporations, writers, etc. We don't tamper with existing accounts though, so there's nothing we can do about it. Over the last few years, numerous restrict
...and you've got a Ruby app to write, you'll be happy to know that Ruby/DBI is available.
It's being actively developed - a FrontBase release just happened a few days ago - and it supports a big list of databases.
The Army reading list
This will be an excellent addition to the O'Reilly books on Perl I already have.
The whole love or hate thing in the article intrigues me I might add. I love both MySQL and Perl. Why? Well, you can't beat MySQL for its cheapness facor. Let's face it, most people don't need some professional job, myself included. And as far as Perl goes, well, anyone who's used it significantly can understand how great it is for practical answers on the fly.
I could really go for a BJ right about now. If only I got my dick sucked as often as I reload slashdot...
...until I discovered poking myself with a sharp stick.
does anyone else realize that this book is exteremly old?
Paperback, August 2001
also.... on the same bn site
A new copy is not available from Barnes & Noble.com at this time.
I love perl for what it was designed to do: process text in just about any way imaginable. I hate it for the purpose proposed here: CGI scripts.
I usually use PHP for Web pages, a mixture of PHP, Perl and Bourne shell (and whatever else is at hand) for the back end, and I wouldn't touch MySQL for a database if my life depended on it, when there are vastly superior OSS altrernatives available.
How am I supposed to fit a pithy, relevant quote into 120 characters?
As there are already books such as Programming the Perl DBI and Web Development with Apache and Perl, is the niche that this book is trying to fill actually worth it? Would I be better off reading Writing CGI Applications with Perl and The Official Guide to Programming with CGI.pm?
Personally, I haven't read a single one of them, so I'd really love to know. (one of these days, I'll actually read the copy of Practical mod_perl that's been collecting dust on my shelf.)
Build it, and they will come^Hplain.
pretty extreme example of writing free software and charging for "services." I'm probably not the only one who didn't bother looking closer after seeing that.
Comment removed based on user account deletion
Congratulations O$DN!
;)
Why should log in?
Logged in users have a variety of benefits on Slashdot that are unavailable to users who don't bother logging in. Among these benefits are:
* The ability to save user preferences from visit to visit.
* Your own Journal in which to share your innermost feelings.
* The ability to define Friends & Foes to aid in reading discussions.
* A chance to participate in Slashdot's Moderation and Meta Moderation System.
* Posting in Discussions at Score:1 instead of Score:0 means twice as many people will see your comments.
So do it! Log In Already!
Answered by: Rob "CmdrTaco" Malda
Last Modified: 6/16/03
Can I change my nickname?
You can't. Sorry. It's just too prone to abuse. You can't delete your own comments. You can't change your name. There are no exceptions to this.
Answered by: Samzenpus
Last Modified: 12/19/01
How do I change my password or email address?
Go to the User Info Editing Page while you are logged in and use the form provided there.
Answered by: CowboyNeal
Last Modified: 4/03/03
How can I delete my account?
You can't. The system needs to keep track of the users, so accounts are permanent. Don't sweat leaving unused accounts hanging around. It doesn't hurt anything.
Answered by: CmdrTaco
Last Modified: 6/13/00
I forgot/can't get my password!
You should be able to get it from the user login page. Just type in your nickname and hit 'mailpasswd' and your password will be whisked off to your email address. If, however, this doesn't seem to be working, email passwords@slashdot.org for help.
Answered by: CowboyNeal
Last Modified: 3/4/02
I'm having trouble logging in.
Make sure you have cookies turned on. If you don't, it won't work. Also make sure that the date and time on your computer is correct. In an handful of cases, the problem could be related to a problem with a proxy server, but this is very unlikely. If you've turned cookies on and tried again to log in, and it still doesn't work, drop CowboyNeal a note and he'll try to help you.
Really, though, the system works for thousands of people every day, so the problem is most likely on your end
Answered by: CmdrTaco
Last Modified: 6/13/00
I'm having trouble logging into Slashdot Sections (Like Apple, YRO, or BSD)
You can be logged into slashdot while you view any of the subsections. All you need to do is hit any of the sections, and log in. Logging into one of them logs you into all. But you need to log into at least one section seperate from logging into http://slashdot.org.
Yeah, we know this is confusing, but we didn't write the RFC for cookies. Sorry for the inconvenience.
Answered by: CmdrTaco
Last Modified: 3/30/02
I don't want to accept a cookie!
A lot of people are paranoid about cookies, and not without reason, but the simple fact is that this is how you create persistence in a stateless protocol. I've heard all the arguments and all the debates on the subject, and this is how we're doing it.
If you don't want to use cookies, you don't have to. You can still post (either anonymously, or by entering your password each time you submit a comment) but you will not be able to use all of the advanced features of Slashdot (story filtering, customized Slashboxes, user preferences etc.). If your paranoia requires you not to use cookies, this is the sacrifice you'll have to make.
Answered by: CmdrTaco
Last Modified: 6/13/00
Someone is posting under a false identity, or an account designed to look like someone else
There are many accounts in the system that were created for malicious purposes. There are dozens of variations on names like 'CmdrTaco' and 'Hemos' as well as heads of many corporations, writers, etc. We don't tamper with existing accounts though, so there's nothing we can do about it. Over the last few years, numerous restr
I know I've never been a fan of Front Page, with the security problems it has had in the past, but if this message was about that, then it's not directly offtopic.
Of course, the lack of a real message makes it rather useless, so it should probably be scored down for some reason or another.
Build it, and they will come^Hplain.
I personally won't use Perl for backend programming on a website but if I had to I would probably buy this book based on the fact that it is authored by Paul DuBois.
When I first started out with MySQL I bought the book titled 'MySQL' written by DuBois. Since then, I've obtained a couple of other books about it and still find myself referring to his most often.
Too bad it isn't MySQL and (PHP|Python|Java). Who uses Perl in web programming anymore?
*dons flame retardant suit*
-Pat
Nice. I'm planning on learning how to tie scripting (have decided on Perl yet but it's a contender) and databases this summer anyway. This book might make the decision as to what to use for me.
However, for those just picking up Perl for the first time I recommend the free ebook Picking Up Perl, and the ActiveState Perl Interpreter for Windows (this was a while ago-- if you are using Linux it probably aleraday has Perl installed). And then as it was Windows I was learning Perl on I used OpenPerl IDE. For Linux I recommend using Kate and Konsole.
Not trying to be off-topic here but I figure someone reading this may want to try out what this Perl thing is.
Disclaimer: Not a Perl fan at all, I actually perfer Python, but to each their own and as any Perl hacker can appreciate TIMTOWTDI! ;)
Your CPU is not doing anything else, at least do something.
*cough*python*cough*
you don't want your pages turning into hacked up messes do you?
Perl is a superb scripting language for system coding, but...
Now with systems like Java Server Faces and Creator you can design a web form in a few seconds using a drag-and-drop designer, clip in some data validators, and visually design navigation through a complex website. A few more clicks and you have an single archive file that can be dropped into any J2EE application server, using any JDBC database on any platform.
You can design, code and test complex form-based web applications in minutes.. and all the tools are free.
So why would anyone want to hand-code all this in Perl?
Even more puzzling, given that Perl has a portable database interface, why restrict things to MySQL?
Okay, so it discusses the merits of PHP vs. Perl. So friggin' what? It's an attempt at creating a discussion, and has been replied to already. Why mod the hell out of something that could be interesting. And it IS Ontopic - it only widens the area of discussion in a logical fashion.
> MySQL (love it or hate it)
Hate it. And stupid fuckhead zealots like Jeremy Zawodny that prostitute it. Mysql is the choice or ignorant newbies and dishonest greedy hucksters.
> Perl (also love it or hate it)
It's "okay". Love a lot of the modules in cpan - PORT THEM TO OTHER LANGUAGES (HELLO? PHP?)!!
"if you are planning on putting together a website, using MySQL and Perl that MySQL & Perl for the Web will aid immensely in that development."
However if you are putting together a basket and require that this be done while not being mentally "all there" and submerged in seawater, "Underwater Basketweaving for the Mildly Retarded" will aid immensely in your project.
I mean c'mon, can't we infer the subject matter from the book title? I'll admit that there are some obscure ones out there that you can't tell but this one just seems to be a no-brainer.
One thing that Perl has going for it that PHP doesn't is that it has correctly set up the database connection functions. Once you connect to a data source, all of the commands you use to interact with that connection are the same, whether you are using mysql, postgresql, or just a csv file. This means that you can change backend databases trivially, merely by changing one line of code.
With php, the commands for connecting to a database and running a query change, sometimes drastically, depending on the database you are using. For example, until recently if you had a query to run on a mysql backend, you did mysql_query($query) but for a postgres it was pg_exec($query). That is changing at least so now it's pg_query($query) but it still makes changing backends a large search, replace, and hope nothing breaks task.
Seriously, when your type in BR 5 times after each paragraph, don't you feel that at least 3 of them are superflous.
It's bad enough we have people posting the slashdot FAQ at 60 second intervals.
And what are the 2 linebreaks after the end of your post for? Deliberate annoyance? Extra scrolling pleasure? come on.
Maybe so, but I still have trouble figuring out why MySQL is given so much credibility in the first place.
In the previous story about MySQL, I posted a comment asking what it actually did that other databases (including the also-free PostgreSQL) didn't do at least as well, or better. The main responses seemed to include:
The Windows build issue seems quite reasonable, but the other reasons imply that the main reason MySQL is so popular is simply due to lock-in. People use it because they have to, or because they're not familiar with the alternatives --- not necessarily because it's actually better for the task-at-hand.
Perhaps MySQL is such a common name that people haven't heard of better alternatives out there. Presumably the book that this story reviews, which gives it even more publicity, is yet another reason that someone might consider MySQL without even thinking about alternatives.
Can anyone tell me if I've missed anything, though? Besides the typical lock-in reasons for using MySQL, does it actually do anything better than other databases as any sort of killer feature?
If not, and if you're looking to start learning about a database and actually have a choice, it seems that you're much better off looking at an alternative database.... whether it be a free one such as Postgres, or one of the big ones such as Oracle or SQL Server. At the very least, you'd get a more reliable database than MySQL, a more portable database than MySQL, and even postgres (just as free) offers a wealth of additional -- often useful and important -- features such as stored procedures and more complete data integrity. You'll probably also become much more familiar with correct SQL syntax ... for what it's worth.
The OP discusses nothing of the merits of PHP vs Perl. It gives an uninformed opinion.
It really should've really been modded "troll"....just like all the other PHP, Ruby, Python karma whoring wankers...
Well first to the latter. You should check out the upcoming PHP 5 release, it will give you a glimpse of the type of easy Object Oriented Programming that I think is enough for the web. And PEAR is a nice library too, that is almost completetely object oriented.
.NET structure has not convinced me. Why is it such a Hype? Just because of Market percentages? Or is there really something I'm missing.
About ASP I just can say, that if you like being on the secure side of programming you cannot really use it. IIS is known for not being that secure, as it is working with MS, if you wanna keep your data to yourself. ASP is not meant to work with MySQL. The last time I tried doing that I just had headaches with it. So if I would have a very large project I would think of Java, but otherwise I prefer PHP than PERL. But I would never touch ASP. And this not mentioning all the MS licenses that would be needed to make it work.
The
...otherwise you wouldn't have so much trouble with closing tags...
=8-)
The only reasons to use perl over PHP for web development are 1.) familiarity with perl (slashdot), and 2.) security (to avoid "today's php upload root exploit").
...
...)
So PHP is ideal unless, you know, you don't want to be rooted
Noted.
(Backs away slowly
Python is used in Zope, www.zope.com, and its pretty impressive in itself. While perl definately had its time in the sun, especially when there wasn't much competition, now its just punk'd. Perl can still be used, but so can Fortran (not that those are equally comparable), but both are still useable. Though again php is gonna hit the same point especially when .net is deployed and C# is taking over the market. Web scripts are slowly being replaced with web services, and for the linux user in me, I am terrified. I say keep it server side, and if you can't make it a program, not a webservice, but again thats just me trying to fight the inevitable.
je suis parce que j'aime
While the idea of a 3 year old book on web development appeals to the poetry in my soul, I think it is misleading. In the last few years the Perl dev community has been making really significant progress in enabling rapid development methodologies, in particularly using tools like Class::DBI
A book which claims to detail how to do web development with Perl and MySQL and doesn't address the following issues is painfully out of date:
* Class::DBI
* SPOPS
* Kake's How to avoid writing code
With the Perl Foundation funded work on Maypole being the most recent efforts in this direction.
You may have this perception because people rarely use PHP code to do heavy lifting.
I would have to agree with you here. If you are going to compare speed of perl to speed of php, you have to compare the two doing the same thing.
Also, You cannot forget CPAN. The PHP folks will typically say something like, well we have PEAR. Unless PEAR has made some amazing strides in the last year or so, it is still no comparision to the massive body of code that CPAN provides.
-- john
I mean, maybe if yo uwork for a tiny little company with no users...but scaling Perl and MySQL to scale to 100's of 1000's of users? Perl's for parsing logfiles, better to use a purpose built tool.
Blar.
Perhaps MySQL is such a common name that people haven't heard of better alternatives out there. Presumably the book that this story reviews, which gives it even more publicity, is yet another reason that someone might consider MySQL without even thinking about alternatives.
This is what almost got me. I started mucking around with databases in '99, and the first book I found was Mysql & msql from O'reilly. I read throught the book and started messing around. I found a message board or something, where someone was responding to a comment where the responder said something like "hey why aren't you using PostgreSQL?". That got me to ask the question, what is the PostgreSQL thing? Since I wasn't too entrenched, I eventually started using PostgreSQL instead of MySQL.
I'm happy that I started using PostgreSQL because of all the features. MySQL may be faster for db's that dont change much (i.e. few inserts, deletes and updates), but I don't really notice the effects for what I do.
-- john
I had to throw in my 2 cents after seeing some of what is being posted here.
When using the appropriate tools, such as mod perl combined with the template toolkit or Mason, Perl is not at all slower then php. In fact in many cases you have to use add on's like the Zend accelerator before it's as fast as something like mod perl/template toolkit.
A story about Perl and MySQL? Why not also mention that it runs best on FreeBSD, especially if it is written in vi?
sic transit gloria mundi
I use Chillisoft's ASP on Apache with MySQL, and it works quite well: it seems more stable than IIS. It's not object-oriented, though it can use Java "chillibeans". It's a reasonable platform for small- to medium-sized projects.
I've got to admit I still can't see any advantage .net has over Java, but I try and stay current in both.
This is where the serious fun begins.
http://wwws.sun.com/software/products/jscreator/in dex.html
mad propz
I recommend HTML::Embperl (embedded perl).
Makes it trivial to create web-based apps. If you use Apache::Session, then state maintenence is a simple matter of populating an element in a hash. Makes web development really fast and modular, and mostly XSS-proof (it's sometimes a pain to make embedded perl actually create something like a link if you refer to it in a variable, unless you really think about it).
http://perl.apache.org/embperl/
Use it with mod_perl, some sort of database, and a bunch of your own modules (preloaded in your apache config, of course), and you'll have a high-speed, easily-maintained, dynamic site in no time.
> As for what MySQL does better? Thats easy speed.
Really? Without partitioning? Without automatically maintained materialized views?
Ah, what you probably meant to say is that mysql does a read-only index-oriented workload better on small hardware than its larger competitors.
I'll buy that.
But, it's nonsensical to think that mysql can scan 300 million rows faster than Oracle/DB2/Informix when you add partitioning into the picture. In that case they can often simply scan the 5% of the data needed.
Same situation with maintained materialized views. Doing both reporting and transactions on same database? Bet those reporting queries are beating up the database pretty badly! Materialized views can be just the ticket here.
Or, how about a mixed workload? Have you compared mysql to oracle on a server supporting 3000 inserts a second along with 20 users simultaneously reading from the database? No?
Or how about on large hardware? Can you spread a database across a cluster of servers and have them all cooperate on each query in parallel? Informix & DB2 could do that since the mid-90s. You can spread DB2 across a hundred 8-way servers in a fully parallel configuration.
Well then, I suppose you can say that for a subset of what databases are used for MySQL is very fast. But that's about it. But there's an entire set of other situations out there in which it comes in way behind the more sophisticated alternatives.
It's just the alternatives I suppose that have me truely confused.
A fully featured website (which needs it all), has several layers, at most:
The client-side dynamic content, javascript, vbscript, etc
The middle-ground dynamic content,
SSI's, PHP, ASP
And the backend,
Perl, C/C++, Java, (insert any true, full blown, fully featured, programming language here, which none of the above are).
There are places where these overlap, there are number of things you could do in Perl, PHP, ASP, or with SSI for instance, which it should be done with is a matter of efficientcy of course and preference when it's just as fast at 100,000 simultaneous connections either way (even if you only expect 5). But something like PHP is not a replacement for Perl anymore than Perl is for PHP.
It's apples and oranges guys, if you want to compare something go with the SQL database flames, at least there you are comparing pretty much the same thing to pretty much the same thing. And there that same thing and generally used for the same purposes.
What's up? Did the camel piss in your cheerios or something? Why so much time wasted basically saying "Perl is da suxx, PHP/Java/Python/foo is da r00lz!" Ya'll sound like a bunch of immature freaks! I wouldn't hire any fucking one of you!
I freelance professionally with both perl and php. I like them both. Perl is my first language. I find that it's easier for me to use php when I'm using techniques I already know, and it's easier for me to use perl when I'm learning new techniques. php has a way of penalizing you for experimenting, it's kind of inscrutable in terms of doing what you'd expect. Perl is great that way. But when you know exactly what you're doing, php is cleaner.
If you're the kind of coder that has an urge to make things complicated, then perl is better. But I find that as I get more experienced and senior level, that I aim more towards making my code as simple and elegant as possible. I aim towards frameworks rather than applications with a lot of anticipated features. You want the application layer (in MVC terms, the control layer) to be as thin as possible. I find that I rarely need to even do things like subclass other classes. A lot of highly competent but inexperienced programmers tend to overengineer things, make too many layers of interface, use too much API, write utilities to write other utilities, get stuck in meta-land. It's like the people that declare that they can't use anything that can't do multiple inheritance. It's silly.
All you need to do is just get the job done without coding yourself into a box. Design, design, design. Architecture, architecture, architecture. You can make six figures with a solid understanding of MVC. The language choice doesn't really matter all that much. You'd be surprised how much syntax I don't have memorized. You'd be surprised how little code I write. And I can still get a lot better - I'm only started to work with Class::DBI. I'm only starting to work with php 5.
skkkoooonnnggggkkk ptui
*dons flaming retard suit*
I run Uberhacker.com. The site is a PHP and SQL security challenge with forums on the subject. The site also includes some tutorials on programming securely in PHP and SQL.
IMO Perl is rapidly losing steam due to the enormous popularity of PHP. PHP is easier to learn, faster to master and less confusing to begin with. Not to mention, PHP's online documentation is really hard to beat sporting many easy to follow examples, a very functional layout, and features (such as the http://php.net/ search) that i'm pretty sure i've only seen mysql.com adopt.
Granted, PHP is not great for everything, but for small to medium websites (and arguably large websites as well, I know of some corporations that use PHP, see bravenet.com, one of the largest providers of ready-to-run webmaster tools. They use PHP quite extensively.). For rapid application development, it's a dream.
As we come closer to PHP5 (which is RC2 now) we're also seeing the integration of sqlite as an option which may appeal to people who just want to write small blogs and other applications which simply do not demand the need of mammoths like mysql or postgresql. This means less headache for budding programmers, and easier migration of applications since sqlite does not require an SQL server.
BeauHD. Worst editor since kdawson.
I have this one.
You need to know perl basics to begin using this though. Just reading Learning Perl would do.
Great book for beginners (that's me). Covers a broad range of web apps.
AFAIK nothing on Amazon.com is actually done in Perl anymore.
*** This thread is marked as CLOSED ***
*** Please move on to another topic ***
PHP is an ugly crufty hack IMHO ... everytime I use it I find some new "feature". The current ones:
... at least the sane bits.
1. There is an strftime function, but no strptime??
2. They use something that looks a whole lot like C format strings, the documentation claims they work like C format strings, but they don't actually format strings the way C format strings do. Sorry, no time for examples ATM.
Anyway, that's just my latest example, and probably my last. Everytime I use PHP it feels like I'm working with a beta project, so I'm currently learning Perl
But I really don't get this harping about the OO model?
That's the problem I'm talking about. It's very dangerous for us to hire programmers who are confused on this issue or, better phrased, programmers who do not understand OO well enough to recognize the problems in Perl when they encounter them.
Perl encourages a lack of encapsulation. This is more than a "stay out of the kitchen" type of rule. If I want to subclass a standard Perl class but use a blessed array reference instead of a blessed hash, the odds are that I am out of luck. The standard Perl object model locks me into a particular implementation that may not be suitable for my needs.
Next, there's no clear separation of class and instance data. As many Perl programmers have little OO experience outside of Perl, they frequently don't recognize the distinction and simply treat the class data as instance data. This is inefficient and bug prone. Failing to understand the difference between the two can cause many problems for programmers.
And don't forget the problem with lack of private and protected methods and the accidental overriding of them. Sure, you can use anonymous subroutines to get around the private methods, but that can become a hack upon a hack (particularly when you accidentally generate a closure and start leaking memory.)
Yet another problem is the whole "blessing" issue. If you bless a referent, you can call methods on it. Unfortunately, those method calls are much slower than subroutine calls and, if you need to programatically know the difference between a method and a subroutine, you're pretty much out of luck. Since Perl kind of bolted this on (or "bolted through", as Larry Wall himself described it), we have a slow OO implementation that's useful for small projects but can be difficult to scale because it's slow and at odds with core OO benefits.
Don't get me wrong, I love Perl. It's very powerful and I'll kick any Java programmer's tail in the speed in which I can turn out robust code (with a full test suite no less). However, most Perl programmers can't do this and the ones who are can be tough to find.
I also posted a review on Perl Monks when the book came out. It still isn't in his list of reviews, though. :/