If every object needs to determine the null

Net development of the webform, to ask the question: whether each object pages are needed to determine whether the null?
Suppose a page, the page is displayed on a course information, such as the curriculum, class time, teachers, curriculum pictures and so on curriculum object attribute information, the browser's address bar will have a course in ID. If the input does not exist a course of ID in the address bar, then this time code should be how to deal with, I think:
1 if the object is not null, then read the information, if empty, then do not read. In this way, the need for reading information dynamic page in the places is blank, only static information.
2 if the object does not exist, then jump directly to the 404 page.
3 if the object does not exist, then the default read a certain existing object information.
4 if the object does not exist, then return to the course list page, page.
However, I see a lot of code in our company are not judgmental, direct read object information in the configuration file, and then a 404, then, you enter a nonexistent course ID in the browser, a direct jump to 404 (code error, jump, not reported, yellow pages.) this treatment can do it, I always feel this way not ah, this should be the error in your code.
All the cattle are how to deal with this situation, is it right? Is it right? Should judge whether the object is empty, or some other better?

Started by Reginald at November 30, 2016 - 5:21 PM

The other did not see, ID parameters must handle. Without treatment, there will be various problems that, such as injection.

Posted by Theobald at December 05, 2016 - 5:29 PM

Must be judged.. Abnormal return by yellow pages show this is obviously a very bad user experience. .

Thinking about it, if you are in operation, the operation without any problems, but suddenly jumped to an error page, more cheating is, it took a similar to the "I'm sorry, system errors" such hints, fuck, immediately think this system sucks, motionless on the ISO often, and it led operation page me... I in order to continue the operation, I have to back off, and this time I operating record does not exist... I also in step by step

Posted by Carl at December 08, 2016 - 5:50 PM

This is already know the cause of the error, and / or to deal with the problem of. Why to want to jump to the 404 page? The 404 page dealing with unpredictable error

Posted by Bartholomew at December 15, 2016 - 6:35 PM

Good design will judge the various possible errors, the null value must be considered

Posted by Ignativs at December 17, 2016 - 7:12 PM

Need null value judgment. Various abnormalities should be taken into consideration, otherwise do not fill in late stage.

Posted by Webster at December 28, 2016 - 7:50 PM

What do want teenager, must be judged.

Posted by Abner at December 29, 2016 - 8:19 PM

1 if the object is not null, then read the information, if empty, then do not read. In this way, the need for reading information dynamic page in the places is blank, only static information.
This method is good.
As for whether or not to jump to the 404 page of this demand is generally not required

Posted by Wythe at December 30, 2016 - 8:34 PM

Don't judge when the program to others will be a big push errors do programs or attention to detail

Posted by Algernon at January 02, 2017 - 8:58 PM

Must first convert int ah, type errors will return 0, then prompts not found

Posted by Kay at January 02, 2017 - 10:01 PM

Judgment of null can make the program more robust, otherwise click hang. Your program with who

Posted by Hunter at January 09, 2017 - 9:02 PM

Judge the various abnormal, abnormal made according to different processing. Unified jump to the 404 page, the user experience great harm

Posted by Franklin at January 09, 2017 - 9:48 PM

Want to do good, give a friendly reminder.
"Children, like access to the page in the right way.!!"

Posted by Ed at January 10, 2017 - 10:20 PM