Page 2 of 3
Posted: Thu Nov 01, 2007 1:21 pm
by Luke
how come? that's exactly what it is. if they try to access /book/234/ and there is no book #234, that == not found, right? I mean of course you should give them helpful information on the 404 page, but what else is that situation if not 404?
Posted: Thu Nov 01, 2007 2:38 pm
by jmut
The Ninja Space Goat wrote:how come? that's exactly what it is. if they try to access /book/234/ and there is no book #234, that == not found, right? I mean of course you should give them helpful information on the 404 page, but what else is that situation if not 404?
in 99% of cases if they try this..it will be by hand..and not using the interface provided...hence..you can safely ignore this....request and just return to normal list of books or whatever. You don't have to do error.....and I certainly think this is not exceptional situation...not to have certain record.
Exceptional is db down...blabla....
Posted: Thu Nov 01, 2007 2:46 pm
by Luke
request and just return to normal list of books or whatever
I disagree... that is not expected behavior. What if the record used to exist, but for some reason no longer does? They try to access it, and it goes to the list of books? That would confuse and irritate me. If I got a 404 I would at least know (and so would google) that it no longer exists.
Posted: Thu Nov 01, 2007 3:38 pm
by Benjamin
I saw you starting to ask questions about Zend a while back and was wondering how that would turn out for you. I figured it probably wouldn't be a happy ending.
Posted: Thu Nov 01, 2007 3:41 pm
by Christopher
The Ninja Space Goat wrote:request and just return to normal list of books or whatever
I disagree... that is not expected behavior. What if the record used to exist, but for some reason no longer does? They try to access it, and it goes to the list of books? That would confuse and irritate me. If I got a 404 I would at least know (and so would google) that it no longer exists.
That is not the expected behavior for web standards mavens, but it is the expected behavior for someone looking for a book! Not only would I show a list of books, but if I knew that the 200 series were mysteries I might show a list of available mysteries. This is one of the things that Front Controller (for totally incorrect URLs) and Action Controllers (for bad selectors) excel at dealing with in a consistent, organized manner.
This is especially true for retail sites, but true for all sites, you need to make every click count -- even if it is the wrong click.
Posted: Thu Nov 01, 2007 5:14 pm
by Luke
I agree... but I'd still send a 404 and tell the user the page they requested doesn't exist

Posted: Thu Nov 01, 2007 9:30 pm
by Kieran Huggins
Old pages linked to via Google or someone "sharing" the page in some fashion maybe...
As a user I would expect there to be a 404 page, but with contextual information. Maybe a 404 specific to books? The controller at least gives you a hint as to what they intended to see.
At any rate, there should be a 404 header for spiders and the like.
Posted: Thu Nov 01, 2007 9:55 pm
by Christopher
Kieran Huggins wrote:At any rate, there should be a 404 header for spiders and the like.
So someone linked to one of your clients' sites and mistyped the URL and you're going to tell Google "No thanks, there must me some mistake." ?
Posted: Thu Nov 01, 2007 10:08 pm
by Kieran Huggins
I think that's the most correct thing to do: indicate that the requested resource doesn't exist.
Am I mistaken?
Posted: Fri Nov 02, 2007 1:55 am
by Christopher
I think it is the technically correct thing to do. But given the reality of links and typed-in URLs, I think it is rarely the appropriate thing to do. Users and site owners want useful sites with high rankings much, much more than they want technically correct sites.
Posted: Fri Nov 02, 2007 12:28 pm
by Kieran Huggins
I don't see how a helpful 404 page would harm users following incorrect or outdated links. Also, it would only help preserve SEO by encouraging a more accurate and up-to-date index.
Posted: Sat Nov 03, 2007 3:22 pm
by Ollie Saunders
You should display an error page when a resource can't be found, if you redirect somewhere the user
won't expect that. Imagine the user story:
- User clicks to view more details about a book
- User is redirected back to the book index whence came (as if he hasn't moved at all), only the book in question has been removed
Some users might be concerned they just deleted the book from existance, none of them would truely understand what had just happened or how likely it was to happen again. You should always display a page that can restore some confidence to the user about what just happened and, if possible, provide the user with the tools to continue navigating the site in the way he originally intended to.
Redirects complete with 301s are acceptable when the resource does exist but has been moved, when you change your URL structure or the user makes a typo, for example. The two, 404s and 301s, can be treated as separate problems. If you don't send a 404 status header search engines will index a useless page.
Back to the main issue: Yes, NSG I'm completely with you, ZF is crap. I believe I vocalized that opinion a while ago.
I've heard lots of good things about Symfony and I know some pretty big companies (ebay) are using it. Symfony documentation seems very detailed. ROR is another serious contender, I was working towards dropping PHP in favor or Ruby and Rails but since I've been reading about Symfony I'm not so sure. Definitely want to try both now.
Posted: Sat Nov 03, 2007 4:47 pm
by Kieran Huggins
ole++
well said.
Posted: Thu Dec 20, 2007 5:37 pm
by Luke
umm I decided to go with cakephp simply because of its code generation stuff (I really needed the site framework up quickly to allow the client to start entering data). I am very happy with it. It took a little getting used to, but I've found it to be top-notch. It was a toss-up between symfony and cake. In the end I chose cake because 1) I've used it before and 2) it was the most rails-like which suits the project I am working on very much (scaffolding).
Posted: Thu Dec 20, 2007 5:40 pm
by Ollie Saunders
Cool. It's interesting to here you say that, about rails and all.