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.
>> create a cart in the session (bad, bad, bad)
Sorry to be a total n00b, but why is it bad to keep the cart in a session? What do you suggest as an alternative?
So if the client wanders off, you have no way to clean up based on that event other than a brute force timeout.
A common rebuttal to this is well just sprinkle in an AJAX call. Which in my opinion is the worst decision one can make. Now not only are you supporting a server model but you also have client mode sprinkled in which compounds the complexity of you application significantly, in essence doubling your technology stack. This is the choice a lot of developers make when trying to dabble in RIA and it is my held belief that this is a fatal mistake. It doubles the required skill set and creates convolution in the sequences of application communication.
Wow. Did I just point out that cookies have legitimate and valid uses? My self from 10 years ago would run after me with a shovel and yell that cookies are evil. (Incidentally, the opinion of my self from 10 years ago about Javascript would be exactly the same).
For example the majority of what you're describing as benefits has been known to anyone using MVC for a while, MVC is available in any of the languages you mentioned as your system being easier than.
http://www.appcelerant.com/mvc_is_dead.html
http://apsblog.burtongroup.com/2007/11/mvc-matrix-and-.html
http://broadcast.oreilly.com/2008/10/mvc-as-anti-pattern.htm...
http://www.sitepoint.com/blogs/2005/12/22/mvc-and-web-apps-o...
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.
There are 3 pages, with 9 live sites. There are many more, but not everybody decides to post their sites to the powered by section. We'll be starting a push to get NOLOH authors to post their sites there in the near future.
Furthermore, if you would've actually taken the time to read through our site, you would see that NOLOH does in fact render content without JS, if the developer chooses, which we're constantly improving. You can read our blog for more information.
It's somewhat shocking that this is what HN has come down to. Writing a reply without actually verifying your comment. I'm starting to think I don't belong here anymore, it's starting to feel like high school all over again.
As I mentioned earlier it's at the developer's discretion as to whether they want to enable JS degradation or not. Sometimes when an application is sufficiently complex a developer may choose not to, or not have certain actions map to links.
You shouldn't base your assumptions on one implementation, but rather, read what the technology claims to do and then try it so you can actually see, rather than just slash and burn.
It's people like you that really make me wonder whether we should even continue down the standards based route, or continue to support text-based browsers, as mentioned in our latest blog posts http://dev.noloh.com/#/blog/, or http://dev.noloh.com/?/blog/ for you. Not a single client or user has ever asked for such features, but we always get complaints from the die-hards. So we work and implement it, to what effect? Next you'll complain that some app that uses NOLOH doesn't do XYZ. There's nothing we can do about that, we can't force users to upgrade, or implement a feature, we can only offer it.
Clearly it doesn't matter what we do, or how compatible we try to be, you won't care, won't listen, and won't actually try it.
If I were in the market for a web framework, I would not take it on faith that I could rely upon interoperability features the site claims but does not demonstrate. And I wouldn't write the demo myself unless I had already ruled out your competitors.
If you decide to drop it, I have no doubt you can still find a large potential market of developers either indifferent or ignorant about the ongoing disintegration of the open HTML web. It comes down to what kind of effect you're comfortable with having on the industry.
The best way to determine if something lives up to its claims is to try it. You can't look at sites done in NOLOH and then expect them to have implemented or turned on every feature.
Furthermore, it's amazing that when our competitors 280north, or Sproutcore, or whatever else is "cool" posts something nobody complains that you HAVE to have js. No degradation options, no text-based browsers. Nobody complains that their sites aren't in their tool, or that they have significantly less resources than we do.
As soon as we post something there's usually somebody that steers the conversation to a different topic and then criticizes us for one reason or another. In this case you successfully diverted the conversation from "single page" websites into a conversation on js degradation, which in the case of NOLOH is really irrelevant to most users.
Search engines get a different version from the js, non-js versions, thus the non-js version is only for humans that specifically decide to turn off their js. Could it be better, yes, will it be better, yes, can we mandate it, no.
I thought it was fairly obvious that someone on a technical forum complaining about anchors not leading anywhere and hidden divs appearing on the page is using NoScript, or otherwise has javascript disabled.
>Rather, you just started to list things that seems like they weren't working.
Well, they weren't, were they?
> As soon as we post something there's usually somebody that steers the conversation to a different topic and then criticizes us for one reason or another.
Mm, kinda like how you complain about your competitors instead of addressing issues about your javascript degredation?
If you bring up your product as a solution, it seems reasonable to expect us to describe why it isn't.
We have this fantastic thing called threaded discussion. There is not a direction for a conversation, but many, as is evidenced by the deeply-threaded messages on most technical boards (think Slashdot, not Digg).
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.