I came across a design pattern "Builder" which I think would fit well to what I would like to do. In my iOS application, I have different Core Data Entities and I would like to able to transform my objects into different data formats. Currently, my plan is to support XML, HTML & JSON. So, I have been thinking to design this solution using a standard design pattern like "Builder". Some of my questions are
- Is the Builder pattern the correct one for this problem?
- Can I use this pattern in Objective C? Since there is no abstract class notion in Obj C, not sure how to approach this. I am thinking I should use a base class and a protocol to define my abstract methods.
Please, feel free to suggest of any new design solutions that would best suit my needs.
Thanks so much for your suggestions and comments.
Regards, Javid
Edited: One other key point is the final format will comprise of different core data entities. For example, if there is an entity team and player, I need to create a data format that uses both team & player.