Announcing the Mezzo framework

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Announcing the Mezzo framework

Hans Höglund
Even though Manuscript development may not be the most career promising profession
that is (but hey, look at Dolet), for the last months I've been putting considerable
time into an open-source project for Manuscript called the Mezzo framework. This is
a project aimed at developers that would like to take Manuscript coding to the next level.

The idea of writing mezzo grew out of my frustration in the limited tools provided
by Sibelius for developers. I should say that I do believe they made a good decision by providing a scripting
language rather than an api, and I also support of the choice of Simkin, which I really like for
all its flaws. I think we should also acknowledge the improvements of the language made over the
years, such as the new dictionary object in version 6.

However, the main problem for me has always been the plug-in architecture. This is seriously
limited, forcing the developer to limit his/her view to one single task, one single
functionality at a time, and always thinking in methods, data, dialogs, when we really
have treeNodes and objects. Also, the internal plug-in editor is quite primitive,
and lacks support for common task found in development environments, such as content outline,
version history, search/replace, auto-indentation, syntax coloring, and even line numbering.
 The simple solution is to write your plug-ins as text files outside Sibelius instead, but as
we all know, this has drawbacks such as having to cope with the unusual UTF-16LE format,
writing a lot of extra quote marks, not being able to put comments outside value declarations,
and the extremely tedious process of having to restart Sibelius over and over again to reload
your code.

The Mezzo framework will provide an alternative way to organize your code, namely in mezzo class files.
As the name suggests, each file will contain a 'class' declaration and overall look very much
like a c++ or java class. Classes may contain methods and fields, which are just common Manuscript.
Class instances can be created from ordinary plug-in code with one simple call. For instance,
if we have a mezzo class file that looks like this:

public class Talker {

    private say = "Hello World!";
   
    public Talk() {
        trace(say);
    }
}

we could call its method in a plug-in like this:

t = Mezzo.Create('Talker');
t.Talk();

which would print "Hello World!" to the trace window.

The mezzo class files are standard ANSI files located outside Sibelius, in any valid mezzo
search paths (which include the global and user plug-in folder by default). Any number of classes
may be created and used in mezzo code or plug-in code. Instances of mezzo classes are full-fledged
objects, undistinguishable from native objects to the user. In time, mezzo should also be able
to handle static fields, interfaces and inheritance. Classes can be changed and reloaded at runtime,
without any need to restart Sibelius.

How does this work technically? The mezzo runtime is responsible for finding, loading and initiating
classes. The mezzo runtime is simply a collection of Manuscript plugins, invisible to the user of
Sibelius. Programmers may interact with the runtime using methods in the plug-in 'Mezzo', as
in the code above where the standard factory method Create() was called.


Being a framework, Mezzo will consist of some core components:

1) The runtime (essential)

2) A library of code for performing standard tasks. We already have utils, Preferences and TupletLib,
but mezzo will make things possible that have been too tedious to write before. My initial
ideas for this library includes JSON and XML utilities but anything could be done here. This
'Mezzo library' will be distributed with the framework and can be used by both mezzo and non-mezzo
developers.

3) An IDE for mezzo and plg files is under development. This will be based on the Eclipse platform,
which is used by many Java, PHP, C++ developers and support all of the IDE features listed above.
Eclipse is available on both Mac OS and Windows. For people knowing about it, I could tell that
the mezzo editor will be based on Xtext.

Mezzo will be developed open-source, and released under GNU GPL. To this point, I have been doing
everything, but I welcome help from anyone interested. The project is available on
http://sourceforge.net/projects/mezzo. Mezzo is currently in an alfa-version, and the first usable
test version is expected by the end of the summer.

Taking the time to write such a long mail, I hope it will trigger some response from the community ;).
Any suggestions, questions or objections are highly welcomed.

Cheers!
/Hans Hoglund
Reply | Threaded
Open this post in threaded view
|

Re: Announcing the Mezzo framework [no line wrapping]

Hans Höglund
[Looks like Nabble did something strange to the line wrappings in my original mail. Here is a corrected text: ]

Even though Manuscript development may not be the most career promising profession that is (but hey, look at Dolet), for the last months I've been putting considerable time into an open-source project for Manuscript called the Mezzo framework. This is a project aimed at developers that would like to take Manuscript coding to the next level.

The idea of writing mezzo grew out of my frustration in the limited tools provided by Sibelius for developers. I should say that I do believe they made a good decision by providing a scripting language rather than an api, and I also support of the choice of Simkin, which I really like for all its flaws. I think we should also acknowledge the improvements of the language made over the years, such as the new dictionary object in version 6.

However, the main problem for me has always been the plug-in architecture. This is seriously limited, forcing the developer to limit his/her view to one single task, one single functionality at a time, and always thinking in methods, data, dialogs, when we really have treeNodes and objects. Also, the internal plug-in editor is quite primitive, and lacks support for common task found in development environments, such as content outline, version history, search/replace, auto-indentation, syntax coloring, and even line numbering. The simple solution is to write your plug-ins as text files outside Sibelius instead, but as we all know, this has drawbacks such as having to cope with the unusual UTF-16LE format, writing a lot of extra quote marks, not being able to put comments outside value declarations, and the extremely tedious process of having to restart Sibelius over and over again to reload your code.

The Mezzo framework will provide an alternative way to organize your code, namely in mezzo class files. As the name suggests, each file will contain a 'class' declaration and overall look very muchlike a c++ or java class. Classes may contain methods and fields, which are just common Manuscript. Class instances can be created from ordinary plug-in code with one simple call. For instance,if we have a mezzo class file that looks like this:

public class Talker {

    private say = "Hello World!";
   
    public Talk() {
        trace(say);
    }    
}

we could call its method in a plug-in like this:

t = Mezzo.Create('Talker');
t.Talk();

which would print "Hello World!" to the trace window.

The mezzo class files are standard ANSI files located outside Sibelius, in any valid mezzo search paths (which include the global and user plug-in folder by default). Any number of classes may be created and used in mezzo code or plug-in code. Instances of mezzo classes are full-fledged objects, undistinguishable from native objects to the user. In time, mezzo should also be able to handle static fields, interfaces and inheritance. Classes can be changed and reloaded at runtime,without any need to restart Sibelius.

How does this work technically? The mezzo runtime is responsible for finding, loading and initiating classes. The mezzo runtime is simply a collection of Manuscript plugins, invisible to the user of Sibelius. Programmers may interact with the runtime using methods in the plug-in 'Mezzo', like in the code above where the standard factory method Create() was called.

Being a framework, Mezzo will consist of some core components:

1) The runtime (essential)

2) A library of code for performing standard tasks. We already have utils, Preferences and TupletLib, but mezzo will make things possible that have been too tedious to write before. My initial ideas for this library includes JSON and XML utilities but anything could be done here. This 'Mezzo library' will be distributed with the framework and can be used by both mezzo and non-mezzo developers.

3) An IDE for mezzo and plg files is under development. This will be based on the Eclipse platform,which is used by many Java, PHP, C++ developers and support all of the IDE features listed above. Eclipse is available on both Mac OS and Windows. For people knowing about it, I could tell that the mezzo editor will be based on Xtext.

Mezzo will be developed open-source, and released under GNU GPL. To this point, I have been doing everything, but I welcome help from anyone interested. The project is available on http://sourceforge.net/projects/mezzo. Mezzo is currently in an alfa-version, and the first usable test version is expected by the end of the summer.

Taking the time to write such a long mail, I hope it will trigger some response from the community ;). Any suggestions, questions or objections are highly welcomed.

Cheers!
/Hans Hoglund
Reply | Threaded
Open this post in threaded view
|

Re: PLUGIN-DEV: Announcing the Mezzo framework

Neil Sands-2
In reply to this post by Hans Höglund
Well, that certainly sounds interesting. I don't mind helping if you can
find something for me to do!

Well done, and thanks!

Neil

Reply | Threaded
Open this post in threaded view
|

Re: PLUGIN-DEV: Announcing the Mezzo framework

Robert Carver
In reply to this post by Hans Höglund

> Sibelius ... I should say that I do believe they made a good decision
> by providing a scripting language rather than an api, ...

Thanks, this looks like a very worth while project. I do have a question,
born out of ignorance, as to what factors make a scripting laguage better
than an API in this particular context.

thanks,

robert



Reply | Threaded
Open this post in threaded view
|

Re: PLUGIN-DEV: Announcing the Mezzo framework

Hans Höglund
Thanks for your initial response! I've not been able to answer before, since I have been quite busy debugging the eclipse editor for manuscript and mezzo. I can report that it works, and henceforth it is possible to develop Manuscript in eclipse. The eclipse plugins will be posted on the sourceforge site as soon as I have the time for it, along with some installation instructions.

Neil, you are very welcome to join the project at sourceforge. All code is available there (under Develop->Code->SVN Browse). If you take a look at it, you might find some place where you'd feel comfortable to start.

Robert Carver wrote
I do have a question,
born out of ignorance, as to what factors make a scripting laguage better
than an API in this particular context.
Well that is just my personal opinion ;). For (relatively) simple tasks like controlling a score writer program there is no real loss in performance for scripts contra compiled code, and you can spend more time on the actual task.