<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-11344128</id><updated>2007-09-04T14:16:04.076+10:00</updated><title type='text'>Adept Development System</title><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml'/><author><name>Paul Marrington</name></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11344128.post-5041883788381560913</id><published>2007-09-03T13:21:00.000+10:00</published><updated>2007-09-04T14:16:04.174+10:00</updated><title type='text'>User Management</title><content type='html'>I am using Adept Bookings as a proof-of-concept system for the Adept Development System. The first thing that became immediately obvious was that now it is time to implement user management.

&lt;span style="font-weight: bold;"&gt;Authentication&lt;/span&gt;

Adept user management provides authorisation, not full authentication. So, let's start with talking authentication. Authentication is to stop unauthorised access. It typically involves log-in and some sort of time-out so that a workstation locks if left unused. These functions are best done by the operating system.

Adept supports operating system authentication by allowing you to stay logged in on any user account on any hardware. Use the optional check-box for this function. Once checked then any time you go to Adept in the future you will continue where you left off. Only your user account will have this ability - so security requirements are covered.

With fast user switching (available on Windows XP/Visa, OS X and some Linux distributions), we end up with a powerful and easily shared system. As each person moves away and the screen-saver kicks in, the next user will need to switch to their account. If they have Adept running it will still be available for use - exactly where they left it. This works well in a shared front-desk situation. If you want more security, add a swipe or proximity card to the mix. Installation and maintenance are an operating system task and independent of Adept.

&lt;span style="font-weight: bold;"&gt;First Start&lt;/span&gt;
When a virgin system is created - and the installation does not create a special system - then two users/groups are created - &lt;span style="font-style: italic;"&gt;Administrator &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;Everybody&lt;/span&gt;. Both can be logged in and neither has a password. Only &lt;span style="font-style: italic;"&gt;Administrator &lt;/span&gt;can create or lock out users - or change groups.

Log in as &lt;span style="font-style: italic;"&gt;Administrator &lt;/span&gt;and create users for all people who will use the system. Give then access to the groups that will be named after the applications they are using.

&lt;span style="font-weight: bold;"&gt;First Log-in&lt;/span&gt;
&lt;img style="margin: 0pt 0pt 10px 10px; float: right;" src="http://marringtons.com/Adept/blog/Adept.Development.System/uploaded_images/LoginScreen-705621.png" alt="" border="0" /&gt;
The first time you go to Adept on a new system you will be presented with a log-in screen. If the application is single-user, choose the user you maintain and set it to stay logged in. You will not be bothered again. If more than one person use the system the the administrator will have created user names to suite. Resist working as Administrator or the user with the same name as the application unless absolutely necessary.


&lt;span style="font-weight: bold;"&gt;Authorisation&lt;/span&gt;

Once logged in the user object is attached to the session. Each user belongs to two or more groups. Various components recognise groups and change functionality accordingly.
&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Menu&lt;/span&gt;: Menu items can be displayed or hidden based on use groups. If the node  element &lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt; element has a &lt;span style="font-style: italic;"&gt;groups&lt;/span&gt; attribute, then only users in those groups will see this menu item.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Applications&lt;/span&gt;: The Desktop menu has an Application item. Valid applications are in the configuration files. Any &lt;span style="font-style: italic;"&gt;PROPERTIES.TXT&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;in any &lt;span style="font-style: italic;"&gt;META-INF&lt;/span&gt; can have an entry named &lt;span style="font-style: italic;"&gt;adept.application&lt;/span&gt;. This entry includes the name and group that can run this application. &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;adept.application=/BookingsAdept,BookingsAdept&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Trees&lt;/span&gt;: have 4 attributes - displayFor, hideFor, openFor, lockFor. The first two allow a branch to be hidden or displayed. The latter two specify whether the branch can be opened if it has sub-elements.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Input&lt;/span&gt;: have 4 attributes - displayFor, hideFor, editFor, lockFor. The first two allow a branch to be hidden or displayed. The latter two define whether the branch can be edited or only displayed as read-only.&lt;/li&gt;&lt;/ol&gt;</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2007/09/user-management.html' title='User Management'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=5041883788381560913' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/5041883788381560913'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/5041883788381560913'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-112348770696648082</id><published>2005-08-08T17:53:00.000+10:00</published><updated>2007-08-23T12:55:46.380+10:00</updated><title type='text'>The Static Active Tree</title><content type='html'>The reason for the unusual title is because I've created the visual tree code for Adept. The first use is in the options system. I've chosen the large-input method of tree on left and panels on right favoured by X-Windows over the panel-and-tab approach that Windows programs enjoy. It provides for a much richer selection set - but looks rather silly when there are only a few panels. The options system will be the subject of another article later (when this feature is ready). &lt;/p&gt;
&lt;p&gt;
Most of us are familiar with this form of visual tree representation. Windows Explorer and its ilk use it to display the list of folders on the left, for example. Each line is a branch or leaf. If a branch it has a + to open and view sub-branches, or - to close and hide them again.
&lt;p&gt;
In truth, I was surprised at how easy a visual tree was to develop using DHTML and CSS. My first version, written years ago for an online art gallery was for older browsers. This made it more complicated and less elegant than the current generation. 
&lt;p&gt;
To create a tree, place it inside an activated FORM or SPAN element. It is an unordered list (UL) with a class of &lt;i&gt;tree&lt;/i&gt;.

&lt;pre style="FONT-STYLE: italic; FONT-FAMILY: monospace; font-size: small;"&gt;
&amp;nbsp;ul class="tree"&gt;
  &amp;nbsp;li&gt;One
    &amp;nbsp;ul&gt;
      &amp;nbsp;li&gt;1.1
      &amp;nbsp;li&gt;1.2
      &amp;nbsp;li&gt;1.3
        &amp;nbsp;ul&gt;
          &amp;nbsp;li&gt;1.3.1
          &amp;nbsp;li&gt;1.3.2
          &amp;nbsp;li&gt;1.3.3
          &amp;nbsp;li&gt;1.3.4
        &amp;nbsp;ul&gt;
      &amp;nbsp;li&gt;1.4
    &amp;nbsp;ul&gt;
    &amp;nbsp;li&gt;Two
&amp;nbsp;ul&gt;
&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

This gives a result shown below. Clicking on the ± will expand/hide the node. In practice each node will consist of links, images or other active elements.

&lt;img src=http://marringtons.com/treeExample.jpg&gt;

Implementation was so remarkably easy that I have included it here in full. They style sheet, as usual is all about presentation. The only part critical to the tree is to hide inner unordered lists by default so that the tree starts closed.
&lt;p&gt;
When a branch is clicked on it will investigate the open attribute for the node and hide or show the underlying unordered list.

&lt;pre style="FONT-STYLE: italic; FONT-FAMILY: monospace; font-size: small;"&gt;
ul.tree, ul.tree ul
  {
    margin: 0px 0px 0px 16px;
    padding:0;
    font-size: small;
    color: gray;
  }
ul.tree li
  {
    list-style-image: url(/tree/no.leaf.gif);
  }
ul.tree ul
  { display:none; }
ul.tree a
  {
    text-decoration: none;
    color: black;
  }
&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

The supporting code is a little longer, but not much. The activation system calls Tree.activate(), passing it the unordered list element that has a class of "tree". Only a single event listener is required for the whole tree as it uses the node clicked as the target to be processed. It will look for an &lt;i&gt;open&lt;/i&gt; attribute and open any branch node that has one. The image displayed for each node is set by the activation code.

&lt;pre style="FONT-STYLE: italic; FONT-FAMILY: monospace; font-size: small;"&gt;
/** Called by ActiveComponent.js to activate a tree component. */
Tree.activateTree = function( ul)
  {
    System.linkStyleSheet( ul.ownerDocument, "/tree/Tree.css");
    ul.addEventListener( "click", Tree.toggleTreeEvent, false);
    Tree.activateTreeLevel( ul);
  }
  
Tree.activateTreeLevel = function( ul)
  {
    for (var li = ul.firstChild;  li;  li = li.nextSibling)
      if (li.nodeType == 1  &amp;&amp;  li.nodeName == "LI")
        {
          innerULs = li.getElementsByTagName( "ul");
          if (innerULs.length &gt; 0)
            {
              /*
               * We have an inner UL, so treat li as a branch
               */
              li.ul = innerULs[0];
              Tree.activateTreeLevel( li.ul);
              li.style.cursor = "default";
              li.open = (li.getAttribute( "open") != null);
              Tree.showTree( li, li.open);
            }
          else
            {
              li.style.cursor = "default";
               li.style.listStyleImage = "url(/tree/leaf.gif)";
            }
        }
      /*
       * Work-around because style images don't work
       * without a refresh in FireFox.
       */
      ul.style.display = "none";
      ul.style.display = "block";
    }

Tree.toggleTreeEvent = function( evnt)
  {
    Tree.showTree( evnt.target, ! evnt.target.open);
  }
  
Tree.showTree = function( li, open)
  {
    if (! li.ul) return;
    if (open)
      {
         li.style.listStyleImage = "url(/tree/minus.gif)";
         li.ul.style.display = "block";
         li.open = true;
      }
    else
      {
         li.style.listStyleImage = "url(/tree/plus.gif)";
         li.ul.style.display = "none";
         li.open = false;
      }
  }
&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h4&gt;Extensions&lt;/h4&gt;

The first obvious extension is to add keyboard control. Once the key is clicked it should gain focus and process the four arrow keys to move up and down or in and out of the tree structure. This is not important for windows-explorer-like applications (and the options system is such). After all, who uses the keyboard interface on Windows Explorer? I had to try it just then to confirm that it had one. Other applications, however, work differently. If the tree is part of a system editing system where the hands spend more time on the keyboard than on the mouse, keyboard control becomes an important time-saver.
&lt;p&gt;
And this brings us to the next extension. The current tree is static. The server provides an unordered list and this code displays it. What if the user wants to add, move or delete nodes? This will need to be controlled by more keystrokes (shift-arrow for moves), and to implement drag and drop functionality.
&lt;p&gt;
I don't need this additional functionality today, but I do have plans that will require it in the near future. When it's ready I will write another article.</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/08/static-active-tree.html' title='The Static Active Tree'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/112348770696648082'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/112348770696648082'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-112177059708994330</id><published>2005-07-19T20:55:00.000+10:00</published><updated>2005-07-19T20:56:37.096+10:00</updated><title type='text'>Adept Progress Report - First Pass Complete</title><content type='html'>&lt;p&gt;So I've had a couple of months between contracts. Naturally, I've been spending quite a bit of time applying for every contract in sight, but the rest of my time has ben devoted to completing Iteration 1 of Adept. I have to say, it's looking &lt;em&gt;good&lt;/em&gt;. It's not ready for Source Forge release yet - that won't be until the end of the year - but I've reached major milestone. I'm ready to use the result in anger.&lt;/p&gt;
&lt;p&gt;The panelling system is complete. It's now possible to attach panels to each other or the edge of the desktop, and to create tiles as well as the panels' native drag-and-resizeable window style. Any desktop or panel can have a menu built up from multiple sources - beneath the standard File/Edit/Window/Help top-level menus. Any application running under Adept will have at least two desktops - the primary desktop and one for the specific application. As of this iteration, the primary desktop finally allows for launching of the application - and later it'll be filled with useful tools such as notes, alarms, calender, link collections, etc.&lt;/p&gt;
&lt;p&gt;So it's time to get the ball rolling. To prove the viability of Adept I'm starting on the first commercial application that will use it - Budget Adept. Why a budget program? I've been budgeting my small business and household using a spreadsheet for the last three years, and I'm definitely a budget convert. I see the value and exactly how much I'm saving. More importantly, the way my budget system works is fundamentally different to the methods I have used in the past while using Quicken (and a brief, horrifying jaunt into MS Money). I believe I know enough now to create a kick-ass budget program.&lt;/p&gt;
&lt;p&gt;From an Adept perspective, once this application is ready for release I can be quite confident that Adept is solid enough for use in the real world outside my office. Then I can take the time to release it on Source Forge - so you should look Budget Adept in early 2006. (nb: if you can't wait, drop me a line and I'll let you have a pre-release copy)&lt;/p&gt;
&lt;p&gt;I don't really imagine I'll get far with Budget Adept before I'll be back to tweaking and adding much-needed features to Adept. For example, while Adept already has basic form handling, I'll need to add list handling. I'll also need to integrate date and tree-shaped reference lists. Point is, once I've implemented a working core for Budget Adept, I can start testing it while I flesh out the complete system.&lt;/p&gt;
&lt;p&gt;The next phase will be in producing production code from Adept. This involves compiling under gcj and resolving all the issues that will arise. Then there's browser compatibility - it currently works fine under Mozilla/Firefox, and is designed to work under IE6 also, but there are sections that are so far untested in this environment. It's always more difficult to work under IE as this environment has nothing to match Venkman for debugging (that I've found, anyway).&lt;/p&gt;
&lt;p&gt;Those are just a few of the latest highlights for Adept and Budget Adept - more as things progress.&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/07/adept-progress-report-first-pass.html' title='Adept Progress Report - First Pass Complete'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=112177059708994330' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/112177059708994330'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/112177059708994330'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-111805525883613118</id><published>2005-06-06T20:53:00.000+10:00</published><updated>2005-06-06T20:54:18.843+10:00</updated><title type='text'>Look and Feel - The Adept GUI Layout</title><content type='html'>While Adept is an application server, it provides an interface that has more in common with a native GUI program.
&lt;p&gt;
The Adept system will normally open in a browser window without menu, button bar or status bar. It provides multiple windows into one or more applications running under Adept. Each of these windows run in their own panel. Panels can run in desktop mode - in which case they cover the browser window excluding a tab bar at the button - or window mode when they can be dragged or resized. The result is similar to a Windows MDI (multi-document interface) application.
&lt;img src="http://marringtons.com/Adept/panels.gif"&gt;
&lt;p&gt;
A typical Adept application will have one desktop panel containing multiple window panels, providing different views, forms or data. Because a user is free to maximise a window panel to create a desktop one, this structure can be modified to suite individual tastes.
&lt;p&gt;
A window panel can have a resize point on the bottom left, a title tab on the top, a border and a shadow. Each feature can be turned off. In addition the title tab can be set to only become visible when the mouse curson hovers over it.
&lt;p&gt;
This allows the developer many visual options. By positioning panels to suit and turning off all decorations, an application interface would appear totally different to the same code where the panels could overlap, be resized or moved.
&lt;p&gt;
All these options can be set programatically or by the user. Once changed they are saved so that next time the program is run the same windows will display with the same decorations, at the same size and at the same location.
&lt;p&gt;
Each panel can have a horizontal menu and button bar associated with it. In most cases, the desktop panel will have these tools while the inner window panels provide more detailed information. There are times, however, when having an inner window panel with menu and button bar makes sense - an editor panel for instance.
&lt;p&gt;
The Adept GUI is created with DHTML, so the look and feel to the panels and their decorations can be completely altered by changing a style sheet and a few images. KISS is the key here.
&lt;p&gt;
Inside the panel, below the optional menu and button bar, is the window to the application. It will be loaded when the panel loads. While it is a browser window and can be reloaded on demand, Adept provides facilities for update without reload.
&lt;ul&gt;
&lt;li&gt;A panel close command just hides the panel so that a re-open will display it quickly without a reload (unless needed).
&lt;li&gt;Buttons and links post and get through a hidden frame so that the page with these action objects does not have to reload. The server can update the display of the calling or other related window.
&lt;li&gt;Adept provides many facilities to update dynamic displays using DHTML, that can be driven by server or client as the needs arise. It is possible, for example, to insert, remove or update rows in a table without redisplaying the whole page.
&lt;/ul&gt;</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/06/look-and-feel-adept-gui-layout.html' title='Look and Feel - The Adept GUI Layout'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=111805525883613118' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111805525883613118'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111805525883613118'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-111647324377483680</id><published>2005-05-19T13:26:00.000+10:00</published><updated>2005-05-19T13:27:23.780+10:00</updated><title type='text'>Servlets - Types and Uses</title><content type='html'>&lt;h4&gt;An Action&lt;/h4&gt;
&lt;p&gt;is the most primitive servlet. It's used to give a command to the
server when no response is expected - or when the response is processed
externally. All servlets implement ActionInterface - defining the
execute() method that's called by the connection manager. An action saves
references to the request, response and parameter information blocks
then calls process() - an Action inherits from this class and must
implement the process() method. &lt;/p&gt;
&lt;p&gt;The base Adept system includes one Action &lt;i&gt;StopServer&lt;/i&gt; that, when given the correct password, will stop the server from the browser/client. The &lt;i&gt;Action&lt;/i&gt; includes a &lt;i&gt;go()&lt;/i&gt;
method that can be used for invoking methods other than the default
based on the _action parameter or a dot in the name (see above). If &lt;i&gt;go()&lt;/i&gt; is used, the class can implement &lt;i&gt;setup()&lt;/i&gt; and &lt;i&gt;teardown&lt;/i&gt; methods to wrap common code around the action method called for. &lt;/p&gt;
&lt;h4&gt;CGI&lt;/h4&gt; 
is a method for Adept to run normal operating system
dependant programs as CGI. A CGI program is independent. Anything
output from is expected to be able to be rendered by the browser.
Scripting languages such as Perl and Python have CGI libraries, but an
program can generate a HTTP string and produce a valid display. If the
script has an extension of cgi, the you don't need to explicitly
mention the CGI servlet as in /mytest.cgi?param1=one. CGI programs of
other names can be run if the servlet is explicit - &lt;i&gt;/CGI?mytest.bat?param1=one&lt;/i&gt;. In all cases, in true CGI tradition, the output to the console is redirected to the browser.

&lt;h4&gt;Batch&lt;/h4&gt; 
is an extension of CGI for normal command-line programs
that aren't browser aware. A batch builds up a valid HTTP stream and wraps
the program output in &amp;lt;pre&amp;gt; tags so that they'll display as
they would on a local terminal.
&lt;h4&gt;Exec&lt;/h4&gt; 
is designed for GUI applications where the browser and
server are on the same machine. It will execute an operating system
program then complete without waiting for interactions. With the &lt;i&gt;Exec&lt;/i&gt; class you can create a program launcher using HTML on a web page.

&lt;h4&gt;A Service&lt;/h4&gt; encompasses the next level of sophistication over an
action. It is designed to send information to the server where the
responses will be JavaScript commands. It does use &lt;i&gt;go()&lt;/i&gt; to call methods other than the default &lt;i&gt;respond&lt;/i&gt;
method. It is an abstract class, and respond() must be implemented. It
contains a protected JavaScript instance for building JavaScript
commands to give the browser. It has convenience methods to display a
message on the status line and to pop up an alert box.
&lt;h4&gt;The Page&lt;/h4&gt; 
consists of a class file of the specified name in the package path and a HTML template file of the form &lt;i&gt;&lt;b&gt;className&lt;/b&gt;.template.html&lt;/i&gt;.
First the target for all operations is set to the calling
context/panel. Next, go() is called and if a non-default method is
called, Page acts like any other Service. If the default is called, the
template is sent, forms are activated and &lt;i&gt;initialise&lt;/i&gt; called to
continue class-specific initialisation. The JavaScript object allows
scripts to be sent both before and after the HTML template. While the
class is called &lt;i&gt;Page&lt;/i&gt;, it's more often posted to the hidden
service window where the HTML contains templates used to change the look
and feel of an existing panel.</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/05/servlets-types-and-uses.html' title='Servlets - Types and Uses'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=111647324377483680' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111647324377483680'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111647324377483680'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-111603097019954734</id><published>2005-05-14T10:35:00.000+10:00</published><updated>2005-05-14T10:36:10.206+10:00</updated><title type='text'>Processing a HTTP Request</title><content type='html'>The process has been touched on in &lt;a href="http://marringtons.com/Adept/blog/Adept.Development.System/2005/05/adept-server-model.html"&gt;The Adept Server Model&lt;/a&gt;. Here I'ill document the raw and specific data.
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;Each request has complete ownership of their own thread until they respond again to the server.
&lt;li&gt;You can turn request logs on so that each request is written to the log in full before processing.
&lt;li&gt;In debug mode, no request is cached in either the browser or the server, so you can change files and see the results immediately.
&lt;li&gt;If the request URL ends in a slash (/), the default actions are explored immediately; otherwise an action is looked for as:
&lt;ul&gt;
&lt;li&gt;If the file type is registered against a servlet by the server, that servlet is run. The standard system registeres js for Javascript and cgi for CGI; or
&lt;li&gt;If the file type is registed by the browser (as part of the request as a mime type) the file is sent directly to the browser for processing. Examples of these are html, gif and jpg; or
&lt;li&gt;The request of for a servlet. If the request includes a stop (.), it is considered a defined method in the servlet class, otherwise, the default execute() method is called. Typically an application will use the default &lt;i&gt;execute()&lt;/i&gt; for loading the page and defined methods as responses to links and form posts. The servlet method to call can optionally be set with an &lt;i&gt;_action&lt;/i&gt; parameter instead.
&lt;/ul&gt;
&lt;li&gt;If no action is found so far the default actions are explored, treating the URL as a directory or path.
&lt;ul&gt;
&lt;li&gt;A servlet called Index in the package specified by the path. The &lt;i&gt;execute()&lt;/i&gt; method is called.
&lt;li&gt;A script or program called &lt;i&gt;index.cgi&lt;/i&gt;. For unix based systems it will be marked executable. For Windows, cgi needs to be associated with an interpreter.
&lt;li&gt;A static html document called &lt;i&gt;index.html&lt;/i&gt;
&lt;li&gt;A static html document called &lt;i&gt;index.htm&lt;/i&gt;
&lt;/ul&gt;
&lt;/ul&gt;</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/05/processing-http-request.html' title='Processing a HTTP Request'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=111603097019954734' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111603097019954734'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111603097019954734'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-111525010796369201</id><published>2005-05-05T09:39:00.000+10:00</published><updated>2005-05-05T09:41:47.973+10:00</updated><title type='text'>The Adept Server Model</title><content type='html'>The Adept Development System has as its goal the use of corporate skills and technology to produce shrink-wrap software. One of the core design decisions was to use a DHTML-enabled browser as the GUI. This means that the Adept server is a web/application server in the same family as Tomcat. There are differences: Adept has been developed from the ground up to serve a DHTML client, not a Java Server Pages intermediate.

&lt;h4&gt;The Server&lt;/h4&gt;
At the core there is a Server class that runs in its own thread until it's asked to be closed. The main thread normally just waits for the server thread to complete. The separate threading is mostly a convenience for testing, where the test methods want to spawn a server and send it stuff to test. So the server class has the simple function of waiting for client connections, then spawning off a new Connection object to service them. Some servers attempt to minimise the expense of starting a new thread for each connection by pooling connections, but I considered this a case of the benefit not being enough to cover the risks. Modern HTTP 1.1 protocols keep the same connection for use for as long as they can - typically minutes but often for much longer. And on the other side of the coin, starting a clean thread for each new connection ensures that data won't accidentally survive to be used by another thread. This model is inherently multi-user.
&lt;h4&gt;The Connection&lt;/h4&gt;
Each connection also runs in its own thread. This allows the same server to service multiple connections from the same or different clients. As a standard, most browsers make 2 concurrent connections to the server. A connection survives until the client closes the socket or until it is unused for the timeout period of 5 minutes. The browser will at times close the connection and ask for a fresh one using internal rules of it's own.

&lt;h4&gt;The Request&lt;/h4&gt;
The connection then waits for a request from the client. The first thing a request does is attempt to associate a session. The URL of the request is then parsed. If the command ends in slash(/), the default action is looked for. If a normal action cannot be associated a slash is added and the default action attempted again.
&lt;p&gt;
For an action, default or no, the request will first look at the file type of the request - being everything before the ? or end of request back to the last full stop. If a servlet is registered against a file type (as with .js), it is used. Otherwise, if it's one that the client has registered it's sent as-is to the browser. If neither of these occur, the request looks for a Java class that extends from &lt;i&gt;ActionInterface&lt;/i&gt;. If all else fails, it's sent back to the client to see if it can be rendered as-is.

&lt;h4&gt;The Session&lt;/h4&gt;
A request looks for a specific browser cookie for the session ID. If there is no cookie a new one is created to send as part of the response. In the disconnected client/server environment, this is the way we keep data for the session - by associating it with a unique cookie. By default this cookie is called &lt;i&gt;AdeptSession&lt;/i&gt; - although it can be changed by setting a property called &lt;i&gt;session.cookie&lt;/i&gt;.
&lt;p&gt;
The session name can be either an automatically generated name for anonymous connections, or the user name once the user has logged in. The anonymous name is a persistent cookie so that related data is kept permanently. If a user logs in this cookie is overridden by a browser session cookie that will be lost when the browser is closed or the user logs off. It's possible to make this cookie persistent  for secure machines.

&lt;h4&gt;Default Actions&lt;/h4&gt;
If default actions are given a path only, the server will look for a default action to run - being either a servlet called &lt;i&gt;Index&lt;/i&gt;, an external program called &lt;i&gt;index.cgi&lt;/i&gt;, or html documents called &lt;i&gt;index.html&lt;/i&gt; or &lt;i&gt;index.htm&lt;/i&gt;. In general it's better to specify the full action rather than ask the system to search for it.

&lt;h4&gt;Registered Servlets&lt;/h4&gt;
Normally any file with an extension is sent to the browser/client for rendering. This be anything from documents to text files, images, style sheets or JavaScript. Occassionally it will be useful for server classes to know about or filter the information. Currently the only existing example within adept is in loading JavaScript classes. They are registered against a servlet called &lt;i&gt;LoadJavaScript&lt;/i&gt; that adds a call to a &lt;i&gt;JavaScript._afterLoad()&lt;/i&gt;, which  Adept uses to sequence loads and initialisation of Javascript.
&lt;p&gt;
Each class is registered in server code using &lt;i&gt;LoadJavaScript.Server.register()&lt;/i&gt;, giving it the file extension and a class with an ActionInterface to do the work.

&lt;h4&gt;Running a Servlet&lt;/h4&gt;
A servlet is a class with a &lt;i&gt;com.marringtons.adept.action.ActionInterface&lt;/i&gt; interface. Its execute method is called wrapped in a transaction. Any exception will cause a rollback, while a clean return will trigger a commit.</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/05/adept-server-model.html' title='The Adept Server Model'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=111525010796369201' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111525010796369201'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111525010796369201'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-111474219894009780</id><published>2005-04-29T12:34:00.000+10:00</published><updated>2005-04-29T12:36:38.943+10:00</updated><title type='text'>The JavaScript Model</title><content type='html'>In all the web services projects I have been involved with, JavaScript has been used as a separate tool to make the GUI prettier. In some cases it has done essential validation and form processing - although most architects object to having any functional dependence on JavaScript. Frameworks, for example Sofia, may generate JavaScript to be sent as part of a page.
&lt;p&gt;
Adept is completely different. It has been designed to use the browser to create a system with the speed and interactivity of a native application. To do that it makes heavy use of DHTML - and JavaScript is a core component of DHTML. In fact, JavaScript is the D which stands for Dynamic.
&lt;p&gt;
Adept changes the architecture also. In a traditional web system the browser is merely a renderer, with everything occuring on the server side. In contrast, using Adept, two layers of the GUI tier run on the browser - and are designed and documented with this clarity in mind. JavaScript becomes part of the design, not just an add-on that is tolerated when necessary.
&lt;p&gt;
So, how is this accomplished? When Adept loads, it includes an invisible iFrame that's used to post or send information to the server. Both the invisible iFrame and visible panels work the same way. They're filled by the response to a servlet call. The servlet will set up the DHTML environment (ensuring that any required JavaScript is loaded), pass a HTML template of the same name, then generate any JavaScript required to activate the DHTML.
&lt;p&gt;
In the case of the communications frame the HTML portion is usually empty, but it can contain patterns that are loaded into the calling visible frame by JavaScript System methods. JavaScript specific to the servlet will fill in dynamic content for a panel, expand lists, open new panels or generally change the UI in some way.
&lt;p&gt;
For the visible panels, the HTML is that which is seen. The default JavaScript activates it so that form actions and links post to the communications frame. Then Servlet specific JavaScript is run to do whatever dynamic work needs to be done. The idea of the sample template is that it works stand-alone: designers can create it, add sample data, show it to the customer and generally treat it as their own. They can continue to do so even after it is integrated into the system. The developer activates it by adding IDs and additional properties to elements, but that's all. The system will remove the sample data during the load and turn the static page into something dynamic. Additionally, the page designer can continue to maintain the pages as long as she leaves the additional properties as-is. I consider this as far better than current practice where the developer turns design HTML into JSP or ASP, while the GUI designer loses access.
&lt;p&gt;
The JavaScript model uses objects to provide separate namespaces, with the object name matching the file name in classic Java fashion. Each of these namespace classes has a Java mirror of the same name, as does each public method inside the class. Apart from allowing the server to call these methods, the Java also provides full Javadoc documentation.
&lt;p&gt;
All the Javascript is loaded into the top Adept frame and made available to all panels as part of the initialisation process. The initialisation ensures that new JavaScript files are loaded before the code that needs them is executed. The effect is to provide a load-on-demand infrastructure similar to that used by Java.
&lt;p&gt;
Check out the Javadoc provided by the Adept system for examples of JavaScript usage from both the server and the client.</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/04/javascript-model.html' title='The JavaScript Model'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=111474219894009780' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111474219894009780'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111474219894009780'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-111354383859771564</id><published>2005-04-15T15:42:00.000+10:00</published><updated>2005-04-15T15:43:58.600+10:00</updated><title type='text'>The Adept Client Model</title><content type='html'>Adept is a client/server system based on web server technologies. Specifically it uses a browser as the container for the top GUI tier. So far this is no different from Apache and Tomcat - HTML along a TCP/IP wire. Many systems developed on these platforms use DHTML and JavaScript to provide frills and icing. Here Adept diverges from the standard model - it takes a step further and uses DHTML to provide shrink-wrap software like features to the web browser.
&lt;p&gt;
An Adept application is run in a 3-frame window. The top frame is a desktop where all the action happens. Below it is a narrow tab-bar frame for maximised windows. The communications frame is invisible for working applications, but shows while in debugging mode. It has an iFrame for server communications and space for log messages. It also has a number of debug specific links such as record and playback.

&lt;h4&gt;Panels&lt;/h4&gt;
On the desktop there can be one or more panels holding forms, pages or any other form of browser supported displays. The panel itself consists of a label tab, border, resize point, menu and content iframe. When a panel covers the full desktop, it's label moves to the desktop tab area. Panels can be moved and resized - or programatically locked into place. Each panel can hold other panels allowing for a heirarchical grouping of applications and functions.

&lt;h4&gt;Menus&lt;/h4&gt;
Any panel can have menu and button bars above the content. In most cases these will be full-screen parent panels containing other panels with more application detail. This, however, is convention and not restricted by the application. The panel tab and resize graphic also have a special single-depth context menu to minimise, maximise or close a panel.

&lt;h4&gt;Server Communications&lt;/h4&gt;
Inside the communications frame are one or more iframes that are used to communicate with the server. Clicking on a link or submitting a form on a panel will not normally replace information on that form directly (as a web application does). The information is sent to the server through the server iFrame. The response may or may update the calling form - typically by changing specific information, rather than replacing all the contents in a blanket update. The result is a more interactive feel than the usual web application. On a working Adept application there may be up to 3 of these iFrames:
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Client to Server&lt;/b&gt;: always exists so that links and form submits can talk with the server without forcing a reload of the calling panel. Any link or button in a form with an attribute of &lt;i&gt;active&lt;/i&gt; will be activated to talk through this iframe.
&lt;li&gt;&lt;b&gt;Recording&lt;/b&gt;: In debug mode it is possible to record actions as they occur for later playback, or for creation of interactive unit test code. The recording goes through a separate frame so that it can monitor but not effect normal server communications.
&lt;li&gt;&lt;b&gt;Server to Client Control&lt;/b&gt;: There are situations in interactive applications where the browser display needs updating based on asynchronous changes from the server. The technology is often called a pushlet since it pushes information from server back to browser. Examples are timers, counters, stock or news tickers and graphs. Once a pushlet is requested it opens a connection between browser and server through it's own iFrame. All pushlet information is passed from server to client through this connection - and passed on to their respective panels.
&lt;/ol&gt;

&lt;h4&gt;Process Flow&lt;/h4&gt;
An Adept system will open with at least one menu on one full-screen panel that will act as a desktop. Some menu items will open child panels that will have an iFrame to load with HTML from a HTML template. The template is loaded with a servlet that can add additional functionality - such as filling in fields. If the panel includes an activated form, a post will go through a hidden iFrame back to the server. Responses from the server are flagged with the panel so they can be used to update panel data. A response can also include commands to update other panels, create new panels, hide panels and anything else needed to create a modern interactive application.</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/04/adept-client-model.html' title='The Adept Client Model'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=111354383859771564' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111354383859771564'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111354383859771564'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-111233258469354363</id><published>2005-04-01T15:15:00.000+10:00</published><updated>2005-04-01T15:23:05.510+10:00</updated><title type='text'>Session and Conversation Data</title><content type='html'>This article is an extension of &lt;a href="http://marringtons.com/Adept/blog/Software.Development/2005/03/data-lifetimes.html"&gt;Data Lifetimes&lt;/a&gt; in my &lt;a  href="http://marringtons.com/Adept/blog/Software.Development/"&gt;Software Development blog&lt;/a&gt;.

&lt;h4&gt;What is Session Data&lt;/h4&gt;

Session data is data that lives as long as the session is active. A session is active from the moment the browser first connects or a user logs in until the session times out - typically 20 minutes of inactivity after the user leaves the site or closes the browser.

&lt;h4&gt;What is Conversation Data&lt;/h4&gt;

Conversation data is much shorter lived. It can exist from the moment a browser makes a get or post request to the server and goes out of scope as soon as the browser receives a response from the server. Conversation data is mostly used to return information, validation and error messages to the browser for display.

&lt;h4&gt;How Session Data is kept in Adept&lt;/h4&gt;

Class &lt;i&gt;com.marringtons.util.Session&lt;/i&gt; contains a static private &lt;i&gt;com.marringtons.util.Cache&lt;/i&gt; instance that will hold session data and release it if not used for a specific interval (defaulting to 20 minutes). If a browser has never connected before, create() is called to generate a unique key. This is saved in a permanent cookie on the browser called "AdeptSession". This key is used to retrieve a session or create a new one at the start of each conversation. With this method the same session will be used by all instances of the same browser for the user currently logged in at the OS level. Closing the browser and reopening (before the timeout) will continue to use the same session. Using the same browser after the session timeout will still retrieve persistent session data.

  &lt;p&gt;This all changes if the user logs into the Adept system. A session-only cookie of the same name ("AdeptSession") is created with the user's name. This is used to retrieve session information - and isn't a security risk since the user is authenticated against the session at the start of each conversation.&lt;/p&gt;

  &lt;p&gt;In either case, because the thread is named for the session, a static &lt;i&gt;getInstance()&lt;/i&gt; without parameters can be used to retrieve the session data dictionary.&lt;/p&gt;

&lt;pre style="FONT-STYLE: italic; FONT-FAMILY: monospace; font-size: small;"&gt;
Session session = Session.getInstance();
&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h4&gt;How Conversation Data is kept in Adept&lt;/h4&gt;

Conversation data is kept in a much simpler static private Map, with the conversation keyed on the thread name. Since a conversation is sequential, it will use the same thread from beginning to end.

&lt;h4&gt;Manipulating Session Data&lt;/h4&gt;

Retrieving the object from the session depends on it's scope and type. An object can have a scope of:
  &lt;ol&gt;
    &lt;li&gt;Class scope. Use &lt;i&gt;classScope();&lt;/i&gt;
    &lt;/li&gt;
    &lt;li&gt;Package scope. Use &lt;i&gt;packageScope();&lt;/i&gt;
    &lt;/li&gt;
    &lt;li&gt;Global scope. Use &lt;i&gt;globalScope();&lt;/i&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
  &lt;p&gt; Use the above methods to create a static final field in the calling class and use that to access session level data.&lt;/p&gt;

  &lt;p&gt;Objects can be one of three types also:&lt;/p&gt;
  &lt;ol&gt;
    &lt;li&gt;Transient entries: are lost when the session closes.&lt;/li&gt;
    &lt;li&gt;Closeable entries: have a close method that is called when the session goes out of scope. Data class implements &lt;i&gt;com.marringtons.util.Closeable&lt;/i&gt;.&lt;/li&gt;
    &lt;li&gt;Persistent entries: are saved on disk and retrieved the next time the session is activated (a user logs in). Set by final parameter in scope creator method.&lt;/li&gt;
  &lt;/ol&gt;
Because session data can have type, scope, persistence and closeability, a &lt;i&gt;Session.Key&lt;/i&gt; is created to contain it. For efficiency, this should be a static final field in the class that's making use of it.

&lt;h4&gt;Manipulating Conversation Data&lt;/h4&gt;

Because a conversation is relatively short-lived, the &lt;i&gt;com.marringtons.util.ThreadData&lt;/i&gt; class is much simpler. There are getters that create a new instance if needed, those that provide a default and those that use the class name as key name (for local scope). There is also, of course, a matching setter - although it's rarely used since most instances are created automatically using a default constructor.

&lt;h4&gt;Session Data: A Real-World Example&lt;/h4&gt;
  
&lt;pre style="FONT-STYLE: italic; FONT-FAMILY: monospace; font-size: small;"&gt;
private static final Session.Key recordingSessionKey
  = Session.classScope( Tape.class, "taping",
    null, Session.transientLifetime);

private static final Session.Key storageSessionKey
  = Session.classScope( Tape.class, "tape",
    null, Session.persistentLifetime);

public static Tape load( Session session)
  { return (Tape) session.get( recordingSessionKey); }

public static Tape create( Request request)
  {
    Tape tape = load( request);
    if (tape == null)
      tape = new Tape();
    else
      tape.commands.clear();
    tape.startPage
        = request.getParameter( "startPage");
    request.session.put( recordingSessionKey, tape);
    return tape;
  }
&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;h4&gt;Conversation Data: A Real-World Example&lt;/h4&gt;

&lt;pre style="FONT-STYLE: italic; FONT-FAMILY: monospace; font-size: small;"&gt;
/**
 * @return Messages associated with this thread.
 * Usually used as error messages to be displayed
 * in response to a browser request.
 */
static public Messages getThreadInstance()
  {
    return (Messages) ThreadData.get( className, 
        Messages.class);
  }
&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/04/session-and-conversation-data.html' title='Session and Conversation Data'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=111233258469354363' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111233258469354363'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111233258469354363'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-111135981428378076</id><published>2005-03-21T09:02:00.000+10:00</published><updated>2005-03-21T09:03:34.286+10:00</updated><title type='text'>The Browser as a Client</title><content type='html'>For all of my 25 year career I have wanted to develop platform
independant shrink-wrap software. Technically this has been possible
for some years now by writing in Java, Perl or Python - with the latter
two using TCL to provide a GUI. I resisted this approach for a number
of years because:
&lt;ul&gt;
  &lt;li&gt;For less than practical reasons I was not happy with releasing
interpreted code.&lt;/li&gt;
  &lt;li&gt;It's inconvenient for the end-user.&amp;nbsp; None of the
interpreters or virtual machines come stock with the operating systems,
so the user has to locate these themselves.&lt;br&gt;
  &lt;/li&gt;
  &lt;li&gt;Java is the only language that has IDEs to help lay out visual
components.&lt;/li&gt;
  &lt;li&gt;Most users consider the GUIs produced for Java, Perl or Python
software to be a little strange, simply because they aren't native.&lt;/li&gt;
&lt;/ul&gt;
As you've probably gathered, one of my most consistent problems has
been with the GUI. Admittedly Swing has improved out-of-sight and
Eclipse is providing a competitive cross-platform system. Long before
either of these alternatives became available I had decided to use a
DHTML browser as the front end for the Adept Software Development
system. This is something I stand by, too - a DHTML browser of some
sort is native to every operating system, is hardware independent, and
is an interface that most users know like the back of their mousing
hand.&lt;br&gt;
&lt;h4&gt;Advantages of The Browser and GUI&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;There are plenty of powerful tools for creating outstanding and
variable user
interfaces.&amp;nbsp; Any recent HTML editor, in fact. Web designers are
entirely familiar with the necessary tools and
can provide quality interfaces far beyond those that require a
developer to create.. &lt;/li&gt;
  &lt;li&gt;Familiar user experience - even a user who might feel totally
lost within the Java Virtual Machine is likely to be able to handle
their browser of choice. &lt;/li&gt;
  &lt;li&gt;Full access to the rich media the browser provides natively -
including (but not limited to) video, images, PDF, Javascript,
Macromedia Flash/Shockwave
and Java applets. &lt;/li&gt;
  &lt;li&gt;The GUI is only loosely coupled with the server, so changes to
the visuals of the interface are non-destructive and simple - often
accomplished by simple changes in the style sheet. &lt;/li&gt;
  &lt;li&gt;DHTML techniques allow the designer page to be used without
change. This means that the designer can update pages without a
developer having to go back and translate it into production code
again. &lt;/li&gt;
  &lt;li&gt;The web server design is inherently multi-user. This means you
can run applications at home, access them at work, or
provide the tools and data to your workgroup. &lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Disadvantages of The Browser and GUI&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;The browser is great for multi-media and form based work. It is
not as suitable for complex interactive programs similar to word
processors or spreadsheets. Of course there are many good plugins (Java Applets or Native Active-X components) that will fill many of these types of tasks and still work well with Adept.&lt;/li&gt;
  &lt;li&gt;Many believe that HTML, DHTML, XHTML and XML do not provide the
best in GUI design. For those with this viewpoint, Adept is a less
useful tool. &lt;/li&gt;
&lt;/ul&gt;</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/03/browser-as-client.html' title='The Browser as a Client'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=111135981428378076' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111135981428378076'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111135981428378076'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-111086486809031659</id><published>2005-03-15T15:33:00.000+10:00</published><updated>2005-03-15T15:34:28.096+10:00</updated><title type='text'>Requirements</title><content type='html'>I have developed the Adept Development system for my own learning and for my own used. I set the following goals:
&lt;ul&gt;
&lt;li&gt;Make no compromises. I develop the software to my best ability without compromising quality. I've had my fill of working on projects where time and money overrule the principle need for good design and code.&lt;/li&gt;
&lt;li&gt;Must be fully documented. I provide ongoing full documentation as part of the code - line by line - and keep it up during updates and changes.&lt;/li&gt;
&lt;li&gt;Full Unit Testing at all levels. Unit testing is a concept I've embraced, and I want to see how it fairs when fully implemented.&lt;/li&gt;
&lt;li&gt;Use Browser/DHTML as the front end to make full use of the talents of the modern GUI designer. It is popular to criticise the browser as a client, but I believe the advantages outweigh the problems.&lt;/li&gt;
&lt;li&gt;Must be inherently multi-user. The application server/browser framework allows for more than one user. I see no reason why this shouldn't be implemented to provide the same conveniences to the single user.&lt;/li&gt;
&lt;li&gt;Must be cross-platform. It has always been part of my vision to provide the same software on Windows, Mac and Unix/Linux, without having to spend costly months on ports.&lt;/li&gt;
&lt;li&gt;Implement separation between the GUI and back-end so that a HTML designer can continue to work on production pages without referring to development staff.&lt;/li&gt;
&lt;li&gt;Follow correct architectural principals to divide application development up horizontally (separate tiers) and vertically (clear functionality packages).&lt;/li&gt;
&lt;li&gt;Be able to be compiled by a native compiler such as GCJ to provide shrink-wrapped packages of software for each platform.&lt;/li&gt;
&lt;li&gt;Not to rely on server based database systems such as Postgres - although the users of the system should be free to use these if that is their desire.&lt;/li&gt;
&lt;li&gt;To work on all modern DHTML compatible browsers - Microsoft and Mozilla/Netscape based, as well as on OSX browsers like Safari.&lt;/li&gt;
&lt;li&gt;To provide clear and useful session management - including the simple retrieval of session and conversation data without having to explicitly pass them through the tiers.&lt;/li&gt;
&lt;li&gt;To provide a system that can be easily used by corporate developers - with the tools, packages and techniques that are familiar to them - to create shrink-wrapped software packaged to give away or sell.   &lt;/li&gt;
&lt;/ul&gt;</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/03/requirements.html' title='Requirements'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=111086486809031659' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111086486809031659'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111086486809031659'/><author><name>Paul Marrington</name></author></entry><entry><id>tag:blogger.com,1999:blog-11344128.post-111041286649277803</id><published>2005-03-10T09:59:00.001+10:00</published><updated>2005-03-10T10:23:58.506+10:00</updated><title type='text'>Introduction</title><content type='html'>&lt;p&gt;My name is Paul Marrington, software developer.  Well, just Paul Marrington, actually.  The software development part, as you might have imagined, is what I do.  Before you join the other 99% of visitors to any given web-page, why not take a moment to hear a story that has a good chance of hitting close to home.&lt;/p&gt;
&lt;p&gt;I joined the software industry in its infancy, and by the early 80's I was spending my time exclusively developing software for myself and my customers.  I was among those who saw the merits of micro-computers before they became mainstream, and so the PC was my bread and butter for many years.  Shareware was the word of the decade, and each person owned themselves.&lt;/p&gt;
&lt;p&gt;But - and this is the part that might sound familiar - a family and the necessities of life forced me to realise that the only customers who could afford to consistently support developers in their trade were the corporations, and so I joined the queue and was contracted out.  For the last six or seven years my primary source of income has been working as an architect and development manager for corporate client/server systems - the mainframe'd masses - and it scares me how easily I joined their ranks, and how quickly my skillset began to be molded exclusively fit the Information Systems model.&lt;/p&gt;
&lt;p&gt;However, working as a corporate development manager I came in contact with many developers who were highly interested in application development, and I came to see that a great deal of client/server architects would be developing shareware and freeware for themselves, if they could use the same techniques and tools that they were used to.&lt;/p&gt;
&lt;p&gt;I've also watched designers develop HTML pages for the business to sign off and give to developers to be converted into xSP (JSP, ASP, PHP, etc) for implementation. Not only does that mean developers are wasting time in the conversion but more importantly, the designer cannot easily change the interface as the customer's needs change. I like the idea of the web page signed off by the client going into production with little or no change. That way the GUI designer can make visual changes without interference from development.&lt;/p&gt;
&lt;p&gt;So, wanting to try my hand at application development again, and hoping to eventually provide the same opportunity to my colleagues, I decided to create a system for enterprise developers to be able to create shrink-wrap systems. &lt;b&gt;Adept&lt;/b&gt; (&lt;b&gt;A&lt;/b&gt;pplication &lt;b&gt;D&lt;/b&gt;evelopment - &lt;b&gt;E&lt;/b&gt;nterprise to &lt;b&gt;P&lt;/b&gt;ersonal &lt;b&gt;T&lt;/b&gt;ransformation) was born. I have divided my development efforts into two source trees. There is a support library in com.marringtons.library, while the Adept specific code is in com.marringtons.adept. &lt;a href="/Adept/blog/Open.Source.Library"&gt;See Adept Open Source Library&lt;/a&gt; for the blog on the support library and &lt;a href="/Adept/blog/Software.Development/"&gt;Adept Software Development&lt;/a&gt; for general discussions on software development.&lt;/p&gt;
&lt;p&gt;The &lt;i&gt;Adept Development System&lt;/i&gt; is specifically designed to leverage developer tools, libraries and skills to provide shrink-wrapped products. Put simply, if you want to use the skills, tools, etc that you use in your corporate job to create software to give or sell to friends and clients, then Adept will provide you with what you need. That still leaves the question: so what &lt;i&gt;is&lt;/i&gt; Adept, then? The simple answer is a personal web server designed to fully utilise DHTML to provide a truly integrated client/server system using a browser for the GUI.&lt;/p&gt;

&lt;h4&gt;Benefits of the Adept Approach&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Well known GUI and tools using the modern browser of the user's choice. &lt;/li&gt;
&lt;li&gt;Full access to the rich media the browser provides natively - including (but not limited to) video, images, PDF, Javascript, Macromedia Flash/Shockwave and Java applets. &lt;/li&gt;
&lt;li&gt;GUI is loosely coupled with the server - allowing easy change of look and feel - often by changing the style sheet. &lt;/li&gt;
&lt;li&gt;HTML Web designers are totally familiar with the tools and can provide a depth and quality of interface far above that of any GUI that is created mostly by a developer.&lt;/li&gt;
&lt;li&gt;DHTML techniques allow the designer page to be used without change. This means that the designer can update pages without a developer having to go back and translate it into production code again. &lt;/li&gt;&lt;li&gt;The web server design is inherently multi-user. This means you can run applications at home, access them at work or provide the tools and data to your workgroup. &lt;/li&gt;
&lt;li&gt;Client code can be written in JavaScript, Flash, VB or even Perl if you are willing to install the Perl plugin and use IE. You can also use activeX, Java applets or other mechanisms to provide a rich client. The basic system requires only Javascript to be enabled - and Javascript is available natively on all platforms. &lt;/li&gt;
&lt;li&gt;Adept Server code is written in Java and natively compiled using GCJ. This allows additional server code to be written in Java, Groovey, Python (using Jython), Javascript or any of the miriad of other languages supported by the Java platform. See &lt;a href="http://java-source.net/open-source/scripting-languages"&gt;this page&lt;/a&gt; for examples. &lt;/li&gt;
&lt;li&gt;Java has a rich source of libraries for every occasion from many sources. There are libraries to serve MPEG, render PDF, process XML and just about any other task you can imagine. Many of them are open source. &lt;/li&gt;
&lt;li&gt;Adept provides a server push technology to allow the server to update the client display when the server finds a reason. &lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Limitations in the Adept Approach&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;The browser, and hence Adept is great for multi-media and form based work. It is not as suitable for complex interactive programs similar to word processors or spreadsheets. &lt;/li&gt;
&lt;li&gt;Many believe that HTML, DHTML, XHTML and XML do not provide the best in GUI design. For those with this viewpoint, Adept is a less useful tool. &lt;/li&gt;
&lt;/ul&gt;</content><link rel='alternate' type='text/html' href='http://marringtons.com/Adept/blog/Adept.Development.System/2005/03/introduction.html' title='Introduction'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11344128&amp;postID=111041286649277803' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://marringtons.com/Adept/blog/Adept.Development.System/feed/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111041286649277803'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11344128/posts/default/111041286649277803'/><author><name>Paul Marrington</name></author></entry></feed>