SlideShare a Scribd company logo
How I Built My Code
Editor in Ruby
Andy Maleh
Senior Developer
Lexop
How Did I Build My Code Editor in Ruby?
● I used Ruby as Programming Language (using JRuby)
● I applied Object Oriented Design (with abstractions like File and Dir)
● I applied Architectural Patterns (like MVC and MVP)
● I applied Design Patterns (like Command, Composite, Adapter & Observer)
● I used Domain Specific Languages (like Glimmer GUI DSL)
How Did I Build My Code Editor in Ruby?
● I decomposed Software Modules (AKA Components AKA Custom Widgets)
● I reused Ruby Gems (like glimmer-dsl-swt, filewatcher, and clipboard)
● And, that's all folks! You can go home now!
● Just kidding! That was just a preview of the talk. Hang on for more.
About Myself
● Bachelor of Science in Computer Science from McGill University, Montreal
● Master of Science in Software Engineering from DePaul University, Chicago
● RubyConf 2008 + MagicRuby 2011 + MountainWest RubyConf 2011 +
RailsConf 2012/2014 Speaker
● Fukuoka Ruby 2022 Special Award Winner
● Senior Full-Stack Developer at Lexop
Why Build a Code Editor in Ruby?
● Ruby is a great language:
○ Object Oriented
○ Dynamically Typed
○ Inspired by Lisp, Smalltalk, Perl, Python, and Basic
○ Supports Meta-Programming and Embedded DSLs
○ Highly Expressive and Maintainable Code
○ Very Productive (e.g. Rails)
Why Build a Code Editor in Ruby?
● I am a senior software engineer:
○ Proficient in Requirements Engineering
○ Proficient in Object Oriented Programming
○ Proficient in Architectural Patterns (e.g. MVC)
○ Proficient in Design Patterns
○ Proficient in Domain Specific Languages
○ Proficient in Writing Highly Maintainable Code
○ Proficient in Automated Testing
Code Editor (Gladiator) Demo
Gladiator Software Architecture
● MVC
Gladiator Software Architecture
● MVP
● Data-Binding
Gladiator Software Architecture
● Software Modules (AKA Components AKA Custom Widgets)
○ Gladiator
○ TextEditor
○ FileExplorerTree
○ FileLookupList
○ FileEditMenu
○ GladiatorMenuBar
○ ProgressShell
Software Development Process
● Avoid using any editor other than built-in VIM while building Gladiator
● Start small and add features incrementally to Gladiator
● Eat own dog food by using Gladiator to build more Gladiator features
Software Development Process
● Glimmer Process is simply made up of 7 guidelines to pick and choose as
necessary until software development needs are satisfied. Not all guidelines
need to be incorporated into every project, but it is still important to think
through every one of them before ruling any out. Guidelines can be followed
in any order.
○ Requirements Gathering
○ Software Architecture and Design Diagrams
○ Initial Release Plan
○ Small Releases
○ Usability Testing
○ Automated Tests
○ Refactoring
Implementation of Gladiator Features
● File Tree Navigation
● File Lookup by Name
● Text Editor With Syntax Highlighting for Over 30 Programming Languages
● Tabs
● Find and Replace
Implementation of Gladiator Features
● Keyboard Shortcuts
● Undo/Redo via Command Pattern (and Adapter Pattern)
● Split Pane
● Menus
● Run Ruby Code
Implementation of Gladiator Features
● Watching external file/directory changes
● Remembering Last Open Files
● Ignoring Irrelevant Paths
Future Features
● File content search (right now I use grep for that)
● Themes (right now there is internal support for theme that is not exposed)
● Extensions (right now, code is open source, so people can fork to extend)
● Better Windows and Linux support (I mostly use on the Mac)
Q & A
https://github.com/AndyObtiva/glimmer-cs-gladiator
https://github.com/AndyObtiva/glimmer-dsl-swt
https://github.com/AndyObtiva
https://andymaleh.blogspot.com/
https://twitter.com/AndyObtiva

More Related Content

PDF
Gradle build automation tool
PPTX
Exploring the power of Gradle in android studio - Basics & Beyond
PPTX
The Professional Programmer
PDF
DocDokuPLM presentation - OW2Con 2015 Community Award winner
PDF
DocDoku: Using web technologies in a desktop application. OW2con'15, November...
 
PDF
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
PPTX
Dmytro Dziubenko "Developer's toolchain"
ODP
Test Automation Framework using Cucumber BDD overview (part 1)
Gradle build automation tool
Exploring the power of Gradle in android studio - Basics & Beyond
The Professional Programmer
DocDokuPLM presentation - OW2Con 2015 Community Award winner
DocDoku: Using web technologies in a desktop application. OW2con'15, November...
 
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Dmytro Dziubenko "Developer's toolchain"
Test Automation Framework using Cucumber BDD overview (part 1)

Similar to How I Built My Code Editor in Ruby (20)

PDF
Code-Hub
PDF
Gradle
PDF
Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ...
PDF
Architektura html, css i javascript - Jan Kraus
PDF
Clean Architecture in Android. UPTech TechTalk
PDF
Making sense of the front-end, for PHP developers
PDF
Griffon for the Enterprise
DOCX
Best Angular JS training in Hyderabad, India
PDF
Programming for non tech entrepreneurs
PDF
You Can Work on the Web Patform! (GOSIM 2023)
PDF
Android Modularization
PDF
PPTX
Becoming A Drupal Master Builder
PPTX
Modern Web-site Development Pipeline
PDF
PDF
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
PDF
"Different software evolutions from Start till Release in PHP product" Oleksa...
PDF
Multiplier Effect: Case Studies in Distributions for Publishers
PDF
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
PDF
Keeping code clean
Code-Hub
Gradle
Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ...
Architektura html, css i javascript - Jan Kraus
Clean Architecture in Android. UPTech TechTalk
Making sense of the front-end, for PHP developers
Griffon for the Enterprise
Best Angular JS training in Hyderabad, India
Programming for non tech entrepreneurs
You Can Work on the Web Patform! (GOSIM 2023)
Android Modularization
Becoming A Drupal Master Builder
Modern Web-site Development Pipeline
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
"Different software evolutions from Start till Release in PHP product" Oleksa...
Multiplier Effect: Case Studies in Distributions for Publishers
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Keeping code clean
Ad

More from Andy Maleh (16)

PDF
Fukuoka Ruby Award 2023 - Opal
PPTX
Becoming a SOC2 Ruby Shop - Montreal.rb November, 5, 2022 Ruby Meetup
PPTX
Ultra Light and Maintainable Rails Wizards at RailsConf 2014
PPTX
RailsConf 2014 Recap at Montreal.rb by Andy Maleh
PPTX
Ultra Light and Maintainable Wizards in Rails at Montreal.rb
PPT
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
PPTX
Software Craftsmanship VS Software Engineering
PPTX
Rails Engine Patterns
PDF
Software Craftsmanship vs Software Engineering (Lightning Talk)
PDF
Software Design Trilogy Part III - Domain Driven Design for Ruby on Rails App...
PPTX
Software Design Trilogy Part II - Design Patterns for Rubyists
PPTX
Software Design Trilogy Part I - Responsibility Driven Design for Rubyists
PPTX
The Rails Engine That Could - In Motion
PPTX
The Rails Engine That Could
PPTX
How I Learned To Apply Design Patterns
PDF
Simplifying Desktop Development With Glimmer
Fukuoka Ruby Award 2023 - Opal
Becoming a SOC2 Ruby Shop - Montreal.rb November, 5, 2022 Ruby Meetup
Ultra Light and Maintainable Rails Wizards at RailsConf 2014
RailsConf 2014 Recap at Montreal.rb by Andy Maleh
Ultra Light and Maintainable Wizards in Rails at Montreal.rb
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
Software Craftsmanship VS Software Engineering
Rails Engine Patterns
Software Craftsmanship vs Software Engineering (Lightning Talk)
Software Design Trilogy Part III - Domain Driven Design for Ruby on Rails App...
Software Design Trilogy Part II - Design Patterns for Rubyists
Software Design Trilogy Part I - Responsibility Driven Design for Rubyists
The Rails Engine That Could - In Motion
The Rails Engine That Could
How I Learned To Apply Design Patterns
Simplifying Desktop Development With Glimmer
Ad

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Machine Learning_overview_presentation.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Electronic commerce courselecture one. Pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Spectral efficient network and resource selection model in 5G networks
Big Data Technologies - Introduction.pptx
A Presentation on Artificial Intelligence
MIND Revenue Release Quarter 2 2025 Press Release
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Machine Learning_overview_presentation.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
MYSQL Presentation for SQL database connectivity
Reach Out and Touch Someone: Haptics and Empathic Computing
Network Security Unit 5.pdf for BCA BBA.
Chapter 3 Spatial Domain Image Processing.pdf
Spectroscopy.pptx food analysis technology
Building Integrated photovoltaic BIPV_UPV.pdf
Electronic commerce courselecture one. Pdf
The AUB Centre for AI in Media Proposal.docx
Spectral efficient network and resource selection model in 5G networks

How I Built My Code Editor in Ruby

  • 1. How I Built My Code Editor in Ruby Andy Maleh Senior Developer Lexop
  • 2. How Did I Build My Code Editor in Ruby? ● I used Ruby as Programming Language (using JRuby) ● I applied Object Oriented Design (with abstractions like File and Dir) ● I applied Architectural Patterns (like MVC and MVP) ● I applied Design Patterns (like Command, Composite, Adapter & Observer) ● I used Domain Specific Languages (like Glimmer GUI DSL)
  • 3. How Did I Build My Code Editor in Ruby? ● I decomposed Software Modules (AKA Components AKA Custom Widgets) ● I reused Ruby Gems (like glimmer-dsl-swt, filewatcher, and clipboard) ● And, that's all folks! You can go home now! ● Just kidding! That was just a preview of the talk. Hang on for more.
  • 4. About Myself ● Bachelor of Science in Computer Science from McGill University, Montreal ● Master of Science in Software Engineering from DePaul University, Chicago ● RubyConf 2008 + MagicRuby 2011 + MountainWest RubyConf 2011 + RailsConf 2012/2014 Speaker ● Fukuoka Ruby 2022 Special Award Winner ● Senior Full-Stack Developer at Lexop
  • 5. Why Build a Code Editor in Ruby? ● Ruby is a great language: ○ Object Oriented ○ Dynamically Typed ○ Inspired by Lisp, Smalltalk, Perl, Python, and Basic ○ Supports Meta-Programming and Embedded DSLs ○ Highly Expressive and Maintainable Code ○ Very Productive (e.g. Rails)
  • 6. Why Build a Code Editor in Ruby? ● I am a senior software engineer: ○ Proficient in Requirements Engineering ○ Proficient in Object Oriented Programming ○ Proficient in Architectural Patterns (e.g. MVC) ○ Proficient in Design Patterns ○ Proficient in Domain Specific Languages ○ Proficient in Writing Highly Maintainable Code ○ Proficient in Automated Testing
  • 9. Gladiator Software Architecture ● MVP ● Data-Binding
  • 10. Gladiator Software Architecture ● Software Modules (AKA Components AKA Custom Widgets) ○ Gladiator ○ TextEditor ○ FileExplorerTree ○ FileLookupList ○ FileEditMenu ○ GladiatorMenuBar ○ ProgressShell
  • 11. Software Development Process ● Avoid using any editor other than built-in VIM while building Gladiator ● Start small and add features incrementally to Gladiator ● Eat own dog food by using Gladiator to build more Gladiator features
  • 12. Software Development Process ● Glimmer Process is simply made up of 7 guidelines to pick and choose as necessary until software development needs are satisfied. Not all guidelines need to be incorporated into every project, but it is still important to think through every one of them before ruling any out. Guidelines can be followed in any order. ○ Requirements Gathering ○ Software Architecture and Design Diagrams ○ Initial Release Plan ○ Small Releases ○ Usability Testing ○ Automated Tests ○ Refactoring
  • 13. Implementation of Gladiator Features ● File Tree Navigation ● File Lookup by Name ● Text Editor With Syntax Highlighting for Over 30 Programming Languages ● Tabs ● Find and Replace
  • 14. Implementation of Gladiator Features ● Keyboard Shortcuts ● Undo/Redo via Command Pattern (and Adapter Pattern) ● Split Pane ● Menus ● Run Ruby Code
  • 15. Implementation of Gladiator Features ● Watching external file/directory changes ● Remembering Last Open Files ● Ignoring Irrelevant Paths
  • 16. Future Features ● File content search (right now I use grep for that) ● Themes (right now there is internal support for theme that is not exposed) ● Extensions (right now, code is open source, so people can fork to extend) ● Better Windows and Linux support (I mostly use on the Mac)