The following post is a reprint from my personal blog. It is editorial in nature and even delves into random politics. I apologise. You can deal with it though :)
Steve Jobs didn’t hold back when talking about Google and Adobe. That is great. Life is so much more fun when people speak their mind. I remember hearing a story when Sir Steve was asked why mac keyboards where the way they were. He grabbed a PC keyboard and started to rip out “stupid keys” (print screen, F keys, and the like) and swore a lot.
We love to paint with broad black and white brushes these days don’t we? Whenever I hear people talking about Google being “evil” or not…. I sit back and think about how interesting it is that companies become “people”, especially in this country.
Corporations are recognized by the law to have rights and responsibilities like actual people.
That may have been a convenient (and often almost genius) abstraction by lawyers, but it is screwed up. It feels like the times when you use inheritence in a way that isn’t a ISA relationship, but it does kinda make the code nice. We have all done that, until we learned to favor composition. Corporations ISA Person? No. They are composed of them though.
I have been thinking about this ever since the recently surprise court decision the other day that “allows corporations and unions to pour unprecedented amounts of money into elections.”
Lawrence Lessig had some interesting commentary:
The court decision does feel totally wonky to me. Right now, $ has a direct bearing on elections, and allowing multi-nationals (who have the money) to rain it down makes no sense.
Fun aside
My renaissance friend Graham Glass talks about how corporations can be considered a single conscious in his series on “the mind”.
The issue with the vast number of corporations is that they are profit driven entities whose charter is to bring financial reward to shareholders. While you could argue that we as a species are driven by the selfish gene, corporations are driven by profits. Duh. Capitalism.
Google is a company. It is driven by this same goal. Now, there are various paths to a particular goal to make profits. Some companies sell things that kill people (weapons, cigarettes, etc). Others offer medical devices. All companies are not equal. Having spent time at Google, I do feel like the place isn’t just an evil cult. The people that make up the consciousness were very driven strong willed people that cared about the company mission (universal access to information and all that) more than just the $. Sure some folks are focused on that. Also, although the wool could be placed over your eyes, the guys at the top of the chain have their hearts in the right place. While Larry and Sergey are there, decisions will be made that aren’t solely based on profit. They want to create a different kind of legacy and company.
That being said, I think it is quite easy to fall into a trap such as:
If we do something here to block competition, we can make more $ and since we are Good Guys we can do better things with that money!
Google will sometimes do things that could be considered “evil” by some. That is life.
The good news with Google is that their search and ads business deals in a trust economy. It doesn’t take much to switch from Google to Bing. Google knows that. Even though they have some HUGE advantages (technical [data centers, talent], brand, etc) the low barrier to change is huge.
Not all corporations are profit driven
I had the huge pleasure of working for Mozilla, which is a mission based corporation. Wow does that make life different. While you have to sustain yourself, it does mean that you think of the world very differently. You would rather go out in a blaze of glory doing something great for the mission, than just slowly die not doing much. Every choice you make …. you think of the mission.
It was interesting to work there knowing that I actually wouldn’t want Firefox to be a 90% browser. You can fall into the similar trap as above and think:
We are mission based! If we had that domination we would use it for good!
But, not having that power in one hand is even better. Imagine working somewhere thinking “in my wildest dreams, the market would be shared somewhat evenly with the competition.” The Open Web is amazing in that there is NO SINGLE VENDOR. If we are able to keep a decent balance between browsers (and thus the platform as we know it) then we have a balance of powers. Sure, in some ways you can’t move as fast as a dictatorship, but there is a reason we don’t want dictatorships in our government (even if the trains run on time!)
And, this brings me to the Adobe half of the Steve Jobs equation. Flash isn’t dead. HTML5 is slowly going to put a dent into it if we ever get some of the use cases just right (e.g. video), but Adobe has a good penetration and can move at the speed of a dictatorship. The iPhone/iPad combo not shipping Flash will have an interesting dynamic here too, hopefully helping the HTML5 video cause. There is still much more work to be done. Flash and browser plugins have had a long history at forging new paths, and the Web can come in behind them and standardize. May that continue.
I do watch for single-owned platforms such as Flash, Silverlight, or now the Apple platform (even though they do great work on the HTML5 side of the house). I don’t want any of those vendors to have too much power. The thought of a Web that required the use of their technology makes me shudder (we have a piece of that with Flash video). Right now I can turn off those plugins and life moves on. Sure I can’t Hulu or Netflix, but that will change. I would miss some of the Flash sites that my kids use, but they could even be partially ported over to HTML5 these days.
I don’t want to “kill” these other platforms as they offer competition and spur on the industry. I just don’t want any one of them to take over. It may seem like the world would be better if we all just used Macs and iPhones and iPads, but would it? Do you think Steve would be a benevolent dictator?
Erm, no.
And thus I find myself torn. I really want to go out and by that iPad……. but when is it “too late”. Surely I have a few years right? I can enjoy the shiny new toy? :)
The study asks some interesting questions revolving around the development side of the tablet. Are developers going to develop for it? What are they looking for? What are they excited about from a technology perspective?
I found it interesting to see the type of companies looking to build apps:
Games will still probably be huge on the device, but it is great to see other types of apps at the ready.
Then we have the feature requests:
Even if there is a way to run iPhone apps, it is clear that people will be spending effort creating truly native experiences. There are core differences beyond screen size here. Very different capabilities to take into account.
We are seeing an increase in consumer devices. I recently talked about the table stakes of 2010 and beyond. As a consumer it is exciting to see the vision of connected devices become real. As a developer, although there is new opportunity, it is incredibly daunting. How many proprietary SDKs can one learn and fund development on?
This is where the Web comes in. The Web has the potential to become the unifying platform across devices. This isn’t about write once run anywhere, but it is about offering advanced solutions to deliver experiences across the devices using shared code, services, and APIs.
Back to Appcelerator. They publish this study right before the tablet launch. Hmm…. something tells me that Titanium (now in mobile and desktop versions) will support Tablet. As companies struggle with the pull of delivering functionality to many devices, Titanium has an opportunity of helping developers out. We have heard that Titanium is going to GA some time soon (probably in March) and we will then see pricing plans and some new products (probably around analytics and metrics). Apparently more desktop and mobile applications will be developed using Titanium than Adobe AIR this year. That would be quite a feat.
What are your thoughts on the Tablet and the Web? What did you get out of the survey?
Here is Jeff talking about their work with Scoble:
This was quite a surprise! Tobias Schneider has built a Flash runtime that works right in the browser. It's implemented in pure Javascript and HTML5, and the whole thing is open source, MIT-licensed, and hosted on GitHub.
It works like a charm in recent versions of Firefox, Chrome, and Safari (and, yes, iPhone Safari, though the "blue" demo runs at tedious pace on my 3G). To install it yourself, use "git clone git://github.com/tobeytailor/gordon.git". I found the demos don't work from a file:/// URI due to the script dependency system, so point your web server at the root and point your browser at demos/.
There's not yet any docs, so it's not clear how broadly compatible Gordon is or where it's headed. But if nothing else, it makes a bold statement about the maturity of open web technologies.
When I talked about some snow related CSS3 experiment, I could not imagine @Natbat was already preparing something like snowflakes, an almost fully CSS3 featured snow FX created for clearleft, specially suited for Chrome and Safari.
And what about @zacharyjohnson? He put snow all over the network via its Winternetizer, the first snow proxy I have ever seen.
Am I missing anybody? ... sure, me!
Above FX is dedicated to all Ajaxian readers and created via some CSS3 rule handled via JavaScript for a partial cross browser implementation. WebKit based browsers, included Android and iPhone, plus Firefox 3.6, should render properly, while the most interesting thing, snow a part, is that for the first time rather than browser sniffing, I have implemented a sort of "screen resolution to power computation" sniff:
Probably not perfect, the aim is to avoid same number of flakes in mobile devices, netbooks, or desktop PCs.
I guess one day we'll have exposed CPU model and RAM amount as read only userAgent properties, so that all new effects could avoid stress for web surfers.
Something like System namespace in ActionScript, with capabilities for audio and video and extra info about the current navigator ... maybe just an AS to JS bridge 'till that day? We'll see, today the important thing is simply one: Have Fun!
John Gruber has spotted a library for iPhone web apps, from none other than Apple. This mysterious library, called PastryKit, seems to have flown under the radar as a Google search reveals precious little on it. In similar vein to other efforts, Apple's library provides support for native-feel websites - websites that run in Mobile Safari, but feel like native apps. (That's the objective anyway; some look-and-feel emulators are "good enough", while others get stuck in the uncanny valley).
Now with the same site in regular Safari (on your Mac/PC), open up the Develop Menu (if it's not there, enable it in Preference|Advanced). Choose User Agent > Mobile Safari 3.0 (or probably any other version number). And now you can see it in your browser. From Develop Menu, Web Inspector will let you view the script.
PastryKit accomplishes all three of the aforementioned things — hiding the MobileSafari address bar, providing fixed-position toolbars, and providing scrolling with momentum — by disabling regular scrolling and setting up its own view hierarchy and implementing its own scrolling.
The whole question of native iPhone apps was a hot topic last month after PPK whipped up a storm on the question of web apps replacing iPhone apps. The really interesting thing here is Apple's stance. They launched the iPhone with web intended to be the platform for 3rd party apps, then switched over to native apps and haven't done much to facilitate native-style web apps since then. Is a change coming? As Gruber puts it:
The $64,000 question, though, is whether PastryKit is something Apple intends (or that a team within Apple hopes) to ship publicly. It seems like a lot of effort to build a framework this rich just for this iPhone User Guide, so I’m hopeful the answer is yes. Perhaps something integrated with the next major release of Dashcode? And, perhaps with integrated UI layout tools, along the lines of Interface Builder?
PhoneGap API’s available to Palm devices include geolocation, accelerometer, notification, orientation, sms, telephony, network, file (read only), and a limited selection of device properties (see the PhoneGap Mobile Spec running on the Palm Emulator to the left).
Essentially a JavaScript shim that maps to the various mobile APIs, the PhoneGap API & suite of tools makes it much easier to build mobile apps for the iPhone, Google Android and various versions of Blackberry by leveraging standard web-based technologies. You can now add Palm to the list of mobile devices being supported by the PhoneGap project.
Simon Willison snuck in a last-minute topic change, and is now going to give the server-side Javascript talk.
The news of the past 24 hours is ChromeOS. For the first time in years, someone's re-thinking how an OS should work. With Chrome, you turn on your computer and you're in the browser. What's really interesting is to contrast it to the introduction of the iPhone, where Apple's apps used native APIs while they expected developers to write web apps running in the browser with limited abilities. Here, Google's apps are using the same web platform...it's a level playing field.
Javascript combined with JSONP makes it real easy to write quick and dirty apps. An example of a quick app is Tweetersation Simon wrote with Natalie Downe. Simple app, 200 lines, written in an afternoon. At a larger system level, there's Google Moderator, which is essentially a pure-Javascript solution with a no-op in the noscript tag.
These pure Javascript apps are great for experimenting and prototyping. The problem with this style of development, though, is you're completely breaking web standards. The web Simon "felll in love with" is one where you point to a URL and you get content coming back.
With server-side Javascript, we can get the benefits of the things we like about Javascript, but without throwing away with the things we like about the web. Simon has been playing with node.js, and evidently the results were important enough to throw out the old talk and make this new one.
Take a step back and look at the interaction patterns with a web server. The conventional model is straightforward request-response, where the server tries to respond and disconnect as quickly as possible. But ... there's also the event loop model. As in Comet; it's generally considered to be more efficient, so why do web developers avoid it? Simon says traditional server-side languages aren't designed to deal with event-driven programming. It's more like "do A, do B, do C, exit". Javascript, on the other hand, is well suited to do callback-driven event programming.
Brave Simon now proceeds to live code with node.js. He shows a "Hello World" daemon, where the code looks like Ajax in reverse, and runs extremely fast. But where it gets really interesting - and useful - is with Comet. Another demo. The code is tiny and the benchmark looks good.
Simon's built his own framework on top of node.js: Djangode takes the best features from Django and sticks them on the server.
The more interesting example is Comet, which he's demo'd here.
Moving on to persistence, there's the NOSQL trend of the past 18 months, and he shows how simple it is to write CouchDB queries from node. It's easy to talk to CouchDB from Node.js apps. Redis is another interesting database, which could lead to pages being rendered very quickly, given its performance benchmarks.
Posted by Michael Mahemoff at 12:41 pm Comments Off
PPK talks up the excitement of mobile web development, then brings the mood down a notch by listing the overwhelming array of browsers to be targeted! Quirksmode says it all. This talk is about quirks in mobile development, and some of the solutions out there.
Mobile CSS Quirks
So many platforms. Take just WebKit; there's iPhone Safari, Android WebKit, Bolt, Iris, different versions, etc. "If someone says my 'app should work in WebKit', laugh in their face. There are just too many versions of WebKit, so as PPK says it, there really is no "WebKit for mobile".
That said, it's good that things are starting to converge towards WebKit. As for the others: Blackberry browser "is dead" as they'll be switching to WebKit; Mozilla is very late to the game; NetFront "is not very good". Windows Mobile 6.5 is a big improvement on 6.1, and with an improved browser, but it's still IE6 based. ('Nuff said.)
There's also a large legacy share, and if users are used to it already, that may be what they want to keep using.
Landscape versus profile mode is an interesting one for those of us desktop developers whose users don't flip their heads around on a regular basis. NetFront has some very surprising and idiosyncratic ways of dealing with it.
The modes don't stop there. There is also mobile versus desktop mode in some browsers; sometimes users can switch these in some obscure corner of their mobile browser preferences. Again, some surprising things happen in Opera and Android. Perhaps of more concern is the difficulty he had diagnosing the situation at first, when Android was showing three divs of the same width in one mode, and not in the other.
@media to the Rescue
Okay, what can we do about all this? Media queries are extremely useful and fairly well supported in modern mobile browsers.
max-width and min-width have subtle issues which PPK is currently researching, but max-device-width and min-device-width give more reliable results. orientation, aspect-ratio, and dpi (also needs research).
Mobile Javascript
Performance-wise, IE Mobile and Blackberry extremely slow. iPhone is middle ground. The really fast browsers are Opera on Samsung and N97, and S60 on Nokia E71 and N97. The bottom line is take your time with mobile Javascript development; you generally can't expect it to "just work"; you'll have to optimise. Also, don't use iframes - they're major performance hogs.
Mobile Connections
Tempting fate, PPK informs us that if someone in the room starts downloading movies, the network gets slower for the rest of us.
Fortunately, browsers give us events to determine when user is going online and offline. Unfortunately, they're doing it wrong. Only Firefox automatically detects offline; all the others require the user to explicitly say "I'm offline now"!
W3C Widgets
In general mobile development, best practice is to put all the core files on the moble phone, and only download the data. But how can we do that with web apps, where the code comes down with the data? W3C widgets offer a solution. You just create a single HTML page with the CSS, Javascript, and images you need; add an icon and config; zip it up; and deploy. PPK reports it works in practice, and works in a "write once, run many" fashion. There are still problems to be sure, but he says it's the best interoperable solution we have today. But still many outstanding platforms: Blackberry (already talking about it), Nokia Maemo, Palm Pre, Android, and of course, iPhone.
Device APIs
Security risks mean critical device APIs will generally remain off limits to general websites for a while. Widgets have a better model, because they're more self-contained and can be verified, although not perfect either.
Posted by Michael Mahemoff at 7:58 am Comment here
What if we could agree on a simple backwards compatible approach to packaging Web resources so the browser could suck down the puppies in one go?
Alexander Limi (of Plone and Firefox UX fame) has been thinking about this for awhile, and has gotten his latest proposal out there which defines a simple way to package things.
It builds on existing tech: zip, manifests, and the like.... and degrades nicely.
This is so much nicer than spriting hacks, but does have its own issues:
In theory the browser could sometimes render faster by grabbing items in parallel
Mobile caches may be messed up (as larger than a cache size, like say iPhone's 256k)
What if the zip gets out of date with the other resources?
Ideally tools (and in fact even web server modules) would auto generate this stuff
Although not perfect, for the majority case this could be a real boon to performance. What do you say Steve?
Oh, and it sounds like Firefox will implement this in 3.7!
A lot of great news is coming in via Twitter. I make a lot of Ajax comments under @dalmaer and wanted to give you a roundup on the month of October via Tweets. Always interesting to take a glance at the month. What do you think?
Dave Shea's elevation is cool indeed "A free, open source route visualizer that renders GPS data in 3D space" 1:50 PM Oct 28th
iBeans is a cool new project that helps you with integration to the backend from MuleSoft 10:29 AM Oct 28th
RT @tolmasky: the web requires a constant 20% commitment from your CPU to do absolutely nothing with Flash. Im COMPILING and Flash tops it11:05 PM Oct 27th
RT @jdalton: Prototype+NWMatcher and P+Sizzle ops/sec benchmarks and updated the match() benchmarks 11:10 PM Oct 24th
The Web offers incredible diversity in many areas, so kinda strange that JS is the only viable language on the client, even though it morphs 2:45 PM Oct 24th
RT @dberlind: Sir Tim Berners-Lee @ #w2s: W3C things to pay attention to: Web apps, mobile web, SVG, HTML (now at 5) 5:50 PM Oct 22nd
Wave and Raindrop may have a similar front cover, but the story is sooo different. Squint past "messaging" and see the massive differences. 5:16 PM Oct 22nd
Raindrop announced; Hacking your email again; Getting personal: I am really jazzed to see the work of the Mozilla M... 3:48 PM Oct 22nd
RT @davidascher: Pleased to announce the launch of Raindrop -- our experiment for messaging on the Open Web: labs.mozilla.com/raindrop 1:46 PM Oct 22nd
Addy Osmani has posted on using YUI SWFStore as a storage solution a la Dojo Storage 12:52 PM Oct 22nd
RT @glazou: "in 1997 I wrote this and 12 years later, the #whatwg discovers the power of link dereferencing :-) #w3c" 12:19 PM Oct 22nd
RT @WebReflection: ...and we wonder why Microsoft does not want canvas into HTML5, uh? 90% of Silverlight almost everywhere in microsoft.com 12:00 PM Oct 22nd
RT @WebReflection: Dean Edwards always ends up with ultra useful snippets: IE color value to hex 11:22 AM Oct 22nd
RT @jobsworth: Pichai: Most operating systems of today were designed before the web existed; most of the time we use OS we use for web. #w2s9:24 AM Oct 22nd
Alexander Kirk is doing fun work with Colorillo, the collaborative drawing app using Canvas 8:58 AM Oct 22nd
RT @Pre101: "I just opened up http://webos101.com as a resource for webOS development." 2:56 PM Oct 18th
“I really need to build a plugin system for #PhoneGap. I just successfully created support for adding native toolbars / buttons!” -@NachoMan 3:17 PM Oct 17th
It will be fun to have a naming scheme for lists (already seeing them e.g. @company/team) & then being able 2 ask @dalmaer;@bgalbs/jsgurus 9:11 PM Oct 15th
Daniel Bogan rules for taking Ben's Web Directions talk and doing this! 8:41 PM Oct 15th
Fun to be setting up some public lists. jsgurus and ajaxians Who am I missing? 8:30 PM Oct 15th
RT @webos_school: Acceleroto, Nice post about developing for webOS. We've also taken a look at your App. Great work. 8:01 PM Oct 15th
RT @edwk: Firefox 3.6b1 launches so much faster! Good work Mozilla team! 8:01 PM Oct 15th
“Titanium's addition of an embedded PHP interpreter is gonna be big, I think. Opens up a massive community to desktop app dev.” -@funkatron 12:12 PM Oct 15th
“IntelliJ IDEA Community Edition released! Free and open-source. http://jetbrains.org/ cool!” awesome. If only they did this years back! 11:54 AM Oct 15th
ClickToFlash has an awesome tagline "any crash if probably Flash" http://rentzsch.github.com/...11:58 PM Oct 14th
RT @diveintomark: Damn, I wish this were simpler #html5 #video 10:15 PM Oct 14th
Hamish Friedlander has a nice new jQuery Concrete library for adding functionality to DOM elements w/ a new CSS engine 8:12 PM Oct 14th
That @srobbin is always doing cool shizzle. This time he has jQuery Approach which animates content based on proximity 4:29 PM Oct 14th
RT @thomasfuchs: Awesome slides on Interface Design Basics by @smoofles. Highly rec'd for devs. 11:47 PM Oct 10th
Perlito == MiniPerl6 compiler self-hosted in Javascript, Lisp and in Perl 5. 10:08 PM Oct 10th
RT @nathansmith: Page count for jQuery Cookbook = 468 pages. Looking over a PDF preview. Excited to see it near completion. 10:06 PM Oct 10th
Codepad is interesting in that it lets you collaboratively run code :) Nice work @sahazel look at embedding @bespin! 10:02 PM Oct 10th
Love how Adam Barth answered "When will Chrome 4 be released?" A: "When these bugs are done" instead of "We have not publicly announced.." 8:59 PM Oct 10th
Met the Taptu folks who have a search "machine" that uses how mobile friendly websites are to the scoring algorithm 12:17 PM Oct 9th
RT @BenWard: Google's front page is using CSS animations to fade in the peripheral chrome when you move the mouse. Actually pretty cool. 11:13 PM Oct 6th
I love that the What Browser? site by Google (for dummies?) has a section with terms such as "V8 Benchmark Suite." http://whatbrowser.org/ 10:49 PM Oct 6th
Gilad Bracha discusses the pros and cons of the SmallTalk Image 10:22 PM Oct 6th
I've been afraid of changing / because I've built my app / around SQL Features get bolder / schemas get older / Code's getting older 2 @al3x 3:52 PM Oct 5th
Crazy times: parsing HTML and rendering it using Canvas tag: http://github.com/jamesu/ht... #html5 (via @bradneuberg) 3:17 PM Oct 5th
James Hall has a really nice roundup of cool FF features: full screen video; drag and drop; WebGL; -moz-image-rect 9:42 AM Oct 5th
Kevin Decker keeps kicking arse with Firediff. His latest version offers revert, search, snapshot, and safe diff 11:27 PM Oct 4th
Another HTML builder with(HTML). Firebug has one. mkup is one and this is @cramforce's 10:11 PM Oct 4th
RT @erikdahlstrom: Script-driven demo exploding a playing video, paper describing some of the nice svg demos 2:34 PM Oct 4th
RT @codedread: @danfooo "There's no such thing as the Mobile Web" Fully agree! #svgopen (via @erikdahlstrom) 10:41 AM Oct 4th
Looking forward to seeing the classes flushed out for @webos_school. Let us know if you need anything guys! 8:37 AM Oct 4th
RT @silentlennie "Big 3 <video> improvements: quality (Theora 1.1), seek performance and fullscreen-support. It seems to be maturing nicely"8:34 AM Oct 4th
The best and most important talk I've seen in years. Rich Hickey on Clojure's approach to Identity & State http://is.gd/3SLeI (via @jboner) 1:01 PM Oct 2nd
RT @bradneuberg: "Google urges Web adoption of vector graphics": CNet News: Stephen Shankland: http://tinyurl.com/yexawat #svgweb #svg 12:01 PM Oct 2nd
Steve Faulkner has tested ARIA support in Windows browsers. FF/IE = 44/43 http://www.paciellogroup.co... 12:00 PM Oct 2nd
An Engineer's Guide to Bandwidth, a nice right up by YDN http://bit.ly/9HuNP 11:10 AM Oct 2nd
RT @gruber: Rather than dropping calls, AT&T's new strategy seems to be not ringing your iPhone in the first place when calls come in. 10:23 AM Oct 2nd
RT @kirillcool > @swingrocks Interesting, #JavaOne is listed on the Moscone center website! http://j.mp/10y7nh OracleOne is here! :) 9:44 AM Oct 2nd
Joonas Lehtinen has created GWT Graphics, an open source wrapper on SVG and VML http://bit.ly/123rFA 9:36 AM Oct 2nd
Weave is way faster and reliable now. The team has been cranking the last few months! http://bit.ly/HklpC 11:13 PM Oct 1st
"processing.js is already amazing. Imagine if we took 8 students, finished it & added 3D support from C3DL?" http://vocamus.net/dave/?p=771 11:07 PM Oct 1st
David Humphrey shows Cathy Leung's Motionview 3D web goodness http://vocamus.net/dave/?p=771 and ... 11:06 PM Oct 1st
Nice! The @cloudera folks have created a MooTools based rich web app view for Hadoop: Cloudera Desktop http://bit.ly/3938cT 11:00 PM Oct 1st
RT @mozhacks new guest post by @humphd: WebGL in the wild: http://bit.ly/10KH4V 10:34 PM Oct 1st
Just when I get excited about the Web as an app platform.... I use Google Docs :/ 9:45 PM Oct 1st
Tamura Jones goes into detail on various ways to detect and utilize Chrome Frame, e.g., how to turn it on for all pages http://bit.ly/xjTv2 8:01 PM Oct 1st
RT @bradneuberg > @sil That's like putting the HTML 4.1 DOCTYPE onto an HTML 2 document & calling it HTML 4.1. Technically but actually no:) 2:44 PM Oct 1st
Got to see dynaTrace as well as @souders. Some nice work coming there. http://bit.ly/1IgdPD 2:40 PM Oct 1st
RT @kriszyp > @WebReflection Persevere truly preserves the JS paradigm all the way down where CouchDB fails to: dates, circ refs, functions 9:56 PM Sep 28th
Mojo SDK 1.2 has followed up after webOS 1.2. New tools (e.g. palm-log), new APIs (e.g. Download Manager API), and more 3:15 PM Sep 28th
Dean Edwards: "I'm currently writing a JavaScript implementation of the <video> element." Ahhhhh yeah :) Good news for us ;) 1:43 PM Sep 28th
The following is a guest post. If you have something to say to the Ajaxian community, please feel free to either link us to your work, or give us a guest posting that goes into detail! Contact us.
My name is Jerod Venema, and I'm excited to write to you about our new Comet server for the Microsoft stack - WebSync. It is written in 100% managed C#, and uses IIS to reach incredibly high user concurrency. Despite being written in C#, we've made it easy to integrate other languages as well by pre-building client libraries and allowing generic HTTP requests to send messages.
There are many challenges in getting a Comet server to operate efficiently in any language, and the .NET environment delivers its own set of unique challenges. One of the biggest challenges we faced was how to make IIS "play nice" when scaling to tens of thousands of concurrent HTTP connections and message transactions. A great deal of time was spent minimizing the memory footprint (even to the point of lazy object construction), optimizing libraries, and digging through pages of profiler results. Multi-threading reared its ugly (but powerful) head on more than one occasion as we sought to take maximum advantage of multiple CPU cores while keeping locking and concurrency issues to a minimum. We even ended up writing a new lock-free data structure similar to a linked queue that allows us to perform multiple-writer add/remove operations - very helpful when dealing with large lists of clients and messages. Once all was said and done, we tested on a $500 Acer desktop and saw over 30,000 concurrent users and 25,000 messages per second. (We were pretty pumped when we saw some of those numbers coming through!)
Once we were satisfied with the server's performance, we set our sights on a JavaScript client. We had originally been using the Dojo Toolkit, but the overhead was more than what we wanted (it rang in at about 90k after compression, but before gzipping), so we wrote our own library that, when compressed and gzipped, comes across the wire at about 8k total (just over 15k before gzipping). We also ran into a slew of cross-browser issues (of course), in particular when dealing with long-lived HTTP connections. A bit of effort, though, and we can now claim the client to be fully compatible with over a dozen browsers, from IE5.5 all the way to the iPhone and Android browsers. Being fans of open-source technology (even in a Microsoft world), we decided to use the Bayeux transport protocol rather than develop our own, so any Bayeux-compliant client can link in to the server.
We also spent some time on making it easy to integrate into non-browser applications. One of the really neat features is the ability to publish data via a simple GET/POST request, so it can integrate into any application that can make a web request, regardless of the language. If you're writing in PHP or .NET, we've made life even easier by writing publishers that wrap up the creation and invocation of the web request into single method calls.
Oh, and we've got a hosted version too (WebSync On-Demand), so people with smaller sites who don't want the cost of hosting their own Comet server can still get all the benefits of a full Comet solution. For the On-Demand solution we've also implemented request proxing, which allows developers to direct the low-impact publish and subscribe requests to their server first, so they can pre-process any incoming messages (to add authentication, save messages to a database, etc). And again, for PHP or .NET users, it's a one-liner to implement.
Anyway, it's a pretty neat product, easy to get started with, and as I said, we're pretty excited and proud of it, so check it out including demos or tutorials and let us know what you think!
scripty2 supports multiple API vendors for Multitouch events, and even provides a desktop emulation (click+drag to pan, shift+click+drag to scale and rotate)– so you can try this out even without having multitouch hardware at your disposal.
Currently the scripty2 API abstraction event supports Desktop emulation, Nokia Starlight and Apple iPhone Mobile Safari. With just one API, you can now multi-touch enable any web application easily, just check out the demos.
In a recent update to scripty2, I’ve also introduced automatic support for WebKit CSS transitions, so whenever scripty2 effects are used and CSS transitions are available, the effects engine will automatically do the right thing for you.
All in all, using this in your web sites or apps boils down to just a couple of lines of code:
I recently ran across a site that made my jaw drop when I realized it's completely made with HTML5, CSS, and SVG. It's the site for the GNU Emacs for Mac OS X release:
Who ever knew GNU Emacs could look so sexy? When I think of GNU Emacs I generally imagine Richard Stallman's beard rather than the fancy site shown above.
Wow, I've got to get that image out of my head :) Moving on.
Here is what is cool about this site: it's completely using open web technologies to put things together. That's not just a big image you're seeing on the site.
Let's crack this thing open with a View Source tutorial and see what makes it tick so you can apply similar techniques in your own work. View Source is a new series of tutorials where we look at open web technology 'in the wild' and break them down step by step so you can learn what they are doing.
Many browsers have been experimenting with new custom CSS properties lately. Keeping track (and learning how to use them) can be a bit of a challenge.
Via WidgetPad comes a nifty CSS 3 Generator that helps you understand the new CSS 3 features in Webkit with an interactive tool that will build up and show how each new property affects an element. Here, for example, we see the results of applying rounded corners, box shadows, reflections, and a transform to an element:
The CSS 3 Generator works on any webkit based browser, including Safari, the iPhone, and Chrome.
Here's a challenge to the community: can you create an enhanced version of this that works with all the new CSS 3 and vendor-specific properties, including on IE and Firefox, hiding the options that don't work on specific browsers? That would turn this into a more general purpose educational and testing tool that would be very valuable. Even better if you open source it and we can host it on the Open Web Developer Network we've been kicking around. Drop me a line if you create such a thing :)
As a side note, I had never seen the WidgetPad website where this is hosted before this which looks quite interesting. From the site:
[WidgetPad is a] collaborative development environment for developers to develop fully-interactive, stand-alone, downloadable SmartPhone applications in HTML5, CSS3 and Javascript. You don't need to install any special development tools or learn any platform-specific API sets. WidgetPad offers everything you need -- project management, source code editing, debugging, collaboration, versioning and even distribution -- in your own browser!
Inspired by its conceptual simplicity, Andrea Giammarchi ( cough, the newest Ajaxian, cough ) has revisited an old ActionScript 1.0 Image effect making it lightweight, 1.2Kb minified and gzipped, and portable, thanks to its cross-browser nature and zero libraries dependencies. Last but not least, it's 100% JavaScript, and without canvas.
The theory is simple: expanding a div with an image as background, and moving a stretched image in the opposite direction, it is possible to adjust some pixel in order to find a match point between the last part of the expanded background and the moved image.
The practice is even more simple: a Liquid function call with a configuration object.
Being this effect based on just 2 DOM nodes, even mobile devices such Android and iPhone can show it with a reasonable rendering time.
Here you can find the source code while to give it a try you have Demo 1, with Firefox logo, and Demo 2 , with VAIO one, thanks to its smooth lines specially suited for this effect.
Bikin Chiu of the Gmail Mobile team picks up the HTML5 series with a piece on reducing startup latency.
It starts off by talking about lazily loading code via the old favorites of adding a <script> to the DOM, or XHR+eval, but then it gets beyond the typical and discusses the nuance of mobile + offline caching. The hack that is used, is another oldie.... which is to hide the script and eval it later:
For an HTML 5 application that takes advantage of the application cache to reduce startup latency and to serve the application offline, there are a few caveats one should be aware of. Mobile networks have decent bandwidth, but poor round trip latency, so listing each module as a separate resource in the manifest incurs quite a bit of extra startup latency when the application cache is empty. Also, if one of the module resources fails to be downloaded by the application cache (e.g. disconnected from network), additional error handling code needs to be written to handle such a case. Finally, applications today have no control when the application cache decides to download the resources in the manifest (such a feature is not defined in the current specification of the draft standard). Typically, resources are downloaded once the main page is loaded, but that's not an ideal time since that's when the application requests user data.
To work-around these caveats, we found a trick that allows you to bundle all of your modules into a single resource without having to parse any of the JavaScript. Of course, with this strategy, there is greater latency with the initial download of the single resource (since it has all your JavaScript modules), but once the resource is stored in the browser's application cache, this issue becomes much less of a factor.
To combine all modules into a single resource, we wrote each module into a separate script tag and hid the code inside a comment block (/* */). When the resource first loads, none of the code is parsed since it is commented out. To load a module, find the DOM element for the corresponding script tag, strip out the comment block, and eval() the code. If the web app supports XHTML, this trick is even more elegant as the modules can be hidden inside a CDATA tag instead of a script tag. An added bonus is the ability to lazy load your modules synchronously since there's no longer a need to fetch the modules asynchronously over the network.
On an iPhone 2.2 device, 200k of JavaScript held within a block comment adds 240ms during page load, whereas 200k of JavaScript that is parsed during page load added 2600 ms. That's more than a 10x reduction in startup latency by eliminating 200k of unneeded JavaScript during page load! Take a look at the code sample below to see how this is done.
var lazyElement = document.getElementById('lazy');
var lazyElementBody = lazyElement.innerHTML;
var jsCode = stripOutCommentBlock(lazyElementBody);
eval(jsCode);
}
</script>
In the future, we hope that the HTML5 standard will allow more control over when the application cache should download resources in the manifest, since using comments to pass along code is not elegant but worked nicely for us.