Linked by Thom Holwerda on Mon 1st Oct 2012 22:55 UTC
General Development "Everyone seems to have a replacement for JavaScript - Google even has two. Now Microsoft has revealed that Anders Hejlsberg has been working on a replacement and it has released a preview of TypeScript. TypeScript is open source - Apache 2.0 license - and a superset of JavaScript. As you would expect from a Hejlsberg language it incorporates type checking, interfaces and lots of syntactic sugar."
Thread beginning with comment 537243
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: Does this fix the DOM too?
by Brendan on Tue 2nd Oct 2012 03:16 UTC in reply to "Does this fix the DOM too?"
Brendan
Member since:
2005-11-16

I've heard somewhere that the problem with making web apps isn't with JavaScript but with the DOM. Does this new super-set of JavaScript do anything about the DOM or is it just more stuff dealing with the language?


The problem with web apps is that (originally) HTML was mostly designed/intended for static documents. For remote applications there were other protocols (e.g. X).

Since then, many different people with many different goals have hacked up work-arounds/extensions to solve problems caused by "not intended for remote applications to begin with" (and problems in other areas, and problems caused by other people's hacks/work-arounds). Because the result is a steaming pile of puke, other people try to create frameworks, etc to hide the underlying puke-fest (but the existence of many different frameworks just adds to the unnecessary complexity/confusion for web app developers, like a thick layer of turd icing on top of a multi-layered puke cake).

The basic idea is that the server tells the client what to display, what user input is allowed and what user input the server wants to know about; and the client displays what it's told to display and gathers the input from the user. It wouldn't be hard to create a clean/elegant way of doing this.

Sadly, the only organisation that would be capable of getting a clean/elegant alternative accepted/supported by the industry is the same organisation that is responsible for a lot of the ungodly mess we have now (W3C).

- Brendan

Reply Parent Score: 8

lucas_maximus Member since:
2009-08-18

This happens to most software eventually, It out grows it s intended use.

TBH, if you keep JS, CSS and HTML actually separated and adhere to that you can write some pretty good maintainable webpages. Unfortunately most web developers think well made means "It works okay in my version of Firefox/Chrome".

Edited 2012-10-02 04:55 UTC

Reply Parent Score: 3

moondevil Member since:
2005-07-08

That is why after a decade in the trenches trying to bend the browsers to do stuff they were never intended to do, I have switched my mind and now state if you want an application, make it native.

As it should be in first place, browsers are for documents.

Cool startups like to say how the web is the future, but they never have to discuss layout issues or look-and-feel, of browser behaviour vs OS defined guidelines, to get the customer to pay the project.

Or browser performance vs native performance for that matter.

In the end, applications should be done native. Easiness of installation can be achieved with things like ClickOnce, Java Web Start, or simple package repository.

Reply Parent Score: 8

Alfman Member since:
2011-01-28

moondevil,

"In the end, applications should be done native. Easiness of installation can be achieved with things like ClickOnce, Java Web Start, or simple package repository."

I hear you, three cheers for easy distribution of native apps. There are many kinds of apps for which browser based solutions aren't nearly as good. But many modern platforms are forcing us (devs/users) to make a contrived choice: submitting to and empowering corporately imposed walled gardens, or standing up for our freedom with (thus far unregulated) web apps. Given this choice, I'd go for freedom almost every time.

JWS was an excellent model for what mobile apps should have been; native apps which are as easy as using a website. However this possibility is largely being foiled by mobile manufacturers who are willing and able to promote platforms that enforce themselves as native application middle-men. This way they can collect royalties over 3rd party apps which they couldn't do if things like JWS were allowed.

Edited 2012-10-02 06:15 UTC

Reply Parent Score: 3