I am deciding on where using .xib files are needed while developing with MonoTouch.
My current project needs to work with iPhone and iPad, so I’m wondering if even using Interface Builder is worth it. I already have to remove some designer files so that 2 different views (one for each device) go to the same controller. I also am the only one working on this, and there will be no designer working in IB.
Here are a couple questions:
- Is there any performance benefit/decrease to using XIBs?
- Is there any software design issues, detracting from MVC, etc. that one way or the other will inihibit?
- Is there any versatility drawbacks to using XIBs, like is it tough to implement lazy-loading for certain views with XIBs?
Thoughts?
I just recently had to make the same decision, and I decided to go xib-less. I found it easier to be able to see exactly what was happening when.
With the iPhone and iPad interfaces being relatively simple, I wasn’t getting a huge benefit from IB, but there was a lot of jumping around between MonoDevelop and IB. Like you, I wasn’t working directly with designers.
I do the initial layout in IB to get the coordinates. After that, I just do modifications directly in the code.
There’s also the benefit of having less files.
Another advantage was in asking questions. It’s much easier to email colleagues chunks of code, than code and xib files. I can also easily extra the core code need to specify the question succinctly.
As to your questions… I found it easier to think about and structure my project according to MVC when I was in complete control – but maybe that’s just me. For my project, I didn’t really find something where I thought a xib file would have been much better. As for performance, I’ve not done any tests, so can’t really offer an informed opinion on that. I read a post somewhere that the difference was negligible, but a quick search hasn’t dug it up. I’ll try and locate it tonight.