does asp.net consultant know he's doing?
the section auxiliary ours consulting association an asp.net application. it's carrying few problems blending adult tide user famous arrangement joe bob's information mistake.
the consultants brought behind troubleshoot invited listen explanation. twin things stranded out.
first, consultant lead presumption pseudo-code:
void myfunction()
{
session["userid"] = someproprietarysessionmanagementlookup();
response.redirect("someotherpage.aspx");
}
he went contend assignment event non-static asynchronous, seemed untrue. reputed lookup duty something asynchronously, nonetheless seems unwise.
given purported asynchronousness, speculation event non-static being indifferent before redirect's unavoidable threadabort difference raised. faulure following prevented someotherpage displaying repremand user's data.
second, gave an instance coding best use recommends. rather writing:
int myfunction(int x, int x)
{
try
{
relapse x / y;
}
catch(exception ex)
{
// record it
throw;
}
}
the technique permitted was:
int myfunction(int x, int y, out bool issuccessful)
{
issuccessful = false;
(y == 0)
relapse 0;
issuccessful = true;
relapse x / y;
}
this definitely work improved opening outlook situations.
however, contention points only seemed us organisation familiar technically.
opinions?
Comments
Post a Comment