Lasso Soft Inc. > Home

Why Lasso 9 is better than PHP or Java

30 Aug 2011

[An explanation for the non-programmer]

In actual fact, the name of this post should be "Why Lasso 9 is better than PHP, Python, Perl, Ruby, Coldfusion, Java, ASP, Lisp, Scheme, Tcl, Smalltalk, BASIC, C, C#, C++  and all other languages combined - including Lasso 8 - for building websites and web applications." However, long titles are bad for SEO.

Before I can explain this, however, I need to give you more detail on how all of these languages compare—albeit looking at one side of the overall language comparison cube—and give you a fundamental explanation of how languages work in the web environment.

To start, I need to state the following: Lasso 9 exists to build websites and web applications. Not all of these languages are designed to do this.

The Web is Here to Stay

I should also state that I believe, despite ridiculous comments and theories to the contrary in the media, that this pesky world wide web thing is here to stay. I asked a group of people during a speaking engagement the other day if they knew where their yellow pages were. Only two out of the dozens could even remember where they were located. And I think you would all agree the web is a bit more ubiquitous than the yellow pages.

Given this, for those of you who don't have the context, you need to understand how the whole pie of "this pesky web" works together.

An Over-Simplified Description of How the Web Works

At the end of the day, behind every website is a computer. For the layperson, a web page is merely a document which has been sent to your computer from another computer. Typing a web address into a web browser on a computer is merely a shortcut for fetching a document from another computer and displaying it on your computer, whose client web browser is responsible for two-dimensionally painting it on your screen.

Some other computer → Internet → Your computer

Viewing a web page often looks and feels like looking through a window to another world, but it is not doing anything magical. A web page is just a file which has been sent to your computer fairly instantaneously, containing clickable areas you can engage which cause another file to be retrieved. These files, as they change in front of you, may feel like you are "surfing" information, but you are really just going and getting a static string of information as you click and interact with the document on your own computer.

The web (for the most part) is just the one-way traffic of documents being sent to you based on your requests.

On Serving

On the computer from which it originated (which is usually a fancy computer with extra blinking lights called a "server"), these documents you are receiving are being assembled as quickly as possible before they're sent to you.

Let's turn our attention then to the mechanism of the computer whose responsibility it is to put documents together and send them back as quickly as possible to the people requesting them (through web page requests): the server.

Now, at the bottom of this server is hardware. Chips and wires and drives and fans (and tubes?). This computer has the ability to change bits from one to another as you introduce other bits, and can do so very quickly. You ask the server for something by presenting it with a string of bits, and it gives a response back.

Now to take complete advantage of the hardware's ability to do things quickly, the best case scenario would be to interact directly with the switches and memory and bits on the hardware itself. In fact, one can write in a "low level machine language", or an assembler language, in order to do so. However, the simplest tasks would then require intense and difficult computations and extensive knowledge. To create a complex document, dynamically add something from a pile of data, efficiently break it into sections and send it effectively to you via a cable would require an incredible amount of programming effort.

On Operating Systems

A number of groups have created complex frameworks to sit on top of the hardware to make interacting with the hardware easier, called "operating systems". You may have heard of them (Microsoft's Windows, Apple's Mac OS X, The Many Flavours of Linux including CentOS, Debian and Ubuntu, and many more). Different frameworks can work on top of the same piece of hardware if they have been designed to do so. These systems make operating the hardware easier for programmers and create a centralized ecosystem for them all to work within.

An operating system is just a set of shortcuts to deal with a given piece of hardware and make the act of creating more complex actions easy.

However, when programming for the web, there are a few extra goals that we need to achieve. One, we need to make a website return pages to the end user as quickly as possible. Second, we also need to take advantage of the work other people have done (for example, store data in an efficient way and respond to many other tasks, like DNS or email traffic—or making a powerpoint). And most important of all, we need to minimize the overall development work required to build a website application.

At the bottom of everything, the capabilities of the operating system (which have become somewhat ubiquitous to the world in the server market) is the single most important factor in the development and delivery of a website. Building a website in a low level machine language would take far too long.

On Programming Languages

So instead, we have a few languages which allow us to write programs in a more human-readable manner, which are then squished into a form the computer understands ("compiled"), allowing the program to efficiently use the hardware it is "running" on. A good example of such a language (and probably the most popular) would be C, or any of its variants, such as C++.

There are some languages which have other layers you put on top of these operating systems which give you the ability to use the same program (even if already compiled) on different operating systems without re-squishing (aka compiling) for each OS. A popular example of one of these would be Java.

However, writing code in C or Java still requires you to do an incredible amount of logistical work (like getting and releasing memory) for everything you do. In order to properly use a language like this, you typically need to have serious education as a programmer. In fact, when you talk of "PHP" around a "real" programmer, they will scoff and tell you it isn't a "real" programming language.

You can definitely still build a website application using a compiled language like C or Java. In order to take full advantage of the power of the server hardware, this is the only way to go. However, making a simple functional website using one of these languages can take dozens of people weeks to months of time. It is like cutting grass with scissors: much more precise, but not necessary practical.

Making Web Development Easier, and More Cost Effective

People realized that making websites didn't (or shouldn't) require you to do these tremendously complex things in order to build websites or web applications. So they built programs out of these low-level languages which run on top of these Operating Systems which then have a language for writing code of their own. Code written in these languages are essentially a set of shortcuts which make it easy to create logic and replace values in web content without having to be a virtuoso programmer.

What's interesting is that in the early days of the web, building websites from low-level languages was really your only choice. As these newer "interpreted" languages were developed, websites built with them  weren't as powerful as the ones built with low-level languages (hence the "real" programmers and their scoffing), but your average guy could build a quick, functional website in PHP, Perl, or Lasso in as little as a few days. Only the real hardcores kept building websites in C, like the early eBay or Yahoo. (*cough* Though Yahoo is built in PHP now.)

(The first "dynamic websites", as we know them now—as interactive beasts—occurred when CGI was developed. That would really put shell scripts as the prototypical website development language. Perl quickly became #2. And so on... but that's another post...)

So the early PHP and Lasso guys started to push the C guys out of the web business for your "average working stiff's" website. I remember doing something in a few days that a competitor using Java had taken months for without producing a working prototype. In another example, a project was successfully built in 5 months in Lasso what a developer team using ASP took 2-3 years and still failed to deliver. In yet another example, one of our clients spent a million dollars building an infrastructure in .NET—and we replaced it in a month. I built a site personally in three weeks which took two developers a year to replace with less functionality. I bet our community has lots more stories like this.

(Having said this, the C guys will never actually go out of business; they have lots of other stuff to do. Everything is written in C. Lasso, Perl, Python & Ruby are written in C. Your OS and every piece of software you are using right now is written in C. It's C's world, we just live in it or on top of it. Coding in C is like building with grains of sand instead of bricks and mortar. Or like performing surgery with stem cells instead of a knife and bandaids.)

Then, as interpreted languages were refined and made faster, and the available computer hardware got more powerful, interpreted languages became much more acceptable, even to "real" programmers. But an interpreted language - given that it has two layers to go through (itself as a program, and the OS), is still slower. Sure, you can build your solution very quickly in PHP, but when the tough gets going and the traffic gets flowing, your server falls down in fetal position, whimpering and crying like a baby.

Faster is Better, and Better is Better

And of course, I should also mention here that websites' usability and user satisfaction is directly correlated to how quickly the web pages come to you over the Intertubes. Google gives you 1.3 seconds to get your website created, served, and displayed. The faster you can get your site out the door means the higher you will rank on Google. The higher you are on Google, the higher likelihood someone will purchase something.

Faster Serving = More Cash.

The web serving battle is all about speed. What tips the balance, however, is the speed of getting your product to market and the speed of the web technology getting you the page as quickly as possible once the product is completed.

What's in a Programming Language?

Now up until this point, all I have done is really explain the difference between an interpreted language and a compiled language.

FORTRAN, Ada, C and C++ are compiled languages. Extremely slow to program in—and not fundamentally designed for website building—but they talk right to the heart of the machine. So, if you have an unlimited budget, big teams of developers, and lots of time on your hands, and need your web application to scale accordingly to handle the traffic, you build it right to the metal and choose one of these as many corporates and large government organizations have, requiring investments in the thousands or millions. You cut the grass with scissors.

PHP, Python and ColdFusion are all interpreted languages (as is Lasso 8.x), built for the web. Quick to program in (because you have so many shortcuts to do things, and they look after your errors and memory for you), but they require significant hardware overhead and they don't scale easily.

Down to the Bare Metal

If you've read this far, thank you, because here is the rub.

Lasso 9 is a language intentionally built, from scratch, for the web. It has all of the shortcuts of any other web language (three times as many as PHP out-of-the-box, almost twice as many as Lasso 8, and hundred times more then Perl). It is known for being simple and readable. It has an easy-to-use syntax, and is flexible and makes coding websites incredibly quick.

However, Lasso 9 is not an interpreted language, it is a compiled language. It achieves this witchcraft by compiling pieces of your sites the first time they run. Once they are compiled, they talk directly to the bare metal—just like Java or C. It's called JIT, or "just-in-time compilation". Java now works the same way, where it used to be interpreted. Java JIT was introduced for hot spots - code that gets executed a lot. Now the technology is good enough that basically (if not) all Java is JIT compiled. Yah! for Java. Unfortunately for the Java developers, they're still so busy trying to finish their projects given the complexity of the code, we can't tell them about how impressed we are with their tool.

Of course, Lasso 9 is all JIT compiled - no interpretation. Take that, Java.

Better still, you can also compile your code ahead of time with Lasso 9, as we'll see below with LassoApps or with dylib/so libraries. Not just in time but way-the-heck-beforehand (WTHB compilation).

In fact, it's not just the language which is compiled to talk to the machine, but your website itself. It's true. When you've compiled a LassoApp you have compiled the entire site, images, javascript, etc. into a single executable. All your regular .lasso pages get compiled and held in memory. There is no difference as far as performance goes. 

It really is witchcraft.

Building in Lasso 9 enables you to take full advantage of the hardware you are running it from, with very little overhead. Ergo, the limitation becomes the machine(s) you run your site from, not the interpreter itself (as in PHP). Lasso 9 is also specifically designed to take proper advantage of today's multi-cpu machines. It detects how many CPUs you have and adjusts its behaviour to suit.

I could go on, but I'm getting a little too excited, and starting to geek out.

Icing on the Cake

This is the forgotten mystery and brilliance of the Lasso 9 mechanism. This is the reason it has taken 5 years to write. It is the best of both worlds. It's having your cake, and eating it too. This is the basic reason why people were so excited about the idea of Lasso 9 and so disappointed when it failed to launch in the first couple of years.

We've all forgotten, given everything else changing around us, but the magic is still there. It was finally born, after a very uncomfortable and debilitating trip through the birth canal. And now, Lasso 9 isn't just good, it's spectacular.

You can program as fast or faster in Lasso 9 than any other language, and yet you can compete in end-product speed directly with the sardine cans of guys who write in Java. You, the lone wolf, can write applications which compete with companies who write in the lower level languages even though they believe their choice will give them a better end product.

*And, we haven't even talked about the fact that the kernel is closed for viewing, so China can't hire hackers to spend their afternoons figuring out ways to hack your interpreted language websites.

You can write websites quickly that serve faster and don't get hacked every few months. Take that, PHP.

You can write Twitter quickly, all by yourself, and not have to rewrite it later to handle the load. Take that, Rails.

You can write an application which needs to be quickly changed later as users modify their preferences, without going bankrupt. Take that, Java.

Lasso 9 is still the language you have been waiting for all of your life, and will be for some time to come. If ever you needed an explanation for your client of why they should move to Lasso 9, this is it.

The easy is easy, and the hard is possible. The impossible? We eat that for breakfast.

Long Live Lasso!

Author: Sean Stephens
Created: 30 Aug 2011
Last Modified: 31 Aug 2011


No comments found
You must be logged in to comment.

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft