Web 關於一個可以一統江湖的Web開發語言Opa

Opa,一站式的Web應用開發語言,使你從需要同時編寫HTML,CSS,JavaScript,SQL以及其他五花八門的Web應用開發語言的痛苦經歷中解脫。
    長久以來對於Web開發的問題是面對它開發的複雜性,即使開發一個最簡單的Web應用也需要開發人員同時懂得多種語言。你需要HTML跟CSS來負責UI部分,JavaScript負責客戶端功能開發,服務端業務邏輯需要使用JAVA或PHP等服務端語言進行開發,另外還需要使用SQL來訪問數據庫等等。
    把以上的語言都拋開怎麼樣?
    最近幾周我被Opa迷住了,它致力於消除Web開發過程中不同部分開發語言間的糾葛。使用Opa,你不再需要使用一種語言開發UI,另一種語言開發客戶端程序,以及服務端語言來開發業務邏輯了,幾乎所有的事情,從面向客戶的代碼到數據庫訪問都可以使用Opa進行開發。
    不像一些RIA(富應用)平臺,使用Opa的用戶不需要在瀏覽器端安裝任何插件。需要在瀏覽器端運行的Opa部分代碼會自動編譯爲JavaScript。另外服務端代碼運行在服務器上。實際上,Opa的服務端與其他服務端語言不太一樣,它是一個真正的一體化解決方案。與大多數平臺不同的是,你不再必須安裝並維護一個單獨的Web服務器,數據庫服務器,應用服務器,或者還有中間件層來使整個應用運行起來。Opa平臺提供了一切,從Web服務到數據庫服務,以及客戶端和服務端的框架。
    因此,使用Opa開發的Web應用能做到難以置信的精簡,幾乎沒有用來處理各個環節之間連接的代碼,以及更少的樣板文件和乏味的工作這些其他平臺普遍存在的問題。一個聊天室的例子,只用了27行Opa代碼就可完成。用Opa開發以及部署Web應用的方法可以訪問http://opalang.org/learn.xmlt獲得。

 

 

A perennial problem with Web development is its complexity and the number of languages and technologies a developer must juggle to deploy even the simplest Web application. You need HTML and CSS for the UI, JavaScript for the client-side code, a server-side platform such as Java or PHP for the back-end logic, SQL to access the database, and potentially more.

What if all of that went away?

In recent weeks, I've been fascinated with Opa, a new language that aims to eliminate all of the convoluted code-wrangling from Web application development. With Opa, you don't use one language to script your UI, another to code your business logic, and so on. Everything, from the client-facing code to the database access, is written in Opa.

Unlike with some rich Internet application (RIA) platforms, users don't need a browser plug-in to use Opa applications. The parts of your Opa code that need to run in the client browser are automatically compiled into JavaScript.

Other parts of your code run on the server, as appropriate. Here, Opa is unusual in that it's a truly all-in-one solution. Unlike most platforms, you don't need to install and maintain a stand-alone Web server, database server, application server, and middleware layer to get going. The Opa platform provides everything, from the Web server to the database server to the client- and server-side frameworks.

As a result, Web applications built with Opa can be incredibly compact. There's very little of the "glue code," boilerplate, and drudge work that characterizes most Web platforms. The sample application is a distributed Web-based chat client that comprises just 27 lines of Opa code. A full description of how to develop and deploy Web applications in Opa would be too long to include here, but I encourage you to browse the copious documentation available online.



 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章