<?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-4168438736003463339</id><updated>2007-07-17T10:54:48.509-07:00</updated><title type='text'>CTV15 Sandbox</title><link rel='alternate' type='text/html' href='http://sandbox.ctv15.org/devlog/'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4168438736003463339/posts/default'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sandbox.ctv15.org/devlog/atom.xml'/><author><name>Alex Block</name></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4168438736003463339.post-5410877748274968163</id><published>2007-07-17T10:18:00.001-07:00</published><updated>2007-07-17T10:52:19.090-07:00</updated><title type='text'>Transaction methodologistics</title><content type='html'>The current version of Cassander (2.2RC3) uses templates to format data. These templates are processed by PHP and then sent to the client. The program currently uses a muxed retardation of AJAX and server-side processing. The main page is drawn once, by admin.php (or another page like login.php) and then each subsequent request (for each module) is handled in the same frame without refreshing the page. The frame itself is not a frame element, but a div that changes its contents. A problem arises from this method. When should admin.php draw the container frame and when should it just draw the inside content. A quick workaround was written for this to solve the issue but while it fixed the issue, it created more problems than it solved. Sometimes a page would need to be redraw (to refresh a cached page) and sometimes the same page would need to be drawn in the frame. This was solved by moving the "inside" check to the global header. If "inside" was sent to the server, it did not draw the outside frame because it is "inside". This became complicated because sometimes the page wouldn't know if it was inside or outside and the inside content couldn't talk to the outside content (because of scope resolution problems).&lt;br /&gt;&lt;br /&gt;What if the content didn't need to specify inside or outside? What if the content could know automatically if it was inside or outside, and if it needed to call an inside or outside request? There are two ways that this can be accomplished. The first way requires no significant modification to the current infrastructure, but it does not facilitate growth or expansion very easily. The second method requires a very significant amount of change but will allow easier implementation of future features.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The first method&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To track whether a request is inside or outside, append a pseudo-unique transaction ID to the end of each request by making a function that would be used to get data instead of doing it by hand each time. This transaction ID would track whether the request was INSIDE or OUTSIDE. Any subsequent request made by the current transaction would carry the inside flag.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The second method&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Make one container for the site ("The wrapper"). The wrapper then requests data which is then returned via a JSON-style request. The data is then interpreted and printed on the site, no refreshing is ever done. Each request will return a template ID along with the data. If the template ID is not in the cache (There is a list of templates and ID's) then it will download the template and cache it. This way, the wrapper does not need to know how to draw data that it hasn't had to draw, but if it has to draw it again, it will be able to draw it again without asking for template data. This method moves Cassander towards being a total AJAX application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Conclusion&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Based on the information provided above, the second method is most appropriate. While it may take longer for this method to be implemented, it will allow for faster implementation of features down the road. The second method will provide a faster interface, better usability and an overall improvement on the current interface. Because the data will be sent in a generic format, it will allow for better third-party interpolation and integration.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://sandbox.ctv15.org/devlog/2007/07/transaction-methodologistics_17.html' title='Transaction methodologistics'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4168438736003463339&amp;postID=5410877748274968163' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://sandbox.ctv15.org/devlog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4168438736003463339/posts/default/5410877748274968163'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4168438736003463339/posts/default/5410877748274968163'/><author><name>Alex Block</name></author></entry><entry><id>tag:blogger.com,1999:blog-4168438736003463339.post-5683926059248784136</id><published>2007-01-17T09:59:00.000-08:00</published><updated>2007-04-08T13:10:47.742-07:00</updated><title type='text'>XHTML vs. HTML</title><content type='html'>Right now, the "web" is filled with poorly-formed documents. That is, websites that do not conform to the HTML 4.01 standard. Believe it or not, there are specific rules for coding in HTML. XHTML is a combination of XML and HTML. XHTML, when properly formed, is compatible with every XML reader (that conforms to the XML standard). Rather than separating web browsers and XML browsers, they can be combined.&lt;br /&gt;&lt;br /&gt;Most browsers now-a-days (Firefox and Internet Explorer included) are very forgiving when it comes to poorly-formed HTML documents. For example, it is required that every meta tag be closed.&lt;br /&gt;&lt;blockquote&gt;&amp;lt;b&amp;gt;Hello World&amp;lt;/b&amp;gt;&lt;/blockquote&gt;Traditionally, some tags were never closed:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;p&amp;gt;Hello World!&lt;/blockquote&gt;This caused problems. The browser would have to determine where the tag was to end and when you present this feature in an XML document (A tree based architecture, nodes, branches, etc...) the &lt;p&gt; tag represents a node and the node MUST be closed.&lt;br /&gt;&lt;br /&gt;XHTML is the first step to document standardization. It requires four aspects of programming to be considered a well-formed document. They are:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;All elements must be properly nested.&lt;/li&gt;&lt;li&gt;All elements must be closed.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;All elements must be lowercase.&lt;/li&gt;&lt;li&gt;All documents must have one root node (I.E. &amp;lt;html&amp;gt;)&lt;/li&gt;&lt;/ol&gt;This is why XHTML should be used instead of HTML. It is the first step to standardizing the web.</content><link rel='alternate' type='text/html' href='http://sandbox.ctv15.org/devlog/2007/01/xhtml-vs-html.html' title='XHTML vs. HTML'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4168438736003463339&amp;postID=5683926059248784136' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://sandbox.ctv15.org/devlog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4168438736003463339/posts/default/5683926059248784136'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4168438736003463339/posts/default/5683926059248784136'/><author><name>Alex Block</name></author></entry><entry><id>tag:blogger.com,1999:blog-4168438736003463339.post-8352256533100354227</id><published>2007-01-16T14:16:00.000-08:00</published><updated>2007-01-16T15:02:29.400-08:00</updated><title type='text'>DOM: The Document Object Model</title><content type='html'>While &lt;a href="http://www.w3.org/DOM/"&gt;DOM&lt;/a&gt; is not a new thing, I have finally jumped into understanding it. I've been using elements of DOM (parts of DOM, not the elements themselves... even though that's what they are) for quite some time: manipulating HTML after it has been rendered using Javascript. Basically it is the aspect of AJAX and DHTML that make it Asynchronous and Dynamic.&lt;br /&gt;&lt;br /&gt;DOM treats the entire HTML page as an XML document. The document is an object. Each element of HTML is an object as well, called a node. This allows one to control any aspect of anything on a website.&lt;br /&gt;&lt;br /&gt;Like I said, this is not new and I am not just discovering this now, but I am finally exploring its manifest functions and its overall purpose.&lt;br /&gt;&lt;br /&gt;I wrote a small script to demonstrate the essence of DOM which you can view at &lt;a href="http://sandbox.ctv15.org/domexample1.html"&gt;http://sandbox.ctv15.org/domexample1.html.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is the main function of the page:&lt;br /&gt;&lt;blockquote style="background-color: grey; color: black;"&gt;&lt;br /&gt;function do_nodes(){&lt;br /&gt; var parent = document.getElementById("parent");&lt;br /&gt; nodeList = parent.childNodes;&lt;br /&gt; child1 = nodeList[1];&lt;br /&gt; child1prime = document.getElementById("child1");&lt;br /&gt; if (child1 == child1prime){&lt;br /&gt;     alert("True");&lt;br /&gt; }else{&lt;br /&gt;     alert("False");&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;As you can see from the example that child1 is in fact the same as child1prime. This proves that the object in the child list (nodeList) is the same as the one returned by getElementById.&lt;br /&gt;&lt;br /&gt;I will expand on this later with a better example of the full features of DOM.</content><link rel='alternate' type='text/html' href='http://sandbox.ctv15.org/devlog/2007/01/dom-document-object-model.html' title='DOM: The Document Object Model'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4168438736003463339&amp;postID=8352256533100354227' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://sandbox.ctv15.org/devlog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4168438736003463339/posts/default/8352256533100354227'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4168438736003463339/posts/default/8352256533100354227'/><author><name>Alex Block</name></author></entry><entry><id>tag:blogger.com,1999:blog-4168438736003463339.post-2429463498624381549</id><published>2007-01-15T11:58:00.000-08:00</published><updated>2007-01-15T12:25:04.804-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='pseudo-asynchronous file transfer'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='dojo'/><title type='text'>Pseudo-Ascynchronous File Transfer</title><content type='html'>As you may have seen on some websites such as gmail.com, files are uploaded asynchronously. That is, the website does not reload or refresh or go to any other location, the file simply starts uploading. It is not possible to upload a file via HTTP without submitting a page request because &lt;a href="http://en.wikipedia.org/XMLHttpRequest"&gt;XMLHttpRequest&lt;/a&gt; does not handle file uploads.  One technique to accomplish the task of uploading a file without reloading a page is to use an iframe. An iframe is an inline frame (As opposed to a block-level frame which takes up an entire segment of a website). Instead of refreshing the document (The parent object), you simply use an iframe to hold the form and do your uploading from that.&lt;br /&gt;&lt;br /&gt;This technique is easy to implement. Simply make an iframe with the file upload form in it, and put the iframe on your page. I have used a similar method but employed DTK (DojoToolkit). Dojo has a special transport called IframeTransport.&lt;br /&gt;&lt;br /&gt;You can see it in action here: &lt;a href="http://sandbox.ctv15.org/async2.html"&gt;http://sandbox.ctv15.org/async2.html&lt;/a&gt; Locate a file on your computer and click upload. While the file is uploading you can switch between tabs. It will also inform you if the upload fails or not. You can view the dynamic source here: &lt;a href="http://sandbox.ctv15.org/async1engine.php"&gt;http://sandbox.ctv15.org/async1engine.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My first test before I found that part of dojo was to create two different forms, one in an iframe and one not. Then, when the user submits the original form, it copies the data to the hidden iframe form and submits that one. Unfortunately Firefox won't let you do that:&lt;br /&gt;&lt;span class="title"&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;blockquote&gt;Error: uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "http://sandbox.ctv15.org/.&lt;/blockquote&gt;&lt;/span&gt;It took a long four hours to figure that one out.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;h2&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/h2&gt;&lt;/blockquote&gt;</content><link rel='alternate' type='text/html' href='http://sandbox.ctv15.org/devlog/2007/01/pseudo-ascynchronous-file-transfer.html' title='Pseudo-Ascynchronous File Transfer'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4168438736003463339&amp;postID=2429463498624381549' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://sandbox.ctv15.org/devlog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4168438736003463339/posts/default/2429463498624381549'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4168438736003463339/posts/default/2429463498624381549'/><author><name>Alex Block</name></author></entry><entry><id>tag:blogger.com,1999:blog-4168438736003463339.post-3717862568990229501</id><published>2007-01-15T11:51:00.000-08:00</published><updated>2007-01-15T11:57:30.224-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='introduction'/><title type='text'>The Sandbox Devlog</title><content type='html'>Here I will post scripts and documents regarding programming techniques with which I have been experimenting. I will post links to scripts that will demonstrate the technique. I cannot guarantee that the link will work, or you will understand what happens in the script. You may play around with them in any way you wish. These scripts are &lt;span style="font-weight: bold;"&gt;experimental&lt;/span&gt;, do not report any errors to me.</content><link rel='alternate' type='text/html' href='http://sandbox.ctv15.org/devlog/2007/01/sandbox-devlog.html' title='The Sandbox Devlog'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4168438736003463339&amp;postID=3717862568990229501' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://sandbox.ctv15.org/devlog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4168438736003463339/posts/default/3717862568990229501'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4168438736003463339/posts/default/3717862568990229501'/><author><name>Alex Block</name></author></entry></feed>
