Accessibility
 
Home / Developer Center / Blackboard Sample Application

Developer Center Article

Icon or Spacer Icon or Spacer Icon or Spacer
John Bennett

John Bennett
Macromedia

 
Lessons learned: Behind the scenes of Blackboard development


While working on the Blackboard project, we encountered several major discoveries about how to build Rich Internet Applications. Our findings were based on solutions and real-world implementations, rather than inventing new approaches from scratch.

Although these lessons may not seem revolutionary, they are common sense principles that any developer can and should employ in developing Rich Internet Applications for the web with Macromedia MX.

Wherever possible, put data and logic on the server

Macromedia Flash MX creates new alternatives for solution architecture. ActionScript gives the thin client a rich, extensible, object-oriented programming environment. Macromedia Flash Remoting makes it easy to distribute data and programs between client and server. We used the following best practices guidelines to decide how to structure our data and logic layers.

 
The following rules of thumb emerged in working on the Blackboard project and another similar project:
 
·
Wherever possible, place both the data and logic on the server. Only send data for display to the client. The only logic on the client should be that which is required to implement the user interface. Any other data and logic should only be put on the client as an exception to the rule, whenever it is required for a specific solution.
·
Take advantage of locating (or caching) data on the client for your application when possible. Similarly, if the user interface (UI) will benefit from logic that is implemented on the client, then put the logic on the client. Do not be reluctant to place logic and data on the client it is advantageous and possible. The client-side software is what makes a rich user experience possible.
 
The rationale for these guidelines include:
 
·
Programmer productivity is higher for server-side code. Many factors contribute to this relationship. The Java compiler eliminates many types of programming errors early in the development process. Other tools, such as integrated development environments, debuggers, unit-testing frameworks, and code profilers, can aid the Java programmer’s work.
·
A rich set of libraries exists for server-side code. In addition to what is integral to the Java language, a vast array of extensions are available for building Java solutions.
·
The quality assurance (QA) process for server-side components is easier. For example, it is relatively straightforward to build a test harness for Java components.
·
Server-side code is not subject to reverse engineering, unlike client logic, which is sent over the network. Algorithms that are considered valuable intellectual property should be implemented on the server—unless there is a compelling reason to do otherwise.
 
The Macromedia Flash component reuse model is different
A variety of user interface components are available for Macromedia Flash MX. Most of these components are free. Component source code is readily available in the Macromedia MX authoring environment. Plan to examine this source code. (It is compact and easy to understand.) Often this is the best way to learn precisely what capabilities each component offers. In some cases, you may want to reuse  code from these components. You may even choose to clone and modify these components to get the behavior you require.

For example, in order to get a draggable  list box on Blackboard, we copied and modified the ListBox component and several of its collaborators. See the article entitled The Blackboard Group Management application: Realizing rapid development with Macromedia Flash MX for details.
 
Acquire Macromedia Flash and ActionScript development expertise
Macromedia Flash MX is an extraordinarily powerful tool for building Rich Internet Applications. As with other programming environments, consult with experts if you want to get the most out of it. You can hire expertise, or you can cultivate it with internal resources. If you plan to acquire Macromedia Flash expertise by training developers within an existing team, you should realize that using Macromedia Flash encompasses much more than merely learning how to use a new software interface. It has its own concepts, tools, and development methods. Like the developer with procedural programming experience learning object-oriented development—it takes time to learn how to think in a different way. It is unreasonable to expect a Java coder to become proficient with Macromedia Flash after just a few days of self-study.
 
Utilize available tools
To save time, learn about the following tools:
 
Macromedia Flash debugger
The Macromedia Flash debugger is a valuable resource for diagnosing errors in your Macromedia Flash applications. You can set break points in included files. Time spent learning this tool will save you time.
 
NetConnection debugger
This essential tool shows information that flows between the Macromedia Flash client and the server(s) with which it communicates.
 
Macromedia Flash debug player
The debug player helps you diagnose problems that show up during integration testing when the Macromedia Flash UI program is not being launched from the Macromedia Flash MX authoring tool. Note that you may have to install the debug player, in which case, you must first uninstall the release player. Read about the Debug version of Macromedia Flash Player for more information.
 
Use component-based development to eliminate bugs early

It is better to find and fix bugs early in the development cycle, when system components can be tested in isolation than during system integration, where finding and fixing bugs are much more costly. While this is true in any software system, it is particularly true in a rich UI solution because of the inherent complexity of the infrastructure on which such a solution runs.

Therefore the most expedient approach to developing a rich UI application involves using component-based designs, well-defined subsystem interfaces, and thorough unit testing. The early investment in this approach really brings a big return on investment, helping you to avoid time consuming late stage problems.

 
The Blackboard project illustrates this approach in several ways. First, we created prototypes, putting the UI design through rigorous tests before finalizing the interface—making sure  to separate client and server subsystems. Then, we built test harnesses on either side of the interface. Later, we completed the more time consuming development of client and server components in parallel. See the article Designing Java applications for Flash Remoting for more information. Pay particular attention to the section that discusses how Java interface technology enables easier parallel development.
 

The BBGM client was also designed as separate component. Each component was built and tested separately. Each had its special-purpose test programs. The client was not assembled (integrated) until its components had been fully implemented and unit tested.

 

 

 


 

John Bennett is an architect in the newly formed Macromedia Strategic Services group (also known as the SWAT team). The SWAT team acts as a catalyst for Macromedia MX development projects with strategic customers and partners, driving early phase development projects that demonstrate best practices in Rich Internet Application development. Before joining Macromedia, John built enterprise software solutions for financial services companies across the globe.