Assisting End-User Development in Browser-Based Mashup Tools Soudip Roy Chowdhury DISI, University of Trento, Italy
[email protected]
Abstract—Despite the recent progresses in end-user development and particularly in mashup application development, developing even simple mashups is still non-trivial and requires intimate knowledge about the functionality of web APIs and services, their interfaces, parameter settings, data mappings, and so on. We aim to assist less skilled developers in composing own mashups by interactively recommending composition knowledge in the form of modeling patterns and fostering knowledge reuse. Our prototype system demonstrates our idea of interactive recommendation and automated pattern weaving, which involves recommending relevant composition patterns to the users during development, and once selected, applying automatically the changes as suggested in the selected pattern to the mashup model under development. The experimental evaluation of our prototype implementation demonstrates that even complex composition patterns can be efficiently stored, queried and weaved into the model under development in browser-based mashup tools. Keywords-assisted development; end-user development; composition pattern; pattern recommendation; weaving
I. P ROBLEM AND M OTIVATION By now, mashup tools, such as Yahoo! Pipes (http:// pipes.yahoo.com/pipes/), undoubtedly simplified some complex composition tasks by providing easy modeling constructs and lightweight runtime environments inside the client browser. Yet, despite these advances in simplifying technology, mashup development is still a complex task that can only be managed by skilled developers ([1], [2]). Figure 1 illustrates a Yahoo! Pipes model that encodes how to plot news items on a map. The lesson that can be learned from it is that plotting news onto a map requires enriching the news feed with geo-coordinates, fetching the actual news items, and plotting them on a map. For developing even such a simple application, at every step the user needs to know which component/s to use, how to set the parameter values for the components, how to define the data mapping among the components etc. Understanding this logic is neither trivial nor intuitive. Motivated by a user study on how end users imagine assistance during mashup development [3], we assist the modeler in each step of his development task by means of interactive, contextual recommendations of composition knowledge. The knowledge is re-usable composition patterns, i.e., frequently occurred composition fragments of previous successful mashup models. Having such re-usable composition patterns stored in
c 2012 IEEE 978-1-4673-1067-3/12/$31.00
Figure 1.
A typical pattern in Yahoo! Pipes
our pattern knowledge base, in this research, we particularly focus on (i) how to efficiently query and retrieve them interactively in response to the user’s modeling actions and the current composition context inside modeling tool. For instance, once user drags URL Builder into the modeling canvas and fills it’s parameters with values like in Figure 1, we recommend a pattern which suggests to use Fetch Feed as a next component. We further focus on (ii) how to automatically weave a pattern, upon selection, into the current mashup model by performing a set of modeling steps (adding a component, adding a connector between two components etc.) on behalf of the user. II. BACKGROUND AND R ELATED W ORK A. Challenges To identify the composition patterns for mashup development, in [4] we analyzed data flow based mashup composition models (similar to Yahoo! Pipes) and discovered five types of composition patterns: parameter value, connector, data mapping, component co-occurence, and complex patterns. However, recommending this patterns proactively and interectively inside the client-side modeling environment requires to design a pattern knowledge base (KB) that supports fast retrieval of the patterns. It also requires to have a set of efficient and interactive pattern querying and retrieval algorithms. In [4], we explained our approach for tackling these challenges. For the weaving, we further require to define a set of algorithms, which automate the contextual
1625
ICSE 2012, Zurich, Switzerland ACM Student Research Competition
Interactive modeling environment Query q
Pattern instance cp'
Composition pattern
Pattern usage statistics
Client-side pattern knowledge base
Similarity metrics
user selection cp
Patterns
Ranking algos
Object-actionrecommend. mapping
Recommendation R
Modeling canvas
Recomendation panel
Recommendation engine
pm
Partial mashup model pm pm
Pattern weaver
cp
KB loader Synchronization of client side and server side pattern knowledge base
object
Modeling instructions instr
Modeling action Modeling action
Modeling instructions instr
User selection cp
Event bus
steps related to recommendation
steps related to weaving
Figure 2. Functional architecture of our interactive recommendation and weaving approach
weaving steps of a pattern into a model by tackling issues related to model conflicts at runtime. B. Related Work Several works aim to assist less skilled developers in the design of mashups. Web macro approaches ([5], [6]) capture and reuse navigation patterns in end user programming. However, the assistance in these approaches are provided only for navigating and configuring data in webpages. In our research, we support compostion pattern reuse, by providing development assistance to end-users, in a more complex web mashup compositions scenario. Among other assisted development approaches, syntactic approaches [7] suggest modeling constructs based on syntactic similarity (comparing output and input data types), while semantic approaches [8] annotate constructs to support suggestions based on the meaning of constructs. In programming by demonstration [9], the system aims to auto-complete a process definition, starting from a set of user-selected model examples. Goal-oriented approaches [10] aim to assist the user by automatically deriving compositions that satisfy user-specified goals. Pattern-based development [11] aims at recommending connector patterns (so-called glue patterns) in response to user selected components (so-called mashlets) in order to autocomplete the partial mashup. The limitation of these approaches is that they partly overestimate the skills of less skilled developers (e.g., end users), as they either still require advanced modeling skills (which users don’t have), or they expect the user to specify complex rules for defining goals (which they are not able to), or they expect domain experts to specify and maintain complex semantic networks describing modeling constructs (which they don’t do). III. A PPROACH In Figure 2, we show the architecture of our client-side, interactive pattern recommendation and weaving infrastructure. The interactive modeling environment runs in the client browser. It is here where the pattern recommendation logic reacts to modeling actions performed by the modeler on
a construct (the object of the action) in the canvas. For instance, we can drop a component onto the canvas, or we can select a parameter. Upon each interaction, the action and its object are published on a browser-internal event bus, which forwards them to the recommendation engine. With this information and the partial mashup model pm the engine queries the client-side KB for recommendations, where an object-action-recommendation mapping tells the engine which types of recommendations are to be retrieved. The list of patterns retrieved from the KB are then ranked and rendered in the recommendation panel. Upon the selection of a pattern from the recommendation panel, the pattern weaver weaves it into the partial mashup model. The pattern weaver first retrieves a basic weaving strategy (a set of model-agnostic mashup instructions) and then derives a contextual weaving strategy (a set of model-specific instructions), which is used to weave the pattern. Deriving the contextual strategy from the basic one may require the resolution of possible conflicts among the constructs of the partial model and those of the pattern to be weaved. The pattern weaver resolves them according to a configurable conflict resolution policy. Our prototype is a Mozilla Firefox extension for Yahoo! Pipes [12], with the recommendation and weaving algorithms implemented in JavaScript. Event listeners listen for DOM modifications, in order to identify mashup modeling actions inside the modeling canvas, and accordingly recommendation engine queries and retrieves patterns from the KB, which is implemented in SQLite (http://www.sqlite. org/). The instructions in the weaving strategies refers to modeling instructions, which are implemented as JavaScript manipulations of the mashup model’s JSON representation. IV. E VALUATION AND D ISCUSSION For our experiments we extracted 303 pipes definitions from the repository of Pipes. We were able to identify patterns of all the types described above. We used these patterns to populate our KB and generated additional synthetic patterns to test the performance of the recommendation engine (the sizes of the KBs ranged from 10, 30, 100, 300, 1000 complex patterns) [4]. The complexity of the patterns ranged from 3 − 9 components per pattern, and we used queries with varying component set of size 1 − 7. In the worst case scenario (KB of 1000 patterns, approximate similarity matching of patterns), the recommendation is provided within 608 millisecond – everything entirely inside the client browser. As a next step, we will work towards evaluating the precision and recall of our recommendation and weaving algorithms. Subsequently we will expand our algorithms toward other modeling environments (e.g., BPM tools), we will make our prototype tool publicly available online and perform in-depth user studies to fine-tune the usability of our approach.
1626
R EFERENCES
[7] J. Wong and J. I. Hong, “Making mashups with marmite: towards end-user programming for the web,” in CHI’07, pp. 1435–1444. [Online]. Available: http://doi.acm.org/10.1145/ 1240624.1240842
[1] A. J. Ko, R. Abraham, L. Beckwith, A. Blackwell, M. Burnett, M. Erwig, C. Scaffidi, J. Lawrance, H. Lieberman, B. Myers, M. B. Rosson, G. Rothermel, M. Shaw, and S. Wiedenbeck, “The state of the art in end-user software engineering,” ACM Comput. Surv., pp. 21:1–21:44, 2011.
[8] A. Ngu, M. Carlson, Q. Sheng, and H. young Paik, “Semantic-based mashup of composite applications,” IEEE TSC, vol. 3, no. 1, pp. 2 –15, 2010.
[2] F. Casati, “How end-user development will save composition technologies from their continuing failures,” in IS-EUD’11, 2011, pp. 4–6. [3] A. De Angeli, A. Battocchi, S. Roy Chowdhury, C. Rodr´ıguez, F. Daniel, and F. Casati, “End-User Requirements for Wisdom-Aware EUD,” in IS-EUD’11, pp. 245–250. [4] S. Roy Chowdhury, F. Daniel, and F. Casati, “Efficient, Interactive Recommendation of Mashup Composition Knowledge,” in ICSOC’11, 2011, pp. 374–388. [5] C. Bogart, M. Burnett, A. Cypher, and C. Scaffidi, “End-user programming in the wild: A field study of coscripter scripts,” in VL/HCC 2008, 2008, pp. 39 –46. [6] A. Koesnandar, S. Elbaum, G. Rothermel, L. Hochstein, C. Scaffidi, and K. T. Stolee, “Using assertions to help end-user programmers create dependable web macros,” in SIGSOFT 2008, ser. SIGSOFT ’08/FSE-16, 2008, pp. 124– 134.
[9] A. Cypher, D. C. Halbert, D. Kurlander, H. Lieberman, D. Maulsby, B. A. Myers, and A. Turransky, Eds., Watch what I do: programming by demonstration. Cambridge, MA, USA: MIT Press, 1993. [10] M. Henneberger, B. Heinrich, F. Lautenbacher, and B. Bauer, “Semantic-Based Planning of Process Models,” in Multikonferenz Wirtschaftsinformatik’08, 2008. [11] O. Greenshpan, T. Milo, and N. Polyzotis, “Autocompletion for mashups,” VLDB’09, vol. 2, pp. 538–549. [Online]. Available: http://dl.acm.org/citation.cfm?id=1687627.1687689 [12] S. Roy Chowdhury, C. Rodr´ıguez, F. Daniel, and F. Casati, “Baya: Assisted Mashup Development as a Service,” in WWW’12, 2012.
1627