- Order:
- Duration: 5:52
- Published: 23 Jun 2009
- Uploaded: 27 Aug 2010
- Author: richwareham
Name | Curl |
---|---|
Logo | |
Paradigm | multi-paradigm: object-oriented, markup |
Year | 1998 |
Designer | Steve Ward, MIT |
Developer | Curl, Inc. & Sumisho Computer Systems Corp. |
Latest release version | 7.0.0 |
Latest release date | 2009-05-07 |
Typing | strong |
Dialects | none |
Influenced by | HTML, JavaScript, Lisp |
Operating system | Cross-platform: Windows, Linux, Mac OS X |
Website | http://www.curl.com/ |
Wikibooks | Curl |
The 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
Curl combines text markup (as in HTML), scripting (as in JavaScript), and heavy-duty computing (as in Java, C#, or C++) within one unified framework. It is used in a range of internal enterprise, B2B, and B2C applications.
Curl is a markup language 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. Curl applications are not required to observe the separation of information, style, and behavior that HTML, 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 capabilities 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 and run at high speed.
Curl applets are viewed using the Curl RTE, a runtime environment with a plugin for web browsers. Currently, it is supported on Microsoft Windows, Linux, and Mac OS X.
Curl has had a feature of detached applets for several years, which is a web deployed applet which runs on the user's desktop independent of a browser window much as in Silverlight 3 and Adobe AIR. See also Site-specific browser. Curl applets can also be written so that they will run off-line when disconnected from the network (occasionally-connected computing). In fact, the Curl IDE is an application written in Curl.
{Curl 5.0, 6.0, 7.0 applet} {text color = "blue", font-size = 16pt, Hello World}
This code will run if the user has at least one of the Curl versions 5.0, 6.0, or 7.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:
{paragraph paragraph-left-indent=0.5in, {text color = "red", font-size = 12pt, Hello} {text color = "green", font-size = 12pt, World}}
Recently this style of layout has been adopted by 'builders' in the Groovy 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 + Scriptaculous such as accordion panes.
Curl sets callbacks in the manner also adopted by Groovy:
{CommandButton width=100pt, height = 50pt, label = {center {bold Invokes an event handler when clicked}}, control-color = "orange", || Attach the following event handler to this CommandButton {on Action do {popup-message title = "Your Message", "This is a user message dialog." } }}
Curl comments use the vertical bar in several variations. The simplest is as follows:
{text A comment can be on a line by itself, || A comment on a line by itself or it can be at the end || A comment on the same line as code of a line.}
{poem || wraps entire poem {stanza || first verse here in any language } {stanza || another verse here in any language } } 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 {destination} which is itself a text procedure.
The same markup can be used for different results, as in one context a text format can be simply invisible but be visible in another: Curl permits top-level file inclusion so that a source text in markup can be included in different parent files, e.g., in education this permits a student-version and teacher-version or a pre-assignment version and a post-grading commented version (glosses, annotations, translations, emphasis) of the identical source file in markup.
Category:Functional languages Category:Markup languages Category:Lightweight markup languages Category:Declarative programming languages Category:Rich Internet application frameworks
This text is licensed under the Creative Commons CC-BY-SA License. This text was originally published on Wikipedia and was developed by the Wikipedia community.