Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [handly-dev] Project description

Hi,

Well, the content itself is ok, but it could use some nice formatting so that the important information is highlighted. I did a quick rewrite (that could use some editing), mainly adding a few headlines and a "what you get" chapter (it could be merged with the 'rationale'). The implementation overview will probably have to be reworded in light of that.

best regards,
Vlad

**Handly, a technology project at Eclipse, provides basic building blocks that help create handle-based models similar in design patterns and principles to the JDT Java model. The uniform API makes it possible to supply common IDE components dealing with Handly-based models. Integration with Xtext editor is provided along with support for other source editors.**

# Background 

It goes without saying that handle-based models play an important role in the Eclipse IDE, with the workspace resource model being the foremost example.

The workspace resource model is programming language agnostic, so Eclipse development tools such as JDT (Java Development Tools) and CDT (C/C++ Development Tooling) are based on language-specific handle-based models that define a code-centric view on the underlying workspace and support navigation down to structural elements inside source files.

Traditionally, such models were built either entirely from scratch or by forking and modifying preexisting models with due consideration of possible licensing issues. The traditional process required much effort, was tedious and error-prone. The resulting models were effectively silos with a completely isolated API, which prevented a possibility of developing reusable IDE components around those models, although the models did seem to have certain traits in common.

# Handly rationale

The Handly project begs to differ with the traditional approach. Basically, it provides a unified architecture and a set of flexible building blocks that help create handle-based models similar in design patterns and principles to the JDT Java model. This reduces programming effort, fosters software reuse and provides opportunities for interoperability.

In particular, the project defines a common interface and provides a skeletal implementation for the central notion of a handle that acts like a key to a model element and has the following principal characteristics:

* immutable, equals by value
* can define behavior of the element, but doesn't keep any element state beyond the key information
* can refer to non-existing elements

Handle-based models employ a variation of the handle/body idiom, where clients have direct access only to handles to model elements, while the element state beyond the key information is stored separately in an internal body. Such design has a number of important properties:

* handles are stable, you can freely keep references to them
* handles are lightweight but can be rich in behavior
* bodies can be computed on demand and virtualized

This makes handle-based models highly scalable and perfectly suited to presenting in Eclipse views such as Project Explorer, Search, Outline, etc.

# What you get with Handly

* a handle-based model that can be used by generic UI components (navigator, outline, *list all!*)
* default implementations for
* model change handling (like IHandleDelta, IElementChangeEvent)
* buffer and cache management
* working copy support
* an outline framework, with quick outline
* working set support
* integration with Xtext editors
* almost no restrictions on the shape of attainable models or on the languages modeled

Although we provide some UI components that leverage Handly, it is not in the current scope of the project to provide a full range of those. We would like to get a stable API before considering that.

# Implementation overview

Elements of a Handly-based model are expected to implement certain basic interfaces such as IHandle, ISourceElement and ISourceFile using the provided skeletal implementations. That being said, the model implementor is free to define model specific interfaces such as IFooProject, IFooFile and IFooFunction and make model elements implement those interfaces in addition to the basic interfaces.

The project also defines common interfaces for model change notifications such as IHandleDelta and IElementChangeEvent and provides implementations of these interfaces that can be used as they stand or extended as circumstances warrant. It also includes infrastructure interfaces and implementations that provide essential support for the model such as buffer and cache management.

The project provides comprehensive working copy support, including out-of-the-box integration of the working copy facility with the Xtext editor and support for integrating other source editors.

The provided implementation gives a lot of freedom when resolving handles to find the corresponding body. For example, using supplied building blocks a model can maintain an LRU cache of element bodies to set a cap on its memory footprint.

The established API makes it possible to develop generic IDE components dealing with Handly-based models. Some common UI components such as an outline framework, quick outline and working set support are already supplied by Handly. While providing a uniform handle-based API, the project imposes almost no restrictions on the shape of attainable models or on the languages modeled.


On Tue, Apr 19, 2016 at 5:00 PM, Vladimir Piskarev <pisv@xxxxx> wrote:
Hi Vlad,
 
Thanks for this feedback!
 
Of course, both the description and the architectual overview should be updated to 0.5, once the 0.5 is released.
 
Regarding the project description, I can perfectly understand the criticism, but I don't quite see a good solution, unfortunately.
 
First, the sentence you are referring to is part of the project's summary, which must be really concise. I failed to find a better way to describe the nature of the project in just a couple of sentences.
 
Also, the project's description (as opposed to the summary) is quite a bit larger than I would like. Actually, I have made many iterations on this, but the result is still not good enough apparently, although the text contains the necessary information including an answer to your questions: "Some common UI components such as an outline framework, quick outline and working set support are already supplied by Handly." Regarding the question "will there be a separate project for the components", honestly I don't know yet. I'm not a UI expert myself, so the UI components already provided are intended to serve more as an example of what is possible, although they are also actually used in production. It all depends on the interest of the community, which currently seems to be very low (sadly).
 
So, if you see how the description could be re-written in a better way, perhaps you could provide a draft? Contributions are always welcome ;-) Anyway, thanks again for the feedback! It is a good food for thought, certainly.
 
Thanks,
Vladimir
 
 
Hi!

I re-read the project description at https://projects.eclipse.org/projects/technology.handly and I think there is something missing, namely a more detailed answer to "why handly?"

It is said that "The uniform API makes it possible to supply common IDE components dealing with Handly-based models", but it is not entirely clear

- which components those can be

- if some or all will be supplied by handly (if some, which ones? will there be a separate project for the components?)

- what the benefits of using a standard handle model are (these are mentioned in the text, but are not emphasized and are easy to miss)

BTW, I suppose that the description and the architectural overview should be updated to 0.5 too, or at the very least marked as deprecated, so that people don't get confused? 

best regards,
Vlad


_______________________________________________
handly-dev mailing list
handly-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/handly-dev


Back to the top