When I try to talk to people about a technology they are not familiar with, I often try to make comparisons to something they are already using. The generally involves drawing parallels between ColdFusion and Ruby on Rails on the one hand with Java and .Net on the other. I frequently find myself explaining some of the differences between what is a programming language, what is a development framework, and what is platform that the application runs on.
The last one, the platform, is one that I find the most difficult to articulate. Generally, you know you're using a platform when you are relying on something inherit in the operating system or you have installed something. The platform determines where your application can run and what artifacts of the host system you have at your disposal. Examples of platforms are:
- Java Runtime Environment (JRE) - runs on any computer with the JRE installed. Includes Mac OS X without additional installation.
- .NET - runs on any computer with the .NET framework installed. Windows only.
- Ajax - Browsers which support XML HTTP requests and Javascript
- Flash - Browsers which have Flash plug-in installed, or the standalone Flash player
The language is, at its simplest form, just a compiler which generates something executable from code. The compilation of a language targets a platform, or is evaluated by the platform at run-time. Depending on the targeting or which platform is doing the evaluation, the application will have access to resources and services native to the platform. Examples of languages:
- Java
- C#
- Javascript
- Actionscript
- Ruby
What's interesting about these languages is that, perhaps with exception of C#, they can be executed on various platforms:
- Java: Java Runtime Environment or .NET (via J#)
- Javascript: in a browser, .NET (via JScript), and Java (via Rhino)
- Actionscript: in a flash player, AIR application, or in ColdFusion (via the little-used server-side ActionScript -- and yes! this makes ColdFusion a platform)
- Ruby - using a standard Unix environment, JRuby, and IronRuby
Finally, there are the frameworks. Frameworks generally may target a platform or a language, depending on the nature of the framework. A framework exists to organize code in a systematic way, but may be bound to features present in the underlying platform. Often the confusion with something like Rails, ColdFusion or Flex is that they are not understood as frameworks, but as programming languages. This is simply not true; they are frameworks, tightly bound either to their underlying language, platform, or both. For example, Rails for another language such as Java simply isn't possible: Rails relies on very specific language features of Ruby simply not available to Java programmers. However, some frameworks are indeed portable across languages. Spring, with its IoC container concept and API to access it is indeed used across multiple platforms and languages: ColdFusion, .NET, and Java.
In summary, although the distinction between languages, frameworks and platforms isn't necessarily complex, it is important to keep in mind the distinction when exploring new technologies.
1 comments:
Post a Comment