This session was a really cool session that showcased what ember can do and something that was build with ember as opposed to diving into a specific tool or component of the framework. Presented by Jeremy Mack, the talk was about how he used tapas with ember and built a search engine without a server. Jeremy looked at the app store and was annoyed with the silly popup links and the lack of good functionality in the app store.
The first issue he discussed was that there are lots of different data types in the app store. The core model is the iTunes item and an iTunes item has data like price, artwork, name, etc. Everything else inherits from iTunes item.
Jeremy then talked about mixins, which let you encapsulate functionality and reuse them. Mixins are kind of like components (I think) but components focus on the template and what you see whereas mixins focus on properties that can be added to other classes. The app mixin that was created are comprised of things that ALL apps have. These are aspects like screenshots, version, developer, and more. Then there is a genre mixin, and other mixin types. The app uses different mixins depending on if the iTunes item is a song, app, movie, or other option.
Then there is an adapter. The adapter is code that talks to a specific endpoint. In addition, there are then serializers. The serializers turn the adapter stuff into the format that you want it in.
Going back to talking about the iTunes item… it has classifies, polymorphism and sideloading. Classifiers are different properties that we know about. There’s a top charts serializer which uses the ID to transform the top charts data into the correct format. Then there are also relationships which map the parent-child relationships using ember data. It also maps the other data (ie- bringing into the app view information from youtube, rotten tomatoes, etc.). There is a fetcher which is defined in the controller. It takes care of pagination (custom built in this app), uses the identity map to de-duplicate, looks at required params, max results, etc.
Finally, in the templates for the app, there were lots of partials utilized, which is interesting. And as a sidenote, he uses fastclick to optimize the touch response.
Finally, here’s the app! It’s amazing so check it ou: fnd.io
30-Mar-2014 by Allison McMillan Read Time: Approx. 2 minutes