php-general Digest 5 Oct 2008 02:47:16 -0000 Issue 5718

Topics (messages 281433 through 281448):

Re: AJAX and PHP
        281433 by: Peter Wang
        281435 by: Nitsan Bin-Nun
        281437 by: Ashley Sheridan
        281438 by: Alain Roger
        281439 by: Ashley Sheridan
        281440 by: tedd
        281442 by: Alain Roger
        281443 by: tedd
        281444 by: Per Jessen
        281445 by: Alain Roger
        281446 by: Robert Cummings
        281447 by: Per Jessen

Re: 37 Pictures the World must see
        281434 by: Colin Guthrie
        281436 by: Colin Guthrie

Re: SESSION array problems [ANOTHER SOLUTION]
        281441 by: tedd

Re: PHP job available, Phoenix, AZ, USA
        281448 by: Manuel Lemos

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
"Alain Roger" <[EMAIL PROTECTED]> writes:

I think both will be ok, it just depends on what's you want:)

> HI,
>
> i'm currently working on some web application and i would like to know what
> is the best way to do what i want.
> basically like all application i have a menu and based on selected item menu
> i want to display a page (basically 50 % of this new page is DB result/grid.
>
> As usual i have 2 divs, one for the menu one for the content of DB to
> display.
> i would like to know if it's not better to use AJAX to load the content of
> the second div (DB result and other stuff) instead to every time load a new
> page which load menu and content of DB ?
>
> what are your experiences on such thing ?
> thx.
>
> -- 
> Alain
> ------------------------------------
> Windows XP SP3
> PostgreSQL 8.2.4 / MS SQL server 2005
> Apache 2.2.4
> PHP 5.2.4
> C# 2005-2008


--- End Message ---
--- Begin Message ---
It depends how much stuff you have in the first div, it there are a lot of
images and the user will have to load them again (in case there is no cache)
and you care for the traffic those images cost - it would be better to use
AJAX.

But generally - they both okay, I personally would use reload of the whole
page just because of the time it would take me to develop it with ajax ;)

HTH,
Nitsan

On Sat, Oct 4, 2008 at 12:10 PM, Alain Roger <[EMAIL PROTECTED]> wrote:

> HI,
>
> i'm currently working on some web application and i would like to know what
> is the best way to do what i want.
> basically like all application i have a menu and based on selected item
> menu
> i want to display a page (basically 50 % of this new page is DB
> result/grid.
>
> As usual i have 2 divs, one for the menu one for the content of DB to
> display.
> i would like to know if it's not better to use AJAX to load the content of
> the second div (DB result and other stuff) instead to every time load a new
> page which load menu and content of DB ?
>
> what are your experiences on such thing ?
> thx.
>
> --
> Alain
> ------------------------------------
> Windows XP SP3
> PostgreSQL 8.2.4 / MS SQL server 2005
> Apache 2.2.4
> PHP 5.2.4
> C# 2005-2008
>

--- End Message ---
--- Begin Message ---
On Sat, 2008-10-04 at 13:48 +0200, Nitsan Bin-Nun wrote:
> It depends how much stuff you have in the first div, it there are a lot of
> images and the user will have to load them again (in case there is no cache)
> and you care for the traffic those images cost - it would be better to use
> AJAX.
> 
> But generally - they both okay, I personally would use reload of the whole
> page just because of the time it would take me to develop it with ajax ;)
> 
> HTH,
> Nitsan
> 
> On Sat, Oct 4, 2008 at 12:10 PM, Alain Roger <[EMAIL PROTECTED]> wrote:
> 
> > HI,
> >
> > i'm currently working on some web application and i would like to know what
> > is the best way to do what i want.
> > basically like all application i have a menu and based on selected item
> > menu
> > i want to display a page (basically 50 % of this new page is DB
> > result/grid.
> >
> > As usual i have 2 divs, one for the menu one for the content of DB to
> > display.
> > i would like to know if it's not better to use AJAX to load the content of
> > the second div (DB result and other stuff) instead to every time load a new
> > page which load menu and content of DB ?
> >
> > what are your experiences on such thing ?
> > thx.
> >
> > --
> > Alain
> > ------------------------------------
> > Windows XP SP3
> > PostgreSQL 8.2.4 / MS SQL server 2005
> > Apache 2.2.4
> > PHP 5.2.4
> > C# 2005-2008
> >
Also, it depends on who you think will be visiting the site, as an
increasing number of people browse the web with devices that have no
JavaScript capabilities, so they wouldn't be able to use an Ajax site.


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
On Sat, Oct 4, 2008 at 2:38 PM, Ashley Sheridan <[EMAIL PROTECTED]>wrote:

> On Sat, 2008-10-04 at 13:48 +0200, Nitsan Bin-Nun wrote:
> > It depends how much stuff you have in the first div, it there are a lot
> of
> > images and the user will have to load them again (in case there is no
> cache)
> > and you care for the traffic those images cost - it would be better to
> use
> > AJAX.
> >
> > But generally - they both okay, I personally would use reload of the
> whole
> > page just because of the time it would take me to develop it with ajax ;)
> >
> > HTH,
> > Nitsan
> >
> > On Sat, Oct 4, 2008 at 12:10 PM, Alain Roger <[EMAIL PROTECTED]> wrote:
> >
> > > HI,
> > >
> > > i'm currently working on some web application and i would like to know
> what
> > > is the best way to do what i want.
> > > basically like all application i have a menu and based on selected item
> > > menu
> > > i want to display a page (basically 50 % of this new page is DB
> > > result/grid.
> > >
> > > As usual i have 2 divs, one for the menu one for the content of DB to
> > > display.
> > > i would like to know if it's not better to use AJAX to load the content
> of
> > > the second div (DB result and other stuff) instead to every time load a
> new
> > > page which load menu and content of DB ?
> > >
> > > what are your experiences on such thing ?
> > > thx.
> > >
> > > --
> > > Alain
> > > ------------------------------------
> > > Windows XP SP3
> > > PostgreSQL 8.2.4 / MS SQL server 2005
> > > Apache 2.2.4
> > > PHP 5.2.4
> > > C# 2005-2008
> > >
> Also, it depends on who you think will be visiting the site, as an
> increasing number of people browse the web with devices that have no
> JavaScript capabilities, so they wouldn't be able to use an Ajax site.
>

AFAIK only PDA do no have javascript support at 100%.
MacOS, MS OS and LINUX support it.

--- End Message ---
--- Begin Message ---
On Sat, 2008-10-04 at 14:41 +0200, Alain Roger wrote:
> On Sat, Oct 4, 2008 at 2:38 PM, Ashley Sheridan <[EMAIL PROTECTED]>wrote:
> 
> > On Sat, 2008-10-04 at 13:48 +0200, Nitsan Bin-Nun wrote:
> > > It depends how much stuff you have in the first div, it there are a lot
> > of
> > > images and the user will have to load them again (in case there is no
> > cache)
> > > and you care for the traffic those images cost - it would be better to
> > use
> > > AJAX.
> > >
> > > But generally - they both okay, I personally would use reload of the
> > whole
> > > page just because of the time it would take me to develop it with ajax ;)
> > >
> > > HTH,
> > > Nitsan
> > >
> > > On Sat, Oct 4, 2008 at 12:10 PM, Alain Roger <[EMAIL PROTECTED]> wrote:
> > >
> > > > HI,
> > > >
> > > > i'm currently working on some web application and i would like to know
> > what
> > > > is the best way to do what i want.
> > > > basically like all application i have a menu and based on selected item
> > > > menu
> > > > i want to display a page (basically 50 % of this new page is DB
> > > > result/grid.
> > > >
> > > > As usual i have 2 divs, one for the menu one for the content of DB to
> > > > display.
> > > > i would like to know if it's not better to use AJAX to load the content
> > of
> > > > the second div (DB result and other stuff) instead to every time load a
> > new
> > > > page which load menu and content of DB ?
> > > >
> > > > what are your experiences on such thing ?
> > > > thx.
> > > >
> > > > --
> > > > Alain
> > > > ------------------------------------
> > > > Windows XP SP3
> > > > PostgreSQL 8.2.4 / MS SQL server 2005
> > > > Apache 2.2.4
> > > > PHP 5.2.4
> > > > C# 2005-2008
> > > >
> > Also, it depends on who you think will be visiting the site, as an
> > increasing number of people browse the web with devices that have no
> > JavaScript capabilities, so they wouldn't be able to use an Ajax site.
> >
> 
> AFAIK only PDA do no have javascript support at 100%.
> MacOS, MS OS and LINUX support it.
I meant mobile devices mainly, which tend not to support scripting.
Also, JavaScript can be turned off on a browser, and in some workplaces,
proxy servers have been known to strip out script from a page.


Ash
www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
At 12:10 PM +0200 10/4/08, Alain Roger wrote:
HI,

i'm currently working on some web application and i would like to know what
is the best way to do what i want.
basically like all application i have a menu and based on selected item menu
i want to display a page (basically 50 % of this new page is DB result/grid.

As usual i have 2 divs, one for the menu one for the content of DB to
display.
i would like to know if it's not better to use AJAX to load the content of
the second div (DB result and other stuff) instead to every time load a new
page which load menu and content of DB ?

what are your experiences on such thing ?
thx.

--
Alain

Alain:

The only difference the user experiences between having AJAX, or not, is refreshing the page. If page refresh is not a problem, then don't complicate your life. On the other hand, if page refresh is annoying, or not wanted, then AJAX is you're only solution.

But as it has been said before, not all users have javascript turned on and as such AJAX will not work -- after all, it javascript.

However, there are way to degrade gracefully from a AJAX site to a normal site. Google
javascript graceful degradation" for references.

Please note, going the AJAX route does not make your coding simpler -- it's a different critter. But it does (with help from jQuery et al) offer exciting new ways to present data.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
Thanks tedd.
basically page refreshin is not a problem for me as it in intranet
application.
however, AJAX offers some really nice thing and 1 from my point of view it's
to reduce the network traffic by limiting what should be refresh/downloaded.
in that way i think it is interesting.


On Sat, Oct 4, 2008 at 3:52 PM, tedd <[EMAIL PROTECTED]> wrote:

> At 12:10 PM +0200 10/4/08, Alain Roger wrote:
>
>> HI,
>>
>> i'm currently working on some web application and i would like to know
>> what
>> is the best way to do what i want.
>> basically like all application i have a menu and based on selected item
>> menu
>> i want to display a page (basically 50 % of this new page is DB
>> result/grid.
>>
>> As usual i have 2 divs, one for the menu one for the content of DB to
>> display.
>> i would like to know if it's not better to use AJAX to load the content of
>> the second div (DB result and other stuff) instead to every time load a
>> new
>> page which load menu and content of DB ?
>>
>> what are your experiences on such thing ?
>> thx.
>>
>> --
>> Alain
>>
>
> Alain:
>
> The only difference the user experiences between having AJAX, or not, is
> refreshing the page. If page refresh is not a problem, then don't complicate
> your life. On the other hand, if page refresh is annoying, or not wanted,
> then AJAX is you're only solution.
>
> But as it has been said before, not all users have javascript turned on and
> as such AJAX will not work -- after all, it javascript.
>
> However, there are way to degrade gracefully from a AJAX site to a normal
> site. Google
> javascript graceful degradation" for references.
>
> Please note, going the AJAX route does not make your coding simpler -- it's
> a different critter. But it does (with help from jQuery et al) offer
> exciting new ways to present data.
>
> Cheers,
>
> tedd
>
> --
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Alain
------------------------------------
Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

--- End Message ---
--- Begin Message ---
At 5:39 PM +0200 10/4/08, Alain Roger wrote:
Thanks tedd.
basically page refreshin is not a problem for me as it in intranet application. however, AJAX offers some really nice thing and 1 from my point of view it's to reduce the network traffic by limiting what should be refresh/downloaded.

A small clarification as per my understanding -- using AJAX does not limit what should be downloaded -- what needs to be downloaded, needs to be downloaded regardless. However, using AJAX does change how the browser refreshes and cuts down the chatter between the server and client.

An AJAX request (GET or POST) is simply done behind the browser's back -- if something needs to be brought forward from the server to the client then it makes no difference if you use AJAX or the standard way. In either case, it requires download time and server contact.

If you are not using AJAX, then the browser simply refreshes the entire page with what it has cached and goes to the server for what it hasn't. With AJAX, AJAX simply tells the browser what to refresh and leaves the remainder alone.

As I said, using AJAX will cut down on the chatter between the server and client, but that chatter is not reloading everything each time. So, AJAX is not really affecting downloads -- those are determined by the needs of the page and not on the manner of the presentation.

Now, one can argue that any contact is downloading and I guess that is technically correct. But I am saying that communication between the server and client is different depending upon what's been cached. It's a bit like my wife calling her sister. If my wife gets the answering service, she leaves a message -- if not they talk. While one can say that a call has been made and received in either case, the amount transmitted is significantly different if her sister answers -- if you get my drift.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
Alain Roger wrote:

> Thanks tedd.
> basically page refreshin is not a problem for me as it in intranet
> application.
> however, AJAX offers some really nice thing and 1 from my point of
> view it's to reduce the network traffic by limiting what should be
> refresh/downloaded. in that way i think it is interesting.

On an intranet you've almost certainly got 100Mbit/s with a suitably
capable backbone - limiting network traffic is not a concern, IMHO. 


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
So in this case what is the plus for companies like MS, Google (with Gmail),
flicker and so on to use AJAX ?
it is on internet, so i guess they have a purpose to do that.
mine is to have a responsive and intuitive interface application whatever it
is on internet or intranet.

On Sat, Oct 4, 2008 at 7:12 PM, Per Jessen <[EMAIL PROTECTED]> wrote:

> Alain Roger wrote:
>
> > Thanks tedd.
> > basically page refreshin is not a problem for me as it in intranet
> > application.
> > however, AJAX offers some really nice thing and 1 from my point of
> > view it's to reduce the network traffic by limiting what should be
> > refresh/downloaded. in that way i think it is interesting.
>
> On an intranet you've almost certainly got 100Mbit/s with a suitably
> capable backbone - limiting network traffic is not a concern, IMHO.
>
>
> /Per Jessen, Zürich
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Alain
------------------------------------
Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

--- End Message ---
--- Begin Message ---
On Sat, 2008-10-04 at 13:38 +0100, Ashley Sheridan wrote:
> On Sat, 2008-10-04 at 13:48 +0200, Nitsan Bin-Nun wrote:
> > It depends how much stuff you have in the first div, it there are a lot of
> > images and the user will have to load them again (in case there is no cache)
> > and you care for the traffic those images cost - it would be better to use
> > AJAX.
> > 
> > But generally - they both okay, I personally would use reload of the whole
> > page just because of the time it would take me to develop it with ajax ;)
> > 
> > HTH,
> > Nitsan
> > 
> > On Sat, Oct 4, 2008 at 12:10 PM, Alain Roger <[EMAIL PROTECTED]> wrote:
> > 
> > > HI,
> > >
> > > i'm currently working on some web application and i would like to know 
> > > what
> > > is the best way to do what i want.
> > > basically like all application i have a menu and based on selected item
> > > menu
> > > i want to display a page (basically 50 % of this new page is DB
> > > result/grid.
> > >
> > > As usual i have 2 divs, one for the menu one for the content of DB to
> > > display.
> > > i would like to know if it's not better to use AJAX to load the content of
> > > the second div (DB result and other stuff) instead to every time load a 
> > > new
> > > page which load menu and content of DB ?
> > >
> > > what are your experiences on such thing ?
> > > thx.
> > >
> > > --
> > > Alain
> > > ------------------------------------
> > > Windows XP SP3
> > > PostgreSQL 8.2.4 / MS SQL server 2005
> > > Apache 2.2.4
> > > PHP 5.2.4
> > > C# 2005-2008
> > >
> Also, it depends on who you think will be visiting the site, as an
> increasing number of people browse the web with devices that have no
> JavaScript capabilities, so they wouldn't be able to use an Ajax site.

So just engineer the AJAX so it falls back to traditional full page
reload when JavaScript is disabled.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


--- End Message ---
--- Begin Message ---
Alain Roger wrote:

> So in this case what is the plus for companies like MS, Google (with
> Gmail), flicker and so on to use AJAX ?

For them (and others), it's about the user experience, and ajax is good
at enhancing the user experience. 

> it is on internet, so i guess they have a purpose to do that.
> mine is to have a responsive and intuitive interface application
> whatever it is on internet or intranet.

Now you are changing the rules - they are very different on the
internet.  My advice - don't use ajax in an attempt to reduce network
traffic.  Use it to enhance the user experience.  Caching is much
better at reducing network atraffic anyway.


/Per Jessen, Zürich


--- End Message ---
--- Begin Message --- Seeing as Alex didn't say what this is about, it concerns XDR-TB or Extremely Drug Resistant Tuberculoses. I've been hearing a lot about this of late in several documentaries and have actually seen this video already on TED.com.

Direct link for those who don't like mail tracking links:
http://www.xdrtb.org/


For those that don't know it, TED.com is an awesome site. It's very informative and well worth adding to your RSS subscriptions.

Col


--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


--- End Message ---
--- Begin Message ---
Thiago Melo de Paula wrote:
What all this stuff have related to PHP?!?
Please, don't use this list to spam

Have you even read this list before??? I've not seen your name here before and I've posted and contributed quite a bit over the last few years so have a right to the odd indulgence on what is generally a nice mix of technical advice, assistance and discussion with a strong social side to it.

While I'm not sure that Alex meant to post to the list, I thought it would be worth pointing out to those that were intrigued by it what it actually was. I think I was doing a service here.

Also the TED.com website is an interesting resource for people involved in technical industries and while it's not directly related to PHP, many people interested in PHP would be interested in it and I felt it was worth pointing that out.

So please don't think what I have to say spam without actually taking a little time to consider it.

Col



--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


--- End Message ---
--- Begin Message ---
Hi gang:

While this may be trivial to many of you, I post this for the others.

In my last problem, which was caused by register globals being ON, I wondered how I could fix this.

In my specific case, the client had "Register Globals ON" and his host objected to turning if OFF saying that other scripts might break. After hearing that, the client was not willing to risk it.

So, I looked at some of my older scripts and found I had used:

ini_set( 'register_globals', '0' );

But in my last problem, neither '0' or 'off' did anything.

So, I looked at the manuals again:

http://www.php.net/manual/en/ini.php

The manual says, I can change this directive:

Entry can be set in php.ini, .htaccess or httpd.conf

So, by simply adding an .htaccess file with the following --

php_flag register_globals off

-- fixed the problem.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
Hello,

on 10/02/2008 11:31 PM Matt Graham said the following:
> I just saw this.  If someone is in the Phoenix, AZ, USA area and wants a job 
> writing/maintaining PHP code, this may be right for you.  Contact details 
> below:

You may want to post it here:

http://www.phpclasses.org/jobs/country/us/

-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---

Reply via email to