Hi tim

what was the result of you chat?
Because to me I would go for the first solution because in any case
you would have to modify the sprintsIn: method if the argument is
really changing so I do not see the point to carry around and extra
arguments to all the methods.

stef

On Mon, Jun 12, 2017 at 9:15 PM, Tim Mackinnon <tim@testit.works> wrote:
> Hi - I’m after some ideas or maybe previous examples that might guide me in 
> the best approach of wrapping a low level library (essentially the Jira 
> connector that Phil demo’d at Pharo days this year).
>
> There are some low level commands that will fetch json arrays for you given a 
> “lira” instance- e.g:
>
> board := JiraBoard fromJira: jira named: ‘Project'.
> sprints := board sprintsFrom: jira.
>
> My question is related to building on top of this - and its a style question.
>
> I want model objects that wrap the json arrays and let me navigate things a 
> bit more simply, and query details more naturally - however I can’t decide 
> whether my model objects should “contain” a jira when you instantiate them - 
> which can be re-used for subsequent queries - OR - whether I should view jira 
> as a from of context, and keep passing it to methods when I need to retrieve 
> more details, or child objects?
>
> e.g.
> myBoard := ModelBoard fromJira: jira named: ‘Project’.
> mySprints := myBoard sprints. “No need to pass the jira again”.
>
> vs.
>
> mySprints :- myBoard sprintsIn: jira.
>
>
> I’m wondering if anything might guide me one way or the other? Is one more 
> tasteful/elegant than the other?
>
> Tim

Reply via email to