Comment Re:Better Yet (Score 1) 111
>Anybody here have anything to say in the defense of frames?
There are reasons why, sometimes, it's just not possible to load content with the functionality desired within the same window.
For example, right now I'm working on a project that requires me to query another server for a header that contains user-specific elements, such as message counts, user-specific links, etc.
Unfortunately, we're utilizing a fairly inflexible partner-provided API for the basic infrastructure of the site, but a branded header from a third party. Due to restrictions of the partner's API, the only server-side include that can be done requires that the connection be made without passing user-specific cookies. (i.e. the server goes and queries the brand's server for the header, but can't pass the user's cookies/credentials over when it does, thus, can only return code in that query that isn't user-specific.) However, due to the aforementioned need that the header support user-specific details, that solution isn't sufficient. The browser would normally provide this via cookies and/or session data, but since it's a server-to-server connection that makes the header request, that isn't possible until the API is changed to support passing browser variables and cookies in the query. So, in the meantime, an iframe will probably be used to bridge the gap. Since it's the browser that's making the request, the user's cookies/session data remains intact when the query is made, so the code returned is user-specific.
Is it ideal? No. Is it the only feasible way to solve the problem until the header is normalized or the partner's API is made more flexible? Yep! We don't live in a laboratory; we live in the real world. Sometimes, we're told to build something and handed a set of tools that isn't the best way to do the job. There isn't always time or flexibility to do it "right", as much as we wish we could convince our bosses (or in this case, partners) to do so. And in those circumstances, I'm glad we at least have the flexibility of frames/iframes to get the job done. I hate using them, but sometimes you're stuck between a deadline and an inflexible API, and there just isn't another option in the time you have.
"I was jes' follerin' orders, boss!"