the case for speech march, 2013. think of the following kinds of applications … do they have...
TRANSCRIPT
10101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010001 100011110101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010001 100011000101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110000000000111111111110101010101000000001111010111100000001010111111111111111110101010000000000000000011111111111111111010101 000000010101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010001 100011010101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010001 100011000101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110010101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010 001100011010101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010 001100011000000011111111111010101010100000000111101011110000000101011111111111111111010101000000000000000001111111111111111101010100 000000000101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110000000011111111111010101010100000000111101011110000000101011111111111111111010101000000000000000001111111111111111101010100 000000010101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010001 1000110The company for programming the information societyThe company for programming the information society
The case for Speech
March, 2013
2
Think of the following kinds of applications … Do they have something in common?
Gaming
InformationSystems
Social software
e-*eGovernment
?
3
Yes! They all deal with people, with their needs for collaboration, communication, coordination … They are Social Apps!
Gaming
InformationSystems
Social software
e-*eGovernment
Socialapplications
4
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?….
5
But programming these requirements with general-purpose abstractions is tough, error-prone, too verbose, … Can we do it better?
6
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 …
7
For instance, look at the following Twitter requirements. Can you find any commonalities between the concepts emphasised in orange, green and red?
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 reply to it. Users can also group tweeters into
lists to facilitate following.
In Speech, they are represented as particular types of speech acts, agent roles and interaction contexts. The generic model of these abstractions accounts for the 90% of the twitter structure!
8
And Speech comes also equipped with a standard library of speech acts which are both highly reusable and expressive. The following scenario can entirely be modeled after standard speech acts!
Isabel- I want to create an account named idelamorUsername 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 MilesMiles’ account is not private, so the request is authorised
Alberto- I want to follow MilesMiles’ account is not private, so the request Is authorised
Alberto- I want to follow DavidDavid’s account is private, so the request is pending for approval
David- I accept Alberto as a followerThe request for acceptance is authorised, and Alberto is declared as David’s follower
David- I want to create a new list named scalaThe request is authorised; the list is created
David- I want to include Alberto in the scala listThe request is authorised; Alberto is added to the list
: SetUp
: Join
: Join
: Join
: Allow
: SetUp
: Assign
9
Speech designs can be represented using a UML profile. The following diagram represents the social structure of the Twitter app.
10
miles: account
Scenarios can also be formalised using custom dynamic diagrams. Beautiful animations!
:visitor
javi: account{blocked=isabel}
:twitterer:follower
:twitterer
isabel: account :twitterer
jesus: account{private=true}
:twitterer
: setUp
scala: list
:follower
: join
:follower:listed
: join: setUp: allow: assign
11
Modeling diagrams are complemented with specification sheets, which provide further details on rules, attributes, etc.
Structural spec.: attributes & constraints
Dynamic spec.: life-cycle, empowerment & permissions, …
12
How do we implement a Speech design? Using its current embedded implementation in Scala!
13
But there is more to the Speech interpreter: the Speech development environment also gives us significant support at the persistent, web and client layers!
Client Tier
Web Tier
Business Component Tier
Persistence Tier
HTTP
Java invocations
JDBC, SQL
14
In sum … which are the advantages of Speech over general-purpose technologies?
General-purpose Programming Languages
Low-level languages, huge semantic gap
Verbose programs
Poor understandability
Difficult to master
Poor quality, high time & cost
High-level social abstractions
Up to 50% shorter in lines of code
Speech designs directly understandable by domain experts
Easier to master
Significant increase in quality, and reductions of time and cost
Speech
What about workflow & rules engines, social networking tools, etc.? Speech also outperforms these tools in many respects!
Whole spectrum of social apps!
Also target programmers!
A full-fledged programming-language!
An embedded DSL for social apps!
Domain-Specific Tecnologies
Niche domains
Target business analysts
Suite-based environment: modular and reusability problems, expressiveness problems
Lack of development environments: testing, version control, debuggers, etc.
Speech
15
16
And follow us through …
Do you want to try Speech? Visit us at …
www.speechlang.org
blog.hablapps.com github.com/hablapps twitter.com/hablapps facebook.com/hablapps
10101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010001 100011110101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010001 100011000101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110000000000111111111110101010101000000001111010111100000001010111111111111111110101010000000000000000011111111111111111010101 000000010101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010001 100011010101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010001 100011000101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110010101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010 001100011010101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010 001100011000000011111111111010101010100000000111101011110000000101011111111111111111010101000000000000000001111111111111111101010100 000000000101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110101011110010110101011001111100011101010101000111000011100001110001111100111101010100001100000011110011110001111010101010100 011000110000000011111111111010101010100000000111101011110000000101011111111111111111010101000000000000000001111111111111111101010100 000000010101111001011010101100111110001110101010100011100001110000111000111110011110101010000110000001111001111000111101010101010001 1000110The company for programming the information societyThe company for programming the information society
Contact with:Isabel de la Morena Maroñas, [email protected]
Juan Manuel Serrano Hidalgo, [email protected]
Habla Computing, S.L.Villalobos 20, 13 A28018 MadridSpain
17