|
-
Feb 19th, 2015, 10:44 AM
#1
Thread Starter
Fanatic Member
A question or two about classes and when to use them.
I took a three year course in Computer Programming at a community college. We learned how to code using C++, COBOL (Ugh), VB 6.0, Java, and even had a unit on JCL/Mainframe as a lot of employers in my city are government and therefore quite archaic.
Anyway, that was in 2001. I've been working primarily as a data analyst ever since but I've written my fair share of applications during that time as well - some of which have multiple end users and some are just data-loading programs.
It's been a couple of years since I wrote anything substantial and I'm starting to get the hang of VB.Net.
That's my background...now onto the questions...
I wrote a fairly large program back around 2003 that used "classes" in VB 6.0. The class was setup to build a record that would ultimately be loaded into an Oracle database. Even though I used classes back then and we covered them in school quite a bit, I'm STILL not entirely sure how best to incorporate them into my programs.
I try to write my applications into as many compartments as possible. For example, when someone hits the "Run" button on one of my loading apps the code within that button just calls a bunch of subs/functions.
E.g.
GetData()
AddToDataSet()
EliminateDuplicates(parameter(s))
This method works pretty well for me because when I look at the code it's easy to see the steps my program takes to run. I know based on the above that my program gets data, adds it to a dataset, and then eliminates duplicates - just as an example off the top of my head, not saying that's exactly how it works.
Anyway, at what point here would a "class" be more useful? To me, classes are more useful in shops with multiple programmers and applications where you build everything to be as reusable as possible.
For me, I may get a text file from someone that needs to be loaded into a database once a month. That text file is unique and I fail to see why my above method doesn't work just fine.
I guess what I'm saying here is...I hear a lot about about classes and how they're so useful, but I rarely see how they would be useful in my loading programs or small applications.
I guess I need a refresher more than anything. It's been over 10 yrs and I feel like I'm becomming that crotchety old "back in my day" kind of programmer.
Last edited by The_Grudge; Feb 19th, 2015 at 10:48 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|