My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

Secowela is a language for writing web browser applications. It is a compiler language that generates standard javascript. Thus, all Secowela programs will run nicely on web browsers. If you ever tried to build a multi-thousand LoC javascipt project then this is for you (once it's finished of course).

Features

Component and object-oriented

Unlike JavaScript Secowela features classes and components. The idea of components is that multiple components from different authors can be embedded on one web page without interfering with each other.

Secure components

If you embed third party javascript components in your web-site (widgets etc.) this javascript code can do what it wants to on the client side. In Secowela you can specify which client-side APIs and which DOM elements such a component is allowed to use.

If - for example - a social networking web-site embeds some Secowela components from a third party, the web-site can limit the access rights of the component. Thus, the component can for example query the user's friends but it cannot send mails to these friends.

Statically typed

The Secowela compiler will be able to find bugx that a dynamically typed javascript interpreter cannot find upfront.

Partial type inference

Haveing types is nice. Typing them in is boring. Secowela tries to infere the type in many places such that you do not have to write it down. The compiler will figure it out.

Distributed programming

Modern web applications perform many server callbacks (AJAX). Since web applications are single threaded we have to implement asynchronous IO which results in cluttered code if used in too many places. Furthermore, network and server problems must be tolerated. Thus, a programmer has to mix timers with AJAX requests. Failed requests must be repeated, and so on ... It is getting extremely ugly and therefore most programmers don't care, keep their fingers crossed, and write code that runs only well on good weather. Secowela allows you to write programs synchronous but executes them asynchronous on the browser.

Google Protocol Buffers

Secowela supports google protocol buffers natively.

XML

While I am really not an XML fan boy, Secowela supports XML natively which simplifies the creation of nice UI elements.

Why

You may argue that GWT is the way to go. However, I do not believe that Java is the perfect fit for web programming (C# is not the perfect fit for WPF either). Thus, GWT is not where I want to go from a syntax paradigm. Furthermore, some core concepts of Secowela are not there in Java. Especially the support for secure components and asynchronous distributed programming is missing in Java. Of course java can handle security boundaries at runtime, but that is far too slow when executed in javascript. The Secowela approach puts the magic in the compiler/language thus that the resulting javascript code is not slowed done by security checks.

Implementation

Secowela is implemented in C# and features a LL grammar. See the source Luke.

Status

The grammar for the language core (without XML and protocol buffers) is in place, the parser works and type checking is almost complete. The javascript generator is yet to be done.

Powered by Google Project Hosting