Monday, June 23, 2008

Integrating Flex with the Business Layer

Now that we have addressed some presentation layer concerns let's discuss how other layers in our application architecture are affected. We have repositioned our presentation layer components; how do we integrate with our business layer?

Flex is an extensible RIA framework that provides several ways to communicate with your J2EE components. Flex offers HTTP communication, Web service communication, and Macromedia's proprietary AMF (ActionScript Messaging Format) gateway. The AMF gateway is a high-performance binary protocol that is synonymous with the Flash remoting protocol. Remote objects that are sent through the AMF gateway use the HTTP protocol. Flex offers MXML tags for each of these communication protocols, which significantly reduces the coding complexities. Furthermore, Flex allows you to invoke remote calls to your business tier in either an asynchronous or synchronous manner. By using an asynchronous remote call, the user has the ability to perform some action on the client and not be blocked as happens in traditional web applications. You can block the user from interacting with the UI using synchronous calls where appropriate.

Let's consider how Flex might be integrated with our business/integration layer. For this discussion we will use the Spring framework as our integration layer, but there are no restrictions to the integration layer you choose to implement. Let's assume you have your services in objects that operate in a Spring microcontainer, and you need to make remote object calls from Flex.

Since Flex knows nothing about Spring directly you might consider adding a separate, thin layer that acts as a delegate to your service components. Also, since Spring makes good use of Java interfaces it might be a good idea to build delegate objects that implement the same interfaces as your Spring services. These delegate objects will provide a decoupled gateway from Flex to the integration layer. The only thing you need to do is configure these objects in the Flex configuration file so they can interoperate with the AMF gateway. Here is an example of how a delegate object can be configured inside the server-side flex-config.xml Flex configuration file:


< object name="OrderBusinessDelegate" >
< source >
com.meagle.flexro.FlexBusinessDelegate
< /source >
< type >stateless-class< /type >
< use-custom-authentication >
true
< /use-custom-authentication >
< allow-unnamed-access >
false
< /allow-unnamed-access >
< roles >
< role >OrderUser< /role >
< role >Admin< /role >
< /roles >
< /object >
< /code >

At first glance you can see some additional capabilities of Flex such as configuring security and determining if the delegate object is stateful or stateless. When a remote object call is made from Flex to the integration layer it will be intercepted in a Flex delegate Java object. Delegates will be responsible for making the call to the integration, or service, layer (in our case, Spring). Resultant objects are sent back through the AMF gateway to the Flex client where they can be interpreted as ActionScript objects. Here is an example of the MXML code that will be used by the Flex client to make the remote call invocation and store results in a data model:


< mx:RemoteObject id="soapro"
named="OrderBusinessDelegate"
protocol="https"
showBusyCursor="true">
< mx:method name="saveNewOrder"
result="saveNewOrder_result(event)"
fault="faultHandler(event.fault)"/ >
< mx:method name="findOrderById"
result="findOrderById_result(event)"
fault="faultHandler(event.fault)"/ >
< mx:method name="updateOrder"
result="updateOrder_result(event)"
fault="faultHandler(event.fault)"/ >
< /mx:RemoteObject >

< mx:model id="roModel" >
< !-- The object graph for the Order object
will be stored here -- >
< order/ >
< /mx:Model >

Domain objects written in Java with ActionScript equivalents are passed back and forth through the AMF gateway. This process starts with a request from the Flex client through the AMF gateway to other layers in the application. A resultant object graph will be sent back through the other Java layers and eventually through the AMF gateway back to the client. Once the objects pass through the gateway they are converted back to ActionScript equivalents. Figure 3 shows what this looks like:

Overview of the AMF gateway
Figure 3. Overview of the AMF gateway.

One more note about passing objects back and forth between Flex and your Java tier: Since ActionScript 2.0 is an object-oriented language, it is possible to create ActionScript objects that have Java equivalents. This makes things easier and consistent when passing these objects back and forth over the AMF gateway. The ActionScript objects that are sent back to the Flash plug-in resemble data transfer objects (DTO). This is necessary because the Flash plug-in does not have any Java runtime components. Here is a familiar example of an Order domain object using Java:


package com.meagle.bo;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
* This object represents an order.
* @hibernate.class table="TestOrder"
* @author meagle
*/
public class Order {
private int id;
private double total;
private int version;
private String userName;
private List orderLineItems = new ArrayList();

// other fields and getter/setter methods not
// shown to save space
}

Here is the ActionScript equivalent:


/**
* Generated Action Script Object
* for com.meagle.bo.Order. Do not edit!
*/
class com.meagle.bo.Order extends Object {

public function Order(){}

public static var regClass =
Object.registerClass("com.meagle.bo.Order",
com.meagle.bo.Order);

var id : Number;
var orderLineItems : Array = new Array();
var total : Number;
var userName : String;
var version : Number;

// other fields and getter/setter methods not
//shown to save space
}

You should notice a special method in the ActionScript Order object called Object.registerClass. This Object.registerClass method is used by the AMF gateway to know how to marshal and unmarshal objects between Java and ActionScript. This method registers the client-side ActionScript classes to the server-side Java classes. Since these objects are so similar it is understandable that you would not want to rewrite your domain objects in a slightly different format. Tools such as XDoclet and Ant allow you to generate these ActionScript objects automatically rather than hand code them. Now you can manipulate your Java objects as ActionScript equivalents in the Flex client.

Integrating Flex with the Persistence Layer

In applications that use a well defined decoupled architecture over the Web you do not communicate with your persistence layer directly. Using Flex should not change this architecture. The integration layer typically will communicate to your persistence layer in most cases. This is usually done using a Data Access Object (DAO) that is responsible for accessing data in a persistent store such as a database. The Flex client should not communicate directly to the persistence layer or even know about this layer because it forms a tight coupling. Let's use Hibernate as an example of our persistence layer.

There are a couple of pitfalls when using Hibernate and remote objects with Macromedia's AMF gateway. Hibernate users know you cannot access a lazy loaded collection that has not been initialized with a Hibernate Session object. Accessing a collection of dynamic proxy objects that has not been initialized will result in a runtime exception. The AMF gateway does not know how to specifically look for Hibernate dynamic proxy objects. A potential solution is an aspect-oriented programming (AOP) interceptor that can take the object that is about to be sent over the AMF gateway in the delegate object and remove the dynamic proxies. This process involves sending the resultant object through the interceptor class, which recursively looks for proxy objects that use reflection and that are not initialized. If any lazy proxy objects or collections are found then they are set to null. This is a cross-cutting concern that can be applied as an aspect using an AOP language such as JBoss AOP, AspectJ, Spring AOP, and so on. The AOP interceptor should be applied to objects in the business delegate layer. Figure 4 shows what this looks like in the application architecture:

Introducing AOP interceptors/advice to delegate objects before they pass through the AMF gateway
Figure 4. Introducing AOP interceptors/advice to delegate objects before they pass through the AMF gateway. This further reduces coupling from components in higher layers such as the integration layer, persistence layer, and so on.

The good news is the AMF gateway does know how to cache bidirectional objects so infinite recursion does not occur when transforming the objects. Therefore, you can keep these relationships intact when transmitting them back and forth over the AMF gateway. Also, because the objects are disconnected and made into copies, you will need to use the Session.saveOrUpdateCopy(Object object) method to persist results into the database. This method has to be used because the object that will be sent back through the AMF gateway will not have any enhanced bytecode information that Hibernate can take advantage of.

Authentication

Typical J2EE web applications have some kind of authentication scheme. This might be a container-based authentication scheme or it might be some custom code that authenticates the user. RIA servers such as Flex allow you to use custom authentication forms on the Flash client and container-based authentication in most application servers. Furthermore, if you look at the business delegate configuration in the example above you will notice that you can assign roles to these objects for security. There are even hooks in the AMF gateway that allow developers to grab the HttpRequest, HttpResponse, and ServletConfig objects to refine the security you want to use within a method of a delegate object.

Summary

This article introduced a number of concepts with the intention of exposing you to some of the tradeoffs and potential pitfalls when using a RIA such as Flex. Whether you use Flex or another RIA implementation, there are major considerations to take into account when architecting an application with this technology. When evaluating an RIA framework make sure it is extensible enough to meet the demands of the application. Furthermore, carefully evaluate integration issues that might need attention when transmitting objects between and RIA and a Java backend.

JavaFX Technology Overview

JavaFX is a family of products for creating rich internet applications (RIA) with immersive media and content, across all the screens of your life. Announced at Java One 2008, it includes a runtime and a tools suite that web scripters, designers and developers can use to quickly build and deliver the next generation of rich interactive applications for desktop, mobile devices, TV, and other platforms. It delivers rich client capability across a wide range of devices and screens as well as unlimited creative expression and accuracy in RIA designs.

The JavaFX family of products consists of the JavaFX Runtime, the JavaFX Tools Suite, and applications powered by JavaFX technology:

JavaFX Runtime delivers rich client capability across a wide range of devices. Examples of JavaFX Runtime are:
* JavaFX Desktop for desktop browsers and desktop applications (available fall 2008)
* JavaFX Mobile (available spring 2009) in the first rollout will deliver the JavaFX rich client runtime on the existing existing platforms that our partners are shipping today. Over time we will deliver additional products.
* JavaFX TV will be for applications that run on the TV platform (available summer 2009)
* Other platforms in the future

JavaFX Tools Suite empowers Web scripters, visual designers, and developers with the freedom to create expressive content, applications, and connected services for consumers of RIA across devices or screens
* JavaFX Development Tools include a plug-in for NetBeans and, in the future, for Eclipse and other IDEs
* JavaFX Designer Authoring Tools:
* JavaFX Media Converter (summer 2008): Tool to export rich media content directly into JavaFX
* JavaFX Designer Authoring Tool (available spring 2008): Tool for visual designers.

JavaFX Suite of Applications: The JavaFX business unit will leverage the capabilities of JavaFX to deliver a suite of content and applications starting in 2009.

JavaFX is a different technology, product and brand than the Java platform. JavaFX is not dependent on any particular JVM or runtime environment, and JavaFX is not built using the JVM specifications. JavaFX leverages the appropriate runtime for each platform - on the desktop it leverages the JRE and is co-bundled with it, while on mobile it leverages the Java ME runtime, and similarly it can run on top of other VMs.

JavaFX Tools Suite Makes Development Easier :
Sun recognizes that the communities creating compelling content, applications, and services consist of a wide range of individuals with different skill sets who require specific sets of tools to fit their needs:

Visual designers need visual and graphical tools to create compelling graphics, media, prototypes and rich client applications without requiring any complex scripting or programming. They currently use Adobe Photoshop, Illustrator, and other visual tools. JavaFX designer will deliver a visual authoring tool to this community.
Web Scripters who are currently using HTML, DHTML, CSS, JavaScript, ActionScript, MXML or XAML are looking for familiar and highly productive scripting environments. JavaFX Script is designed to provide an easy-to-learn scripting language to this audience, and the JavaFX runtime is architected to allow the support of additional scripting environments that this community may already be using.

Programmers using Java programming language and other programming languages have a need to work with their scripting and designer colleagues to deliver compelling end-to-end rich interfaces for enterprise applications as well as provide the back-end for RIA content, applications and services. The JavaFX plug-in for NetBeans and JavaFX Media Converter are designed to facilitate this interaction.

Advantages of JavaFX:
There are a large number of RIA requirements that remain unmet by any RIA platform, and Sun is uniquely positioned to address these challenges. JavaFX will be provide a number of unprecedented advantages:

Built on Java. JavaFX is not starting from scratch; it is built on the Java platform (Java SE and Java ME) and leverages the power and capabilities of the Java platform. It also extends the Java platform to deliver on the original promise of client-side Java. For example, Java ME has been distributed to 3 billion devices, far exceeding the distribution of Adobe Flash Lite, and JavaFX Mobile will deliver rich client capabilities on top of the Java ME platform.

Across Devices and Screens. JavaFX applications will run across multiple devices or screens - browser, mobile, TV, etc.

Reach and Distribution. Sun will leverage its unrivaled reach to distribute the JavaFX runtime across all devices and screens.

Open Source. Many components of its platform are already available in open source, Sun will announce its open source plans with the release of version 1.0.

Browser and Desktop Deployment. JavaFX will provide support for browser-based RIA applications as well as the powerful capability of deploying the same unmodified application on the desktop. JavaFX designers and developers will have the option to take full advantage of Java’s capabilities, including access to file system, security model, and caching.

Competing platforms are just beginning to provide early SDKs that provide relatively rudimentary capabilities for building browser and desktop resident applications.

Designer, Developer Workflow. Current rich client platforms have been struggling to extend beyond their animation heritage to appeal to developers. There is still a distinct need to close the gap between a designer's vision and a programmer's skills with an easy-to-use, visually accurate, high-performance suite of tools. The market is not nearly satisfied.

Java has more than 8 million developers who provide the infrastructure that powers most businesses and the backend of most large Web applications. JavaFX tools suite will empower designers to better collaborate with these developers while working within the Java platform. At JavaOne 2008, Sun will demonstrate this capability with JavaFX Media Converter.

Saturday, June 21, 2008

Building database-driven Flex applications without writing (Client- or server-side) code

One question that developers often ask when they see Flex for the first time is: “how do I write a database application

The answer to this question is typically: You use an HTTPService, WebService, or RemoteObject to connect to a server-side component that provides an API to manipulate your data. This approach provides infinite possibilities, but it makes the assumption that you already have that entire backend infrastructure in place. If you don’t, and all you want to do is build a rapid prototype or a simple application, this might look like a lot of work.

In addition to the RPC services mentioned above, the Flex Data Management Services (FDMS) provide a virtually code-free approach to synchronize data between the client application and the middle-tier. That takes care of 50% of our challenge: no data synchronization code to write at the client-side.

FDMS also provides a pluggable adapter and assembler architecture to handle changes at the server-side. As an example of writing a generic assembler, I built a simple JDBC assembler that allows you to develop rapid prototypes and basic database-driven applications without writing a single line of server-side code. All you need to do is specify the database connection information and the table you want to work with in data-management-config.xml.

This assembler is by no means a full featured solution, but it shows the power and flexibility of the FDMS architecture: you could easily extend its capabilities, or build other generic assemblers for existing persistence solutions (a Hibernate assembler is already shipping with the product).

The point is that if FDMS provides a solid architecture to handle the most complex persistence scenarios (with virtually no data synchronization code at the client side), with the addition of specialized assemblers, it can also provide simple solutions to simple use cases, significantly improve your productivity, and deliver end-to-end code-free persistence.

Installing the SimpleJDBCAssembler:

1. To use the SimpleJDBCAssembler, you need to install the Flex Data Services. If you haven’t already done so, you can download the Flex Data Services here, and follow the installation instructions.
2. Download jdbcassembler.zip here and expand it in your root directory (the files will be unzipped in a directory called jdbcassembler)
3. Copy SimpleJDBCAssembler.class in {context-root}\WEB-INF\classes\flex\samples\assemblers. For example, if you installed the integrated server, copy SimpleJDBCAssembler.class in \fds\jrun4\servers\default\samples\WEB-INF\classes\flex\samples\assemblers.

Running the sample application:

1. Copy the \jdbcdemo directory in the context root of your web application. For example, if you installed the integrated server, copy the \jdbcdemo directory in \fds\jrun4\servers\default\samples.
2. Open {context-root}\WEB-INF\flex\data-management-config.xml and add the following destination:


< destination id="jdbc-product" >
< adapter ref="java-dao" >
< properties >
< source >flex.samples.assemblers.SimpleJDBCAssembler< /source >
< scope >application< /scope >
< metadata >
< identity property="PRODUCT_ID" >
< /metadata >
< database >
< driver >org.hsqldb.jdbcDriver< /driver >
< url >jdbc:hsqldb:/jdbcassembler/db/flexdemo< /url >
< table >product< /table >
< autoincrement >true< /autoincrement >
< /database >
< /properties >
< /destination >

3. This example uses an embedded HSQLDB database. Make sure hsqldb.jar is available in the classpath of your web application. For example in {context-root}\WEB-INF\lib. If you are using another database, make sure the JDBC driver for that database is in the classpath of your web application.
4. Start the server
5. Access http://localhost:8700/samples/jdbcdemo/simpleclient.mxml. (Change the port number and the context root as appropriate). This is a basic client built with just a few lines of code. You can edit the data inside the datagrid.
6. Access http://localhost:8700/samples/jdbcdemo/app.mxml. (Change the port number and the context root as appropriate). This is a slightly more sophisticated client. You edit data in a separate form.

Also notice that changes are pushed in real time to all the clients connected to a destination. For example, open the application in two browser sessions, change some data in one session, and notice that the changes are automatically pushed to the second session.

Tuesday, June 17, 2008

JavaFX Technology Overview

JavaFX is a family of products for creating rich internet applications (RIA) with immersive media and content, across all the screens of your life. Announced at Java One 2008, it includes a runtime and a tools suite that web scripters, designers and developers can use to quickly build and deliver the next generation of rich interactive applications for desktop, mobile devices, TV, and other platforms. It delivers rich client capability across a wide range of devices and screens as well as unlimited creative expression and accuracy in RIA designs.

The JavaFX family of products consists of the JavaFX Runtime, the JavaFX Tools Suite, and applications powered by JavaFX technology:

JavaFX Runtime delivers rich client capability across a wide range of devices. Examples of JavaFX Runtime are:
* JavaFX Desktop for desktop browsers and desktop applications (available fall 2008)
* JavaFX Mobile (available spring 2009) in the first rollout will deliver the JavaFX rich client runtime on the existing existing platforms that our partners are shipping today. Over time we will deliver additional products.
* JavaFX TV will be for applications that run on the TV platform (available summer 2009)
* Other platforms in the future

JavaFX Tools Suite empowers Web scripters, visual designers, and developers with the freedom to create expressive content, applications, and connected services for consumers of RIA across devices or screens
* JavaFX Development Tools include a plug-in for NetBeans and, in the future, for Eclipse and other IDEs
* JavaFX Designer Authoring Tools:
* JavaFX Media Converter (summer 2008): Tool to export rich media content directly into JavaFX
* JavaFX Designer Authoring Tool (available spring 2008): Tool for visual designers.

JavaFX Suite of Applications: The JavaFX business unit will leverage the capabilities of JavaFX to deliver a suite of content and applications starting in 2009.

JavaFX is a different technology, product and brand than the Java platform. JavaFX is not dependent on any particular JVM or runtime environment, and JavaFX is not built using the JVM specifications. JavaFX leverages the appropriate runtime for each platform - on the desktop it leverages the JRE and is co-bundled with it, while on mobile it leverages the Java ME runtime, and similarly it can run on top of other VMs.
JavaFX Tools Suite Makes Development Easier

Sun recognizes that the communities creating compelling content, applications, and services consist of a wide range of individuals with different skill sets who require specific sets of tools to fit their needs:

Visual designers need visual and graphical tools to create compelling graphics, media, prototypes and rich client applications without requiring any complex scripting or programming. They currently use Adobe Photoshop, Illustrator, and other visual tools. JavaFX designer will deliver a visual authoring tool to this community.

Web Scripters who are currently using HTML, DHTML, CSS, JavaScript, ActionScript, MXML or XAML are looking for familiar and highly productive scripting environments. JavaFX Script is designed to provide an easy-to-learn scripting language to this audience, and the JavaFX runtime is architected to allow the support of additional scripting environments that this community may already be using.

Programmers using Java programming language and other programming languages have a need to work with their scripting and designer colleagues to deliver compelling end-to-end rich interfaces for enterprise applications as well as provide the back-end for RIA content, applications and services. The JavaFX plug-in for NetBeans and JavaFX Media Converter are designed to facilitate this interaction.
Advantages of JavaFX

There are a large number of RIA requirements that remain unmet by any RIA platform, and Sun is uniquely positioned to address these challenges. JavaFX will be provide a number of unprecedented advantages:

Built on Java. JavaFX is not starting from scratch; it is built on the Java platform (Java SE and Java ME) and leverages the power and capabilities of the Java platform. It also extends the Java platform to deliver on the original promise of client-side Java. For example, Java ME has been distributed to 3 billion devices, far exceeding the distribution of Adobe Flash Lite, and JavaFX Mobile will deliver rich client capabilities on top of the Java ME platform.

Across Devices and Screens. JavaFX applications will run across multiple devices or screens - browser, mobile, TV, etc.

Reach and Distribution. Sun will leverage its unrivaled reach to distribute the JavaFX runtime across all devices and screens.

Open Source. Many components of its platform are already available in open source, Sun will announce its open source plans with the release of version 1.0.

Browser and Desktop Deployment. JavaFX will provide support for browser-based RIA applications as well as the powerful capability of deploying the same unmodified application on the desktop. JavaFX designers and developers will have the option to take full advantage of Java’s capabilities, including access to file system, security model, and caching.

Competing platforms are just beginning to provide early SDKs that provide relatively rudimentary capabilities for building browser and desktop resident applications.

Designer, Developer Workflow. Current rich client platforms have been struggling to extend beyond their animation heritage to appeal to developers. There is still a distinct need to close the gap between a designer's vision and a programmer's skills with an easy-to-use, visually accurate, high-performance suite of tools. The market is not nearly satisfied.

Java has more than 8 million developers who provide the infrastructure that powers most businesses and the backend of most large Web applications. JavaFX tools suite will empower designers to better collaborate with these developers while working within the Java platform. At JavaOne 2008, Sun will demonstrate this capability with JavaFX Media Converter.

Bootable Definition




Bootable means that a computer can be booted (i.e., started) and attain a state sufficient that any desired application programs can be run on it.

The booting process consists of loading the kernel and other necessary parts of the operating system into the computer's main memory from some storage device. This storage device is usually the built-in hard disk drive (HDD), but it can also be removable media such as a CDROM, floppy disk or USB key memory stick. The kernel is the core of the operating system, and it remains in memory for the duration of the time that the computer is in operation.

The term bootable is also used to refer to any removable storage device or any software that contains sufficient components of an operating system and other necessary utilities (e.g., for file decompression) such that it can be loaded into a computer's main memory and allow the computer to start up.

Perhaps the best known example of a bootable CDROM is the Knoppix liveCD. Knoppix is a distribution (i.e., version) of Linux that is based on the highly regarded Debian distribution. A liveCD allows any computer with a CD (compact disk) drive (or to which an external CD drive can be connected) and an appropriate processor to be converted almost immediately, but temporarily, into a computer having the same operating system as contained on the CDROM without installing having to anything on the computer's HDD. Thus, the Knoppix liveCD
allows virtually any computer with an x86 (i.e., Intel-compatible) processor to be converted almost immediately into a Linux computer.

Bootable CDROMs conform to the El Torito bootable CD specification, which is an extension to the ISO 9660, the standard CDROM specification. El Torito was first released in January 1995 as a joint proposal by IBM and Phoenix Technologies, a manufacturer of BIOSs (basic input output systems).

muLinux is a miniaturized distribution of Linux that is designed to fit on a single 1.44MB floppy disk and serve as a live floppy. That is, it can be used to boot and operate on any x86 computer that has a floppy disk drive (or to which an external floppy drive can be connected). Another operating system that is well suited for making into a bootable floppy is FreeDOS, which is a free clone of MS-DOS.

vmlinuz is the bootable, compressed Linux kernel executable. An executable, also called an executable file, is the ready-to-run form of a program. Unlike conventional executable files, however, vmlinuz does not require for an operating system to already be in memory in order for it to run, as it loads itself into memory at an early stage of the boot process.



Executable Definition



An executable file, also called an executable or a binary, is the ready-to-run (i.e., executable) form of a program.

A program is a sequence of instructions understandable by a computer's CPU (central processing unit) that indicates which operations the computer should perform on a set of data.

A file is a named collection of related data that appears to the user as a single, contiguous block of data and that is retained in storage. Storage refers to computer devices or media which can retain data for relatively long periods of time (e.g., years or decades), such as disk drives and magnetic tape. This contrasts with memory, which which retains its contents only briefly and which physically consists of RAM (random access memory) chips.

Executable files consist of instructions that have been translated from their original source code into machine code, also called machine language or object code through the use of a specialized program called a compiler so that the CPU can use them directly and without further translation. Machine code consists entirely of zeros and ones, which represent the off and on states of the CPU logic circuits and memory cells.

The object code files and any other necessary files (e.g., library files) are then linked together using a linker to create the executable. Linkers are generally included in compilers, and the linking is performed automatically.

Executable files are usually stored in one of several standard directories on the hard disk drive (HDD) on Unix-like operating systems, including /bin, /sbin, /usr/bin, /usr/sbin and /usr/local/bin. Although it is not necessary for them to be in these locations in order to be operable, it is often more convenient. When a program is launched, its executable file is copied into memory by the operating system so that its machine code will be immediately available to the CPU.

In operating systems in which the type of file is indicated by appending an extension after its name, executables are indicated by extensions such as .exe, .com or .bin. Such extensions are generally not necessary in Unix-like operating systems.

Although application programs usually come to mind when the term executable is used, this term also refers to scripts, utilities and even operating systems. A script is a small program written in a scripting language (i.e., a type of simplified programming language). Scripts are stored in plain text files that must be interpreted (i.e., converted on the fly into machine language) by a shell (a program that provides the traditional, text-only user interface for Unix-like operating systems) or other program each time they are executed, rather than being compiled in advance. Unix-like operating systems make extensive use of scripts for controlling the operation of the system.

vmlinuz is the Linux kernel executable. A kernel is a program that constitutes the central core of a computer operating system. In addition to being an executable, vmlinuz is also bootable. This means that it is capable of loading the operating system into memory so that the computer becomes usable and other executables can then be run.