Archive | October 2012

P3: -CSS + Any

I have a proposition…

With the advent of web (2.0) people are more and more obsessed by the web applications and nowadays everything must be on the web. Why is that? I believe that there are multiple reasons behind this and I won’t go into details, what matters in the end is that’s the trend whether you like it or not. I personally don’t have issues with the trends, that’s only natural and things are happening for a reason. Not all trends lead to a success but when they fail we need to learn something from them so we can create new trends that lead to a better world in the end – I’ve digressed a lot so let me return to my proposition. But I do have issues with trends that are difficult to follow, in this case a typical web application is consisted of 3 moving parts: HTML + CSS + Javascript, and that’s only for the client-side of the app. Typical server side app is not using any of the mentioned technologies (I said typical, Node.js and similar are anything but typical). So there’s a fourth dimension in the story (the server) which is the core of the app. So to make an average modern web app you need to be fluent in a minimum of 4 different programming languages (if you add SQL that’s 5). Some would argue that you need to have different roles of programmers to address this problem which are fluent in a given set of technologies, so you could have a backend guy and UI designer and/or else. That’s ok but in my opinion 1 person should be capable of building the whole app without the need to be overburdened by the languages which are needed to build the app. Can we simplify this? I think we can. First of all I can’t get why is there a need for a CSS. If we look at the desktop apps (and they should be used as a source of inspiration for newer kinds of client apps) there’s no such thing as a CSS. HTML should be enough to code a view side (structure, layout, …), for example iOS apps have a XIB (view) and everything else is written in Objective-C (in this case a Javascript counterpart); Java Swing codes everything in Java (which isn’t very good for tooling – GUI builders are pretty bad); JavaFX uses FXML for a VIEW, and Java for everything else (CSS can be used with JavaFX but I personally think that CSS should be casted away) and so on and so forth. So CSS should be casted away and we have fewer dimensions to worry  about(HTML + Javascript + SERVER). But that’s still complex. Can we simplify this some more? Why are we obliged to script HTML pages with Javascript only (officially (IANA) there’s support for VBScript and Tcl but as far as I know that’s not supported in modern browsers)? I’d like if I could write something like this in a HTML file: <script type=”text/java”/> or <script type=”text/csharp”/> or <script type=”text/scala”/>As you probably know there are quite a lot of web frameworks that compile to HTML+Javascript (GWT, Vaadin, …) that’s just plain wrong, you’re trying to overcome issues by introducing new dimensions of problems, let’s go back to the root of the problem if we want web apps to be the apps of the future. Browsers are a platform and they should provide multiple choices for programmers. This would lead to a fewer web frameworks and I believe this would be easier for everyone, today it’s really difficult to choose the “right” framework.

Give the programmers a choice of language to build the client side of the web app!

Solution: lose CSS introduce new scripting options