I was thinking the other day that web development is way too complicated. My current project uses Servlets, JSPs, HTML, CSS, and Javascript and moving between each of these can be woefully complex. So the question that came to me is, why not just do everything in one language? Web pages could be written entirely in Javascript instead of the HTML/CSS/JS mix we use now. Add in Phobos and you can replace most of the Servlet/JSP layer with Javascript as well. So why isn’t this done? Why do we force ourselves to change gears constantly as we develop our sites out.
I suspect part of the problem is the inadequacies of Javascript: it’s lack of true Object Oriented design, it’s classless structure, it’s lack of package organization, it’s inability to support importing of other packages, and other things that are limiting JavaScript. Another part of the problem is the historical perspective; people have been doing it the way we do it for years, so why change now. Finally using a single language would minimize all of the strong features of the other languages that we are not using such as CSS value being completely removed.
Yet, there are some real benefits to a single language website. First, the development readability factor is obvious. Also consider that by using a single language, better design patterns can be enforced across all of the code. Another thought that if a single language is used, cross browser compatibility becomes less of an issues because the compatibility problems apply only to that single language, not a set of 3 or 5 languages.
I think there’s some value in a single language approach. I think I’ll give it a try on a small project in the near future.