170 likes | 270 Views
The case for Speech. Think of the following kinds of applications … Do they have something in common ?. ?. Social software. Information Systems. eGovernment. e-*. Gaming.
E N D
Think of the followingkinds of applications … Do theyhavesomething in common? ? Social software Information Systems eGovernment e-* Gaming
Yes! Theyalldealwithpeople, withtheirneeds for collaboration, communication, coordination … They are Social Apps! Social applications Social software Information Systems eGovernment e-* Gaming
Look at their functional requirements and you will invariably find answers to these typical questions … Which roles do the users play? Which things do they say? Who is able to say/see what? When? Which things they must do? Which things they must be notified of? Which services are needed? Who is able to invoke these services? When? ….
But programming these requirements with general-purpose abstractions is tough, error-prone, too verbose, … Can we do it better?
Yes, we can! Speech allows the programmer to reason about the design of social apps using high-level patterns and socially-inspired abstractions such as …
Twitter is an information network made up of 140-character messages (or tweets), sent by registered users called tweeters. Twitter users may choose to follow other tweeter accounts, so that all their public tweets will be automatically notified to its followers. These tweets can be re-tweeted. Any user mentioned by a tweet may replyto it. Users can also group tweeters into liststo facilitate following. For instance, look at the following Twitter requirements. Can youfindanycommonalitiesbetween the conceptsemphasised in orange, green and red? In Speech, they are represented as particular types of speech acts, agent roles andinteraction contexts. The genericmodel of theseabstractionsaccounts for the 90% of the twitter structure!
Isabel- I want to create an account named idelamor Username is not already taken, so the creation is authorised; the user finishes its session as guest and initiate a new one as a registered tweeter user David- I want to follow Miles Miles’ account is not private, so the request is authorised Alberto- I want to follow Miles Miles’ account is not private, so the request Is authorised Alberto- I want to follow David David’s account is private, so the request is pending for approval David- I accept Alberto as a follower The request for acceptance is authorised, and Alberto is declared as David’s follower David- I want to create a new list named scala The request is authorised; the list is created David- I want to include Alberto in the scalalist The request is authorised; Alberto is added to the list And Speech comes alsoequippedwith a standard library of speech acts which are bothhighlyreusable and expressive. The followingscenario can entirely be modeledafter standard speech acts! : SetUp : Join : Join : Join : Allow : SetUp : Assign
Speech designs can be representedusing a UML profile. The followingdiagramrepresents the social structure of the Twitter app.
Scenarios can also be formalisedusingcustom dynamic diagrams. Beautifulanimations! : setUp :twitter :visitor miles: account :twitterer :follower isabel: account :twitterer : allow : assign : join : setUp : join javi: account {blocked=isabel} jesus: account {private=true} :twitterer :follower :twitterer scala: list :follower :listed
Modeling diagrams are complementedwithspecificationsheets, whichprovidefurtherdetails on rules, attributes, etc. Structural spec.: attributes & constraints Dynamic spec.: life-cycle, empowerment & permissions, …
How do weimplement a Speech design? Usingitscurrentembeddedimplementation in Scala!
Butthere is more to the Speech interpreter: the Speech development environmentalsogivesussignificant support at the persistent, web and clientlayers! Client Tier HTTP Web Tier Java invocations Business Component Tier JDBC, SQL Persistence Tier
In sum … which are the advantages of Speech over general-purpose technologies? General-purpose Programming Languages Speech • Low-level languages, hugesemantic gap • Verboseprograms • Poor understandability • Difficultto master • Poor quality, high time & cost • High-level social abstractions • Up to 50% shorter in lines of code • Speech designsdirectlyunderstandablebydomainexperts • Easierto master • Significantincrease in quality, and reductions of time and cost
Whatabout workflow & rules engines, social networking tools, etc.? Speech alsooutperformsthesetools in manyrespects! Domain-Specific Tecnologies Speech • Wholespectrum of social apps! • Also target programmers! • A full-fledgedprogramming-language! • Anembedded DSL for social apps! • Niche domains • Target business analysts • Suite-based environment: modular and reusabilityproblems, expressivenessproblems • Lack of development environments: testing, version control, debuggers, etc. 15
Do you want to try Speech? Visit us at … www.speechlang.org And follow us through … blog.hablapps.com github.com/hablapps twitter.com/hablapps facebook.com/hablapps