Need to host a subversion repository? Try our hosted development tools.
Introduction to Curl

In this introduction you will discover what Curl is, what its costs are and how it came to be.

Curl was started in 1995 as a DARPA funded MIT project, to look into what should be the next logical step forward for web based computing. The name Curl comes from the use of {} curly braces as a main part of the language's syntax, this original code name for the project has stuck. The results of the original research project were so promising that it was spun off into Curl Corporation in 1998, and the first commercial release of the Curl platform followed in the spring of 1991. There are some pretty heavyweight names involved in the Curl project, including Tim Berners-Lee, the inventor of the web, and MIT research scientist David A. Kranz (creator of the Curl language). States Maureen O'Gara, from Client Server News "Curl Corporation is without doubt one of the best-credentialed companies ever to be inching out of stealth mode."

Figuring out exactly what Curl is, and what it has to offer you is a bit of a challenge, because Curl does so much. Stick with it though, as the potential for Curl to change the way you look at web development is huge.

The Curl platform was created from the ground up to solve the inherent inefficiencies of the current web based application approach. Today's web applications are built upon a server-centric approach, where all the work is done on the server (see the excellent ASP & JSP tutorials on Visual Builder's site) and the results are sent back to the user's browser as, more or less, static html pages. The current model scales poorly, sucks up bandwidth like there is no tomorrow, offers extremely limited user interfaces, has limited extensibility and results in long, frustrating waits for the end user, as each click usually results in a round trip to the server (just try booking an airline ticket via the web for a great example of how awful web based apps can be).

Curl puts the power back onto the client computer, which makes a lot of sense -- today's PC's are wicked fast, and demoting them to the status of a 70's dumb terminal (marketing types prefer the more modern phrase "Thin Client"), has been one of the web's major stumbling blocks. With Curl, your user downloads the application (a Curl applet) just once -- afterwards only the bare data is being transferred between the Curl applet and the server, which can be so fast, that your users might think they are running a local program, and not a distributed web based application.

The Curl programming language is a unique mix of other languages. Imagine putting the best bits of html, JavaScript, Flash, Shockwave, Java, VB and C++ into one pot, and giving it a good stir -- the result would be close to Curl. As Curl was the first language created specifically for the web (unlike Java or Shockwave), the Curl engineers were able to pick and choose the best features of each existing technology and hone them into a single unified package. Using Curl means that you are no longer forced to search for some new technology, every time your application needs extended functionality over html -- html style formatting, 2d, 3d, sound, SOAP, XML and a lot more are all built into the highly efficient core of the Curl language (Curl also plays very well with existing web technologies, and you're not forced to only do things the Curl way).

Curl Technology
If Curl sounds a lot like Java -- it is, and it isn't. Curl is, like Java, based on a JIT compiler -- compiling and executing code directly as it's downloaded. The Curl JIT is called the Surge Runtime Environment (or RTE). Unlike Java or C# it uses raw source code and not bytecode, which is both more secure and less susceptible to platform variances. Both Java and Curl are fully object-oriented languages, but Curl extends past OOP to allow non-technical users to quickly create page layouts in Curl, with html-like syntax. Curl has a much more useable set of user interface elements, and you can create a Curl prototype in hours, instead of days with Java. Curl applications tend to be far smaller than those created in Java, reducing download and startup times. Another point is that Java is 100% object oriented, and the learning curve just to build a simple Hello World applet is very high (imagine an average visual web designer trying to learn Java, and you'll get the point) In Curl to create the same Hello World applet, you just have to type the source code "Hello World" and run the applet. Curl allows less technically savvy users to work with html-like syntax (it's even cleaner than html), with familiar constructs such as:
[images:bold.gif]
or
http://www.programmersheaven.com/articles/curl/2/images/itemize.gif



http://www.programmersheaven.com/articles/curl/2/images/intro-paragraph-output.gif
The output of the above Curl code.


Curl is a programming language, and the Surge Lab IDE is something that programmers will feel comfortable with, but might initially intimidate visual web builders. If you always wanted to try programming, but were always put off by the complexity of Java or C++, then by all means give Curl a spin (see the sections later in this tutorial, where you can actually write and run Curl code directly in your browser! Try that with Java). Curl is probably the easiest programming language of all time to learn -- Curl Corporation calls it a "Gentle Slope" language. You can start off with html like simplicity and slowly work your way up to writing real-time 3d ray tracing programs! New with the 2.0 version of Lab is an extensible Visual Layout tool, that lets you create user interfaces via drag and drop (you still need to know a bit of Curl to hook things up in the background though).

At the moment the Curl platform is only available for Windows, but the language was designed from the ground up to be highly portable, so as it's popularity grows, expect to see Curl show up on other PC OSs (like Linux and Mac OSX) as well as mobile platforms such as personal organizers or mobile phones.

The Cost of Curl
So, you ask, "All this sounds interesting, but what does it cost?". The Curl platform is owned solely by Curl Corporation, and they are looking to make money with it (no great surprise there). The original idea was to charge a rental fee on how much an application was used -- this was met with a resounding groan from the developer community, and was the singly most criticized aspect of Curl when it was released (the technology itself was universally highly praised). At the beginning of last summer Curl Corp. moved to a traditional licensing setup for its enterprise customers, and this last fall released a new licensing plan that allows small independent developers to take advantage of Curl's power, without having to pay Enterprise rates. For independent (read: non- enterprise) developers, using Curl is split into two separate pieces:

100% Free Curl
If you use Curl to add functionality to your web site project and the site is for public, non-profit use, and your users are not required to register to your site (this would include around 95% of all sites on the web) then you can use Curl for free.

Not Free Curl
If your users are required to register to use your site or have to pay a fee, then you are required to purchase a license from Curl Corporation. The cost of the license depends on how many unique users the application will support. Currently, for a web-based application that is used by between 1-500 users, you would have to pay US $500, and prices increase for larger applications. If you are doing a large project, then you should talk to the sales department at Curl for more pricing details.

What this means is if you use the Curl technology platform to earn money, then you have to pay Curl Corporation for a license -- if not, you can use it for free (for more information, go to the Curl web site or contact their sales department at sales@curl.com). One of the interesting aspects of Curl for commercial projects, is that it can save large amounts of money in infrastructure costs – to support a site with 100,000 registered users using a traditional web application, you will quickly find that server and bandwidth costs will become a major factor in the overall cost of your project. With Curl you would have to pay for the license, but would then stand to save potentially large amounts of money on reduced back-end system and bandwidth costs. As always, this type of calculation depends on the specific application you are considering -- your mileage may vary.
Regardless of whether you have to purchase a license, or fall under the free usage license -- you will need to obtain a license file for your project from Curl Corporation. If this sounds like a hassle, it isn't -- let them know what you are doing, and they will send you an email with a 'curl-license.scurl' file that you simply have to place together with your Curl application on the server.

Is Curl right for you?
If you are frustrated by having to use bailing wire and shoestrings to keep your web apps sort of working? Then Curl is most likely your holy grail. If you need to reach every potential person on the web, then you are probably going to be stuck with html for a while, but even then it is possible that you could add a Curl applet to your html site to handle the areas that need to offer your users greater functionality. If you need to reach users who don't use Windows based boxes, then you'll have to wait for Curl Corporation to port the technology (please send them an email at info@curl.com to let them know you're interested though).

Return to Table of Contents
 

Other Views

corner
Popular resources and forums for programmers on Programmersheaven.com
Assembly, Basic, C, C#, C++, Delphi, Java, JavaScript, Pascal, Perl, PHP, Python, Ruby, Visual Basic
© Copyright 2009 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin. Read the latest words from the publisher here.
Be the first to sign up for Lars Hagelin’s In-depth Outsourcing Newsletter here.
bootstrapLabs Logo A bootstrapLabs project.