Welcome to MSDN Blogs Sign in | Join | Help

Web 2.0 Patterns Wiki

Last week a group comprising Felix Nyffenegger, Judith Bishop, Duane Nickull, Marco Brambilla, Marco Egli, Michael Mahemoff, Patrice Pelland, Petri Selonen, Steve Burns, Wolf Logan, and Wei Wei joined me and Joe Yoder at the Web 2.0 pattern mining workshop at ETH Zuerich.

ETH

Several clusters emerged around the workshop's presentations. For example, Patrice and Wolf's coverage of gadgets and gadget platforms pushed our exploration to the UI/glass. Some of the common traits include:

  • Provide an open platform
  • Support several technologies (JavaScript, Silverlight, Flash)
  • Package applications as gadgets
  • Extend instrumentation to include the client
  • Provider feeds raw content, users create personalized mashups

workshop-1

Also on the first day Duane and Steve's coverage of cloud-hosted services brought forth the following:

  • Execution context awareness
  • Scale services up and down
    • Add more capacity quickly, only when you need it
    • Remove capacity when you no longer need it
  • Leverage analytics-increase awareness of server utilization
  • Abstract out the hardware
    • Push into the cloud
    • Leverage virtualization

On the second day Michael's focus on gadgets and OpenSocial directed us to paleosocial patterns, while Felix and Marco's coverage of Web 2.0 site navigation put on the table vizualizations (e.g., debategraph.com, tafiti.com), presentation shifting (e.g., piclens.com, Photosynth), and others.

 workshop-2

During the workshop we also designed a web-based video player that surfaced many of the solutions we looked into. Besides reminding us what it's like to use a real blackboard this exercise helped cluster some of the emerging themes:

workshop-design-1 

  • Key-value store: Amazon Dynamo/S3, BigTable (Google)
  • Streaming: Hulu, YouTube streaming (not Flash)
  • Client time synchro service: NTP, MMORPG
  • Social network integration services: Oauth, OpenID/Passport
  • Mash-up engine: PopFly, Yahoo! pipes
  • Monetization (social cash -> $, analytics, instrumentation): AdSense, witkey.com, SiteMeter, Elance
  • Video: Vime, Nicovideo.jp, Jaman.com
  • Mood: Musicovery, Yahoo! IM, Nabaztag.com
  • Friend states: Twitter
  • IM: Facebook/MySpace, Twitter, Shoutbox
  • Recommendations: Tuneglue, Netflix, Facebook

workshop-design-2

We are planning on fleshing out some of the emerging patterns as a a distributed, collaborative endeavor. We have a wiki site to provide the locus of collaboration for this work. For the moment only the folks who attended the workshop could add and change the content. I expect that to change as the content shapes up so stay tuned.

Posted by Dragos Manolescu | 1 Comments
Filed under: ,

Web 2.0 Pattern Mining Workshop

Monday June 30 we're kicking off the Web 2.0 Pattern Mining Workshop at the TOOLS Europe conference, in Zurich, Switzerland. The submitted proposals focus on gadgets/widgets, gadget platforms, site navigation, and services. So far the confirmed participants include (some of the) people behind:

The workshop spans over 2 days and includes presentations, brainstorming, and pattern mining sessions, as well as 2 related keynotes:

Day Time Event
Monday, June 30 11:00-11:30 1. Introductions
2. Gadget Platforms: Patrice Pelland and Wolf Logan
3. Services in Web 2.0: Steven Burns and Duane Nickull
13:00-14:30 Lunch break
14:30-15:30 Keynote: Michael Mahemoff
15:30-16:00 Brainstorming
16:00-16:30 Coffee break
16:30-18:00 Patterning mining 1
Tuesday, July 1 11:00-13:00 1. Summary of results from Day 1
2. Gadgets: Michael Mahemoff
3. Web 2.0 Navigation: Fleix Nyffenegger and Marco Egli
13:00-14:30 Lunch break
14:30-15:30 Keynote: Erik Meijer
15:30-16:00 Brainstorming
16:00-16:30 Coffee break
16:30-18:00 Patterning mining 2 and closing

Anybody is welcome to participate, even if they haven't submitted proposals. We expect those folks to:

  • Read the submissions (links in the workshop's page)
  • Select 3-5 Web 2.0 sites relevant to the workshop's topics
  • Post to the TOOLS social networking site a brief explanation about why they selected these sites

See you there!

Posted by Dragos Manolescu | 1 Comments
Filed under: ,

Volta Job Opportunities

We have two job opportunities in the Volta team:

For more information please contact Erik Meijer.

Web 2.0 Patterns

During the last decade software patterns emerged as one of the most successful forms of reuse. The Gang of Four 23 Design Patterns, the POSA Architecture Patterns, Fowler's Enterprise Application Patterns, or the xUnit Test Patterns (to name just a few) changed in a fundamental way the way we craft software.

If you are involved with applications that employ:

  • Folksonomies
  • Microformats
  • REST, XML, or JSON-based APIs
  • AJAX and RIAs
  • Syndication and aggregation (RSS, Atom)
  • Mashups
  • Blogs, wikis, social media, or other types of user-generated content

and are interested in patterns covering these topics then join us at the Web 2.0 Pattern Mining Workshop at the TOOLS-Europe 2008 conference, the 46th International Conference on Objects, Models, Components and Patterns. Participation in the workshop is open to anybody who could contribute to Web 2.0 patterns. See the call for participation online and drop me a line if you have questions.

Posted by Dragos Manolescu | 1 Comments
Filed under: ,

PLoP 2008 Call for Papers

*********************************************************************
                        CALL FOR SUBMISSIONS

    15th Conference on Pattern Languages of Programs (PLoP 2008)

      October 18-20, 2008 - co-located with OOPSLA 2008
                   Nashville, Tennessee, USA

                 http://hillside.net/plop/2008/

              Papers Submission deadline is May 2nd

*********************************************************************

ABOUT PLoP

Pattern Languages of Programs (PLoP(tm)) conference is a premier event for pattern authors and pattern enthusiasts to gather, discuss and learn more about patterns and software development.

The conference program offers pattern authors an unique opportunity to have their pattern languages reviewed by fellow authors, which occurs mainly in the form of Writers' Workshops.

Authors and non-authors will find in the different PLoP activities (Writers' Workshops, Focus Groups, BoF sessions, BootCamp, Games) many opportunities to learn more about patterns and pattern writing.

As a whole, the conference provides a friendly and effective environment to give and get feedback, to share expertise, and to allow the participants to improve their patterns and make them more useful and more publishable.

At the Hillside Group web site you can learn more about patterns, writing patterns, PLoP conferences, previous PLoP's, and more.
http://hillside.net/

PLoP's are unique conferences based on a strong community, a community of trust.

Join the community! Come to PLoP!

IMPORTANT DATES

May 2: Paper submissions due
May 19: Shepherding begins
July 4: Shepherd recommendations due
July 21: Notification of acceptance
Sep 26: Conference Drafts due
Oct 17: Pre-PLoP Bootcamp
Oct 18: First Day of PLoP

SUBMISSIONS

The purpose of PLoP is to promote development of pattern languages on all aspects of software, including design and programming, software architecture, user interface design, domain modeling, and software process.

Patterns related with aspects, AOP, and domain-specific patterns are especially encouraged this year.

*Paper* submissions may include short papers, containing one or more patterns, longer pattern languages or sequences, or work-in-progress papers willing to get an in-depth shepherding by an experienced pattern author at the conference.

Papers are sought on topics related to patterns and pattern languages,
including:
* Patterns and pattern languages
* Critiques of patterns and pattern languages
* Research on patterns and pattern languages
* Case studies of the use of patterns and pattern languages

Papers will be peer-reviewed to be accepted for the shepherding process.
During shepherding, authors will have assigned a shepherd that will help the author to improve the content and style of the paper. At the end of the shepherding process, papers will be reviewed again to be accepted into the writer's workshops of the conference. Authors will receive early feedback within two weeks of submission, and a final result at the end of July.

PLoP is run in the "writers' workshop" style. As no more than 15 pages can be properly covered in a session, the normal size of papers is 15 pages or less. Short papers are encouraged! Longer papers are possible, especially for pattern languages, but authors of long papers will have to work with the workshop leader to select a portion of the paper to be covered in the workshop. Authors of books-in-progress who would like to have their work reviewed at PLoP should contact the chairs.

*Focus groups* are free-format discussion groups or workshops aimed at bringing together people interested in a hot topic related to patterns or proven practices, for a period of about two hours.

These sessions might focus on very different topics and issues related to patterns, ranging from writing to using, organising, or adopting patterns. Focus group proposals should include a brief description of the topic to be addressed, objectives, format, conditions for participation (e.g. invitation, submission, free, etc), and a schedule outline. Proposals addressing interdisciplinary topics and topics from other domains than software development are especially encouraged.
Non-conventional formats are welcome.

Focus group proposals are reviewed by the program committee. Focus group leaders are expected to write a report to be part of the final conference proceedings.

HOW TO SUBMIT

All submissions must be done by *May 2* using the online submission system.

PROCEEDINGS

The conference version of the papers will be publicly available, individually, by writers' workshop, and into the preliminary conference proceedings.

Being feedback and improvement the focus of the writers' workshops, papers are not considered final once they have been workshopped. Authors incorporate the feedback they receive at the writers' workshop into their papers before the papers go into the final proceedings to be produced after the conference, which will be made available on the website.

ORGANIZATION

    * Conference Chair: Joseph Yoder (The Refactory Inc., USA)
    * Program Chair: Ademar Aguiar (FEUP & INESC Porto, Universidade do Porto, Portugal)
    * Publicity & BootCamp: Linda Rising (Independent Consultant, USA), Bob Hanmer (Alcatel-Lucent, USA)

Program Committee

    * Ademar Aguiar (INESC Porto/University of Porto, Portugal)
    * Joseph Yoder (The Refactory Inc., USA)
    * Linda Rising (Independent Consultant, USA)
    * Richard P. Gabriel (IBM Research, USA)
    * Bob Hanmer (Alcatel-Lucent, USA)
    * Uwe Zdun (Vienna Technical University, Austria)
    * Paulo Borba (Federal University of Pernambuco, Brazil)
    * Eduardo Fernandez (Florida Atlantic University, USA)
    * Rosana Teresinha Vaccare Braga (ICMC, University of São Paulo, Brazil)
    * Hironori Washizaki (National Institute of Informatics, Japan)
    * Peter Sommerlad (Institut für Software, Switzerland)
    * Jason Yip (ThoughtWorks, Australia)
    * Klaus Marquardt (Dräger Medical, Germany)
    * Juha Pärssinen (VTT, Technical Research Centre of Finland, Finland)
    * Pavel Hruby (CSC, Denmark)
    * Lise Hvatum (Schlumberger, USA)
    * Ralph Johnson (University of Illinois at Urbana-Champaign, USA)
    * Sérgio Soares (University of Pernambuco, Brazil)
    * Nobukazu Yoshioka (National Institute of Informatics, Japan)
    * António Rito Silva (INESC-ID/Technical University of Lisbon, Portugal)
    * Michael Jackson (Independent Consultant, UK)

MORE INFORMATION

For more detailed information, please visit the PLoP'08 website.
http://hillside.net/plop/2008/

--
PLoP is a registered trademark of The Hillside Group, Inc.
--

ICWSM 2008

One of the things that surprised me at OOPSLA 2007 was the amount of traction that social media is getting. The crowd attending the 2007 WikiSym was larger than other co-located events that I remember from past OOPSLAs. Consequently I decided (with encouragement from my colleague Matt Hurst) to attend the International Conference on Weblogs and Social Media 2008. I'm looking forward to it; drop me a line if you're also going.

Posted by Dragos Manolescu | 1 Comments
Filed under:

Blews in the Seattle PI via TechFest 2008 Coverage

TechFest 2008 takes place this week in Redmond. The Seattle PI has a piece about it, and it's great to see Blews (BLogs + nEWS), one of the projects I'm increasingly involved with, mentioned in the article. If this piques your interest read Michael Gamon's explanations (with a photo of the team at the bottom), see a screen-shot, or read the TechCrunch summary.

With Miguel de Icaza on Open Source, Mono, and Moonlight

A few weeks ago I attended Lang.NET Symposium. Charles Torre asked me to participate in a conversation with Miguel de Icaza, who was among the attendees. (While nowadays most people associate Miguel with Mono, our paths crossed--virtually--many years ago, when Tudor Hulubei and Andrei Pitis were working on GIT.) Charles Torre was our host, and we talked about open source, Mono, Moonlight, and various other bits. Our session is now available as a Channel 9 video.

Ajax Patterns, the C# 3.0 Way

Ajax patterns represent solutions to common problems facing the developers of Ajax applications. The patternhood of these solutions stems from the fact that they tend to come up over and over again; they're not one-offs. The book Ajax Design Patterns covers 70 such patterns. The code samples (i.e., for the code running in the browser) involve JavaScript, which is what the J in Ajax stands for.

.NET developers using Volta have several options for implementing Ajax patterns. Consider Display Morphing, a pattern that allows applications to update display elements dynamically, without postbacks and full page redraws. This entails altering the style of DOM elements. Here's a C# snippet from a Volta application that shows or hides a DOM element as the mouse enters or leaves a <div>:

div.MouseEnter += delegate
{
    messageDiv.Style.Display = "block";
};
div.MouseLeave += delegate
{
    messageDiv.Style.Display = "none";
};

Ignoring the anonymous delegates this implementation doesn't look that different from the JavaScript Ajax Design Patterns implementation. So far, so good. But toggling the display style between "block" and "none" is quite common in Ajax applications. Wouldn't it be nice to have Show() and Hide() methods doing just that? It would, but the HtmlElement class (which is the superclass of Div) doesn't define such methods, and with it being a class from a library you can't really go ahead and add them. Or can you?

With Volta extending the reach of .NET to cover the cloud let's implement Display Morphing in a manner that takes advantage of a language feature available in C# 3.0: extension methods. (If you're not familiar with extension methods see Wes' post on Extending the World.) Here are the Show() and Hide() methods mentioned above, defined as extension methods:

static class HtmlElementExtensions
{
    public static void Show(this HtmlElement element)
    {
        element.Style.Display = "block";
    }

    public static void Hide(this HtmlElement element)
    {
        element.Style.Display = "none";
    }

}

Without modifying the library HtmlElement class I extended it with two methods. Now they're available to the element that I want to show or hide. (I could have also extended the Div class. However other DOM elements are likely to benefit from these extensions so it makes sense to add them further up in the class hierarchy.) With Show() and Hide() in place the above code looks as follows:

div.MouseEnter += delegate
{
    messageDiv.Show();
};
div.MouseLeave += delegate
{
    messageDiv.Hide();
};

This implementation of Display Morphing uses a programming style closer to C# 3.0 than to the JavaScript style from Ajax Design Patterns. What style do you use in your Volta code?

Posted by Dragos Manolescu | 1 Comments
Filed under:

EuroPLoP 2008 Call for Participations

Via my fellow Hillsiders from Europe, here's the Final Call for Papers for EuroPLoP 2008. As I mentioned in another post, many pattern authors have at least one PLoP conference under their belt.

                             EuroPLoP 2008
                     13th European Conference on
                    Pattern Languages of Programs
                           July 9-13, 2008
                  Irsee Monastery, Bavaria, Germany
                  http://www.hillside.net/europlop/

                       Final Call For Papers

********************************************************************
                           IMPORTANT DATES

February 18, 2008: Paper Submission Deadline
July 9-13, 2008:   Conference
********************************************************************

         [we apologize for duplicate receipt of this message]

EuroPLoP is the premier European conference on patterns. The
conference offers a variety of tracks and workshops that allow you
to learn about patterns, to receive feedback on your own work, and
to discuss with fellow enthusiasts. It is a unique venue to exchange
knowledge about best practices and learn from other experts in
various fields. EuroPLoP 2008 will be held July 9-13, 2008 in the
Irsee Monastery, Germany. Join us for an experience that will
combine outstanding technical events with a visit to the lovely
Bavarian countryside.

EuroPLoP accepts papers containing patterns or pattern languages as
well as experience reports and other papers related to the theory
and use of patterns. For the first time, EuroPLoP 2008 will offer
thematic tracks allowing practitioners and researchers from a
specific domain to exchange knowledge.

In previous years, thematic clusters evolved implicitly including
areas like:

- Software development
- Software design and architecture
- Software management and development processes
- Human computer interaction
   (e.g., user-interface aspects or novel modes of interaction)
- Education
   (ranging from professional training to classroom teaching)
- Business and organizational questions

This year, we like to invite you to champion one of these thematic
areas or propose new topics by submitting a proposal for a thematic
track.

Several open tracks will be retained to provide for new topics and
topics outside the thematic tracks.

             *******************************************
                           THEMATIC TRACKS
             *******************************************

Starting in 2008, EuroPLoP hosts thematic tracks that put a special
focus on hot topics. In 2008, the tracks are:

Pragmatic and systematic approaches in applying patterns

Organized by Paris Avgeriou (University of Groningen, The Netherlands),
Neil B. Harrison (Utah Valley University, USA), and Uwe Zdun (Vienna
University of Technology, Austria)

Patterns for Collaboration Technology and Processes

Organized by Stephan Lukosch (FernUniversitaet in Hagen, Germany),
Gwendolyn L. Kolfschoten (Delft University of Technology, the
Netherlands), Gert-Jan de Vreede (Institute for Collaboration Science,
University of Nebraska at Omaha, USA) and Robert O. Briggs (Institute
for Collaboration Science, University of Nebraska at Omaha, USA)

Patterns for Collaboration Technology and Processes

Organized by Symeon Retalis (University of Piraeus, Greece) and
Christian Kohls (KMRC - Knowledge Media Research Center, Tuebingen, Gemany)

Please visit the EuroPLoP web site http://hillside.net/europlop and the
EuroPLoP BLOG at http://europlop.blogspot.com/ for more details on the
goals of the specific thematic tracks.

             *******************************************
                        SUBMISSION CATEGORIES
             *******************************************

Submissions should fall into one of the following categories:

Pattern papers

Short papers (5 to 10 pages) containing one or more patterns, longer
pattern languages (about 15 to 20 pages) or sequences and
work-in-progress papers.  All accepted papers will receive in-depth
shepherding by an experienced pattern author before the conference.
Newcomers papers may receive further shepherding at the conference
itself.

Proven practices papers

Papers about the craft of writing software or patterns, papers about
the concept of patterns and proven practices in general, case
studies of patterns in action, or papers about software development
communities of practice.

Focus group proposals

Focus groups are free-format discussion groups or workshops lasting
between 3 and 6 hours.  They are designed to bring together people
who are interested in a challenging topic related to patterns or
proven practices. Non-conventional ideas such as goldfish bowls are
welcome. Organizers of thematic tracks are encouraged to submit a
focus group proposal that covers parts of their topic.

             *******************************************
                         CONFERENCE STRUCTURE
             *******************************************

The main track of EuroPLoP will be organized as a series of writers'
workshops where authors work together to improve their papers.
Before pattern or other papers are accepted for a writers' workshop,
they are shepherded (non-anonymously). This means that an
experienced author will discuss your submission with you, so that
you can refine your paper prior to the conference. All submissions
will be peer-reviewed.

The EuroPLoP proceedings are published in book form after the
conference.

Papers discussed at writer's workshop at this conference qualify for
submission to the new journal "Transactions on Pattern Languages of
Programming" published by Springer. See http://hillside.net/tplop/ and
http://www.springer.com/home/computer/lncs?SGWID=5-164-2-470309-0Final
for details of this journal.

             *******************************************
                               SCHEDULE
             *******************************************

February 18, 2008: Paper Submission Deadline

March 10, 2008:    Start of shepherding

April 18, 2008:    Review Version Due
May 12, 2008:      Paper Acceptance notification

May 26, 2008:      Closing date for Early Registration

June 20, 2008:     End of shepherding and conference version due
July 9-13, 2008:   Conference
December 2008:     Final Publication Version Due

             *******************************************
           SUBMISSION PROCEDURE and CONFERENCE ORGANIZATION
             *******************************************

To submit your paper, please visit the submission page at
http://hillside.net/europlop/submission. This page will be available
in January.

Program Chair:     Till Schuemmer, FernUniversitaet in Hagen,
                    Germany, till.schuemmer@FernUni-Hagen.de
Conference Chair:  Allan Kelly, Software Strategy Ltd.,
                    UK, allan@allankelly.net
Focus Group Chair: Tim Wellhausen, IT-Beratung Wellhausen,
                    Germany, kontakt@tim-wellhausen.de
Web Chair:         Michael Weiss, Carleton University
                    Canada, weiss@sce.carleton.ca

For more information, please visit http://hillside.net/europlop

Posted by Dragos Manolescu | 1 Comments
Filed under:

Deploying Volta Web Applications

A typical Volta application comprises client and server elements. For a web application (Volta also works with WinForms applications) this translates into deploying to the server the content to be downloaded to and then executed by the client, as well as the code that will execute on the server. The Volta developer guidance contains a recipe covering deployment. This post caters to those for whom those explanations are not enough.

I cover the deployment on and provide screenshots for 64-bit Vista and IIS7. The exact details differ for other OS and IIS version combinations, but the intent is the same. To keep the number of variables low I'm using the Quickstart application distributed with the Volta SDK.

Step 1: Verify/Install the Web Server Component of IIS

If you've already configured IIS then this is a verification step only. Open the Windows Control Panel and select the Programs entry; then follow the Turn Windows features on or off (see below). Note that you need Administrator permissions for the latter.

image

Expand the IIS node and select the World Wide Web Services box:

image

Then expand the Application Development Features node and select the ASP.NET node; this will automatically select a few other nodes corresponding to prerequisites (e.g., .NET Extensibility, ISAPI Extensions and ISAPI Filters):

image

Step 2: Create an IIS Application

From the Start menu open IIS Manager (installed as InetMgr in C:\Windows\System32\inetsrv on my machine) and select Add Application...

image

Point it to whatever folder you want to hold the Volta application. The following shows Quickstart as the alias and D:\iis\Quickstart as the path; adjust these parameters according to your needs.

image

Finally ensure that the application pool (DefaultAppPool in the above screenshot) is configured to use version 2.0 of the .NET Framework (the complete version reads v2.0.50727).

image 

If you're using IIS7 these are the defaults; if you're using IIS6 then make sure to select these options.

Step 3: Publish the Volta Application

In VisualStudio 2008 select the Publish option from the Project's context menu, and then aim it at the application's physical path:

image

The Output window shows the publishing details:

image

Alternatively publish (following the above procedure) to a temporary directory and then "xcopy deploy" to the application folder.

Step 4: Test the Deployment

Point your web browser to the server where you deployed the application and verify that it works. For this example the server is localhost, the Alias is Quickstart and the entry point is Page.html:

image

Deploying Volta WinForms applications is similar. The main difference stems from the ability of the client side to interact with any server, not only with the origin server (as in the Singe Origin Policy security model implemented by web browsers). I will cover that in a separate post.

Posted by Dragos Manolescu | 1 Comments
Filed under:

Tier-split Refactoring WinForms Applications with Volta

The Volta quickstart as well as Wes' blog post Volta: Redefining Web Development tier-split an application that runs entirely in the browser. The refactoring yields a distributed application comprising a browser-resident client and a service.

This transformation showcases two aspects of the Volta recompiler at the same time: architectural reshaping and retargeting. However they are orthogonal. Let me focus on the former and set the latter aside. I'll do that through tier-splitting a WinForms application.

In Visual Studio 2008 create a new project of type Volta Windows Forms Application (highlighted below):

image

Then with the forms designer put together a very simple form.

image

With a button labeled Compute Fn it should be clear where I'm headed :) Clear the value of of label2 in the properties pane; this is where the application will display the results.

Next add a class Computation to the project and add a method that computes Fibonacci numbers. Yes there are smarter ways of implementing it :)

namespace VoltaWindowsFormsApplication1
{
    public class Computation
    {

        public int Fibonacci(int n)
        {
            if (n == 0)
                return 0;
            else if (n == 1)
                return 1;
            else
                return Fibonacci(n - 1) + Fibonacci(n - 2);
        }
    }
}

Then add an instance variable of type Computation to the Form1 class and initialize it in the ctor:

public partial class Form1 : Form
{
    Computation computation;

    public Form1()
    {
        InitializeComponent();
        computation = new Computation();
    }
}

Finally wire the button such that clicking on it parses the input, validates it, invokes the computation, and displays the result:

    private void button1_Click(object sender, EventArgs e)
    {
        int n;

        if (int.TryParse(textBox1.Text, out n) && n >= 0)
        {
            label2.Text = string.Format("F({0})={1}",
                                         n,
                                         computation.Fibonacci(n).ToString());
        }
        else
            label2.Text = "Invalid input";
    }
}

So far so good, no voltage here. Let's flip the switch and plug in the rewriter.

After making sure that Enable Volta tiersplitter is checked on the project's property page, navigate or open the Computation class, right-click on the class and select Tier-split To Run At Server from the Refactor menu. The only thing that this refactoring does it to add a custom attribute aimed at the class (as well as add a few references to the project but those aren't source level changes):

namespace VoltaWindowsFormsApplication1
{
    [RunAt("Server")]
    public class Computation

Just like the sample from the Getting Started document, this attribute marks the distribution boundary. Volta uses the marker to split the application into two parts, with one part running as a service. Hit F5 and all the needed pieces unfold under the hood. Because the rewriting operates on MSIL Volta doesn't add any new source files or components to your project or solution. This makes it easy to experiment and fine-tune what runs on either side of the fence.

At this point I'd like to bring up a key point. There is an important difference between where the tier-splitting happens, and how it happens.

  • Volta makes the where part explicit: the developer marks the distribution boundary with a custom attribute, as shown above. Partitioning the functionality and communication are critical decisions when designing distributed systems. Volta doesn't attempt to make these decisions for you; they represent essential complexity.
  • Volta takes the how part out of sight: the rewriter encapsulates the class(es) marked to run at server within a service. It also arranges that the client classes call the service, and injects a marshalling layer between the two. Though required, these implementation details are orthogonal to the problem to be solved; they represent accidental complexity.

People building distributed systems have known for many years about the fallacy of making remote calls look like local calls, and thus setting a trap for the developers. We didn't ignore or forget this insight. Rather, Volta takes over the accidental complexity so Volta developers could focus on putting the distribution boundary at the right place.

It's easy to see that the tier-split WinForms application uses a service. Once the Form comes up double-click on the Volta WebServer's electric eel icon that appears in the notification area. Select the Log requests box and then compute a Fibonacci number. The POST appears on the server's log.

image

But for someone who grew up with the Smalltalk browser the debugger provides the best way of looking under the hood. Visual Studio has a first class debugger so let's put it to work. In the Form1 class set a breakpoint in the client code, before the call to Fibonacci:

image

Then in the Computation class set another breakpoint in the Fibonacci method:

image

Ensure that Visual Studio is in the Debug configuration and then hit F5. Enter either 0 or 1 into the text box to avoid having the debugger pop up as the computation recurses. Then click the form's button and examine the call stack. On the first breakpoint (in the form's event handler) the call comes from the client:

image

Resume execution and the second breakpoint (in the Fibonacci method of the Computation class) pops up the debugger. This time the call stack shows a server:

image 

At this point the Fibonacci calculator is a distributed application. The network is not involved when the application interacts with the service running in the development server. However this not the case beyond development, where the latencies and delays associated with going over the network are a fact of life. Under those circumstances synchronous method invocation becomes unsuitable.

I could make asynchronous calls using delegates. But that's another bit of accidental complexity lurking in the code. So instead let me rely on Volta to generate delegates and inject the BeginInvoke and EndInvoke pair in the code.

As Volta's architecture refactoring and retargeting are orthogonal asynchronous invocation is no different than explained in Step 7 in the quickstart, except one small idiosyncrasy due to to the UI thread (more on that shortly). In the Computation class add:

[Async]
public extern void Fibonacci(int n, Action<int> continuation);

If you haven't heard of CPS then think of the last argument as a callback, to be invoked with the result of the asynchronous computation upon its completion. Similar to [RunAtServer], [Async] is just a marker for the rewriter. The extern modifier makes the method visible to the IDE and C# compiler (so IntelliSense and type checking work as with the other methods) without requiring an implementation. Volta will generate this implementation and make it available in the final, rewritten program.

Finally modify the event handler to use the asynchronous method. To visualize the asynchronous call the code updates label2 prior to invoking the Fibonacci method, and then updates it again when the method completes. An integer around 37 takes enough milliseconds on my machine such that the result shows up a little after the F(37)= appears.

image image

Note that the following code uses a lambda form for the continuation: (f) => { ... } so that's where the => is coming from. In addition, the update happens through the Invoke method to avoid interfering with the UI thread. The argument for the Action ctor is a second lambda form: () => label2.Text = label2.Text + f.ToString()

private void button1_Click(object sender, EventArgs e)
{
    int n;

    if (int.TryParse(textBox1.Text, out n) && n >= 0)
    {
        var result = string.Format("F({0})=", n);
        computation.Fibonacci(n,
            (f) =>
            {
                label2.Invoke(new Action(
                    () =>
                    label2.Text = result + f.ToString()
                    ));
            });
    }
    else
        label2.Text = "Invalid input";
}

Let me bring up another important point. Here Volta hides the accidental complexity associated with asynchronous method invocation, just like it does with tier-splitting. Rather than spending time with BeginInvoke and EndInvoke, you focus on deciding what calls should stay synchronous and what calls should be asynchronous. In effect, Volta provides asynchronous methods through synchronous implementations (such as the initial Fibonacci method) paired with asynchronous declarations (such as attributed method).

Posted by Dragos Manolescu | 5 Comments
Filed under:

Volta: The Power of Lingua Franca

Earlier today we released the Live Labs Volta Technology Preview. There are already a few blog posts covering Volta from several team members, including Danny van Velzen, Harish Kantamneni, Jeffrey van Gogh, and Wes Dyer; Erik Meijer also posted an entry on Lambda-the-ultimate. Here I'd like to clarify an aspect that is starting to come up in other conversations: the power of lingua franca.

Here's the flow of transformations from source code (C# in this example) to native code, without Volta:

Slide1

The Volta recompiler works on MSIL, the intermediate language that .NET languages such as C#, VB or Iron Python are compiled to. Consequently, Volta alters the above flow by introducing another transformation of the MSIL. This transformation rewrites MSIL into MSIL, while adding the plumbing code for distribution and asynchronous method invocation. This is precisely where Volta pushes the corresponding accidental complexity, thus getting it out of the way. The following diagram shows this modified flow, when both the client and the tier-split service are running on the CLR.

Slide2

A similar MSIL transformation provides the ability to stretch the reach of the .NET platform to cover the cloud through retargeting. Rather than rewriting MSIL into MSIL Volta rewrites it into JavaScript. The following diagram shows the retargeting flow, when the client runs in a DHTML browser and the service on the CLR.

Slide3

The above sketches illustrate the power of lingua franca. By working on MSIL rather than source code Volta gives developers the freedom to use any .NET language, the ability to mix multiple languages, as well as leverages the hard work of the compiler writers (think optimizations, for example). In addition, avoiding source code is less brittle and accommodates high-level language evolution as long as the MSIL doesn't change.

Posted by Dragos Manolescu | 5 Comments
Filed under: , ,

Guidance on Model-View-... Variants

Rcently I've been part of several conversations on the differences between Model-View-Controller and Model-View-Presenter. While reviewing the original articles (i.e., Krasner + Pope and Potel) which I read years ago I ran into many different, and sometimes incomplete or even incorrect interpretations and renditions. Following this experience I bet that MVC and MVP are the most misunderstood popular patterns. Answers to questions such as Why have you used MVP? or What's are the salient traits that determine whether a triad is still an MVP? are leading me to believe that many folks would welcome guidance about these patterns (including their relationsip). What's the best side by side MVC/MVP explanation you've seen? Would something like that make your life easier? 
Posted by Dragos Manolescu | 2 Comments
Filed under: ,

PLoP 2007 Call for Participation

Here's the announcement from my fellow Hillsider (and long time friend) Joe Yoder. Anybody who's serious about writing, reviewing and refining patterns should have at least one PLoP under their belt.

 

*********************************************************************
                        CALL FOR PARTICIPATION (final)

    14th Conference on Pattern Languages of Programs (PLoP 2007)

      September 5-8, 2007 - Monticello, Illinois, USA
                   http://hillside.net/plop/2007/


                *Early Registration till 19th August*
        http://hillside.net/plop/2007/index.php?nav=registration
*********************************************************************

*About PLoP*

Pattern Languages of Programs (PLoP™) conference is a premier event for
pattern authors and pattern enthusiasts to gather, discuss and learn
more about patterns and software development.

Patterns authors and non-authors will find in the different PLoP
activities (Writers' Workshops, Writing Groups, Focus Groups, BoF
sessions, BootCamp, Games) many opportunities to meet and learn more
about patterns and pattern writing.

As a whole, the conference provides a friendly and effective environment
to give and get feedback, to share expertise, and to allow the
participants to improve their knowledge about patterns.

*How To Participate*

If you are not an author of a paper accepted for PLoP'07, you can still
participate actively by enrolling a *Writing Group*, or proposing a
*Focus Group* or *BoF*.

*Writing Groups* are primarily for participants willing to start writing
their first pattern, or to continue evolving their work-in-progress.
Writing groups aim at providing authors the opportunity to work on the
their patterns in an interactive session mentored by an experienced
author specifically assigned to each group.

Papers on the writing groups are typically papers that, at the end of
the shepherding process, were considered that would profit more from an
interactive session to work on the paper than from a writers workshop.

After the work done in the writing group, some papers will be selected
to be discussed in the final session of a Writer's Workshop at PLoP'07.
Another possibility is to further evolve them after PLoP'07 and submit
to the Mini-PLoP at OOPSLA'07, a full-day Writers Workshop.

*Focus groups* are free-format discussion groups or workshops aimed at
bringing together people interested in a hot topic related to patterns
or proven practices, for a period of about two hours.

These sessions might focus on very different topics and issues related
to patterns, ranging from writing to using, organising, or adopting
patterns. Focus group proposals should include a brief description of
the topic to be addressed, objectives, format, conditions for
participation (e.g. invitation, submission, free, etc), and a schedule
outline. Proposals addressing interdisciplinary topics and topics from
other domains than software development are especially encouraged.
Non-conventional formats are welcome.

Focus group proposals are reviewed by the program committee. Focus group
leaders are expected to write a report to be part of the final
conference proceedings.

*BoF ('Birds of a Feather')* is a shortening of the proverb "Birds of a
feather flock together.", meaning that people (birds) of the same kind
or interest (of a common feather) enjoy spending time (flocking) together.

BoF sessions are informal meetings, usually scheduled and organized
lately or even on site, where people group together based on a shared
interest and carry out discussions without any pre-planned agenda.
Everyone may propose a BOF session to the conference chairs, on or
before the conference.

*How to submit*
To participate please submit your idea or work-in-progress till *17th
August*, by email to plopsubmissions@hillside.net. The submission can be
as minimal as a 200-word abstract or a full paper under development.

*How to register*
PLoP online registration has opened on May 15 and will be possible till
August 19, 2007. We strongly encourage early registration for better
room arrangements and conference service.
URL: http://hillside.net/plop/2007/index.php?nav=registration

*Important dates*
Aug 12: Conference Drafts due
Aug 17: Writing Workshops submissions due
Aug 19: Early registration ends
Sep 5: First Day of PLoP

*Chairs*
Program Chair: Joseph Yoder (The Refactory Inc., USA)
Conference Chair: Ademar Aguiar (FEUP, Universidade do Porto, Portugal)

*More information*
For more detailed information, please visit the PLoP'07 website.
http://hillside.net/plop/2007/


We will look forward for your participation.

Best regards,
Joseph Yoder and Ademar Aguiar
PLoP 2007 Chairs

P.S. If you think that this conference may be of interest to
colleagues, friends or communities to which you belong, please
forward on this email. Thank you.

--
PLoP is a trademark of The Hillside Group, Inc.
--

Posted by Dragos Manolescu | 1 Comments
Filed under:
More Posts Next page »
 
Page view tracker