Understanding Flash Forms


HTML forms are pretty easy to create and work with, but they are also very limited and not overly capable. For example:

  • Making fields required, or enforcing data validation, requires the user of client-side scripting (which may not be supported or enabled) or server-side processing (which is not very user-friendly).

  • There is no easy way to extend data types, for example, to display a pop-up calendar to allow simple date selection (and to ensure that dates are entered correctly).

  • Form presentation tends to be very tied to form contents. Changing form layout (adding or reordering fields, for example) often requires lots of tinkering with presentation code.

  • It is very difficult to reuse form layout and presentation, and even more difficult to simply make changes to the presentation of all forms (maybe to change color schemes or label alignment).

The truth is, the HTML forms specification leaves much to be desired, and Web developers have developed something of a love-hate relationship with forms, both appreciating their simplicity but despising the lack of functionality that that simplicity causes.

There are alternatives. XForms is the next generation of HTML forms, and XForms can help solve lots of the problems with HTML forms. In addition, plug-in technologies like Macromedia Flash can dramatically improve the forms you create and use. And ColdFusion makes leveraging both of these technologies both easy and productive.

Flash Forms are covered in this chapter, XForms is covered in Chapter 17, "XForms."


Anyone who has spent time online has encountered Macromedia Flash. Be it animated site intros, pop-up advertisements, video, or games, Flash is prevalent and ubiquitous. In fact, you'd be hard pressed to find any computer that does not have a Flash player installed.

But as the term Flash is often misused, a brief terminology clarification is called for:

  • Flash applications (often called movies) are run in a special environment called the Flash Player. This is free software available from Macromedia (the single most installed piece of software on the Internet) and it is available for all major computing platforms (and lots of lesser used platforms too). Within the Flash Player, all platforms and devices look the same. This makes it possible for Flash developers to create applications that run identically on Windows machines and Linux boxes and Mac's. End users typically don't pay a whole lot of attention to the Flash Player itself as their Web browsers load the player as needed creating the impression that the Flash application is running in the browser.

  • The Flash application (which is run within the Flash Player) is called a SWF file (usually pronounced swiff). When Flash developers build applications what they end up with is a SWF file (which can be embedded in Web pages, for example).

  • Flash is a tool, a development environment for creating Flash movies. Flash users work with assets (images, icons, sounds, etc.) and manipulate them in the Flash development environment (using timing sequences and/or ActionScript code) to create an application. Flash users create a work file (called a FLA file), and when they have finished their development the create a SWF from that FLA file.

  • It is also possible to create applications using a server product called Macromedia Flex. Flex developers write Flash applications in code (instead of using the interactive Flash IDE) using a combination of MXML (an XML language) and ActionScript. These files are compiled and a SWF file is created.

So, to summarize, Flash is a tool and Flex is a server, and both are used to create SWF files which run inside of a Flash Player. If you want to create Flash applications you'll need a copy of Macromedia Flash or Macromedia Flex (depending on the type of application you are building, and how you will go about building it).

NOTE

Users often use the term Flash to refer to the player on the actual SWF. Technically this is inaccurate, Flash is the IDE used to create Flash applications.




Macromedia ColdFusion MX 7 Certified Developer Study Guide
Macromedia ColdFusion MX 7 Certified Developer Study Guide
ISBN: 0321330110
EAN: 2147483647
Year: 2004
Pages: 389
Authors: Ben Forta

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net