JavaScript Plugins                     Introduction                      ●                  ●  Current status:            ...
What is Gerrit?2   Copyright ©2012 CollabNet, Inc. All Rights Reserved.
What is Gerrit?
What is Gerrit?
2.5 Plugin infrastructure5       Copyright ©2012 CollabNet, Inc. All Rights Reserved.
What can be done in 2.5?Extension points: ● Stable API ● Listen for events ● Register new SSH command ● Register new HTTP ...
What can be done in 2.5?Extension points: ● Stable API ● Listen for events ● Register new SSH command ● Register new HTTP ...
What can be done in 2.5?Extension points: ● Stable API ● Listen for events ● Register new SSH command ● Register new HTTP ...
JavaScript Plugins9   Copyright ©2012 CollabNet, Inc. All Rights Reserved.
Generate JS plugin stub *$ mvn archetype:generate       -DarchetypeGroupId=com.google.gerrit       -DarchetypeArtifactId=g...
GWT Plugins13   Copyright ©2012 CollabNet, Inc. All Rights Reserved.
Generate GWT plugin stub *$ mvn archetype:generate       -DarchetypeGroupId=com.google.gerrit       -DarchetypeArtifactId=...
Extension API19   Copyright ©2012 CollabNet, Inc. All Rights Reserved.
Requirements for extension APIRequirements:    Client side:      ● Easy to consume      ● Easily accessible from GWT and J...
First idea of client extension APIFirst draft idea of GWT client side extension point API:  import com.google.gwt.user.cli...
JavaScript Plugins                                         Dariusz Łuksza (@dluksza)                                      ...
Upcoming SlideShare
Loading in...5
×

Gerrit JavaScript Plugins

549

Published on

Quick overview of building plugins using pure JavaScript or Google Web Toolkit (GWT), and a group discussion to identify important UI extension points for Gerrit contributors to make available.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
549
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Gerrit JavaScript Plugins"

  1. 1. JavaScript Plugins Introduction ● ● Current status: ➔ Native JS plugins ➢ Generate plugin stub from Maven artifact ➢ Important parts of JS plugin ➢ Build and deployment ➔ GWT plugins ➢ Generate plugin stub from Maven artifact ➢ Important parts of GWT plugin ➢ Build and deployment ● To be defined: ➔ Client side extension points ➔ Registering server side services Dariusz Łuksza (@dluksza) CollabNet Engineering Office Potsdam, GermanyENTERPRISE CLOUD DEVELOPMENT
  2. 2. What is Gerrit?2 Copyright ©2012 CollabNet, Inc. All Rights Reserved.
  3. 3. What is Gerrit?
  4. 4. What is Gerrit?
  5. 5. 2.5 Plugin infrastructure5 Copyright ©2012 CollabNet, Inc. All Rights Reserved.
  6. 6. What can be done in 2.5?Extension points: ● Stable API ● Listen for events ● Register new SSH command ● Register new HTTP servletsPlugins:● API is strongly coupled with Gerrit internals... because they are Gerrit internals● Can do all the rest...
  7. 7. What can be done in 2.5?Extension points: ● Stable API ● Listen for events ● Register new SSH command ● Register new HTTP servletsPlugins:● API is strongly coupled with Gerrit internals... because they are Gerrit internals● Can do all the rest... except of thins that it cannot do.
  8. 8. What can be done in 2.5?Extension points: ● Stable API ● Listen for events ● Register new SSH command ● Register new HTTP servletsPlugins:● API is strongly coupled with Gerrit internals... because they are Gerrit internals● Can do all the rest... except of thins that it cannot do: ● Cannot define own authentication method, ● Cannot change Web UI
  9. 9. JavaScript Plugins9 Copyright ©2012 CollabNet, Inc. All Rights Reserved.
  10. 10. Generate JS plugin stub *$ mvn archetype:generate -DarchetypeGroupId=com.google.gerrit -DarchetypeArtifactId=gerrit-plugin-js-archetype -DarchetypeVersion=2.6-SNAPSHOT -DgroupId=com.collabnet -DartifactId=gerrit-js-plugin-stub
  11. 11. GWT Plugins13 Copyright ©2012 CollabNet, Inc. All Rights Reserved.
  12. 12. Generate GWT plugin stub *$ mvn archetype:generate -DarchetypeGroupId=com.google.gerrit -DarchetypeArtifactId=gerrit-plugin-gwt-archetype -DarchetypeVersion=2.6-SNAPSHOT -DgroupId=com.collabnet -DartifactId=gerrit-gwt-plugin-stub
  13. 13. Extension API19 Copyright ©2012 CollabNet, Inc. All Rights Reserved.
  14. 14. Requirements for extension APIRequirements: Client side: ● Easy to consume ● Easily accessible from GWT and JavaScript ● Allow cross-plugin interactions/dependencies (?) Server side: ● Automatically bind services ● Support server side dependency injection ● Use common protocol for GWT and JavaScript (?) ➢ Use JSON ➢ Or provide JavaScript API for GWT base protocol (RequestFactory?)
  15. 15. First idea of client extension APIFirst draft idea of GWT client side extension point API: import com.google.gwt.user.client.ui.Widget; public interface GerritUi { // we should also consider here async calls // and somehow provide data from UI public interface ExtensionListener { boolean performAction(); } public interface Actions { void addOnChangeSubmittListener(ExtensionListener l); void removeOnChangeSubmittListener(ExtensionListener l); } public interface Containers { void appendToMainMenu(Widget widget); void removeFromMainMenu(Widget widget); } Actions getActions();
  16. 16. JavaScript Plugins Dariusz Łuksza (@dluksza) CollabNet Engineering Office Potsdam, GermanyENTERPRISE CLOUD DEVELOPMENT
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×