Ajax Development Patterns
for much of the processing load of a website. Common AJAX patterns include:
- a separation of the code that produces a view of data from the
data itself. Hidden templates are embedded in pages destined for the client browser and populated
with data upon demand by the client. The browser contains a markup builder function and client
callback function which processes data retrieved from the server.
The HTML Message Pattern
- Like the Browser-Side Templating pattern, markup or JSON objects are generated in response to the
client request. This markup is generated by the server and sent as a callback to the client.
- Browsers implement security policies to prohibit web service requests in domains outside of the
current site. A cross-domain proxy is implemented on the server to proxy a connection to a remote
- Most web applications are designed to use sessions that time out after a predefined period of time.
Since AJAX applications do most of their work on the client, a heartbeat message informs the server
that the session is still alive.
- Pages often need chunks of data from other parts of the site. A microlink generates the chunks of
needed markup and streams them to the client browser.
- Page Arrangement is the pattern of utilizing the client side document object model (DOM) to create
and display page elements.
- Use of browser-side timeouts to schedule periodic page refreshes.
- This pattern is a web version of the ubiquitous dialog box. A popup window displays temporary
HTML content in front of existing content.
- This pattern consists of a predictive algorithm to anticipate user request for data
so that the data can be preloaded. The cost is high resource utilization.
- Server requests can require a lengthy period of time to complete. The progress indicator pattern is
a client side approach to monitoring server progress.
- One potential AJAX issue is that requests overwhelm the server. In some cases scalability is
diminished. Throttling involves timing accumulated requests and caching results locally.
- In cases of operations that use a large amount of server resources, this pattern involves
timing out a request and continuing only upon a renewal.
- AJAX pages change state without changing URL. The Unique URL pattern is a method of
assigning a hash to the current instance of a page when something significant changes. The hashed
URL is injected into the browser's history cache. If the user clicks a back button, the requested
URL's hash can be retrieved so that a previous state can be recalled.
*Prices subject to change without notice. Call for the
latest pricing information. Small Business service contracts based on a minimum
of ten managed PCs.
Small Business Web Solutions
Seafoam Solutions managed services for small businesses
provide you with an affordable alternative to in-house administration.
|Web Page/Report Development
|Web Service Development
|Web Service Integration
|Data Format Conversion
|Site Update Consulting
Improve Your Security Vocabulary
SQL Injection Attack - A hacker enters a line of SQL code
into an input field to attempt to cause a database server to perform an unintended
HTML Injection Attack - A hacker
enters a line of HTML code into an input field to attempt to cause a web page to
display inappropriate data
Script Exploit - A hacker enters
display inappropriate data or perform an inappropriate action.
Responsibility Driven Design
Developed by Rebecca Wirfs-Brock in the late 1980's, the principles of Responsibility Driven Design (RDD)
are applied to a system of components in order to assess responsibilities of the objects that comprise
the whole. Object responsibilities are categorized as "knowing", "doing", or "deciding." RDD is a
lightweight modeling tool that identifies six object stereotypes:
Information Holder - an object consisting of information/data
and perhaps methods to make calculations on the data.
- An object that maintains relationships between
- An object that controls and directs other objects
and decides what other objects should do.
- An object that relates to events and relays
events to other objects.
Service Provider - An object that performs a service for
other objects upon request.
- An object that provides a mechanism for
communications with other parts of the system or the user.
Another modeling technique closely linked to RDD is called CRC (Candidate/Responsibility/Collaborator).
CRC utilizes 3 x 5 index cards to model objects and their behaviors. RDD and CRC are tools to assist
developers as they design software systems.