For example, suppose I had a pageControl UI class and a searcher business logic class with the following :pageControl.jsfunction searchButtonClicked() {  // call business logic class method when button clicked  searcher.beginSearch();}function showSearchResultsPage(searchResults) {  // when this is called, display results  ui.loadContent(searchResults);}searcher.js// This module has a low to moderate chance of someday being used on two or more different pages.function beginSearch() { ... }function searchCompleted(results) {  // This here is what I view as the main problem  pageControl.showSearchResultsPage(results);}The problem is that searcher is specifically tied to pageControl, and it's making the decision that the search result page will be the next thing to appear. The example I was going to give to people about why this is bad gives the idea that You wouldn't directly conditionally call the logic for your entire app inside of Button>onClick, but I'm trying to find a more comprehensive argument about why that is.At first I thought this was inversion of control but looking that up on Wikipedia didn't portray it as negatively, so I don't think that's the right term for this kind of pattern.Is there a name for this anti-pattern of having low-level components controlling higher-level ones?
Is there a name for the anti-pattern of having low-level components controlling higher-level ones?
anti patterns;code smell;coding style
It is called an inversion of authority, named so by Ed Yourdon if memory serves. An example of the usage can be found here.