Welcome!

Java IoT Authors: Pat Romanski, Liz McMillan, Elizabeth White, William Schmarzo, Stackify Blog

Related Topics: Machine Learning , Agile Computing

Machine Learning : Article

Beyond HTTP

Will browsers ever deliver applications instead of documents?

What we need is a Web browser that doesn't just serve up documents, but serves up applications."

Early in 2006 I was given a design brief: a UK-based shipping company wanted to replace its shipment tracking system with a Web-based solution.

Its existing system consisted of this: each widget grower had a contract with the widget producer; this contract was tracked via an Excel spreadsheet; every Friday the shipping company would e-mail the latest copy of the spreadsheet to the widget grower, which would fill out the details of the latest shipment and the details of each and every container in that shipment. This would then be passed back to the shipper, which would then forward it to the widget producer, which in turn would fill out the production usage, quality control results, and the dates and times of when each container load had been used. They would forward it back to the shipper and the cycle would continue. Add in the two separate ports and warehouses in the U.K. and about 16 contracts with different widget growers in countries as far away as Brazil and South Korea, and you start to see that keeping track of the latest version of each spreadsheet, where it is, and what is happening to it was beginning to become something of a mission unto itself.

This is where I came in. The simplest Web-based solution to this would be an online document store in which the widget growers, shippers, and producers could just log in, check out a spreadsheet, edit it, and check it back in. Instead we landed on the Web 2.0 solution: a truly online spreadsheet, tailored exactly to the task at hand, with permissions set on data fields (so that a widget grower couldn't cheekily amend the widget producer's own quality-control results, for example). The whole thing would be in real-time and delivered through Internet Explorer.

This is the sort of real-world application development leveraging the Internet that goes unnoticed by the photo-sharing, music-downloading, blogging masses. In the same way that the largest fraction of software developed and deployed in the world is internal business software, not games and file-sharing clients. As such I had an advantage; this wasn't to be some Microsoft Office Excel killer, it was a tailored, targeted, bespoke application that would look a bit like a spreadsheet but behave exactly like a widget-growing, shipping and production tracking application.

After several months of meetings, prototypes, and endless hours of debugging, the final product was rolled out this summer. The client is happy; their clients are happy; it works exactly as designed; it can export to Excel; you can copy and paste in and out; and it works on IE6, IE7, and Firefox 1.5. I collected my paycheck and they've been using it without any problems ever since.

It does, however, contain over 2,000 lines of JavaScript, and the "spreadsheet view" is an HTML table, with HTML embedded links and images to power said JavaScript. The rows are inserted via the DOM and to edit a cell in a particular row the script has to copy the data from the table row into a faked-up hidden "edit row" containing text boxes using CSS that's hacked to pieces and swapped with the original row. The Save button at the top left of the application cycles through every table row on the page, checking against a bunch of custom attributes slapped into each TR tag to decide if the row needs deleting, updating, or inserting to the database. It builds XMLHttpRequest objects and loads them with a custom CSV-style mashup of data to be sent to the server, which in turn sends a similar mashup back, so that the data on the screen can be kept in sync with the data in the database...on the other side of the planet.

I find myself in a bizarre position. The fact that I'm an expert in this kind of thing and have the technical know-how and aptitude to design and pull off such a complex beast on time and as designed means that I got paid quite well for the six months it took to develop, and I'll continue to get paid as and when upgrades are needed. If any old John Doe could have opened up Visual Studio and slapped it together then I probably wouldn't find myself getting paid quite so much for my services. But the thing is it really could be that easy, or at least, close to it.

Instead of a dedicated platform for developing Web-based applications we have HTML, the DOM, JavaScript and the funderful XMLHttpRequest object. Instead of declaring a pair of <DATAGRID> tags in HTML, I frankly had to hack the %$#@ out of a <TABLE>, normally a static read-only piece of a static read-only document. Compare the Visual Studio .NET Windows Datagrid with its Web-based counterpart. There's no comparison: a confident user of the former wouldn't immediately be able to even recognize the latter.

Finally we get to the rub: The document-based Web as we know it is not a platform for developing complex applications; sure it's possible and there are plenty of bright people working at places like Google who are doing it as we speak and creating frameworks to make it easier. But is this really the way forward? A tree-based object model accessed by an interpreted scripting engine tacked onto a specification designed for static read-only documents?

Now would be a really good time in history to stop, step back, and look at what we have and what could be done better. What we need is a Web browser that doesn't just server up documents, but serves up applications: full screen native GUI, network-transparent and, most important, fast, lightweight, real-time applications. Ideally we'd want to start over, build a whole new spec running on an entirely new platform and set of protocols.

It's unlikely to be that easy. Java promised us Internet-based apps, but spectacularly failed to deliver anything other than mobile phone shoot-Œem-ups. Flash is only just beginning to be taken seriously, and may yet mature into something business can use to track its widgets. Let's take a moment to dream about what we could have.

First, it would be easy to write for with a choice of languages ­ the current request-response framework of the Web can be catered to by PHP, CGI, and ASP to name just three. Write your app in one and you get to access the posts, gets, and cookies natively. So it should expand on that and have a native client object alongside the server object so an author can simply call:

client.Document.Forms["someForm"].txtSomeInput.value = "hello from the server"

And have the asynchronous action happen without any extra effort. And the reverse should be true: the script in the browser should be able to asynchronously call server functions like this:

function btnMyButtonOnClick()
{
     doSomething();
     server.doSomethingWithTheDB( gsFavouriteColor ); doSomethingElse(); }

Again, the legwork would be done for you; a newbie programmer would be able to create something like this in no time, but true enlightenment wouldn't be needed. Custom objects and classes should also be transparently handled across the network, but we don't want to belabor the author with XML and SOAP, it should "just happen."

Second, it should have state, and that state should begin by initializing the application's main source file on the server when the client first connects. The application would maintain state between calls, allowing the use of global variables and custom classes that persist. Calling an async function from the client would begin a thread on the server app, but the advanced programmer could, if he wished, have power over this too and create a call stack, for example, to force events to occur in the order they were sent from the client (not necessarily the order they arrived). Finally, unlike the current Web methodology, there should be a clear disconnect event sent when the user closes the window or a connection stay-alive ping times out.

Thirdly, each user of the app would get his own instance on the server, but these instances would be able to access the Master Application that contains them all, and all its public functions and classes. A chat application, for example, would be able to access the channel list with just a call to application.fetchChannelList(). And to pull up the details of another connected user with application.getUserDetailStruct( intUserID ).

Finally, the author wouldn't be forced into using the current HTML DOM and its small inflexible set of user input controls. There should be a much wider range of inputs, controls, panels, and widgets and has a native grid-based layout system. I keep mentioning the MS Datagrid over and over but imagine being able to create a small spreadsheet object in just a few lines of code and let the user add, insert, remove, and edit rows and columns in the comfort of his own native GUI. This object wouldn't need serializing and sending to the server as far as the author is concerned, pressing submit would give the server a mirrored copy of the control, with full access to its innards.

Such a thing is possible, and we need it sooner rather than later. It would seem simplest to treat the project in two halves. The first half of the challenge is to integrate the new user controls ­ where possible ­ within the existing Web framework. The WHATWG Web Forms 2 and HTML 5 spec are already headed down this road, with such simple but badly needed inclusions as date and time inputs with in-built validation. The second half needs a paradigm shift, a move away from the top-heavy and stateless HTTP protocol to a true lightweight binary client/server relationship between the user and the application.

The thing is a lot of the inherent problems in such an approach have already been solved: Connectivity and synchronicity over a slow or unreliable connection? ID's Quake addressed this 10 years ago and so too has almost every FPS since. Cross-platform compatibility and interaction? Any number of file-sharing and chat applications will yield the answer to that one. All it takes is the will to step away from the Web browser and start something new. As a final thought it might be worth noting that for 20 years now the X Windows system has allowed the development of applications that can transparently display their GUI on one computer while doing the actual processing on a server somewhere else...probably the other side of the planet. Sound familiar?

More Stories By Ric Hardacre

Ric Hardacre discovered the Web in the mid '90s when he really should have been at lectures and not in the University computer lab. He's since worked as a Web solutions developer, systems architect, and wireless and satellite network specialist. His current day job is as an MCP C# Developer in the UK.

Comments (7) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
Francois Rautenbach 03/14/08 01:48:20 AM EDT

I completely agree with Rick.

Most of the current offerings from companies like Microsoft (Silverlight) and Adobe (Air) are nothing more than monolithic "web delivered" apps. What we need is "web based" apps that works in a similar way to HTML pages. We need better UI features than what HTML currently provides, but we also need to retain all of the benefits of web based (HTML) apps.

The web paradigm offers many advantages to web app developers that you loose when moving to "web delivered" apps. No versioning issues. The ability for multiple developers to work on separate parts at the same time. Real time, custom, server generated screens and forms. Scaleability, familiarity, etc. I can go on, but I think you get the drift.

Nice article Rick.

Sam Covington 02/05/07 10:45:06 PM EST

I see AJAX as a runny nose, not the cold. We're building complex structures to cover up the fact that minor changes in the browser could elimnate a lot of code.

Why does a page flash when getting information/data from the server? I mean, double buffering has been around since DOS, so why don't we have multiple surfaces to render content on, and the ability to combine them directly supported in the browser.

This wouldn't even break any WC3 standards, since each surface would be standard HTML rendering.

There are 3-4 changes in the browser that would assist developers with AJAX and DHTML, and dramatically improve the user experience, but it seems that neither Netscape or Microsoft is thinking about them.

GREAT Article!

Luis Saenz 02/05/07 12:32:21 AM EST

In response to: Donald Fraser

I'm not sure I understand the difference.

A Java Web Start application can be coded to only present a "fancy" desktop-quality user interface. In this way, it executes a remote API to perform its operations and interact with the server platform (presumably in a concurrent fashion, along with many other clients).

In this situation, how is the server (internet application) code revealed? Only the API is revealed, which is hardly a security issue if it is designed correctly and requires authentication and authorization to perform operations.

Furthermore, a "fancy" javascript/DHTML internet application reveals its presentation logic just as much as the client GUI code of a Java Web Start application does.

Donald Fraser 02/04/07 07:59:09 PM EST

In response to: Luis Saenz
I agree that Java Web Start is available today and in most situations is a valid choice, but it comes with security issues. You are basically supplying the world with code to access your systems. This approach can be a security risk. No matter how well the code is written or protected, once it is in the hands of a hacker it can be reverse engineered. Where as a true Internet application does not reveal any code to users.

Marshall Caro 02/03/07 01:32:17 PM EST

Ric asks, "Will browsers ever deliver applications instead of documents?"

Well Ric, they do -- and have done so for many years. They are called, "applets" and may be written in Java or Visual Basic (if you're willing to be constrained to Microsoft products -- and by your choice of .Net, it would appear that you are).

And your six months project to wedge the requisite functionality into a Document model with .Net and javascript? My guess it would have taken no more than two to three months to develop a two or three tier distributed database application in Java that satisfies the requirements.

The problems people had with Java applet development a couple of generations back were performance and firewall related. The performance problems are well behind us and the firewall/network security issues are no different for Java than they are for scripted solutions. We developed our own middleware solution that delivers realtime streaming data to thousands of endpoints via port 80 http (in Java)

Marshall Caro 02/03/07 12:26:25 PM EST

Ric asks, "Will browsers ever deliver applications instead of documents?"

Well Ric, they do -- and have done so for many years. They are called, "applets" and may be written in Java or Visual Basic (if you're willing to be constrained to Microsoft products -- and by your choice of .Net, it would appear that you are).

And your six months project to wedge the requisite functionality into a Document model with .Net and javascript? My guess it would have taken no more than two to three months to develop a two or three tier distributed database application in Java that satisfies the requirements.

The problems people had with Java applet development a couple of generations back were performance and firewall related. The performance problems are well behind us and the firewall/network security issues are no different for Java than they are for scripted solutions. We developed our own middleware solution that delivers realtime streaming data to thousands of endpoints via port 80 http (in Java)

Luis Saenz 02/01/07 10:00:22 PM EST

I tried pasting my feedback in this box, but it did not work. Please find my feedback at this URL:

http://homepage.mac.com/lsaenz/jdj/feedback.html

@ThingsExpo Stories
SYS-CON Events announced today that Enroute Lab will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Enroute Lab is an industrial design, research and development company of unmanned robotic vehicle system. For more information, please visit http://elab.co.jp/.
SYS-CON Events announced today that Mobile Create USA will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Mobile Create USA Inc. is an MVNO-based business model that uses portable communication devices and cellular-based infrastructure in the development, sales, operation and mobile communications systems incorporating GPS capabi...
SYS-CON Events announced today that Suzuki Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Suzuki Inc. is a semiconductor-related business, including sales of consuming parts, parts repair, and maintenance for semiconductor manufacturing machines, etc. It is also a health care business providing experimental research for...
Real IoT production deployments running at scale are collecting sensor data from hundreds / thousands / millions of devices. The goal is to take business-critical actions on the real-time data and find insights from stored datasets. In his session at @ThingsExpo, John Walicki, Watson IoT Developer Advocate at IBM Cloud, will provide a fast-paced developer journey that follows the IoT sensor data from generation, to edge gateway, to edge analytics, to encryption, to the IBM Bluemix cloud, to Wa...
SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
SYS-CON Events announced today that Nihon Micron will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Nihon Micron Co., Ltd. strives for technological innovation to establish high-density, high-precision processing technology for providing printed circuit board and metal mount RFID tags used for communication devices. For more inf...
SYS-CON Events announced today that mruby Forum will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. mruby is the lightweight implementation of the Ruby language. We introduce mruby and the mruby IoT framework that enhances development productivity. For more information, visit http://forum.mruby.org/.
In his session at @ThingsExpo, Greg Gorman is the Director, IoT Developer Ecosystem, Watson IoT, will provide a short tutorial on Node-RED, a Node.js-based programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using a wide range of nodes in the palette that can be deployed to its runtime in a single-click. There is a large library of contributed nodes that help so...
SYS-CON Events announced today that Ryobi Systems will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ryobi Systems Co., Ltd., as an information service company, specialized in business support for local governments and medical industry. We are challenging to achive the precision farming with AI. For more information, visit http:...
SYS-CON Events announced today that SIGMA Corporation will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. uLaser flow inspection device from the Japanese top share to Global Standard! Then, make the best use of data to flip to next page. For more information, visit http://www.sigma-k.co.jp/en/.
SYS-CON Events announced today that Daiya Industry will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Daiya Industry specializes in orthotic support systems and assistive devices with pneumatic artificial muscles in order to contribute to an extended healthy life expectancy. For more information, please visit https://www.daiyak...
SYS-CON Events announced today that B2Cloud will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. B2Cloud specializes in IoT devices for preventive and predictive maintenance in any kind of equipment retrieving data like Energy consumption, working time, temperature, humidity, pressure, etc.
SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp em...
What is the best strategy for selecting the right offshore company for your business? In his session at 21st Cloud Expo, Alan Winters, U.S. Head of Business Development at MobiDev, will discuss the things to look for - positive and negative - in evaluating your options. He will also discuss how to maximize productivity with your offshore developers. Before you start your search, clearly understand your business needs and how that impacts software choices.
SYS-CON Events announced today that Interface Corporation will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Interface Corporation is a company developing, manufacturing and marketing high quality and wide variety of industrial computers and interface modules such as PCIs and PCI express. For more information, visit http://www.i...
SYS-CON Events announced today that Keisoku Research Consultant Co. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Keisoku Research Consultant, Co. offers research and consulting in a wide range of civil engineering-related fields from information construction to preservation of cultural properties. For more information, vi...
SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
SYS-CON Events announced today that Fusic will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Fusic Co. provides mocks as virtual IoT devices. You can customize mocks, and get any amount of data at any time in your test. For more information, visit https://fusic.co.jp/english/.
SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
Mobile device usage has increased exponentially during the past several years, as consumers rely on handhelds for everything from news and weather to banking and purchases. What can we expect in the next few years? The way in which we interact with our devices will fundamentally change, as businesses leverage Artificial Intelligence. We already see this taking shape as businesses leverage AI for cost savings and customer responsiveness. This trend will continue, as AI is used for more sophistica...