Opa (programming language)

Opa (programming language)
Opa
Opa logo.png
Paradigm(s) multi-paradigm: imperative, functional
Appeared in 2011
Developer MLstate
Stable release S3.5 (build 687) (October 4, 2011; 30 days ago (2011-10-04))
Typing discipline static, strong, inferred
Influenced by OCaml, Erlang
OS Linux, Mac OS X
License AGPL
Website opalang.org

Opa is an open source programming language for web applications.

The language was first officially presented at the OWASP conference in 2010[1], and the source code was released on GitHub[2] in June 2011, under a GNU Affero General Public License.

Contents

Design and features

Opa comprises a web server, a database and distributed execution engine.[3] Code written in Opa is compiled to native code on the server side and to JavaScript using jQuery for cross-browser compatibility on the client side.[4] The advantage of the approach compared to Rich Internet Application (RIA) platforms is that users are not required to install a plugin in their browser.[5] Opa shares motivations with web frameworks, but takes a different approach.[6] This helps Opa to avoid many security issues, like SQL injections or XSS attacks.[7]

The core language is functional, and enjoys a static type system with type inference. Opa also provides sessions which encapsulate an imperative state and communicate using message passing, similarly to Erlang processes. Opa provides many structures or functions that are common in web development, as first-class objects, for instance HTML[8] and parsers, based on Parsing Expression Grammars.[9] Because of this adhesion between the language and web-related concepts, Opa is not indicated for non-web applications (for instance desktop applications). [10]

Examples

Hello world

The traditional Hello world program can be written in Opa as: [11]

server = one_page_server("Hello", -> <>Hello, web!</>)

It can be compiled to a stand-alone executable binary with:

opa hello_web.opa

Running the resulting binary launches the web application:

./hello_web.exe

Opa is packaged with the opa-cloud tool to help deployment on several instances. The following command launches the application, configures load balancing and makes servers share information automatically:

opa-cloud hello_web.exe --host localhost --host my@my_server1 --host my@my_server2

References

  1. ^ "OPA: Language Support for a Sane, Safe and Secure Web, at OWASP 2010". OWASP. June 2010. https://www.owasp.org/index.php/OWASP_AppSec_Research_2010_-_Stockholm,_Sweden#OPA:_Language_Support_for_a_Sane.2C_Safe_and_Secure_Web. 
  2. ^ "GitHub repository". https://github.com/MLstate/opalang. 
  3. ^ "Opa – The Scalable Open Source Cloud Language". WebAppers. 22 July 2011. http://www.webappers.com/2011/07/22/opa-the-scalable-open-source-cloud-language/. 
  4. ^ "Interview: François-Régis Sinot on Opa, a Web Development Platform". InfoQ. 7 September 2011. http://www.infoq.com/articles/Opa. 
  5. ^ Neil McAllister (8 September 2011). "Introducing Opa, a Web dev language to rule them all". InfoWorld. http://www.infoworld.com/d/application-development/introducing-opa-web-dev-language-rule-them-all-172060. 
  6. ^ "InfoWorld article about emerging web technologies, including Opa". InfoWorld. 12 May 2010. http://www.infoworld.com/d/developer-world/infoworld-review-tools-rapid-web-development-297. 
  7. ^ "Auch Opa ist für Cloud-Anwendungen". Heise. 29 July 2011. http://www.heise.de/developer/meldung/Auch-Opa-ist-fuer-Cloud-Anwendungen-1288588.html. 
  8. ^ "Opa - a unified approach to web programming". i-Programmer. 28 August 2011. http://www.i-programmer.info/news/98-languages/2961-opa-a-unified-approach-to-web-programming.html. 
  9. ^ Koprowski, Binsztok (2011). "TRX: A Formally Verified Parser Interpreter". Logical Methods in Computer Science. doi:10.2168. http://www.lmcs-online.org/ojs/viewarticle.php?id=708&layout=abstract. 
  10. ^ "Opa, un nouveau langage pour le développement d’applications Web". LinuxFr. 22 June 2011. http://linuxfr.org/news/opa-un-nouveau-langage-pour-le-d%C3%A9veloppement-d%E2%80%99applications-web. 
  11. ^ Alastair Aitken (26 July 2011). "Opa, the cloud language – a test drive". Morgan Hill. http://www.morganhill.co.uk/cloud/opa-the-cloud-language-test-drive/. 

See also

  • Dart - similar programming language for web apps
  • HaXe - another similar programming language for web apps

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Erlang (programming language) — Erlang Paradigm(s) multi paradigm: concurrent, functional Appeared in 1986 Designed by Ericsson …   Wikipedia

  • ML (programming language) — ML Paradigm(s) multi paradigm: imperative, functional Appeared in 1973 Designed by Robin Milner others at the University of Edinburgh Typing discipline static, strong, inferred …   Wikipedia

  • Dart (programming language) — Dart Appeared in 2011 Developer Google Preview release 0.05[1] (November 16, 2011; 6 days ago& …   Wikipedia

  • Shakespeare Programming Language — Pour les articles homonymes, voir Shakespeare (homonymie). Le Shakespeare Programming Language ou SPL est un langage de programmation créé par Karl Hasselström et Jon Åslund en février 2001 dont le code source ressemble à une pièce de théâtre. Il …   Wikipédia en Français

  • List of programming languages — Programming language lists Alphabetical Categorical Chronological Generational The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in… …   Wikipedia

  • Tool Command Language — Pour les articles homonymes, voir Tcl. Tcl Apparu en …   Wikipédia en Français

  • Vienna Development Method — The Vienna Development Method (VDM) is one of the longest established Formal Methods for the development of computer based systems. Originating in work done at IBM s Vienna Laboratory [Some idea of that work, including a technical report TR… …   Wikipedia

  • List of Yale University people — Yalies are persons affiliated with Yale University, commonly including alumni, current and former faculty members, students, and others. Here follows a list of notable Yalies. Dynamic listNotes: * LL.B. (Legum Baccalaureum) is a graduate degree… …   Wikipedia

  • OCaml — Paradigm(s) multi paradigm: imperative, functional, object oriented Appeared in 1996 Developer INRIA Stable release 3.12.1 (July 4, 2011; 4 months ago ( …   Wikipedia

  • Liste des langages de programmation — Le but de cette Liste des langages de programmation est d inclure tous les langages de programmation existants, qu ils soient actuellement utilisés ou historiques, par ordre alphabétique. Ne sont pas listés ici les langages informatiques de… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”