Slashdot Log In
Taking the Sting Out of PHP 5 Programming
Posted by
ScuttleMonkey
on Sun Jan 22, 2006 04:34 PM
from the agile-web-development dept.
from the agile-web-development dept.
bfioca writes "Where are the all-in-one PHP frameworks that make building well-factored and maintainable applications as easy as building simple sites? O'Reilly ONLamp's recent article Simplify PHP Development with WASP shows how to make a simple database-backed site with WASP in just a few lines of code. Other PHP 5 frameworks such as symfony and PRADO have been getting a lot of recent attention as well."
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Drupal? (Score:4, Informative)
Re:Drupal? (Score:4, Interesting)
That's not to say stuff like PRADO is any good either - I used it for a commercial site, and it's a pain to maintain. It's an ASP-style component system, and doesn't fit the web model - if you want to do 'Ajax', for example, you're screwed.
symfony looks interesting, though, and much more lightweight.
Parent
Re:Drupal? (Score:3, Insightful)
Re:Drupal? (Score:4, Informative)
Parent
Re:Drupal? (Score:5, Informative)
Nope.
Drupal has multi site out of the box, and has been like that for years. For some 18 months, I ran 4 different domain out of the same code base and the same database even (with database prefixes).
Drupal boasts "clean URLs" out of the box as well. This means that urls do not have to be www.example.com?q=node/123 but rather www.example.com/node/123 (this requires mod_rewrite).
Moreover, Drupal has out of the box the path module which allows you to alias any page to any URL you like. There is also a contributed module (pathauto) that makes this totally automated.
Check my web site for examples (all URLs are aliased).
Parent
Re:Drupal? (Score:2)
My only experience with Drupa
Re:Drupal? (Score:2)
Re:Drupal? (Score:3, Informative)
Re:Drupal? (Score:2)
Both types of approach have their advantages and disadvantages. Drupal's
Re:Drupal? (Score:2, Informative)
Attempts != Problem (Score:3, Insightful)
Re:Drupal? (Score:3, Informative)
This was a third party library that we incorporated in Drupal a while back to do some remote stuff (e.g. remote blogging,
If you do not use third party client apps to post, you can delete the file xmplrpc.php altogether if you wish.
When it was discovered that it has security flaws, we replaced it completely.
Newer versions are as secure as they can be.
Re:Drupal? (Score:3, Interesting)
Re:Drupal? (Score:3, Interesting)
Re:Drupal? (Score:3, Interesting)
In the long run, I would rather write my own CMS than use someone elses. When I first learned PHP, I wrote my own system. Now that I'm older and less stupid, I realize how many security holes where in the application, but in the 3 years I used it, not one hiccup because it wasn't documented anywhere.
I messed around with Mambo (sorta, kinda, like Drupal) and really didn't like it. I hacked it a little to do what I wanted, but found it wasn't for me.
At the same time, I'm a little at a loss
Bogus (Score:4, Insightful)
If you want a quality product, there are no shortcuts. There is no such thing as a free lunch.
A big thumbsdown on this kind of crap. "Sting" to PHP 5 programming? Get real.
Re:Bogus (Score:4, Insightful)
Either way, I can tell you that, from my personal experience, learning and adopting a framework in your work can have a lot of benefits, for me, as a small custom business solutions provider.
Parent
I don't see the magic words MVC... (Score:4, Insightful)
If you are looking for quick app development and you aren't joe home user making a website you are going to need something thats based off a model -> view -> controller architecture. Symphony does this, so does the cake [cakephp.org] framework.
Re:I don't see the magic words MVC... (Score:2, Informative)
Re:I don't see the magic words MVC... (Score:2)
I should think so too. (Score:3, Funny)
Like Zope? Does anybody use this stuff? (Score:2)
I get the feeling these php frameworks might be even more obscure.
Now, compare that to a product like ColdFusion.
I don't use any of those products. But, I've got to wonder.
a framework is NOT a shortcut (or a CMS!) (Score:4, Insightful)
actually, the "sting" of php5 is... (Score:3, Insightful)
this is hitting me hard as i'm trying to put together an xml-intensive app and am stuck using home-grown open-source XML parsing and generating packages, mostly unfinished, that won't be finished because they've been superseeded by the php5 libraries that i can't use yet.
Re:actually, the "sting" of php5 is... (Score:2)
this is hitting me hard as i'm trying to put together an xml-intensive app and am stuck using home-grown open-source XML parsing and generating packages, mostly unfinished, that won't be finished because they've been superseeded by the php5 libraries that i can't use yet.
This is exactly why I'm switching to Ruby and Ruby on Rails. If I have to rewrite the whole applicatin, I'm going to switch to something better.
Framework Soup (Score:2)
For example, here is a simple set of functions to format a typical data entry form with title on the left side and input box/item on the right. If you want to code HTML directly instead of use the he
Re:Framework Soup (Score:2)
The big advantage of frameworks is they make the things the designer wanted to make easy, easy. The problem with frameworks is they make things the designer never thought of or never wanted either harder than it would be to do it directly, harder than it should be, or, in the worst cases, flat out impossible.
I've found that for larger projects, the
What the hell is wrong with you? (Score:2)
You have a low-enough UID to supposedly be somewhat knowledgeable, yet you advocate writing frameworks and not marrying the code to the framework..?
Then why the hell are you mixing the View in with the Model (and most likely Controller too?)
Honestly, it's people like you who give PHP a really bad name.
Any sane person would AT LEAST be using a templating system like Smarty [php.net].
Taking the sting out? (Score:2)
I realize that programming languages are supposed to be painful, but for me, PHP 3 made programming fun again. As a sysadmin sort it was remarkable to be coding and enjoying it. This seemed to be true no matter whether it was a 10-line hack to get something done on a website, or a top-down structured project.
And you know when then turnaround happened? When PHP stopped being fun? I have an opinion. I think it coincided with the
Re:Taking the sting out? (Score:2)
Are you KIDDING?!?!?
15 years ago, I took some college classes on programming. Then, the "thing to do" for intro programming was Pascal - with all the super-strict data types, memory allocation, linked lists, and compiling crap. I hated it - somebody would type a number 3, I'd add 5 to it, and get 56. It was painful to get an input form that somebody could type some stuff in.
Yes, I know about the ASCII char table, and it seems just
Re:Taking the sting out? (Score:2)
Global variables are not harmful at all. The misuse of global variables is. This is a very common misconception shared by most new PHP programmers who read the wrong material on the web, or listen to other inexperienced PHP programmers for security advice.
Now, I'm going to take a leap here, and assume you're actually talking about the register_globals directive, and not global variables in general. From the site: [..]This page will explain how one can write insecure code with this directive but keep in [php.net]
Frameworks, stygma, and rolling (Score:2, Insightful)
To the point: I see a lot of people bashing the concept of frameworks and stating that you shouldn't use frameworks because it's just being lazy or that frameworks are a bad thing. I believe this negativity comes from inexperience and ignorance.
I agree, these are biting words, but consider the fact that the arguments used to suppo
Slashdot for Self-Promotion?! (Score:2, Insightful)
And I wonder why I'm always so surprised that people complain about bias in the media...
PRADO bad. CakePHP + PHPTAL is my PHP ticket. (Score:2)
Luckily there are neat tools that make professional PHP project work very easy and fun:
PHPTAL (http://phptal.motion-twin.com/ [motion-twin.com]) is a PHP based redoo of Zopes TAL (Template Attribute Language) - the best Templating concept ever. M
Re:Just use Ruby or Python (Score:3, Insightful)
Re:Just use Ruby or Python (Score:2, Interesting)
while I agree its a niche language now, it won't be long I imagine till ruby ges more mainstream. The main thing holding ruby back so far has been a lack of books on the subject. hoowever, that is quickly changing and already ruby is more popular than python in japan.
caveat emptor: I've only been dabbeling in ruby for the past week or so
anyway, so far
Re:Just use Ruby or Python (Score:3, Interesting)
And they tend to be better developers too, those that enjoy hacking and being productive.
Re:Just use Ruby or Python (Score:3, Insightful)
As an example, JavaScript has OO, but no classes! How do you suppose that is? It's prototype-based OO. It's an interesting alternative to class-based OO. Well-rounded programmers can pick up a concept like that rapidly -- they don't just say "this is too much of a hassle."
The basics in Ruby a
Re:*Please* use Ruby or Python (Score:2)
With a manual as clear, conside and accessable as PHP's, who cares? There are hundreds of functions in the 'core', but not all of those in the PHP manual are compiled in on most setup's. Who really learns the libraries and function
Re:*Please* use Ruby or Python (Score:2)
I haven't looked at the PHP docs for a while now, but one Perl programmer made up a table of PHP functions [tnx.nl] that even PHP programmers find useful! That page also has a *lot* of good comparisons to Perl. It's amazing how much baggage PHP has accumulated over the years.
Re:*Please* use Ruby or Python (Score:2, Informative)
Well check this Troll Tech VBA thingy (Score:2)
Re:I need PHP (Score:5, Insightful)
Seems like a fools errand to me. I predict you will fail miserably and your web site will be hacked within 24 hours of you putting it up.
You really should learn the language that you are trying to build web sites in.
Parent
Re:I need PHP (Score:2, Informative)
Re:I need PHP (Score:3, Funny)
Re:I need PHP (Score:2, Informative)
Also, your understanding of databases and interfaces needs to be more sophisticated than building a contact manager in MS Access...
Re:I need PHP (Score:2)
If you know some programming already (even BASIC will suffice), then you can pick up PHP. If you know C++, even better. If you don't know programming, step away from the PHP and go learn something that won't let people hack your websites (and even if you don't get hacked, will allow your website to keep running in the meanwhile).
If you don't know HTML...uh...make sure you're comfortable with it before starting, because it's almost impossible to make a useful webpage if you can progra
Never ever use PHPNuke (Score:3, Informative)
Read here. [google.com]
Re:Simple example (Score:2)
Most frameworks are built from some sort of ideology without any real need; they are solutions in search of a problem.
Re:Stupid article, obfuscated and biased examples. (Score:2)