In most other situations though, where you have applications that are not simple, do not have some requirement that really benefits from not reloading pages (e.g. are not playing audio), you are not Google, the additional complexity this approach carries with it is really not worth it.
The Future of Web Apps - Single Page Applications
11–20 of 65 posts
Re: The Future of Web Apps - Single Page Applications
#12I've been following a very similar approach, writing a web app for an upcoming launch. The hardest part is keeping everything in your head. When you have a cache on the client, a cache on the backend, several databases, throw in some ajax requests and command line scripts, it becomes very difficult to sanely architect a web app in one page. That said, it is very possible, but it requires that you bend your design to…
Re: The Future of Web Apps - Single Page Applications
#13https://developer.mozilla.org/en/DOM/Manipulating_the_browse...
Re: The Future of Web Apps - Single Page Applications
#14You end up with more responsive user interface but my feeling at this point is there is still a real cost of additional code complexity -- especially for larger apps.
Re: The Future of Web Apps - Single Page Applications
#15I think this makes sense in a couple of situations. First, for stuff that is fairly simple and where not having page loads is highly desirable, such as a music playing app like his example. Second, for stuff that is complex but you have a team of engineers and computer scientists as well as a suite of tools that make dealing with that complexity much more manageable, as in Gmail. In most other situations though, wher…
Sure, if you try to do this manually, it's complex, but if you use a tool like NOLOH, there are others, it becomes very simple, and even more natural than conventional web development.
It's so frustrating reading these comments as if the tools don't exist today. They do, and they have. Every year or so I'll read another post that re-hashes a small part of something that an existing framework, like NOLOH, does, and it'll be touted as the way forward.
We should be able use the tools that are available, there's no need to re-create the wheel every few months, or start over. If the cool kids in SV aren't using a tool, that doesn't mean that it doesn't exist. It simply means that the cool kids aren't using it. Likely because those cool kids like to re-create the wheel, over and over and over again.
Sorry for the rant. This sort of stuff gets very frustrating.
Re: The Future of Web Apps - Single Page Applications
#16love it love it love it love it love it i just love it when competitors hide their web sites behind 'romulan cloaking devices' that make their content invisible to search engines! more traffic for me! bwa ha ha ha ha ha!
Did you read the article? The single-page web app degrades to linked pages when JavaScript is disabled, and it's fully indexable by search engines.
Re: The Future of Web Apps - Single Page Applications
#17Originally posted in blog comment: Indeed, we originally had this idea back in 2004 (pre-AJAX craze), which led to the creation of NOLOH ( http://www.noloh.com ), available to the public since 2009 (commercial since 2005, public beta in 2008). NOLOH allows you to create your website/WebApp in a single tier and then NOLOH will output your application in a "single page". Furthermore, it takes care of bookmarking, back…
Re: The Future of Web Apps - Single Page Applications
#18Re: The Future of Web Apps - Single Page Applications
#19Re: The Future of Web Apps - Single Page Applications
#20I think this makes sense in a couple of situations. First, for stuff that is fairly simple and where not having page loads is highly desirable, such as a music playing app like his example. Second, for stuff that is complex but you have a team of engineers and computer scientists as well as a suite of tools that make dealing with that complexity much more manageable, as in Gmail. In most other situations though, wher…
For example lets take a shopping cart, in the page post model you would submit the page to the server, create a cart in the session (bad, bad, bad) and then respond to the client with a new UI, the client would select an item, you would form post that item and the server would update the cart with the item. Back comes the UI and we do it over again with another item, ad nauseum. Eventually the user selects check out, we form post and hit a routine that tallies everything up and spits back another UI. We do this until all the data is collected to complete the transaction.
With the new model, The UI is the sole domain of the client and we speak to the server in complete representative state when we have the whole communication. Not only that but data definitions have very ridged walls that define what that data is, therefore making the server side code far more reusable (more on that in a minute).
So for this example, done the new way, JavaScript creates an order object, it then displays the UI for products after making an asynchronous call to get the product information (given that this is a defined call to the /products URL we can set a cache expiration in the future and therefore any subsequent calls have very little cost associated with them).
So now the server is acting as a data and business logic layer, while the client is providing the work-flow and the screens.
Back to the example, on the client side we have an order object, loaded with products that we have not had to make transitions to the server to create and update, we can then push this object to the server via a POST to the /orders service.
As you can see your data and business logic are becoming very defined and resource-able. If you decide to provide a mobile interface you already have the services available to support it, your data is no longer intertwined with UI work-flow.
The benefits of this model are vast but at a high level here are the big ones:
The client side becomes responsible for the work flow. So different UI's can provide optimized work-flows for their format. Web, Mobile, voice, do not have to rely on the same work-flows to reuse existing code and not start over.
Front end developers work in pure HTML, CSS and JavaScript there is no reliance on back end technologies to be able to perform their tasks.
Back end developers work in pure platforms, a Java developer works in Java, a .NET developer works in C#.
The front end and back end are loosely coupled through service calls, either can be swapped out without ramifications to the opposing side.
You data and business logic becomes addressable, a natural byproduct is that you can expose your system to third party consumers and alternative UI's.
You are working with a non-fragmented object model, one party is responsible for state and that is the client.
The front end is far more responsive to user input. You have far more opportunity to pre-fetch data based on user patterns and expectations. You have fine grain control over performance.
UI's are best programmed via an event based model. It is impossible to achieve this within the old page post model. (See the Node.js talk on blocking vs no-blocking, this is a relative of that argument).
Session management is offloaded to the client, reducing large amounts of memory and resource requirements on the server side. No longer does the server have to approximate what is happening on the client side.
A byproduct of the client holding session is that any disruption in communication does not reflect a total failure of the transaction. The client holds state and therefore can submit to the server once it become available again, no matter the point in work flow.
The decoupling of the server side allows the UI teams to develop the front end in a far more agile and rapid fashion. They can hold closer to the stake holder and rapidly modify the application to meet user needs.
If a top down approach is used, the entire front end can be prototyped while creating stub service files, allowing the stakeholder the ability to touch and feel the application before back end development begins. This significantly reduces the costs associated with development to get to the point where end users touch and request rework to the application. Further, the stubbed services provide a clean definition of the services required to the back end team.
I could write a book on the pros of this development methodology but sufficient to say, with JavaScript frameworks and proper architecture, writing new style web apps is far less cumbersome and a lot less convoluted. I was one of the nay-sayers until I tried it and actually found that it was easier and produced a superior user experience. The benefits to building apps this way are numerous.