Curl (programming language)

Last updated
Curl
Curl logo.gif
Paradigm multi-paradigm: object-oriented, markup
Designed by Steve Ward, MIT
Developer Curl, Inc., Sumisho Computer Systems Corp., SCSK Corporation
First appeared1998;24 years ago (1998)
Stable release
8.0.12 / 1 July 2021;14 months ago (2021-07-01)
Typing discipline strong
OS Windows
Website www.curl.com
Dialects
none
Influenced by
HTML, JavaScript, Lisp

Curl is a reflective object-oriented programming language for interactive web applications 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.

Contents

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 programs may be compiled into Curl applets, that are viewed using the Curl RTE, a runtime environment with a plugin for web browsers. Currently, it is supported on Microsoft Windows. Linux, and macOS was dropped on March 25, 2019 (starting with version 8.0.8). [1] Curl supports "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 and Adobe AIR.

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.

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, Cascading Style Sheets (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. [2] 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 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.

Syntax

A simple Curl applet for HelloWorld might be

 {Curl 7.0, 8.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 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:

 {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 + script.aculo.us 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.} 

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:

 {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 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

Related Research Articles

In computing, an applet is any small application that performs one specific task that runs within the scope of a dedicated widget engine or a larger program, often as a plug-in. The term is frequently used to refer to a Java applet, a program written in the Java programming language that is designed to be placed on a web page. Applets are typical examples of transient and auxiliary applications that don't monopolize the user's attention. Applets are not full-featured application programs, and are intended to be easily accessible.

Dynamic HTML, or DHTML, is a term which was used by some browser vendors to describe the combination of HTML, style sheets and client-side scripts that enabled creation of interactive and animated documents. The application of DHTML was introduced by Microsoft with the release of Internet Explorer 4 in 1997.

<span class="mw-page-title-main">HTML</span> Hypertext Markup Language

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 JavaScript.

<span class="mw-page-title-main">Java applet</span> Small application written in Java

Java applets were small applications written in the Java programming language, or another programming language that compiles to Java bytecode, and delivered to users in the form of Java bytecode. The user launched the Java applet from a web page, and the applet was then executed within a Java virtual machine (JVM) in a process separate from the web browser itself. A Java applet could appear in a frame of the web page, a new application window, Sun's AppletViewer, or a stand-alone tool for testing applets.

Web design encompasses many different skills and disciplines in the production and maintenance of websites. The different areas of web design include web graphic design; user interface design ; authoring, including standardised code and proprietary software; user experience design ; and search engine optimization. Often many individuals will work in teams covering different aspects of the design process, although some designers will cover them all. The term "web design" is normally used to describe the design process relating to the front-end design of a website including writing markup. Web design partially overlaps web engineering in the broader scope of web development. Web designers are expected to have an awareness of usability and be up to date with web accessibility guidelines.

An HTML editor is a program for editing HTML, the markup of a web page. Although the HTML markup in a web page can be controlled with any text editor, specialized HTML editors can offer convenience and added functionality. For example, many HTML editors handle not only HTML, but also related technologies such as CSS, XML and JavaScript or ECMAScript. In some cases they also manage communication with remote web servers via FTP and WebDAV, and version control systems such as Subversion or Git. Many word processing, graphic design and page layout programs that are not dedicated to web design, such as Microsoft Word or Quark XPress, also have the ability to function as HTML editors.

<span class="mw-page-title-main">Bluefish (software)</span> Text editor

Bluefish is a free and open-source software advanced text editor with a variety of tools for programming and website development. It supports coding languages including HTML, XHTML, CSS, XML, PHP, C, C++, JavaScript, Java, Go, Vala, Ada, D, SQL, Perl, ColdFusion, JSP, Python, Ruby, and shell. It is available for many platforms, including Linux, macOS and Windows, and can be used via integration with GNOME or run as a stand-alone application. Designed as a compromise between plain text editors and full programming IDEs, Bluefish is lightweight, fast and easy to learn, while providing many IDE features. It has been translated into 17 languages.

An HTML element is a type of HTML document component, one of several types of HTML nodes. The first used version of HTML was written by Tim Berners-Lee in 1993 and there have since been many versions of HTML. The most commonly used version is HTML 4.01, which became official standard in December 1999. An HTML document is composed of a tree of simple HTML nodes, such as text nodes, and HTML elements, which add semantics and formatting to parts of document. Each element can have HTML attributes specified. Elements can also have content, including other elements and text.

A lightweight markup language (LML), also termed a simple or humane markup language, is a markup language with simple, unobtrusive syntax. It is designed to be easy to write using any generic text editor and easy to read in its raw form. Lightweight markup languages are used in applications where it may be necessary to read the raw document as well as the final rendered output.

A user interface markup language is a markup language that renders and describes graphical user interfaces and controls. Many of these markup languages are dialects of XML and are dependent upon a pre-existing scripting language engine, usually a JavaScript engine, for rendering of controls and extra scriptability.

In HTML, div and span tags are elements used to define parts of a document, so that they are identifiable when a unique classification is necessary. Where other HTML elements such as p (paragraph), em (emphasis), and so on, accurately represent the semantics of the content, the additional use of span and div tags leads to better accessibility for readers and easier maintainability for authors. Where no existing HTML element is applicable, span and div can valuably represent parts of a document so that HTML attributes such as class, id, lang, or dir can be applied.

Run BASIC is a web application server, based on the Liberty BASIC version of the BASIC programming language.

ZK is an open-source Ajax Web application framework, written in Java, that enables creation of graphical user interfaces for Web applications with little required programming knowledge.

<span class="mw-page-title-main">CSS</span> Style sheet language

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. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

Google Closure Tools is a set of tools to help developers build rich web applications with JavaScript. It was developed by Google for use in their web applications such as Gmail, Google Docs and Google Maps.

HTML attributes are special words used inside the opening tag to control the element's behaviour. HTML attributes are a modifier of an HTML element type. An attribute either modifies the default functionality of an element type or provides functionality to certain element types unable to function correctly without them. In HTML syntax, an attribute is added to an HTML start tag.

Google Chrome Experiments Online showroom of web browser based experiments

Google Chrome Experiments is an online showroom of web browser based experiments, interactive programs, and artistic projects. Launched on March 1, 2009, Google Chrome Experiments is an official Google website that was originally meant to test the limits of JavaScript and the Google Chrome browser's performance and abilities. As the project progressed, it took the role of showcasing and experimenting latest open-source web-based technologies, such as JavaScript, HTML5, WebGL, Canvas, SVG, CSS, and some others. All the projects on Chrome experiments are user submitted and are made using open source technologies. As of February 24, 2015, there were 1,000 different Chrome projects posted on the website.

Front-end web development is the development of the graphical user interface of a website, through the use of HTML, CSS, and JavaScript, so that users can view and interact with that website.

<span class="mw-page-title-main">Paul S. Wang</span> Chinese-American computer scientist (born 1944)

Paul S. Wang is a Chinese-American computer scientist, researcher, author, consultant, and academic. He is Professor Emeritus of Computer Science at Kent State University.

References

  1. "Changes to Supported Operating Systems of Curl RTE Products". SCSK Corporation. Archived from the original on 2019-05-13. Retrieved 2020-04-01.
  2. M. Hostetter; D. Kranz; C. Seed; C. Terman; S. Ward. "Curl: A Gentle Slope Language for the Web". MIT Laboratory for Computer Science. Archived from the original on 2008-12-24. Retrieved 2005-12-20.