Programming

At Google I/O last week, I was hoping to hear Google’s thoughts on responsive images. Every developer I speak to wonders how to send the right image size to browsers, Google is obsessed with performance, Peter Beverloo and Paul Kin...
At Google I/O last week, I was hoping to hear Google’s thoughts on responsive images. Every developer I speak to wonders how to send the right image size to browsers, Google is obsessed with performance, Peter Beverloo and Paul Kinlan were explicit in their talk Mobile HTML: The Future of Your Sites that web sites should request the correctly-sized images. But how? The element seems to be at an impasse; no-one from Google showed any enthusiasm (nor does any other browser vendor, seemingly). That’s OK; when I dreamed it up 18 months ago it was a strawman to get the conversation going in standards groups (I’d previously been told that there was no need for any standard, as everyone would have huge devices on reliable, fast wifi in the future). We have the srcset attribute, with its wildly unintutive syntax, “ready for first implementation”, so supported nowhere yet. It also doesn’t satisfy the art direction use case. Google has proposed a Client Hints header with device resolution, viewport size, touch-enabled flag etc. The idea is that the server generates lots of different sizes of foo.png, and when a request comes for foo.png, the server looks at the Client Hints and sends the most appropriate size. Opera (and soon, Chrome) announces that it accepts webP images, so the server could intercept requests for foo.png and send foo.webp in its place for conforming browsers, thereby reducing bandwidth. This server-side negotiation will be great for legacy pages as it means source code doesn’t need to be touched. I’ve heard it also touted as being much simpler to author, but I wonder about that; HTML isn’t hard to write, while implementing server-side image resizing and transcoding, intercepting headers, doing the negotiation and setting cache control is much harder for an HTML wrangler than writing HTML is. It also assumes everyone has full access to the server. Don’t forget that some uses of HTML (for example, ebooks) have no server. But those are all for the future. What can you do now? There are a couple of nasty hacks. Firstly, have with a dummy source, then replace the src with JavaScript once you know the dimensions and resolution of your device. This makes images dependent on JavaScript. Alternatively, make your images into single-frame s, and take advantage of media queries on the child element to send differently sized images. Ian Devlin dreamed this up, and it’s evil genius – except that file sizes increase and doesn’t have an alt attribute, so the “images” are therefore inaccessible. A similarly inaccessible technique for webkit browsers is simply to use a element instead of and set an image-set background-image in CSS. Don’t do this; it’s inaccessible, and is single-engine. A brilliant albeit somewhat hacky idea is Estelle Weyl‘s clown car technique. This pulls in a SVG image that embeds images encoded as data URLs, each surrounded by media queries. This has the advantage of removing presentational breakpoint information out of the HTML. The downside to this is that you need to encode images (to reduce http requests), so changing an image isn’t as simple as replacing it on the server, and there isn’t anywhere to hang alternate text. Right-clicking to “save as” doesn’t behave as expected. So that’s the interim report. Inaccessible and/ or single-engine, or JavaScript-dependant, or relying on server-side shenanigans. Images are central to the web; we need a declarative HTML method to achieve them in our multi-device world. I’ve done my part in suggesting a strawman, and although cleverer minds than mine tell me it’s a bad solution, in a year and a half no-one has told me what a good one looks like. Fingers crossed.
8 minutes ago
2013/05/22 -- Brian Tarbox
2013/05/22 -- Brian Tarbox
17 minutes ago
Web architecture separates structured content (markup), presentation (style), and behavior (JavaScript). As recently as a decade ago, many developers worked in all three, but the years since Ajax arrived have brought more specialization....
Web architecture separates structured content (markup), presentation (style), and behavior (JavaScript). As recently as a decade ago, many developers worked in all three, but the years since Ajax arrived have brought more specialization. The rise of JavaScript in particular has …
21 minutes ago
The new version of JBoss EAP 6.1 was released yesterday at 05/20/2013 10:08 and it includes lots of bug fixes and some new features.
The new version of JBoss EAP 6.1 was released yesterday at 05/20/2013 10:08 and it includes lots of bug fixes and some new features.
24 minutes ago
PHP
PHP Google Translate String Package: PHP Google Translate String Summary: Translate words using Google Translate Groups: Localization, PHP 5, Web services Author: Izdrail Description: This class can translate words using Google Tran...
PHP Google Translate String Package: PHP Google Translate String Summary: Translate words using Google Translate Groups: Localization, PHP 5, Web services Author: Izdrail Description: This class can translate words using Google Translate... Read more at http://www.phpclasses.org/package/8072-PHP-Translate-words-using-Google-Translate.html PHP CouchDB Product CRUD Package: PHP CouchDB Product CRUD Summary: Manage products stored in a CouchDB database Groups: Databases, E-Commerce, PHP 5 Author: Muhammad Mengrani Description: This package provides a Web interface to manage products stored in a CouchDB database... Read more at http://www.phpclasses.org/package/8050-PHP-Manage-products-stored-in-a-CouchDB-database.html Redstart Templating Package: Redstart Templating Summary: Template engine that supports template inheritance Groups: Templates Author: PHPBeat Description: This package implements a template engine that supports template inheritance... Read more at http://www.phpclasses.org/package/8063-PHP-Template-engine-that-supports-template-inheritance.html PHP Time Difference Package: PHP Time Difference Summary: Compute the time between two dates Groups: HTML, Time and Date Author: Andrzej Krokos Description: This class can compute the time between two dates... Read more at http://www.phpclasses.org/package/8059-PHP-Compute-the-time-between-two-dates.html Pict CAPTCHA Package: Pict CAPTCHA Summary: CAPTCHA validation making the user select pictures Groups: Graphics, PHP 5, Security, Validation Author: Patricio Cardó Description: This class implements CAPTCHA validation making the user select pictures... Read more at http://www.phpclasses.org/package/8057-PHP-CAPTCHA-validation-making-the-user-select-pictures.html PHP JSONP Response Package: PHP JSONP Response Summary: Encode and generate a response to JSONP request Groups: AJAX, PHP 5, Web services Author: Radovan Janjic Description: This class can encode and generate a response to JSONP request... Read more at http://www.phpclasses.org/package/8060-PHP-Encode-and-generate-a-response-to-JSONP-request.html Simple PHP Domain Whois Class Package: Simple PHP Domain Whois Class Summary: Check if a given domain exists using whois Groups: Networking, PHP 5 Author: Reza Moghaddam Description: This class can check if a given domain exists using whois... Read more at http://www.phpclasses.org/package/8066-PHP-Check-if-a-given-domain-exists-using-whois.html Simple PHP Combat System Package: Simple PHP Combat System Summary: Simulate a combat with attacker and defender army Groups: Artificial intelligence, Games, PHP 5 Author: Hossam Suliman Description: This class can simulate a combat between attacker and defender troops... Read more at http://www.phpclasses.org/package/8056-PHP-Simulate-a-combat-with-attacker-and-defender-army.html PHP OLX Classifieds Scraper Package: PHP OLX Classifieds Scraper Summary: Extract data of classifieds published in OLX sites Groups: PHP 5, Web services Author: Rizwan Abbas Description: This class can extract data of classifieds published in OLX sites... Read more at http://www.phpclasses.org/package/8065-PHP-Extract-data-of-classifieds-published-in-OLX-sites.html PHP Free GeoIP Location Package: PHP Free GeoIP Location Summary: Get the geographic location of a IP with FreeGeoIP Groups: Geography, PHP 5, Web services Author: Frederik Yssing Description: This class can get the geographic location of a IP address with FreeGeoIP... Read more at http://www.phpclasses.org/package/8052-PHP-Get-the-geographic-location-of-a-IP-with-FreeGeoIP.html
25 minutes ago
Microsoft's Xbox One unveil was concentrated on the hardware, entertainment, and gaming, but a controversial aspect to the new console — a rumored always-online requirement — has been left floating amid a sea of confusion. M...
Microsoft's Xbox One unveil was concentrated on the hardware, entertainment, and gaming, but a controversial aspect to the new console — a rumored always-online requirement — has been left floating amid a sea of confusion. Microsoft sparked the hubbub with a vague answer on its Q&A section for the Xbox One. "No, it does not have to be always connected, but Xbox One does require a connection to the Internet," reads a statement related to "always on" internet connection requirements. Microsoft had a chance to explain this fully to avoid further confusion, but it blew it. Backtracking over always-online time period requirement The statement, while accurate, isn't forthcoming with the information that gamers want to know. How long can... Continue reading…
28 minutes ago
Nokia’s Big Data Ecosystem: Hadoop, Teradata, Oracle, MySQL: Nokia’s big data ecosystem consists of a centralized, petabyte-scale Hadoop cluster that is interconnected with a 100-TB Teradata enterprise data warehouse (EDW), numerous ...
Nokia’s Big Data Ecosystem: Hadoop, Teradata, Oracle, MySQL: Nokia’s big data ecosystem consists of a centralized, petabyte-scale Hadoop cluster that is interconnected with a 100-TB Teradata enterprise data warehouse (EDW), numerous Oracle and MySQL data marts, and visualization technologies that allow Nokia’s 60,000+ users around the world tap into the massive data store. Multi-structured data is constantly being streamed into Hadoop from the relational systems, and hundreds of thousands of Scribe processes run every day to move data from, for example, servers in Singapore to a Hadoop cluster in the UK. Nokia is also a big user of Apache Sqoop and Apache HBase. In the coming years you’ll hear more often stories—sales pitches—about single unified platforms solving all these problems at once. But platforms that will survive and thrive are those that will accomplish two things: keep the data gates open: in and out. work with different other platform to make this efficiently for users Original title and link: Nokia’s Big Data Ecosystem: Hadoop, Teradata, Oracle, MySQL (NoSQL database©myNoSQL)
29 minutes ago
Did you know you can write applications for Android using Kotlin instead of Java?
Did you know you can write applications for Android using Kotlin instead of Java?
41 minutes ago
Manage and track your Project and App requirements using AppHawk. You could add requirements either in Text and even as Image, Audio and Video files.
Manage and track your Project and App requirements using AppHawk. You could add requirements either in Text and even as Image, Audio and Video files.
41 minutes ago
Often Android apps have to exchange information with a remote server. The easiest way is to use the HTTP protocol as base to transfer information. There are several scenarios where the HTTP protocol is very useful like downloading an ima...
Often Android apps have to exchange information with a remote server. The easiest way is to use the HTTP protocol as base to transfer information. There are several scenarios where the HTTP protocol is very useful like downloading an image from a remote server or uploading some binary data to the server. Android app performs GET or POST request to send data. In this post, we want to analyze how to use HttpURLConnection to communicate with a remote server.
about 1 hour ago