Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
WebTools for GemStone/SESUG 2011, Friday, 11:00 – 11:45 amJames Foster, Sr. Member Technical Staff                        ...
Abstract GemStone/S 64 Bit includes a new goodie, WebTools, with which    you can quickly and easily interact with a runn...
Presenter Software Background    • As a junior-high student in 1971, I discovered the local university‟s computer     cen...
Agenda   Existing tools   Motivation   Demo: WebTools in Action   Design   Demo: Adding a new tool   JavaScript less...
Agenda Existing tools    • Topaz    • Visual Statistics Display (VSD)    • GemBuilder for Smalltalk (GBS)    • GemTools  ...
Topaz Primary GemStone/S user interface    • Used internally to create distribution image    • Used internally for testin...
Visual Statistics Display (VSD) - 1 Statmonitor    • The product distribution includes statmonitor, an executable that ca...
Visual Statistics Display (VSD) - 2 Issues    • TCL-based application    • Building third-party libraries on several plat...
GemBuilder for Smalltalk (GBS) The traditional GUI-based tools Add-on library for client-based Smalltalk    • Cincom Sma...
GemTools Pharo-based tools for ‘GLASS’ Various GemStone/S tools • Code browser • Debugger • Monticello browser • Metacel...
Jade Microsoft Windows application • Created in Dolphin • Small footprint (EXE is 1.3 MB; takes ~8 MB of RAM) Various GU...
Agenda   Existing tools   Motivation   Demo: WebTools in Action   Design   Demo: Adding a new tool   JavaScript less...
Motivation GUI Light-weight • Simple to install and use • Minimal network and CPU usage Cross-platform • Preferable wit...
Agenda   Existing tools   Motivation   Demo: WebTools in Action   Design   Demo: Adding a new tool   JavaScript less...
WebTools Open web browser on http://vienna:8080/ Explore tools15
Agenda   Existing tools   Motivation   Demo: WebTools in Action   Design   Demo: Adding a new tool   JavaScript less...
Design: Code in GemStone Web Server • One class, couple dozen methods • Not a generalized web server Serves files in $GE...
Design: Files in the File System Place files in $GEMSTONE/examples/www Convention • HTML in / • Simple JavaScript librar...
Why not Seaside? Preference for a light-weight solution • Development is in GemStone/S 64 Bit 3.0 • But should be easy to...
Avi Bryant on Seaside Smalltalk Solutions 2011 • March 2011 in Las Vegas, Nevada, USA Web Architecture Changes • Old: Ge...
Agenda   Existing tools   Motivation   Demo: WebTools in action   Design   Demo: Adding a new tool   JavaScript less...
Adding a Configuration Report Tool Add ConfigurationReport class • Copy and edit three class-side methods from VersionRep...
Agenda   Existing tools   Motivation   Demo: WebTools in action   Design   Demo: Adding a new tool   JavaScript less...
JavaScript Lessons for a Smalltalker Editing in a text file vs. in an image Assignments & comparisons  • = vs. :=  • == ...
Agenda   Existing tools   Motivation   Demo: WebTools in action   Design   Demo: Adding a new tool   JavaScript less...
Future Current Tools • Code Browser: view/set breakpoints, class hierarchy, more context menus • Statistics: zoom, multip...
Questions? James Foster • jfoster@vmware.com • http://programminggems.wordpress.com/27
Upcoming SlideShare
Loading in …5
×

Web Tools for GemStone/S

744 views

Published on

ESUG 2011, Edinburgh

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Web Tools for GemStone/S

  1. 1. WebTools for GemStone/SESUG 2011, Friday, 11:00 – 11:45 amJames Foster, Sr. Member Technical Staff © 2010 VMware Inc. All rights reserved
  2. 2. Abstract GemStone/S 64 Bit includes a new goodie, WebTools, with which you can quickly and easily interact with a running GemStone system through a web browser. With WebTools you can browse code, view version information, view statistics, and analyze statmonitor files.2
  3. 3. Presenter Software Background • As a junior-high student in 1971, I discovered the local university‟s computer center and a life-long obsession with computers began. • I was introduced to Smalltalk/V for the Mac in the mid-90s, and became a Smalltalk bigot. • I am on the Smalltalk Engineering team at VMware, and am a passionate advocate for GemStone and Seaside. Past Careers • Commercial Pilot • Lawyer Other interests • Economics • Politics • Religion3
  4. 4. Agenda Existing tools Motivation Demo: WebTools in Action Design Demo: Adding a new tool JavaScript lessons Future4
  5. 5. Agenda Existing tools • Topaz • Visual Statistics Display (VSD) • GemBuilder for Smalltalk (GBS) • GemTools • Jade5
  6. 6. Topaz Primary GemStone/S user interface • Used internally to create distribution image • Used internally for testing and debugging • Recommended for batch and maintenance jobs (backups, etc.) • Preferred for reproducible bug reports Command-line driven • Analogous to command shell (bash): Enter command and get response • Run, DoIt, & PrintIt to execute Smalltalk code Debugger • View stack frames and variables Applicability • Low-level work by those comfortable with vi, emacs, and Unix • Less comfortable for typical Smalltalker6
  7. 7. Visual Statistics Display (VSD) - 1 Statmonitor • The product distribution includes statmonitor, an executable that captures hundreds of statistics about a running GemStone/S system • Statmonitor produces a text file of data (optionally compressed) • Recommendation that all production systems capture this data constantly • Allows analysis in event of crash • Allows comparisons over time (how does this year compare to last year?) VSD • View statistics in graphics format • Separate application (not part of product distribution) • Cross-platform • Templates for common issues • Ability to zoom, combine, etc.7
  8. 8. Visual Statistics Display (VSD) - 2 Issues • TCL-based application • Building third-party libraries on several platforms • Cannot run if there is a space in the executable path • Doesn‟t run on Windows 7 • Actually, it just requires “XP Compatibility Mode” • File size limits (sometimes there is a lot of data!) • Font size8
  9. 9. GemBuilder for Smalltalk (GBS) The traditional GUI-based tools Add-on library for client-based Smalltalk • Cincom Smalltalk • VA Smalltalk Various GemStone/S tools • Code browser • Debugger • UserProfile editor Limitations • Not free (GBS is not available for the „no-cost‟ license) • Requires installation and use of yet another product • Most updating focuses on host Smalltalk changes9
  10. 10. GemTools Pharo-based tools for ‘GLASS’ Various GemStone/S tools • Code browser • Debugger • Monticello browser • Metacello browser (new!) Limitations • Requires specific server-side code • Requires installation and use of yet another product • Many network round-trips to server • Impractical for remote (e.g., hosted) server • GUI is based on OB10
  11. 11. Jade Microsoft Windows application • Created in Dolphin • Small footprint (EXE is 1.3 MB; takes ~8 MB of RAM) Various GUI-based tools • Monticello browser • Code browser • Debugger Avoids ‘two-object-space’ problem • Built with Dolphin, but not (necessary to) run in Dolphin Disadvantages • Windows-only • Yet another application to download and install • Unofficial „goodie‟11
  12. 12. Agenda Existing tools Motivation Demo: WebTools in Action Design Demo: Adding a new tool JavaScript lessons Future12
  13. 13. Motivation GUI Light-weight • Simple to install and use • Minimal network and CPU usage Cross-platform • Preferable with minimal effort Extensible • Allow users to enhance Experiment with new technology • Because it is fun!13
  14. 14. Agenda Existing tools Motivation Demo: WebTools in Action Design Demo: Adding a new tool JavaScript lessons Future14
  15. 15. WebTools Open web browser on http://vienna:8080/ Explore tools15
  16. 16. Agenda Existing tools Motivation Demo: WebTools in Action Design Demo: Adding a new tool JavaScript lessons Future16
  17. 17. Design: Code in GemStone Web Server • One class, couple dozen methods • Not a generalized web server Serves files in $GEMSTONE/examples/www Returns Json for recognized methods • Search path for class and method to handle request Each ‘tool’ represented on server by subclass of Tool • Required class-side methods: #’displayName’ and #’description’ • Optional class-side methods: #’fileName’ and #’sortOrder’ • Required instance-side method: #’json’ • Optional instance-side methods: any needed by client17
  18. 18. Design: Files in the File System Place files in $GEMSTONE/examples/www Convention • HTML in / • Simple JavaScript libraries in /scripts • Shared style in /css • Complex JavaScript frameworks in / Each tool identifies an html file in Tool class>>#’fileName’ • By default, use class name , „.html‟ HTML for tool is obtained using Ajax call and then added to the existing document • Use embedded (or linked) JavaScript to add behavior • Use embedded (or linked) CSS to add style Okay to have HTML, JavaScript, and CSS in one file?18
  19. 19. Why not Seaside? Preference for a light-weight solution • Development is in GemStone/S 64 Bit 3.0 • But should be easy to port to earlier versions, including older 32-bit product • Seaside requires later 64-bit version Expect heavy use of JavaScript • Somewhat rigid to have server send HTML data • Added #’printJsonOn:’ to a handful of classes Fair question! • Desire to explore something else? • Show some objectivity in advocacy by occasionally choosing something else!19
  20. 20. Avi Bryant on Seaside Smalltalk Solutions 2011 • March 2011 in Las Vegas, Nevada, USA Web Architecture Changes • Old: Get/Post returning fat HTML file • Seaside offers saving state on server • New: Async background requests for Json • Stateless interaction reduces value of saving state on server What will Next Generation Web Framework Look Like? • No components, no continuations, and no canvas • Json builder with callbacks20
  21. 21. Agenda Existing tools Motivation Demo: WebTools in action Design Demo: Adding a new tool JavaScript lessons Future21
  22. 22. Adding a Configuration Report Tool Add ConfigurationReport class • Copy and edit three class-side methods from VersionReport • Copy and edit one instance-side method Add ConfigurationReport.html file • Copy VersionReport.html • Edit JavaScript • Edit CSS • Edit HTML22
  23. 23. Agenda Existing tools Motivation Demo: WebTools in action Design Demo: Adding a new tool JavaScript lessons Future23
  24. 24. JavaScript Lessons for a Smalltalker Editing in a text file vs. in an image Assignments & comparisons • = vs. := • == and === Closures • $.each(list, function(index, each) { newList.add(this * 2); }); • list do: [:each | newList add: each]. Scope • Block (curly braces) does not provide a scope • Scope is limited by function Fifty-nine (59) reserved words • Cannot use for temporary variables and difficult to use for instance variables Not tiny: Chrome has 4 processes at 20 to 150 MB each24
  25. 25. Agenda Existing tools Motivation Demo: WebTools in action Design Demo: Adding a new tool JavaScript lessons Future25
  26. 26. Future Current Tools • Code Browser: view/set breakpoints, class hierarchy, more context menus • Statistics: zoom, multiple per chart, AI analysis • Debugger: step, edit & continue New Tools • Inspector • Monticello • Metacello Or nothing! • Not an officially supported product • Shipping in $GEMSTONE/examples/www • Feedback welcome26
  27. 27. Questions? James Foster • jfoster@vmware.com • http://programminggems.wordpress.com/27

×