Hacker News new | past | comments | ask | show | jobs | submit login

I couldn’t agree more.

One thing I’ve been doing lately to mitigate #2 and #3 is to use the repository pattern. Models become POCOs and the repositories worry about translating to and from SQLite/Core Data/etc. Is it perfect? Nope. But it does provide a lot of flexibility, and I sleep better at night knowing that I can swap out the data store much more easily should I need to.

I do the same thing (in a completely different language, mind you) -- it's quite handy. Especially when I'm working on the original classes and tests without worrying about data storage to begin with: hard-code the stuff that I need right now in the repository layer, and build up the logic. Then, when I'm happy with how that's going, swap over to a proper data-store, and chuck the routing layer in front of it. Bam, and you have a really nice web-app API ready for a front-end.

It's nice working this way, interestingly, sans-frameworks for once. Code is a lot more maintainable too.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact