News for hackers. Stuff that matters.
Re:Modern Web Applications are Here by Joeri on Tuesday November 15, 2011 @01:41AM (#3237307)
You don't need to involve the server in generating the UI at all. You can have a static index.html, that bootstraps a javascript environment from static js files, whose first order of business is to contact a web service to fetch the initial content and configuration as JSON data. This makes all content static except that which is truly dynamic, which offers amazing CDN and caching possibilities. The JSON data can be cached in local storage, for easy offline support without constantly revving manifest files.

Once you get at that point, the dev experience starts to look a lot like traditional desktop client-server app development. Except desktop apps are built using components instead of templates, components that combine rendering and behavior into one encapsulated entity that you can treat like a black box. There's nothing preventing a web app from using that same architecture. In fact, ExtJS does just this.

But I don't think it stops there. I think we're going to get meta-configuration languages like mxml to send the layout of these components to the javascript environment, which will, essentially, mean that we're building another browser inside the browser. And so all software evolves until it can render a web page, including web apps.

Re:Modern Web Applications are Here by anjc on Tuesday November 15, 2011 @02:12PM (#3239632)
Can somebody tell me what the point is? How much of a saving are you getting by transferring json data+metadata versus what would normally be sent. I'm ignoring the extra time that would be required to implement and test it.

And like you say, it starts to look like a traditional native app, so why not just create a native app, if you're working in a domain that requires...whatever benefit you're getting here. It seems like you're just trying to approach a similar appearance to the user, while simultaneously wrestling with lots of technologies that don't suit the idea (CSS for example).

Re:Modern Web Applications are Here by ntoshev on Tuesday November 15, 2011 @02:47AM (#3237446)
If you do this, crawlers can't index your pages. Also your users see the page loaded blank and being gradually populated with content, which is not a good UX.
Re:Modern Web Applications are Here by BerislavLopac on Tuesday November 15, 2011 @03:09AM (#3237489)
If it's a true application, with user interaction and everything (and not just a set of glorified Web pages), then the former is not an issue; you don't really want your "pages" to be indexed. And the latter is easily solved with a "loading" bar or any other of UI tools previously invented for the exact same purpose on the desktop.
Re:Modern Web Applications are Here by csomar on Tuesday November 15, 2011 @03:06AM (#3237481)
Not true. If you are building such application:

1. You need to have a non-JavaScript version. That is your main page index.html is a full functioning page without JavaScript. When JavaScript is enabled, it turns the page into a Web App.

2. A simple loader will solve the problem. You might not be able to show the progress for the moment.

Re:Modern Web Applications are Here by tomjen3 on Tuesday November 15, 2011 @09:31AM (#3238269)
Why does he need to have a non-javascript version?

There is (thankfully) no law which say that your service must be usable for people who turn javascript of.

Re:Modern Web Applications are Here by anjc on Tuesday November 15, 2011 @09:49AM (#3238344)
Yeah, there's no law which says your website must be accessible...
Re:Modern Web Applications are Here by intranation on Tuesday November 15, 2011 @10:04AM (#3238388)
Working with Javascript off != accessibility. Most screenreaders (the common face of accessibility technology) run on top of regular browsers, so your JS experience needs to be accessible too if you are legally mandated to (or even better if you care).
Re:Modern Web Applications are Here by anjc on Tuesday November 15, 2011 @10:34AM (#3238530)
If javascript being off makes your site not work, or not viewable at least, then that's the very definition of not being accessible (i'm not limiting 'accessible' to only mean 'available to people with disabilities' like you appear to be)

Edit: Graceful degradation should be a tenet of web development. Having no provision for a person who doesn't have javascript enabled seems bizarre to me, and being bullish about the requirement seems even more bizarre...maybe i'm just getting cranky with age or something.

Re:Modern Web Applications are Here by tomjen3 on Tuesday November 15, 2011 @09:15PM (#3241403)
That is like saying that I must make sure my programs work for people who don't have a computer and rely on anotated screenshots being sent back and forth. To my programmer brain, that is just stupid.

It is one thing if we were talking about a webpage ala 1995 for joes autoshop. At most it will have a comment field (or, the horror, a guestbook) and each url will map logically to a specific public part of the site. Most likely there will be no concept of users at all.

The same thing goes for a blog although you won't get the auto updating twitter feed and, if the blog uses diques, you may have to click a couple of links to see them.

But a webapp is more like Google writer. It just lose all meaning to make it work without Javascript.

Re:Modern Web Applications are Here by scarmig on Tuesday November 15, 2011 @01:16PM (#3239354)
Accessibility cuts both ways, though. Choosing to prioritize the HTML-only version decreases accessibility to people who have limited bandwidth or download speeds.
Re:Modern Web Applications are Here by anjc on Tuesday November 15, 2011 @01:32PM (#3239425)
This surely hasn't been a major problem since probably the 14.4k modem stages for typical sites, and, even if it was, wouldn't limit accessibility (except in the sense that it'd delay viewing by a few milliseconds->seconds). Especially when the majority of the bandwidth cost will be data that has to be sent regardless (maybe with a necessarily increased amount of metadata).
Re:Modern Web Applications are Here by maccman on Tuesday November 15, 2011 @03:04AM (#3237477)
Your first point is not correct. Crawlers can crawl JavaScript only websites using the Ajax crawling API: http://code.google.com/web/ajaxcrawling/docs/specification.h...

Your second point has merit. However I'd counter it thus: * You can load a HTML page first, containing a representation of the end content, so you can avoid the flash * You can show some sort of loading indicator on page load. Users are usually fine with waiting for the initial page load - it's only subsequent interactions that need be fast.

In other words, there's no reason why the page need be blank.

Re:Modern Web Applications are Here by bad_user on Tuesday November 15, 2011 @07:32AM (#3238000)
Only Google does that currently.

And while people can build crawlers that can fetch Javascript rendered pages, these scripts will have to drive real browsers with rendering engines, not just simple HTTP clients. And this is a problem, because fetching millions of web pages will require serious infrastructure work, versus a crawler using libev that can fetch dozens of pages in parallel without a sweat.

Also, that spec you gave is not exactly how Google operates. That's the advice Google gives for making web apps compliant, but the reality is that Google is smarter than that and it takes Google a good amount of effort to fix other people's screwups.

Accessible to crawlers doesn't mean Google-only and you should be careful not to throw the baby along with the bathwater.

Re:Modern Web Applications are Here by jonknee on Tuesday November 15, 2011 @08:22AM (#3238090)
For most purposes, search engines seeing you = Googlebot seeing you. I have never had a competitor past single digits in percentage of search engine referrals.
Re:Modern Web Applications are Here by bad_user on Tuesday November 15, 2011 @11:34AM (#3238802)
A crawler is not necessarily providing content to a classical search engine, as it can serve many purposes. Ultimately such crawlers may generate links to your website and while not bringing you too much referrals traffic, it may increase your ranking, which ultimately means more traffic from Google.

Also, if search engine referrals is all you're interested in, if Google drops you from their index, your website might as well not exist, right? As I said, be careful not to throw the baby with the bathwater. Google is not what made the web great, but a Google dependency might break it and website authors can be blamed for this.

Re:Modern Web Applications are Here by sirn on Tuesday November 15, 2011 @05:04AM (#3237722)
However by using hashbang URLs, you have to keep that little snippet of JavaScript forever to maintain permalink even after the web has moved on to another solution.

It's not a future-proof solution.

Re:Modern Web Applications are Here by fooandbarify on Tuesday November 15, 2011 @07:20AM (#3237978)
Hashbangs are only a stop-gap at this point - modern browsers ship with the HTML5 History API.
Re:Modern Web Applications are Here by quanticle on Tuesday November 15, 2011 @09:34AM (#3238281)
Does IE8 ship with the History API?
Re:Modern Web Applications are Here by akavlie on Tuesday November 15, 2011 @12:45PM (#3239189)
No, IE8 is not a modern browser by most definitions.
Re:Modern Web Applications are Here by quanticle on Tuesday November 15, 2011 @03:39PM (#3240089)
Which definitions? I've seen definitions of "modern browser" that only exclude IE 6 and 7.
Re:Modern Web Applications are Here by dextorious on Wednesday November 16, 2011 @12:12PM (#3243960)
They are wrong. They use modern to mean "quite new and available to most clients" instead of "actually implementing the majority of the latest standards".

IE 9 comes close, and can be considered modern.

Re:Modern Web Applications are Here by mattmanser on Tuesday November 15, 2011 @06:54AM (#3237910)
I'm not sure what you mean by little snippets of javascript, a link is a link. If you change why couldn't you just 301 them to your new format? It's a trivial redirect that you're keeping for the g-juice.
Re:Modern Web Applications are Here by icebraining on Tuesday November 15, 2011 @07:38AM (#3238016)
The part after an hashbang is not sent to the server, so you need client side code to load the content.

This is because the # in an URL is supposed to be an identifier of a element in the page, not an actual resource.

Re:Modern Web Applications are Here by dextorious on Wednesday November 16, 2011 @12:14PM (#3243971)
Or you could just keep a tiny snippet of Javascript that searches for old style hashbangs and redirects all of them to the "another solution" handler to decide what to do with them. It can be just 3-4 lines of JS.
Re:Modern Web Applications are Here by sirn on Sunday November 20, 2011 @02:41AM (#3257552)
The problem is that you have to keep that snippet forever if you ever use the hashbangs. That's why I'm saying it's not a future-proof solution. Not that few bytes matters, though.
Re:Modern Web Applications are Here by nupark2 on Tuesday November 15, 2011 @09:54AM (#3238357)
Your first point is not correct. Crawlers can crawl JavaScript only websites using the Ajax crawling API: http://code.google.com/web/ajaxcrawling/docs/specification.h....

This sounds like a huge imposition to implement -- so much so that I seriously doubt anyone will bother for anything even moderately complex. Not only do you have to produce an API for the client-side javascript to call, but you also have to render static HTML for Google to index.

Re:Modern Web Applications are Here by robmcm on Tuesday November 15, 2011 @05:32AM (#3237759)
Rember this is an application, would a search engine want to crawl the innerds of photoshop or outlook, or a web page promoting them? Just because it's on the web doesn't mean it's a web site that wants to be searchable.
Re:Modern Web Applications are Here by hello_moto on Tuesday November 15, 2011 @02:28PM (#3239728)
In most community-based, social-networking, the companies behind them do want more exposure. The more people who join, the more vibrant the community is.

FYI.

Re:Modern Web Applications are Here by arethuza on Tuesday November 15, 2011 @03:38AM (#3237550)
"the dev experience starts to look a lot like traditional desktop client-server app development"

I have been wondering if we might see the rise of a general purpose JSON/RESTful API that plays the same role for these kind of apps as general purpose database engines did for the old thick client model.

Re:Modern Web Applications are Here by sedev on Tuesday November 15, 2011 @12:39PM (#3239155)
Once you get at that point, the dev experience starts to look a lot like traditional desktop client-server app development.

... with all the security/privacy problems that go with that, and then some.

Re:Modern Web Applications are Here by BerislavLopac on Tuesday November 15, 2011 @03:13AM (#3237498)
Funny thing is that we were building precisely that nearly ten years ago: https://bitbucket.org/BerislavLopac/waexplorer :)
Re:Modern Web Applications are Here by robmcm on Tuesday November 15, 2011 @03:41AM (#3237559)
And what Flex and Flash developers have been building for 5 years ;)
Re:Modern Web Applications are Here by melling on Tuesday November 15, 2011 @05:42AM (#3237774)
Everyone understands that but we really want to move to open standards. Html5 everywhere vs Flash wherever Adobe has the resources and time to do a good port.
Re:Modern Web Applications are Here by robmcm on Monday November 21, 2011 @05:16AM (#3260618)
Or in most cases a not very good port...