No Stacks in RW9! Stacks5.App is coming!

“WebView” (a generic name, but that’s the name it has) is already deprecated. It has been for several years. The replacement on macOS is WKWebView.

WebKit, the framework, is not deprecated.

WKWebView is a much more secure browser view. And since security is one of Apple’s top-line features these days, they want to strongly encourage developers to go to WKWebView.

Unfortunately, like many of Apple’s security technologies, they’ve made things more secure simply be removing access to many things.

Stacks has used WebView (the old one) for the edit-mode user interface since Stacks v1.0. We make use of a barely documented and often overlooked C-based API to the DOM. In English it means that there’s a super-fast, low-level way to communicate with web pages.

The security implications of this are nearly moot as Stacks Edit-Mode doesn’t support Javascript or even linking.

That said, I was among the first to get excited about WKWebView – and to try it out. Unfortunately in WKWebView there is no way to interact with the DOM (the document object model – the web page renderer) except through Javascript. Enabling Javascript really does affect security. I requested (I’m sure with a great many others) of a way to interact without JS – and WKWebView did deliver a feature. I can now enable JS just for my stuff – but keep JS off for the content being displayed. However JS is still almost 100x slower – yes TWO ORDERS OF MAGNITUDE slower – than the old C-based API.

I’ve since found some more direct ways to pipe in data in large chunks (Web Sockets are pretty amazing), and better ways to implement the JS updates (fewer updates, bigger chunks). This nearly closed the gap. Nearly, but not quite.

But there’s no getting around the speed differential. Even with months of work and careful optimization, it’s still substantially slower than the old way.

For this reason I hold on to these updates and wait patiently until the 3rd or 4th day of WWDC in June of each year, when new WebKit details are released. Then I chat with Brady Eidson on twitter, a friendly WebKit developer, to see if the old WebKit will be included for another year.

While the old way is faster and available I will continue to use it. When it becomes unavailable I’ll be ready with the necessary change well before macOS ships, months later in the fall.

I’m not sure if Apple will remove it soon. As always, I hope for the best and prepare for the worst. :-)

Of course, I’ve told RealMac this all this when they asked – even just recently. I doubt they’ve forgotten. I’m not sure why they’ve chosen to include this. I guess FUD (Fear, Uncertainty, and Doubt) is just an easy way to make people worry. I hope you folks are smarter than all that.

:-)

10 Likes