tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/629-using-local-sql-and-servicesRobotlegs: Discussion 2013-04-28T10:18:32Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/91557872011-08-09T17:39:12Z2011-08-09T17:39:12ZUsing local SQL and services<div><p>In general anything that accesses something outside your
application is considered a service. Obviously this doesn't mean
that you need to cram everything in one or more services, you
create helper classes and delegates that can be reused by several
services for instance.<br>
When it comes to accessing a local database I tend to delegate
accessing the database to a helper class, an adapter or facade that
makes it easier to CRUD the database records. I tend to create
use-case specific services and generic helpers.<br>
For instance a UserDataRetrieverService with a retrieveUserDataByID
method and then a SQLLiteFacade class with a generic method
retrieveFromTable (just making it up as I write, but I think you
catch my drift)<br>
Obviously you'll want to map both against an interface to ensure
you can easily switch implementation if you'd want.</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/91557872011-11-02T15:14:51Z2011-11-02T15:14:51ZUsing local SQL and services<div><p>Closing the thread.<br>
If you need more help with this, feel free to re-open this
discussion. Please open new threads for new issues.<br>
Thanks!<br>
Ondina</p></div>Ondina D.F.