What PHP represents - Page 2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: What PHP represents

On Tue, 21 Jun 2005 19:39:50 -0700, darwinist wrote:

Quoted text here. Click to load it

I may not be popular saying this, but I don't think php is the best tool
for the job that it is used for.

I would agree that it is easy and fits in well with the html/xslt side of
things. It also seems to be the best available at the moment, which is
likely to be why it's popular.

But I would say that ruby-rails is much closer to how things should be,
even if your not keen on the language itself, the principle is much
closer to being right. The html page or 'view' of an application should be
an object of that application, not a filter page that needs to pass
through a 'find & replace' function. How many filters (or transcribers?)
can be active per html page now? php, java script, css, w3c ....

Ruby-rails nearly goes that way of taking the view away from the main
code, but I feel as if it got nervous of taking it to the final
conclusion, plus of cause they are at the mercy of html itself.

When we have a language for web that truly separates data - application -
view, so separate in fact that the view could even live on the client PC
if we wanted it to, then we can rave about it. At the moment we're still
on the journey.

Re: What PHP represents

BearItAll wrote:
Quoted text here. Click to load it

Not being popular is what saying things on the internet is all about :)

Quoted text here. Click to load it

Right there's best in theory and best in practice. They are rarely the
same in virtue of the fact that humans make such limited theories, and
the universe is not impressed.

Quoted text here. Click to load it

Lots of things are more how it "should" be, but the question I'm
interested in is how quickly can one produce something that contributes
economically to an organisation (as an information-tracking tool that
is, rather than as a sellable commodity).

Quoted text here. Click to load it

I've been hearing more about ruby (and rails) lately, the only bad
thing it's got going against it at the moment is that I've never used
it. What little code I've read however makes it look very neat and
efficient (code-wise). In any case it would stupid for me to suggest
that PHP will never be superceded, and who knows maybe it will be ruby
that does it. Like most languages that are better than php though, it
has to be better *on the web* or else a lot of people will think "why
bother, it's so much easier in php, and anyway it's all the same once
it reaches the browser"

I don't think PHP is necessarily the best for any and every website or
web-application, but I think it's probably the best (all things
considered) for getting something genuinely and concretely useful (e.g.
a customer database, a timesheet, project or stock database) and
getting it quickly. You can (too) easily do it badly, but you can do
anything badly (and ironically it's often much slower if you do).

Re: What PHP represents

Kimmo Laine wrote:
Quoted text here. Click to load it

Unless next_page.php generates PHP, the script with this include will
only get HTML.

Quoted text here. Click to load it


    if (isset($_GET['foo'])) {
      echo '<?php echo $_GET[\'foo\']; ?>';
    } else {
      echo '<?php echo \'Not available\'; ?>';

File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot

Re: What PHP represents

BearItAll wrote:
Quoted text here. Click to load it

How is it better to call methods than call functions if you want to
access a database? Interface stuff (eg javascript) is better with
objects because interfaces are decentralised and event-driven. In this
environment, ojects make it easier to keep track of what's happening,
but server-side scripting is essentially linear. There may be a design
argument for using objects, but for reusing someone else's code to save
some records, load some records, and generate an html page; a function
call works the same way as a method call.

Quoted text here. Click to load it

One would expect so, since it's open source and not without its
followers. I look forward to the time when the open source geeks are
praising ruby more highly than any other language in at least one
field. I'll experiment when I'm unemployed again.

Site Timeline