GSoC 2007 : Ruby Code Browser.

molerubybrowser.pdf

[update] : I update the proposal, in order to apply again this year.

Ruby developers use intensely metaprogramming techniques, to create domain specific languages, to develop frameworks or to do a little bit of ruby magic. The ruby browser describe in this paper is a tool that help developers to inspect their classes

The goal of this projects is create an interactive graphical user interface of the irb-console with some extras features that allow a easy way to inspect (run-time introspection) the state of the objects.

The projects don’t pretend replace the irb console, the goal is integrate it in a graphical enhancement environment.

The ruby browser is directly inspired on the Squeak Browser, a graphical interface that allow to navigate throw all the classes and objects inside of the Squeak virtual machine.

When I’m writing a program in Smalltalk, I start a Workspace. Type in some code and evaluate it and open it up in an Inspector. As the program grows, I start refactoring the code in the Workspace into classes and inspecting it. At this point, I have an inspector open on some object. I can go in and modify or add methods in the class and evaluate them in the Inspector. I can open up inspectors on the results of those method calls, and so on… Is the same as we can do in Ruby with the irb with a non graphical, non intuitive console.

=== Functionality : ===

The ruby browser main features are :

——- Image paradigm
* Serializing the objects.
* Replicate the load “image” concept,
* Replicate the Save “image” concept.

——- Introspection
* Show all the classes already loaded in the console.
* Navigate throw the classes or modules.
* Add/remove methods and attributes to a class on the fly.
* Track the list of instances of a class
* View the list method of a live object.
* View the code of a method from a live object.
* Inspect an instance state.
* Show the hierarchy of class.

——- Evaluation
* evaluate code in a irb integrated console

=== Benefits to the Community ===

Static vs. Dynamic is missing some points. One of those points is interactivity. If we can inspect faster and easiest our code, we can interact and modify the objects and their definitions at runtime you gain a huge productivity boost.

Also whit a GUI enhancement irb console reduce the learn curve, for those who already don’t know object oriented programming. Thy can have a graphical representation of the object that they created in the console.

=== Development plan ===
….

=== Related gems : ===

* Ruby2ruby : ruby2ruby

=== About me: ===
…..

=== Available time: ===
…..

=== References : ===
http://www.notarianni.org/index.php/2005/09/17/object_orientation_enlightenment

Advertisements

2 comments so far

  1. ke han on

    Have there been any progress on the Ruby Code Browser project? I am an old Smalltalk developer and am now building a Rails app. I find it very difficult to know what my Rails classes inherit at runtime due to all the metaprogramming. I need tools to allow me to explore my objects and classes.
    What would be very useful is a Rails plugin that I leverage in development that allows me to run the rails console script and point a web browser to this “vm” and view the classes and associated code.
    thanks, ke han

  2. Pedro on

    No, im not planning to work in the ruby code browser, until the end of te summer. Finally this proposal was not selected for the google summer of code, because other of my proposal have more votes.

    BTW, i must find a mentor that support m, after the summer, my knowlegde of IDE/Browser design are not very deep.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: