Single-Page Architectures in PHP

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
rugved
Forum Newbie
Posts: 23
Joined: Tue Dec 03, 2013 12:33 am
Location: Cyber World

Single-Page Architectures in PHP

Post by rugved »

Hello!

I want to create a single-page architecture in PHP but I don't know where to start.

A single-page architecture is something similar to this: http://php.net/manual/en/internals2.str ... ecycle.php When we click on the Feedback & Ideas Form (on the right hand side) which is a different .php page, it is appears on top of the http://php.net/manual/en/internals2.str ... ecycle.php page. Also if you observe carefully, when it is clicked, the URL doesn't change.

Can anyone please provide me a tutorial for beginners on how to create single-page architectures like this? Thank you in advance.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Single-Page Architectures in PHP

Post by requinix »

1. A "single-page architecture" is a bad design. Don't do it.
2. That's not a "single-page" anything to begin with. It's just a popup so you don't leave the page you were on.

The most common term for that is modal dialog.
User avatar
rugved
Forum Newbie
Posts: 23
Joined: Tue Dec 03, 2013 12:33 am
Location: Cyber World

Re: Single-Page Architectures in PHP

Post by rugved »

requinix wrote:1. A "single-page architecture" is a bad design. Don't do it.
2. That's not a "single-page" anything to begin with. It's just a popup so you don't leave the page you were on.

The most common term for that is modal dialog.
Thank you for replying.

I am an R&D engineer and have been told to do by my company to do a research on such single-page web applications. So whether I like it or not is irrelevant. Secondly, I wish to learn how to create Modal Dialog in a website. So thank you for providing me the link. :)
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Single-Page Architectures in PHP

Post by requinix »

Research is fine and all, but make sure you know what you're getting into before doing it. When people do it the two most common problems are (1) URL doesn't change which means pages can't be bookmarked or linked to or opened in other tabs, and (2) doing it so that back/forward buttons don't work and that closing and re-opening a tab doesn't display the same page but rather goes back to the "root" of the site.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Single-Page Architectures in PHP

Post by Christopher »

rugved wrote:I am an R&D engineer and have been told to do by my company to do a research on such single-page web applications. So whether I like it or not is irrelevant.
First, I'd recommend googling for "single-page web applications" where you will find articles and books on the subject. The term just means Javascript applications that use Ajax to communicate with the server. A quick search for "javascript ajax" will provide a lot of information. There are also many Javascript frameworks that can help you with your your company's task.
(#10850)
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Single-Page Architectures in PHP

Post by Christopher »

requinix wrote:Research is fine and all, but make sure you know what you're getting into before doing it. When people do it the two most common problems are (1) URL doesn't change which means pages can't be bookmarked or linked to or opened in other tabs, and (2) doing it so that back/forward buttons don't work and that closing and re-opening a tab doesn't display the same page but rather goes back to the "root" of the site.
There are ways to deal with both bookmarking and back/forward on Javascript/Ajax pages. I know Google manages to make them work as expected in their apps.
(#10850)
Faheemkhan
Forum Newbie
Posts: 1
Joined: Fri Dec 13, 2013 5:13 am

Re: Single-Page Architectures in PHP

Post by Faheemkhan »

Great information. Very useful to me. Actually I was searching the same since many days. Thanks.
Post Reply