1) The problem of displaying a (mostly static) page of HTML
2) The problem creating an application
There are web frameworks in existence that solve either of these problems, but things get ugly when people don't think about which problem they are trying to solve.