[Pharo-users] [Modeling with Pharo] How to model a simple human interaction.

stepharong stepharong at free.fr
Sat Mar 4 15:30:12 EST 2017

Hi sergio

> Hey all..
> I got my first paying gig that i am able to use pharo with, and i am on  
> the last leg before calling it complete.

I'm really happy for you.
just this makes pharo and all our effort worth it.

> Here’s what I need to do..
> This application accepts SMS text messages. It allows the user to send  
> images via MMS and place an order to a print house for those images..   
> it then compiles the order, and >submits it to the order processing  
> system and makes the prints.
> The last thing I need to zero in on is handling the interaction. Believe  
> it or not, I have never modeled such an interaction. The interaction  
> goes:
> - user sends images{s)
> - bot says ‘thanks’ and asks if there are more
> - user types ‘done’ or sends more
> - on ‘done’ bot asks for print size
> - bot says ‘thanks’ and the interaction is done. order is processed.
> my first inclination is to use a state machine, progressing through  
> order each time the user enters ‘done’..
> does this sound reasonable,

Yes it seems.

After you could also have a queue of command.

> or is there a better model/design pattern for this interaction?

You can look at the state pattern. It is good for implementing state  


> Thanks!
> ----
> peace,
> sergio
> photographer, journalist, visionary
> Public Key: http://bit.ly/29z9fG0
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> http://www.Village-Buzz.com
> http://www.ThoseOptimizeGuys.com
> http://www.coffee-black.com
> http://www.painlessfrugality.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101

Using Opera's mail client: http://www.opera.com/mail/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20170304/3d8daec8/attachment.html>

More information about the Pharo-users mailing list