Opa: web programming done right
How many programming languages are out there? We’re not aware of any precise count but the Wikipedia lists some 630 notable ones. And new ones are appearing by the day. Only few of them will make it to the previous list and fewer still will become mainstream. Does that mean one should not bother to try to keep up with them? Well, what if one knew which ones are going to matter?
Opa is one of the new programming languages that entered the scene in June 2011 with its open source release (though it’s development started long before that). In the recent article covering InfoWorld’s 2011 Best of Open Source Software Awards, Eric Knorr had this to say about it:
“[…] and although it was too late for Bossie consideration, keep your eye on Opa, the new open source language that InfoWorld’s Neil McAllister believes may transform Web development.”
In only 3 months since its public release Opa gained a lot of attention, its homepage attracting some 100,000 unique visitors and its crowd of followers growing steadily. What is it then that makes Opa so interesting?
For starters Opa is a new programming language designed specifically for the web. And as such, it really rethinks and rebuilds from the ground-up the way web applications are developed.
Probably the most notable difference with existing approaches is Opa’s integrity. The typical technology stack for web applications involves a web server, a DBMS, a client side language (typically, Javascript), a server side language with an accompanying web framework and a database query language (typically, SQL). Developers need not only to master all those components, but also to configure them and to make them communicate and work together, which often involves writing a lot of (boring and error-prone) boilerplate.
Opa removes all those complexities by offering an integrated platform for web apps. Its programs are automatically distributed between the server and the clients (via automatic translation to JavaScript) and the communication between those agents is handled by the compiler automatically. Also the database is tightly integrated with the language removing the need for any kind of data-mapping.
This has two important consequences. First is simplicity and, as a result, increased productivity for developers, who now only need to master one language and who can focus on the application logic and UX instead of spending their time working on the infrastructure.
The second outcome is perhaps even more important: increased security of applications. Thanks to tight integration Opa applications are immune to most of the popular threats, including SQL injections and XSS attacks. And because all the client-server communication is taken care of by the compiler it can be made secure once and for all.
Finally, tight integration allows Opa to also bring a huge improvement to runtime and deployment of web applications. The compiler produces a single self-contained executable, which includes all the resources of the applications (images etc.) and allows to move it between machines and execute with a single command.
The language is also fully “cloud-compatible”, where running more instances of the application on many machines is fully automated and load-balancing and communication between the instances is transparently handled by the platform.
Finally Opa features a strong, static type-system and employs static analysis techniques, which together are capable of detecting a surprisingly high percentage of programming mistakes, therefore improving code quality and typically saving time spent on debugging the application.
For more information about Opa visit its homepage.
Trackbacks & Pingbacks