Advice for a guy who is finally FED UP w/ the Zend Framework
Moderator: General Moderators
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.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?
Exceptional is db down...blabla....
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.request and just return to normal list of books or whatever
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
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.The Ninja Space Goat wrote: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.request and just return to normal list of books or whatever
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.
(#10850)
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
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.
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.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
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:
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.
- 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
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.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
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).
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK