Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You're asking about code <em>smells</em>, so the I guess the vagueness of the code situation is appropriate. What's the deal with BusinessChart, for example. There's a huge amount we don't know here. But here's what I <em>smell</em>: Only the first issue you mention smells really bad to me. Very strange to have to specify that on the server. I suppose there <em>could</em> be a reason for that, but I have a hard time picturing it. As for the variable CurrentUserID, there could easily be good reasons for that. Maybe BusinessChart filters on different data depending on the user's role, for example. </p> <p>As for GetBaseUrl and ResolvUrl, that could be legitimate also. BusinessChart might need a fully qualified URL, and GetBaseUrl/ResolveUrl are a central place to provide that so you only need to make the configuration change in one place. And why not use a web.config reference for that? Errrr, maybe there's multiple web apps or deployment that use these paths, and the Helper class gets these URL's from a common db, providing <strong>one</strong> common configuration place for multiple apps or deployments.</p> <p>As for using the codebehind . . . sometimes that's necessary. Though it's true that often dynamic code like this is unnecessary, sometimes having the complication <strong>there</strong> achieves the greatest <strong>overall</strong> simplicity.</p> <p>I try to give the benefit of the doubt to existing code, as you can see. However, I wouldn't be surprised to find that, as you suspect, all the dynamic code in your example is indeed absolutely useless. I would say that your sense of smell seems pretty good! And that the first issue you state smells the worst.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload