SlideShare a Scribd company logo
1 of 23
Proteus
Android Layout Engine
About us
Kiran Kumar @thekirankumar
Aditya Sharat @adityasharat
We are developers in the Mobile engineering team at flipkart
What we wanted to do
Can we change the color of the “Buy Now” button?
Can we increase the size of the Product Images?
Can we change “Buy Now” to “Book Now” for some products?
Can we add a subtitle below the title?
We wanted to modify the UI of our application without an update.
Sure we can; but next month!
What is Proteus
Proteus is an android library for achieving granular control over the visual
appearance and data persistence over views/widgets displayed in any mobile
app. Meant to be a drop in replacement for android’s LayoutInflater which
allows creating and inflating layouts at runtime unlike the compiled XML
layouts bundled in the APK.
This talk will introduce an in-house framework developed at Flipkart called
"Proteus" and also touches on the how it was built from scratch.
The framework enabled Flipkart to send a layout describing the view hierarchy
from the server, rather than bundling it the traditional way inside the app. This
framework also helped in doing A/B experimentation of the UI components as
well as build native pages on the fly without the need for app updates.
What is Proteus
Why not use XML inflater ?
Remote XMLs are
not supported by
Android’s layout
inflater !
How Android LayoutInflater works
1. AAPT converts raw xml to binary xml
2. Recursively walk through the xml
3. Find the next class to instantiate using Reflection
4. Invoke constructor of the found View class
5. Cache the constructor in-memory
6. Pass the XML attributes to the created View
7. Ask the view to set fields or call methods on itself for
handling these attrs
8. Go to step 2
Capabilities of Proteus
Build Views and compose Layouts.
Runtime Data Bindings and Formatters.
Describe Shapes and Animations.
Custom Views and Attributes can be plugged in.
Styles (like CSS), reusable attributes-values.
Fallbacks and failsafes are built into the library.
Built in data binding support
Ability to separate layout and data, keep layout cached for a longer time
Ability to change the data which updates the view automatically
Java code can only worry about data and forget the layout
Supported Android Widgets and Attributes
And Many More
Supported Drawables and Animations
● detachWallpaper
● duration
● fillAfter
● fillBefore
● fillEnabled
● interpolator
● repeatCount
● repeatMode
● startOffset
● zAdjustment
● shareInterpolator
● children
● fromAlpha
● toAlpha
● fromXScale
● toXScale
● fromYScale
● toYScale
● pivotX
● pivotY
● fromXDelta
● toXDelta
● fromYDelta
● toYDelta
● fromDegrees
● toDegrees
● pivotX
● pivotY
● controlX1
● controlY1
● controlX2
● controlY2
● tension
● extraTension
● cycles
● linearInterpolator
● accelerateInterpolator
● decelerateInterpolator
● accelerateDecelerateInterpolator
● cycleInterpolator
● anticipateInterpolator
● overshootInterpolator
● anticipateOvershootInterpolator
● bounceInterpolator
● pathInterpolator
● Shape Drawables
● Gradient Drawables
● Layer List
● Resource References
Demo
Adding Custom Views?
Easily doable by using Custom View Parsers
Some Numbers
Number of releases avoided: 3
Development effort reduced: ~2 months
Number of A/B tests: 7(completed) 3(running) + (many planned)
Near Native performance
Sample layout render time:
Native: 25.0ms
Proteus: 24.4ms
Lots of adoption time saved.
Infrastructure tools around Proteus
Studio plugin to convert XML
Web editor to edit/manage/test layouts
MVC library to manage behaviour
Server to handle versioned layouts
A/B service for delivering different layouts
Scripting support ??
Not yet
Advantages
Zero adoption time
Update UI in older apps
Brand specific pages / themes
Customizing different AD layouts
Faster build times (local mode)
UI changes can be done by designers
A/B testing of different layouts
Road Map
Improve performance
Better Android Studio integration
Scripting Engine
The Bigger Picture
It’s open source !!
https://github.com/flipkart-incubator/proteus
Looking forward for your contributions
Other Android FOSS by us
Chat heads https://github.com/flipkart-incubator/springy-heads
Batching analytics events https://github.com/flipkart-incubator/batchman
Network stats https://github.com/flipkart-incubator/okhttp-stats
Contact image grouping https://github.com/flipkart-incubator/circular-image
Other proteus like libraries
Json2view https://github.com/Avocarrot/json2view
AndFix https://github.com/alibaba/AndFix
ItsNat Droid https://github.com/jmarranz/itsnat_droid
React native https://facebook.github.io/react-native/

More Related Content

What's hot

Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - IntroductionWebStackAcademy
 
JavaScript - Chapter 7 - Advanced Functions
 JavaScript - Chapter 7 - Advanced Functions JavaScript - Chapter 7 - Advanced Functions
JavaScript - Chapter 7 - Advanced FunctionsWebStackAcademy
 
Android jetpack compose | Declarative UI
Android jetpack compose | Declarative UI Android jetpack compose | Declarative UI
Android jetpack compose | Declarative UI Ajinkya Saswade
 
Introduction To Angular's reactive forms
Introduction To Angular's reactive formsIntroduction To Angular's reactive forms
Introduction To Angular's reactive formsNir Kaufman
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSDavid Parsons
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data BindingDuy Khanh
 
Magnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - ArchitectureMagnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - ArchitecturePhilipp Bärfuss
 
Introduction to rest.li
Introduction to rest.liIntroduction to rest.li
Introduction to rest.liJoe Betz
 
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...Edureka!
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 formsEyal Vardi
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsWebStackAcademy
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js SimplifiedSunil Yadav
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins Udaya Kumar
 

What's hot (20)

Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
 
JavaScript - Chapter 7 - Advanced Functions
 JavaScript - Chapter 7 - Advanced Functions JavaScript - Chapter 7 - Advanced Functions
JavaScript - Chapter 7 - Advanced Functions
 
Android jetpack compose | Declarative UI
Android jetpack compose | Declarative UI Android jetpack compose | Declarative UI
Android jetpack compose | Declarative UI
 
Introduction To Angular's reactive forms
Introduction To Angular's reactive formsIntroduction To Angular's reactive forms
Introduction To Angular's reactive forms
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Java Script ppt
Java Script pptJava Script ppt
Java Script ppt
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 
Servlet life cycle
Servlet life cycleServlet life cycle
Servlet life cycle
 
React js
React jsReact js
React js
 
Magnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - ArchitectureMagnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - Architecture
 
Introduction to rest.li
Introduction to rest.liIntroduction to rest.li
Introduction to rest.li
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
 
Introduction to Redux
Introduction to ReduxIntroduction to Redux
Introduction to Redux
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 forms
 
TypeScript Overview
TypeScript OverviewTypeScript Overview
TypeScript Overview
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - Components
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js Simplified
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins
 

Viewers also liked

How to choose a web framework and be surprised
How to choose a web framework and be surprisedHow to choose a web framework and be surprised
How to choose a web framework and be surprisedJose María Arranz
 
SPI server centric SEO compatible stateless web sites... ALLELUIA!
SPI server centric SEO compatible stateless web sites... ALLELUIA!SPI server centric SEO compatible stateless web sites... ALLELUIA!
SPI server centric SEO compatible stateless web sites... ALLELUIA!Jose María Arranz
 
Mobile Development with Adobe AIR
Mobile Development with Adobe AIRMobile Development with Adobe AIR
Mobile Development with Adobe AIReaselsolutions
 
Shopwise- Your Shopping Assistant
Shopwise- Your Shopping AssistantShopwise- Your Shopping Assistant
Shopwise- Your Shopping AssistantNamita Maheshwari
 
Mobile Shopping Framework Study 2010
Mobile Shopping Framework Study 2010Mobile Shopping Framework Study 2010
Mobile Shopping Framework Study 2010Ashmeed Ali
 
WENET LEBANESE SHOPS - MOBILE APP
WENET LEBANESE SHOPS - MOBILE APP WENET LEBANESE SHOPS - MOBILE APP
WENET LEBANESE SHOPS - MOBILE APP weid1976
 
Mobile shopping app UX guidelines - Shopping User Experience in Australia
Mobile shopping app UX guidelines -  Shopping User Experience in AustraliaMobile shopping app UX guidelines -  Shopping User Experience in Australia
Mobile shopping app UX guidelines - Shopping User Experience in AustraliaObjective Experience
 
MobiShop - Mobile Commerce
MobiShop - Mobile CommerceMobiShop - Mobile Commerce
MobiShop - Mobile CommerceSandeep Mishra
 
Google Mobile App Research Findings Presentation
Google Mobile App Research Findings PresentationGoogle Mobile App Research Findings Presentation
Google Mobile App Research Findings PresentationModicum
 
ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016) ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016) Erica Beavers
 
React Native를 사용한
 초간단 커뮤니티 앱 제작
React Native를 사용한
 초간단 커뮤니티 앱 제작React Native를 사용한
 초간단 커뮤니티 앱 제작
React Native를 사용한
 초간단 커뮤니티 앱 제작Taegon Kim
 
Mobile learning powerpoint
Mobile learning powerpointMobile learning powerpoint
Mobile learning powerpointSylvia Suh
 

Viewers also liked (18)

Proteus MMX Mobile
Proteus MMX MobileProteus MMX Mobile
Proteus MMX Mobile
 
How to choose a web framework and be surprised
How to choose a web framework and be surprisedHow to choose a web framework and be surprised
How to choose a web framework and be surprised
 
SPI server centric SEO compatible stateless web sites... ALLELUIA!
SPI server centric SEO compatible stateless web sites... ALLELUIA!SPI server centric SEO compatible stateless web sites... ALLELUIA!
SPI server centric SEO compatible stateless web sites... ALLELUIA!
 
ShopDeck overview
ShopDeck overviewShopDeck overview
ShopDeck overview
 
Mobile Development with Adobe AIR
Mobile Development with Adobe AIRMobile Development with Adobe AIR
Mobile Development with Adobe AIR
 
Shopwise- Your Shopping Assistant
Shopwise- Your Shopping AssistantShopwise- Your Shopping Assistant
Shopwise- Your Shopping Assistant
 
eLearning and Mobile
eLearning and MobileeLearning and Mobile
eLearning and Mobile
 
Mobile app developers india
Mobile app developers indiaMobile app developers india
Mobile app developers india
 
Mobile Shopping Framework Study 2010
Mobile Shopping Framework Study 2010Mobile Shopping Framework Study 2010
Mobile Shopping Framework Study 2010
 
WENET LEBANESE SHOPS - MOBILE APP
WENET LEBANESE SHOPS - MOBILE APP WENET LEBANESE SHOPS - MOBILE APP
WENET LEBANESE SHOPS - MOBILE APP
 
Mobile shopping app UX guidelines - Shopping User Experience in Australia
Mobile shopping app UX guidelines -  Shopping User Experience in AustraliaMobile shopping app UX guidelines -  Shopping User Experience in Australia
Mobile shopping app UX guidelines - Shopping User Experience in Australia
 
MobiShop - Mobile Commerce
MobiShop - Mobile CommerceMobiShop - Mobile Commerce
MobiShop - Mobile Commerce
 
Google Mobile App Research Findings Presentation
Google Mobile App Research Findings PresentationGoogle Mobile App Research Findings Presentation
Google Mobile App Research Findings Presentation
 
ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016) ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016)
 
Mobile Store
Mobile StoreMobile Store
Mobile Store
 
The Mobile Store
The Mobile Store The Mobile Store
The Mobile Store
 
React Native를 사용한
 초간단 커뮤니티 앱 제작
React Native를 사용한
 초간단 커뮤니티 앱 제작React Native를 사용한
 초간단 커뮤니티 앱 제작
React Native를 사용한
 초간단 커뮤니티 앱 제작
 
Mobile learning powerpoint
Mobile learning powerpointMobile learning powerpoint
Mobile learning powerpoint
 

Similar to Proteus - android layout engine

Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...DicodingEvent
 
Innovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best PracticesInnovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best PracticesSolstice Mobile Argentina
 
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Paris Android User Group
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, DeveloperLinuxmalaysia Malaysia
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksSunil Patil
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworksSunil Patil
 
Frontend APIs powering fast paced product iterations
Frontend APIs powering fast paced product iterationsFrontend APIs powering fast paced product iterations
Frontend APIs powering fast paced product iterationsKarthik Ramgopal
 
How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?Paul Cook
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
Using Automatic Refactoring to Improve Energy Efficiency of Android Apps
Using Automatic Refactoring to Improve Energy Efficiency of Android AppsUsing Automatic Refactoring to Improve Energy Efficiency of Android Apps
Using Automatic Refactoring to Improve Energy Efficiency of Android AppsLuis Cruz
 
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackSunita Singh
 
Top 7 JavaScript Data Grid Libraries
Top 7 JavaScript Data Grid LibrariesTop 7 JavaScript Data Grid Libraries
Top 7 JavaScript Data Grid LibrariesAlbiorix Technology
 
Flutter vs ReactNative
Flutter vs ReactNativeFlutter vs ReactNative
Flutter vs ReactNativeSumit Sahoo
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
Gnizr Architecture (for developers)
Gnizr Architecture (for developers)Gnizr Architecture (for developers)
Gnizr Architecture (for developers)hchen1
 
React and GraphQL at Stripe
React and GraphQL at StripeReact and GraphQL at Stripe
React and GraphQL at StripeSashko Stubailo
 
Foster - Getting started with Angular
Foster - Getting started with AngularFoster - Getting started with Angular
Foster - Getting started with AngularMukundSonaiya1
 
Denver Atlassian Community 5-minute Plugins
Denver Atlassian Community 5-minute PluginsDenver Atlassian Community 5-minute Plugins
Denver Atlassian Community 5-minute Pluginsdenveraug
 

Similar to Proteus - android layout engine (20)

Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
 
Innovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best PracticesInnovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best Practices
 
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
 
React Workshop
React WorkshopReact Workshop
React Workshop
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, Developer
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
Frontend APIs powering fast paced product iterations
Frontend APIs powering fast paced product iterationsFrontend APIs powering fast paced product iterations
Frontend APIs powering fast paced product iterations
 
Krishnagopal Thogiti_Java
Krishnagopal Thogiti_JavaKrishnagopal Thogiti_Java
Krishnagopal Thogiti_Java
 
How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?How Android Architecture Components can Help You Improve Your App’s Design?
How Android Architecture Components can Help You Improve Your App’s Design?
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Using Automatic Refactoring to Improve Energy Efficiency of Android Apps
Using Automatic Refactoring to Improve Energy Efficiency of Android AppsUsing Automatic Refactoring to Improve Energy Efficiency of Android Apps
Using Automatic Refactoring to Improve Energy Efficiency of Android Apps
 
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and Jetpack
 
Top 7 JavaScript Data Grid Libraries
Top 7 JavaScript Data Grid LibrariesTop 7 JavaScript Data Grid Libraries
Top 7 JavaScript Data Grid Libraries
 
Flutter vs ReactNative
Flutter vs ReactNativeFlutter vs ReactNative
Flutter vs ReactNative
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Gnizr Architecture (for developers)
Gnizr Architecture (for developers)Gnizr Architecture (for developers)
Gnizr Architecture (for developers)
 
React and GraphQL at Stripe
React and GraphQL at StripeReact and GraphQL at Stripe
React and GraphQL at Stripe
 
Foster - Getting started with Angular
Foster - Getting started with AngularFoster - Getting started with Angular
Foster - Getting started with Angular
 
Denver Atlassian Community 5-minute Plugins
Denver Atlassian Community 5-minute PluginsDenver Atlassian Community 5-minute Plugins
Denver Atlassian Community 5-minute Plugins
 

Recently uploaded

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Recently uploaded (20)

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Proteus - android layout engine

  • 2. About us Kiran Kumar @thekirankumar Aditya Sharat @adityasharat We are developers in the Mobile engineering team at flipkart
  • 3. What we wanted to do Can we change the color of the “Buy Now” button? Can we increase the size of the Product Images? Can we change “Buy Now” to “Book Now” for some products? Can we add a subtitle below the title? We wanted to modify the UI of our application without an update. Sure we can; but next month!
  • 4.
  • 5. What is Proteus Proteus is an android library for achieving granular control over the visual appearance and data persistence over views/widgets displayed in any mobile app. Meant to be a drop in replacement for android’s LayoutInflater which allows creating and inflating layouts at runtime unlike the compiled XML layouts bundled in the APK. This talk will introduce an in-house framework developed at Flipkart called "Proteus" and also touches on the how it was built from scratch. The framework enabled Flipkart to send a layout describing the view hierarchy from the server, rather than bundling it the traditional way inside the app. This framework also helped in doing A/B experimentation of the UI components as well as build native pages on the fly without the need for app updates.
  • 7. Why not use XML inflater ? Remote XMLs are not supported by Android’s layout inflater !
  • 8. How Android LayoutInflater works 1. AAPT converts raw xml to binary xml 2. Recursively walk through the xml 3. Find the next class to instantiate using Reflection 4. Invoke constructor of the found View class 5. Cache the constructor in-memory 6. Pass the XML attributes to the created View 7. Ask the view to set fields or call methods on itself for handling these attrs 8. Go to step 2
  • 9. Capabilities of Proteus Build Views and compose Layouts. Runtime Data Bindings and Formatters. Describe Shapes and Animations. Custom Views and Attributes can be plugged in. Styles (like CSS), reusable attributes-values. Fallbacks and failsafes are built into the library.
  • 10. Built in data binding support Ability to separate layout and data, keep layout cached for a longer time Ability to change the data which updates the view automatically Java code can only worry about data and forget the layout
  • 11. Supported Android Widgets and Attributes And Many More
  • 12. Supported Drawables and Animations ● detachWallpaper ● duration ● fillAfter ● fillBefore ● fillEnabled ● interpolator ● repeatCount ● repeatMode ● startOffset ● zAdjustment ● shareInterpolator ● children ● fromAlpha ● toAlpha ● fromXScale ● toXScale ● fromYScale ● toYScale ● pivotX ● pivotY ● fromXDelta ● toXDelta ● fromYDelta ● toYDelta ● fromDegrees ● toDegrees ● pivotX ● pivotY ● controlX1 ● controlY1 ● controlX2 ● controlY2 ● tension ● extraTension ● cycles ● linearInterpolator ● accelerateInterpolator ● decelerateInterpolator ● accelerateDecelerateInterpolator ● cycleInterpolator ● anticipateInterpolator ● overshootInterpolator ● anticipateOvershootInterpolator ● bounceInterpolator ● pathInterpolator ● Shape Drawables ● Gradient Drawables ● Layer List ● Resource References
  • 13. Demo
  • 14. Adding Custom Views? Easily doable by using Custom View Parsers
  • 15. Some Numbers Number of releases avoided: 3 Development effort reduced: ~2 months Number of A/B tests: 7(completed) 3(running) + (many planned) Near Native performance Sample layout render time: Native: 25.0ms Proteus: 24.4ms Lots of adoption time saved.
  • 16. Infrastructure tools around Proteus Studio plugin to convert XML Web editor to edit/manage/test layouts MVC library to manage behaviour Server to handle versioned layouts A/B service for delivering different layouts
  • 18. Advantages Zero adoption time Update UI in older apps Brand specific pages / themes Customizing different AD layouts Faster build times (local mode) UI changes can be done by designers A/B testing of different layouts
  • 19. Road Map Improve performance Better Android Studio integration Scripting Engine
  • 21. It’s open source !! https://github.com/flipkart-incubator/proteus Looking forward for your contributions
  • 22. Other Android FOSS by us Chat heads https://github.com/flipkart-incubator/springy-heads Batching analytics events https://github.com/flipkart-incubator/batchman Network stats https://github.com/flipkart-incubator/okhttp-stats Contact image grouping https://github.com/flipkart-incubator/circular-image
  • 23. Other proteus like libraries Json2view https://github.com/Avocarrot/json2view AndFix https://github.com/alibaba/AndFix ItsNat Droid https://github.com/jmarranz/itsnat_droid React native https://facebook.github.io/react-native/