Note that there are some explanatory texts on larger screens.

plurals
  1. POOOP Modelled Objects in a Database Driven App?
    primarykey
    data
    text
    <p>I've built an entire banking app based on a SQLite database. Today I'm having a panic moment. I've been reading all sorts of articles on OOP, I believe I understand the concept and it's importance, however, I can't understand its place in an app like mine. So far, perhaps ignorantly, my logic for dealing with data has been as follows (example pseudo code for editing a banking form for a new account application):</p> <ul> <li>Within EditAccountApplication Activity, define a public Cursor, this Cursor will hold the details of the prior application form data. </li> <li>Query the DB for the old application form data using a method from DbHelper, return a Cursor object with said data.</li> <li>Using this Cursor, populate values of UI components (EditText, TextView, etc) with which the user can then edit to Re-Submit their application with updated data. </li> <li>User clicks on button to Re-Submit their application form, in the button's onClick() method, variables are defined and set for each UI component in a ContentValues object, this ContentValues object is then passed back to the DbHelper's method which ultimately updates the related DB record.</li> </ul> <p>Is this the correct approach I should be taking when using a SQLite backend? I am not seeing how modelling objects would help in this case (the Cursor is pretty much the object, I don't need to manipulate it as the UI elements are available for the user to manipulate).</p> <p>I really wish to understand whether or not this situation is one where creating modelled objects is of no added benefit.</p> <p>I really appreciate any help, a reality check will be a relief at this point as I'm freaking out!</p> <p>Thanks again!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload