Curl is a
reflective
Reflection is the change in direction of a wavefront at an interface between two different media so that the wavefront returns into the medium from which it originated. Common examples include the reflection of light, sound and water waves. The ' ...
object-oriented programming language
Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
for interactive
web applications
A web application (or web app) is application software that is accessed using a web browser. Web applications are delivered on the World Wide Web to users with an active network connection.
History
In earlier computing models like client-serve ...
whose goal is to provide a smoother transition between formatting and programming. It makes it possible to embed complex objects in simple documents without needing to switch between programming languages or development platforms. The Curl implementation initially consisted of just an interpreter, but a compiler was added later.
Curl combines text markup (as in
HTML
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
), scripting (as in
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
), and heavy-duty computing (as in
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
,
C#, or
C++
C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
) within one unified framework. It is used in a range of internal enterprise,
B2B, and
B2C
Direct-to-consumer (DTC) or business-to-consumer (B2C) is the business model of selling products directly to customers and thereby bypassing any third-party retailers, wholesalers, or any other middlemen. Direct-to-consumer sales are usually tr ...
applications.
Curl programs may be compiled into Curl applets, that are viewed using the Curl RTE, a
runtime environment
In computer programming, a runtime system or runtime environment is a sub-system that exists both in the computer where a program is created, as well as in the computers where the program is intended to be run. The name comes from the compile t ...
with a
plugin for
web browser
A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
s. Currently, it is supported on
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
.
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
, and
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
was dropped on March 25, 2019 (starting with version 8.0.8). Curl support
"detached applets" which is a web deployed applet which runs on the user's desktop independent of a browser window much as in
Silverlight 3
Microsoft Silverlight is a discontinued application framework designed for writing and running rich web applications, similar to Adobe Inc., Adobe's Run time environment, runtime, Adobe Flash. A plugin for Silverlight is still available for a v ...
and
Adobe AIR
Adobe AIR (also known as Adobe Integrated Runtime and is codenamed Apollo) is a cross-platform runtime system currently developed by Harman International, in collaboration with Adobe Inc., for building desktop applications and mobile applicat ...
.
Architecture
The Curl language attempts to address a long-standing problem: the different building blocks that make up any modern web document most often require wildly different methods of implementation: different languages, different tools, different frameworks, often completely different teams. The final — and often most difficult — hurdle has been getting all of these blocks to communicate with each other in a consistent manner. Curl attempts to side-step these problems by providing a consistent syntactic and semantic interface at all levels of web content creation: from simple HTML to complex
object-oriented programming
Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pr ...
.
Curl is a
markup language
Markup language refers to a text-encoding system consisting of a set of symbols inserted in a text document to control its structure, formatting, or the relationship between its parts. Markup is often used to control the display of the document ...
like HTML—that is, plain text is shown as text; at the same time, Curl includes an object-oriented programming language that supports
multiple inheritance
Multiple inheritance is a feature of some object-oriented computer programming languages in which an object or class can inherit features from more than one parent object or parent class. It is distinct from single inheritance, where an object or ...
. Curl applications are not required to observe the separation of information, style, and behavior that HTML,
Cascading Style Sheets
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone techno ...
(CSS), and JavaScript have imposed, although that style of programming can be used in Curl if desired.
While the Curl language can be used as an HTML replacement for presenting formatted text, its abilities range all the way to those of a compiled, strongly typed, object-oriented system programming language.
Both the authoring (HTML-level) and programming constructs of Curl can be extended in user code. The language is designed so Curl applications can be compiled to native code of the client machine by a
just-in-time compiler
In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is a way of executing computer code that involves compilation during execution of a program (at run time) rather than before execution. This may cons ...
and run at high speed. Curl applets can also be written so that they will run off-line when disconnected from the network
occasionally connected computing. In fact, th
is an application written in Curl.
Syntax
A simple Curl applet for HelloWorld might be
This code will run if the user has at least one of the Curl versions 7.0 or 8.0 installed.
Curl provides both
macros and text-procedures in addition to anonymous procedures and named methods.
An alternative using the text-procedure ''paragraph'' would be:
Recently this style of layout has been adopted by "builders" in the
Groovy
''Groovy'' (or, less commonly, ''groovie'' or ''groovey'') is a slang colloquialism popular during the 1950s, '60s and '70s. It is roughly synonymous with words such as "excellent", "fashionable", or "amazing", depending on context.
History
The ...
language for the JVM, but is also familiar to users of CSS or Tcl/Tk. Most features for web applications now implemented through combinations of JavaScript libraries + HTML + CSS are already found within the Curl language, including features usually associated with
Prototype
A prototype is an early sample, model, or release of a product built to test a concept or process. It is a term used in a variety of contexts, including semantics, design, electronics, and Software prototyping, software programming. A prototyp ...
+
script.aculo.us such as accordion panes.
Curl sets callbacks in the manner also adopted by Groovy:
Curl comments use the vertical bar in several variations. The simplest is as follows:
Curl as lightweight markup
Because Curl provides for both user-defined text procedures and stylesheets, Curl can be used readily as domain-specific lightweight markup. A major advantage over plain text HTML markup is that the text encoding can be set to UTF-8, and text entered in a Unicode-enabled editor without any escaping of characters (like JavaScript, Curl is Unicode friendly). A poetry example would be:
which can initially be implemented by defining the poem and stanza markup as paragraph text formats. Stanza could be further refined to include a hidden navigation anchor for page navigation using the Curl which is itself a text procedure.
The same markup can be used for different results, as one can style text to be visible in one context and invisible in another. Curl also permits top-level file inclusion so that a source text in markup can be included in different parent files. In education, for example, one could create a source file of test questions, and include it in both a student and a teacher version of the text.
See also
*
Homoiconicity
In computer programming, homoiconicity (from the Greek words ''homo-'' meaning "the same" and ''icon'' meaning "representation") is a property of some programming languages. A language is homoiconic if a program written in it can be manipulated as ...
: Curl is both a programming language and a data format
References
External links
MIT Curl Project the results of the Curl research project at
MIT's Laboratory for Computer Science.
Curl, Inc.an
Curl International Corp.develop and distribute a suite of commercial products which are based on the results of the MIT research. Owned b
a majority-owned unit o
Sumitomo Corp.by Martin Heller.
InfoWorld
''InfoWorld'' (abbreviated IW) is an information technology media business. Founded in 1978, it began as a monthly magazine. In 2007, it transitioned to a web-only publication. Its parent company today is International Data Group, and its siste ...
awarded Curl its 2008 Technology of the Year award in the
Rich Internet Application
A rich web application (originally called a rich Internet application, or RIA or installable Internet application) is a web application that has many of the characteristics of desktop application software. The concept is closely related to a sing ...
category.
{{Authority control
Declarative programming languages
Functional languages
Lightweight markup languages
Markup languages
Rich web application frameworks
Homoiconic programming languages