Angular revolution in Gerrit

Dariusz Łuksza
Dariusz ŁukszaSoftware Developer
1 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT
The Angular revolution in Gerrit
Dariusz Luksza
CollabNet Engineering, Potsdam, Germany
2 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT
●
Why and what for?
●
Meet Angular-Gerrit
●
How would OpenChanges screen look like?
●
Twitter Bootstrap? Why not!
●
Q&A
3 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
Why and what for?
● Day to day development
– Debugging
– Compilation time (no compilation!)
– Dependency injection
– Testability
– Lower entry barrier to Gerrit WEB UI plugin development
● Branding
– Not only colors but also document structure
4 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT
Meet Angular­Gerrit
Dariusz Luksza
CollabNet Engineering, Potsdam, Germany
5 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
Meet angular­gerrit.js
● Preconditions
– Modified Gerrit with change #53341 (and its dependencies) is required 
you can just put JS code in $gerrit_site/plugins/$plugin_name/static/init.js
● Development flow
– $gerrit_site/plugins/$plugin_name/static/*
● Build
– Zip the 'static' directory, then change archive extension to jar
● Angular­Gerrit
– init.js – loads all JavaScript dependencies like jquery, angular, angular­
route, angular­gerrit.js and plugin code
– angular­gerrit.js – wraps Gerrit JS API into AngularJS friendly services
* JAR files are actually ZIP with different extension
6 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
Meet angular­gerrit.js
● Angular­Gerrit services:
– GerritRoute – wraps angular­route and prefixes page URLs 
with '/x/$plugin_name/' and template URL with '/plugins/
$plugin_name/static/'
– GerritSrv – wraps Gerrit JS APIs
– GerritPluginSrv – wraps Gerrit 'plugin aware' JS APIs
– GerritScreenSrv – wraps Gerrit Screen service
7 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
Meet angular­gerrit.js
● How to actually use it?
– Your plugin code goes to 'static/plugin.js':
– Template code goes to `static/templates/hello.html`:
AngularGerrit.install([/* additional modules goes here */],
function(app) {
app.config(function(GerritRouteProvider) {
GerritRouteProvider
.when('/', {controller: 'HelloCtrl',
templateUrl: 'templates/hello.html'});
});
app.controller('HelloCtrl', function($scope) {
$scope.greeting = 'Hello Diffy!';
});
});
<h1>{{greeting}}</h1>
8 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
Meet Angular­Gerrit
9 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT
How would OpenChanges screen look 
like?
Dariusz Luksza
CollabNet Engineering, Potsdam, Germany
10 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
How would OpenChanges screen look like?
11 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
How would OpenChanges screen look like?
Yes, this was created with Angular!
12 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT
Twitter Bootstrap? Why not!
Dariusz Luksza
CollabNet Engineering, Potsdam, Germany
13 Copyright ©2014 CollabNet, Inc. All Rights Reserved.
Twitter Bootstrap? Why not!
This page uses different template file, JavaScipt code was reused from original screen.
14 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT
Q&A
Dariusz Luksza
CollabNet Engineering, Potsdam, Germany
Angular­Gerrit can be cloned from:
https://github.com/dluksza/angular­gerrit
1 of 14

Recommended

Guiding Diffy to the Enterprise land by
Guiding Diffy to the Enterprise landGuiding Diffy to the Enterprise land
Guiding Diffy to the Enterprise landDariusz Łuksza
882 views18 slides
A story of 715 commits… in ~15 minutes
 by
A story of 715 commits… in ~15 minutes
A story of 715 commits… in ~15 minutes

A story of 715 commits… in ~15 minutes
Dariusz Łuksza
247 views20 slides
One Man App by
One Man AppOne Man App
One Man AppDariusz Łuksza
483 views25 slides
Your own full blown Gerrit plugin by
Your own full blown Gerrit pluginYour own full blown Gerrit plugin
Your own full blown Gerrit pluginDariusz Łuksza
2.5K views36 slides
Review your code like a Googler by
Review your code like a GooglerReview your code like a Googler
Review your code like a GooglerDariusz Łuksza
1.8K views89 slides
Git in Eclipse by
Git in EclipseGit in Eclipse
Git in EclipseDariusz Łuksza
1.2K views19 slides

More Related Content

Recently uploaded

Business Analyst Series 2023 - Week 4 Session 8 by
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8DianaGray10
180 views13 slides
Qualifying SaaS, IaaS.pptx by
Qualifying SaaS, IaaS.pptxQualifying SaaS, IaaS.pptx
Qualifying SaaS, IaaS.pptxSachin Bhandari
1.1K views8 slides
GDSC GLAU Info Session.pptx by
GDSC GLAU Info Session.pptxGDSC GLAU Info Session.pptx
GDSC GLAU Info Session.pptxgauriverrma4
15 views28 slides
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... by
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...ShapeBlue
120 views12 slides
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 by
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023BookNet Canada
46 views19 slides
Generative AI: Shifting the AI Landscape by
Generative AI: Shifting the AI LandscapeGenerative AI: Shifting the AI Landscape
Generative AI: Shifting the AI LandscapeDeakin University
78 views55 slides

Recently uploaded(20)

Business Analyst Series 2023 - Week 4 Session 8 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8
DianaGray10180 views
GDSC GLAU Info Session.pptx by gauriverrma4
GDSC GLAU Info Session.pptxGDSC GLAU Info Session.pptx
GDSC GLAU Info Session.pptx
gauriverrma415 views
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... by ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue120 views
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 by BookNet Canada
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
BookNet Canada46 views
Adopting Karpenter for Cost and Simplicity at Grafana Labs.pdf by MichaelOLeary82
Adopting Karpenter for Cost and Simplicity at Grafana Labs.pdfAdopting Karpenter for Cost and Simplicity at Grafana Labs.pdf
Adopting Karpenter for Cost and Simplicity at Grafana Labs.pdf
MichaelOLeary8213 views
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」 by PC Cluster Consortium
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」
The Power of Generative AI in Accelerating No Code Adoption.pdf by Saeed Al Dhaheri
The Power of Generative AI in Accelerating No Code Adoption.pdfThe Power of Generative AI in Accelerating No Code Adoption.pdf
The Power of Generative AI in Accelerating No Code Adoption.pdf
Saeed Al Dhaheri44 views
Optimizing Communication to Optimize Human Behavior - LCBM by Yaman Kumar
Optimizing Communication to Optimize Human Behavior - LCBMOptimizing Communication to Optimize Human Behavior - LCBM
Optimizing Communication to Optimize Human Behavior - LCBM
Yaman Kumar39 views
The Role of Patterns in the Era of Large Language Models by Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li104 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue209 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10152 views
Mobile Core Solutions & Successful Cases.pdf by IPLOOK Networks
Mobile Core Solutions & Successful Cases.pdfMobile Core Solutions & Successful Cases.pdf
Mobile Core Solutions & Successful Cases.pdf
IPLOOK Networks16 views
What is Authentication Active Directory_.pptx by HeenaMehta35
What is Authentication Active Directory_.pptxWhat is Authentication Active Directory_.pptx
What is Authentication Active Directory_.pptx
HeenaMehta3515 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu474 views

Featured

ChatGPT and the Future of Work - Clark Boyd by
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
29.5K views69 slides
Getting into the tech field. what next by
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
6.8K views22 slides
Google's Just Not That Into You: Understanding Core Updates & Search Intent by
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
7.1K views99 slides
How to have difficult conversations by
How to have difficult conversations How to have difficult conversations
How to have difficult conversations Rajiv Jayarajah, MAppComm, ACC
5.9K views19 slides
Introduction to Data Science by
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data ScienceChristy Abraham Joy
82.8K views51 slides
Time Management & Productivity - Best Practices by
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
169.8K views42 slides

Featured(20)

ChatGPT and the Future of Work - Clark Boyd by Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd29.5K views
Getting into the tech field. what next by Tessa Mero
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero6.8K views
Google's Just Not That Into You: Understanding Core Updates & Search Intent by Lily Ray
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray7.1K views
Time Management & Productivity - Best Practices by Vit Horky
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky169.8K views
The six step guide to practical project management by MindGenius
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius36.7K views
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright... by RachelPearson36
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson3612.8K views
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present... by Applitools
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools55.5K views
12 Ways to Increase Your Influence at Work by GetSmarter
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter401.7K views
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G... by DevGAMM Conference
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference3.6K views
Barbie - Brand Strategy Presentation by Erica Santiago
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago25.1K views
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well by Saba Software
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software25.3K views
Introduction to C Programming Language by Simplilearn
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
Simplilearn8.5K views
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr... by Palo Alto Software
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
Palo Alto Software88.4K views
9 Tips for a Work-free Vacation by Weekdone.com
9 Tips for a Work-free Vacation9 Tips for a Work-free Vacation
9 Tips for a Work-free Vacation
Weekdone.com7.2K views
How to Map Your Future by SlideShop.com
How to Map Your FutureHow to Map Your Future
How to Map Your Future
SlideShop.com275.1K views

Angular revolution in Gerrit

  • 1. 1 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT The Angular revolution in Gerrit Dariusz Luksza CollabNet Engineering, Potsdam, Germany
  • 2. 2 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT ● Why and what for? ● Meet Angular-Gerrit ● How would OpenChanges screen look like? ● Twitter Bootstrap? Why not! ● Q&A
  • 3. 3 Copyright ©2014 CollabNet, Inc. All Rights Reserved. Why and what for? ● Day to day development – Debugging – Compilation time (no compilation!) – Dependency injection – Testability – Lower entry barrier to Gerrit WEB UI plugin development ● Branding – Not only colors but also document structure
  • 4. 4 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT Meet Angular­Gerrit Dariusz Luksza CollabNet Engineering, Potsdam, Germany
  • 5. 5 Copyright ©2014 CollabNet, Inc. All Rights Reserved. Meet angular­gerrit.js ● Preconditions – Modified Gerrit with change #53341 (and its dependencies) is required  you can just put JS code in $gerrit_site/plugins/$plugin_name/static/init.js ● Development flow – $gerrit_site/plugins/$plugin_name/static/* ● Build – Zip the 'static' directory, then change archive extension to jar ● Angular­Gerrit – init.js – loads all JavaScript dependencies like jquery, angular, angular­ route, angular­gerrit.js and plugin code – angular­gerrit.js – wraps Gerrit JS API into AngularJS friendly services * JAR files are actually ZIP with different extension
  • 6. 6 Copyright ©2014 CollabNet, Inc. All Rights Reserved. Meet angular­gerrit.js ● Angular­Gerrit services: – GerritRoute – wraps angular­route and prefixes page URLs  with '/x/$plugin_name/' and template URL with '/plugins/ $plugin_name/static/' – GerritSrv – wraps Gerrit JS APIs – GerritPluginSrv – wraps Gerrit 'plugin aware' JS APIs – GerritScreenSrv – wraps Gerrit Screen service
  • 7. 7 Copyright ©2014 CollabNet, Inc. All Rights Reserved. Meet angular­gerrit.js ● How to actually use it? – Your plugin code goes to 'static/plugin.js': – Template code goes to `static/templates/hello.html`: AngularGerrit.install([/* additional modules goes here */], function(app) { app.config(function(GerritRouteProvider) { GerritRouteProvider .when('/', {controller: 'HelloCtrl', templateUrl: 'templates/hello.html'}); }); app.controller('HelloCtrl', function($scope) { $scope.greeting = 'Hello Diffy!'; }); }); <h1>{{greeting}}</h1>
  • 8. 8 Copyright ©2014 CollabNet, Inc. All Rights Reserved. Meet Angular­Gerrit
  • 9. 9 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT How would OpenChanges screen look  like? Dariusz Luksza CollabNet Engineering, Potsdam, Germany
  • 10. 10 Copyright ©2014 CollabNet, Inc. All Rights Reserved. How would OpenChanges screen look like?
  • 11. 11 Copyright ©2014 CollabNet, Inc. All Rights Reserved. How would OpenChanges screen look like? Yes, this was created with Angular!
  • 12. 12 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT Twitter Bootstrap? Why not! Dariusz Luksza CollabNet Engineering, Potsdam, Germany
  • 13. 13 Copyright ©2014 CollabNet, Inc. All Rights Reserved. Twitter Bootstrap? Why not! This page uses different template file, JavaScipt code was reused from original screen.
  • 14. 14 Copyright ©2014 CollabNet, Inc. All Rights Reserved.ENTERPRISE CLOUD DEVELOPMENTENTERPRISE CLOUD DEVELOPMENT Q&A Dariusz Luksza CollabNet Engineering, Potsdam, Germany Angular­Gerrit can be cloned from: https://github.com/dluksza/angular­gerrit