Objective C: Object event communication methods analysis
Main Article Content
Abstract
This article shows a series of programming patterns used in event communication in Objective C. Each one of these patterns is explained according to its functionality, a concise example of its day to day use is given and, optionally, a listing of its advantages and disadvantages regarding its own features is presented.
In the beginning, some object oriented programming concepts are retaken, so that we don’t lose sight of the topic we’re dealing with. Starting with some of the object orientation pillars, we remember what we seek to have in a greater or minor extent in the software for it to be considered of good quality. Then the model view controller pattern is analyzed, which has been very popular in the last years, and which allows to apply, as it will be shown later, the other event communication patterns.
Mentioned patterns are: delegates, notifications, observation and completion blocks. Each one of these communication methods have its own pros and cons. Throughout this article their everyday uses will be discussed. The objective of this analysis is to offer any developer a discussion point when selecting one of these methods for a specific task.
Article Details
Los autores conservan los derechos de autor y ceden a la revista el derecho de la primera publicación y pueda editarlo, reproducirlo, distribuirlo, exhibirlo y comunicarlo en el país y en el extranjero mediante medios impresos y electrónicos. Asimismo, asumen el compromiso sobre cualquier litigio o reclamación relacionada con derechos de propiedad intelectual, exonerando de responsabilidad a la Editorial Tecnológica de Costa Rica. Además, se establece que los autores pueden realizar otros acuerdos contractuales independientes y adicionales para la distribución no exclusiva de la versión del artículo publicado en esta revista (p. ej., incluirlo en un repositorio institucional o publicarlo en un libro) siempre que indiquen claramente que el trabajo se publicó por primera vez en esta revista.