When to create a new class of functionality

  • Thread starter Thread starter dkode
  • Start date Start date
D

dkode

Guest
I am sort of puzzled when it comes to when to create a seperate class of functionality

Here's an example of an app I am creating right now.

User clicks a button,
selects year from a combo drop down
clicks a button
code is executed in the click code of the button that connects to an access database, runs a query and then takes the results and inserts it into a new excel spreadsheet.
quite a bit of formatting of the excel spreadsheet occurs in 6 different worksheets

Now,

I am wondering if i should break the code up into seperate classes that performs the queries, formatting etc.

If i do seperate it out, what is the benefits of doing it this way?

Is there a performance gain or loss?

Thank you.
 
Back
Top