
This is the Title of the Book, eMatter Edition
Copyright © 2003 O’Reilly & Associates, Inc. All rights reserved.
Architecture for Flash Remoting Applications
|
37
since Flash runs on the client side, which can be a much more variable and unknown
environment than the server.
For example, you can filter large sets of data in the middle tier where you have a
known environment and resources, versus doing it on the client side within Flash
where, depending on the client’s machine, it might not perform well. In this case,
you may want to initially sort the data set on the server and then have any user-
initiated sorts occur within the Flash Player. This is a good tradeoff between client-
side processing concerns and the extra bandwidth required to transfer data sets to
and from the server. Components such as the DataGrid from Macromedia further
abstract the implementation of this logic and allow complex sorting and filtering
directly within the Flash movie. I address these topics in subsequent chapters, using
examples where appropriate.
It is much easier to update the application’s core business logic when it is central-
ized in the middle tier, verses spreading it out across multiple tiers and technologies.
Furthermore, keeping business logic out of the presentation tier allows you to test
the business logic separate from the presentation tier, isolate any problems, deploy
changes, and integrate it with the other tiers of the architecture.
Finally, this multitiered architectural structure mirrors the common divisions of
labor during Flash application development. Often, a Flash developer creates the
Flash movie and client-side ActionScript, while another developer creates the server-
side code. They can program and test their code independently, making develop-
ment much easier, faster and less error-prone. Provided that the interfaces between
the levels are defined, the Flash developer can use temporary data hardcoded into the
application to test the application. The server-side developer simply needs to ensure
that his code implements the defined API to the presentation tier.
Avoid the temptation to use ActionScript to implement the applica-
tion’s business logic within the Flash movie’s presentation layer. Such
an approach ties the Flash movie too closely to the lower levels of the
architecture and exposes the business logic on the client side, making
the application more difficult to maintain and update, as well as possi-
bly affecting client-side performance adversely. When working with
Flash Remoting, you are building a client/server application, not a
standalone Flash movie. The application server is much better suited
for the business logic. Chapter 12 goes into much greater detail about
the best practices in building a Flash Remoting application.
Again, this is a very broad and general overview of client/server application architec-
ture when using Macromedia Flash for the presentation layer. Later chapters discuss
differences specific to additional technologies.
Kommentare zu diesen Handbüchern