Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Open Source

Introduction to ThinWire


The ThinWire Way

Around the beginning of 2000, a small independent software vendor just outside of Dallas, Texas, was one of a number of companies experimenting with various Ajax techniques, with the goal of providing a more interactive user experience in the browser. Historically, they had built complex financial applications that ran on the desktop, but increasingly they needed a way to provide similar capabilities in the browser. After building a number of small projects that included Ajax, they started to flush out a framework that not only included Ajax techniques but also encapsulated a number of those techniques into a reusable component framework. The framework they created never made it into the hands of the public, but the concepts that were flushed out during that time inspired the development of something significantly more ambitious.

Design Considerations

ThinWire started its life in 2003 as a private R&D project within the same company. It stands out from the other Ajax frameworks in a number of ways because the development team went back to the drawing board and threw out the preconceived notions about how a Web application should be built. For instance, the team considered the following:

  • How can we eliminate 80 percent of the complexity required to build a complex enterprise Ajax application?
  • If the framework can talk to the server at anytime, the request/response model is unnecessary in a traditional sense. So, why not eliminate it from the developer's perspective?
  • If the request/response model is concealed, you no longer need to generate full HTML pages. Because generating HTML fragments would be cumbersome for developers to get right, could we build a framework that keeps the developer away from HTML and CSS, too?
  • If the developer is only concerned with responding to user-initiated events, why not let developers handle events by adding listeners for the kinds of events they care about.
  • If developers were confined to handling user-initiated events on the server side, they could write code in a server-side language they are familiar with, use any language API, prevent end users from seeing business logic with View Source, and allow developers to debug the application with a standard IDE.

Key Goals of ThinWire Create Simplicity

From these ideas, the goals behind the framework were mapped out, with simplicity being the guiding principal. The first two goals are now quite common to many Ajax frameworks, but the latter bunch set ThinWire apart from the rest:

  • Rich user interfaces. Use DHTML and DOM techniques with JavaScript to provide a more comprehensive component set, including things such as grids, trees, and combo boxes.
  • Responsive user experience. Eliminate most, if not all page refreshes. Instead, use a hidden communication channel to send information to and from the server and then update the user interface on-the-fly.
  • Single-technology development. Cut out the need for developers to use HTML, CSS, JSP, JSF, EL, JavaScript, DOM, DHTML, and so on. Instead, allow an entire application to be constructed using a single, server-side language.
  • Component model. Instead of working with the bits and pieces that make up a Web application, the framework allows developers to interact and change things in the UI in terms of well-defined components.
  • Event-driven development. Keep developers focused on responding to user interactions, not on responding to lower-level concepts such as HTTP requests. With event-driven development, developers simply attach a listener to a UI component, indicating what kind of event they are interested in (that is, click button, select tree item, click tab, text changed).
  • Natural state management. Restore the concept of state to Web applications. Although Representational State Transfer (REST) design principals are great, the majority of Web applications are better off with simple state management. Therefore, eliminate the need for developers to juggle various states within a session object. Instead, allow for state to be managed in an object-oriented way, stored as members on event listeners or directly on objects passed between methods.
  • Security built in. Let the framework manage the communication channel, not the developer. This allows the framework to constantly change what kind of requests it considers acceptable, thus eliminating any spurious requests.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.