PureMVC Architects Lounge

PureMVC Manifold => Standard Version => Topic started by: JJfutbol on January 23, 2009, 06:50:34



Title: Documentation up to date?
Post by: JJfutbol on January 23, 2009, 06:50:34
Installed the editor today and already am coding in Objective C a language I don't know! Man I love PureMVC. :) Going through the documentation and noticed a Mediator is defined with a setViewComponent method but when looking at the actual source for EmployeeAdmin it uses a withViewComponent method. No biggie but wondering what is correct? Will the documentation be corrected to reflect that? Or is the library that is part of the EmployeeAdmin demo old?


Title: Re: Documentation up to date?
Post by: JJfutbol on January 23, 2009, 06:54:14
Another example would be the Proxy has a withData method rather than setData.


Title: Re: Documentation up to date?
Post by: puremvc on January 24, 2009, 03:45:03
Good catch on the method names. Hopefully if there's no real reason for them to be different it will be changed. The framework should remain true to the reference wherever possible to reduce confusion and minimize the need to document differences.

-=Cliff>


Title: Re: Documentation up to date?
Post by: JJfutbol on January 24, 2009, 07:19:15
No biggie. It's just that it would be best to have consistency but I'm just not sure what is right. Whether its the PureMVC library file or the docs. In the case of the library it does match what seems to be the standards of the Objective C language which is nice. Methods there do tend to start with the word "with". It seems a way to initialize the component.


Title: Re: Documentation up to date?
Post by: puremvc on January 25, 2009, 07:04:54
That's the essential balance to be struck with these ports; staying true as possible to the reference implementation while not looking like an alien framework from Planet Flash.

If prepending 'with' is magic in Obj C, causing accessors to be made for whatever its prepended to, so be it.

On this one, though I still think if its a matter of choice it should stay like the reference. Its not like it will be incomprehensable.

-=Cliff>


Title: Re: Documentation up to date?
Post by: btknorr on January 25, 2009, 12:28:16
Hey there,

Just to clarify any confusion...the withViewComponent method is a static convenience method for creating a Mediator - this is standard ObjectiveC convention.  Also all the instance setter and getter methods follow the standard ObjectiveC conventions as well, for example:

myMediator.viewComponent = someViewComponet;
//or
[myMediator setViewComponent:someViewComponent];

someViewComponent = myMediator.viewComponent;
//or
someViewComponent = [myMediator viewComponent];

Hope this helps:)

Best,

Brian


Title: Re: Documentation up to date?
Post by: puremvc on January 27, 2009, 06:08:47
Ok, I thought that might be a bit of a magic incantation.

-=Cliff>