4

I wanted to know the technology decision behind the iOS Google app.

As we can see, in the app's Google Now feature it renders many different card templates for different scenarios, and those templates seems to be very flexible based on server inputs.

I was wondering if this is implemented all based on HTML5? or they just have many templates built in and render them locally? I'd vote for the HTML5 route but not sure if this still involved some native code to make it more responsive?

Thanks!

enter image description here

Allan Jiang
  • 11,063
  • 27
  • 104
  • 165

2 Answers2

2

As we (well, most of the community) are not Google employees we can't tell you what they really did, but I'd say that it is possible to do this dynamically in the app.

We did develop something similar that responds to definitions sent by the server and transforms them to custom designed forms following basic rules.

Google reuses the design of those cards for different plattforms, the easiest solution should be showing some WebView and using HTML5.

Kevin Griesbach
  • 668
  • 7
  • 19
2

I agree with Kevin, as this answer is entirely based on personal opinion, too.

The way I would go is to create a card class which will load some JSON data and format it with HTML and CSS. Looking at each card it would be hell to format things that way natively. I mean, attributed strings is not the way to go. Too much logic for deciding which card get a bigger text or a picture.

Additionally, the top header is most likely "localized" as well, so you get the location and load a localized image. But that is Google by nature.

carlodurso
  • 2,886
  • 4
  • 24
  • 37