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

How is that simpler than writing a package that replaces the datastore, then changing your imports?



If that feels simple to you, knock yourself out.

I believe this is way simpler. Using interfaces will coral your datastore code into one location. Then, you only need to change that code in a very modular way. Heck, give the job to a friend and go for a walk. You can review the changes he made later without worrying that he crossed your routes up. Heck, you can even run your tests (same tests as before since you are using an interface) against your new datastore.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: