It does not help that the terms were not coined at the same time. That is undoubtedly one of the reasons why there is so much confusion surrounding them. They were not clearly defined at inception because they were not simultaneously conceived. The term User Interface came first – around the same time computing was brought to market.
Fast forward to the 90s when Don Norman helped coin the term User Experience while working at Apple. At the UX Conference in San Francisco, he explains in a video interview that UX is about the entire experience that the user has with the product, the company, and the services. Everything from the way customer service is perceived to how easily the product is released from the package.
So where does that leave User Interface? Depending on whom you ask, UX and UI are either wholly separate, or they overlap, or UI is a subset of UX. How you define UX has a significant bearing on the perspective of the two terms.
One school of thought separates the terms like this:
Think of a house. The framing of the house is the physical structure – the coding. The electrical system and the plumbing and the HVAC are the functionality of the house – the user experience. The window hardware, doorknobs, faucets, and paint are how the homeowner interacts with the house and their enjoyment of it – the user interface.
In that example, the two are separate entities. They rely on each other, but there is little overlap. If UX design only relates to the functionality of the house, then UX design would need to come first, and UI design would wait to step in after UX was completed.