Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an alternative to JavaScript for writing client-side web application code?

I want to program my xhtml Web Applications without javascript.

What are the alternatives for creating interactive xhtml web applications?

Perhaps java applets which do the tasks of javascript?

Or is there another way?

Thanks for any help!

Javascript is hard to debug, is dynamically typed, strange OOP, could be replaced by any other language when that language will be cut to work at a browser.

I would also like some typesafety in my code what can discover many bugs before running the code.

--EDIT 2--

Have a look at http://www.scala-js.org/.

---EDIT---

So for now there is no real alternative to javascript what is as flexible, widespread and applicable. What i think is applicable are frameworks/tools who compile one language to another like GWT or coffescript.

Thank you for the detailed answers. The reason for my question was, that web development is getting more complex every day. I prefer languages like Java for stable error outlining and type safety. JavaScript on the other hand is (in my opinion) mysterious in its ways and hard to debug (browser incompatibilities, silent errors, unintuitive operands, dynamic typing,....). I developed Websites with JS for years now and it feels horrible to me due to such debugging problems and code management. Yet the libraries are quite powerful and ease much of the work.

like image 697
Alex Avatar asked May 19 '26 23:05

Alex


2 Answers

To have an interactive site you need something that can execute code on the client machine.

This is (at the moment) usually JavaScript. In the past this would have also included Flash or Silverlight (both of which are now on the wane).

JavaScript has a big advantage in that it can easily manipulate the HTML elements directly. While it is possible to do that with Silverlight it's not as easy as Silverlight is designed primarily to build self-contained objects.

like image 168
ChrisF Avatar answered May 21 '26 11:05

ChrisF


Google Web Toolkit GWT lets you write java code which compiles to client-side xhtml+javascript. It relinquishes the page-based standard web approach for a more desktop-like interaction (if I remember correctly the API is somewhat similar to many desktop windowing toolkits).

You may (but don't have to) also develop the (java) server logic and have some client-server communication baked in for you by the compiler.

Have a look at http://code.google.com/intl/it-IT/webtoolkit/

like image 22
Utaal Avatar answered May 21 '26 12:05

Utaal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!