Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where to start...OOP using VB6 1

Status
Not open for further replies.

barbola

Technical User
Feb 27, 2003
1,132
CA
We have an excel spreadsheet used to track sales orders and there are mega formulas for all the different customer pricing options. Because I am almost done my VB6 course, I offered to convert this to a database and create a new user interface.

I'm on my own as there is no other expertise in the company and this is alot more complicated than the simple database "employee info" examples in my course. Even my final project is going to be alot simpler.

I have classes and collections drawn up for the usual lookup lists (Company, Customer, Products) but how do I know I've accounted for everything? I'm at the Detailed Object MOdel drawing stage where it shows the classes, and their properties and methods. I don't really know what methods I need to put there.

I also will have an Order table that will store all the final calculations and entries for a customer order. Some of the calculations will be overridden with values. Do I need a class for all the calculations too?

If I have a specific question, it would be how complicated do you think this is, and how long will this take me to program? My boss made a comment like "It's not a 4 week project is it?" and I said "yeah ... it is". He has no IT background.

This is only one of two complicated projects where I think I've bitten off more than I can chew. What have I gotten myself into?
 
Analyse the spreadsheet. What services does it offer the end user? These are your requirements. Now that you have your requirements, think about the domain objects (customer, order, etc.) you will need to support these requirements. Once you have the domain objects, think about how they are going to communicate to get the work done. This will give you clues about the methods they will need to support, and the parameters that will need to be passed to those methods to support the requirements. Once you have a working conceptual model, think about the UI.

Note the continual reference back to the requirements - these are the things you get paid for - meeting the needs of the user.

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Thank you Steve. I will try to break it down instead of trying to solve it as one big requirement. There are so many if's and's or but's depending on the type of product, customer, source of product and a few other things.

 
Divide and conquer. :)

Steve's advice is very good. You always need to keep in mind what it is you're trying to do.

Now, as a practical matter, I wouldn't be looking too hard to create high level class diagrams up front. I would try first to get a good database schema together. Focus on relational database theory rather than OOAD. In fact, I would just go into SQL Server (or Access, if you must) and try creating your tables.

To answer your question about how complicated this is, the answer is how much money do you want to spend!?!? Let's see. You could spend $5000 on a copy of Rational Rose, maybe another $10,000 on training, and then create a 100 page problem statement. After that, you could create class diagrams at 3 levels of detail. Next year, you could....well, you get the idea. The other thing you could do is just work out the one-to-many relationships, create a database, make sure it holds all the data you need it to, and then use VB to create a UI for it. That should take you about 4 weeks, yes, and maybe you can use Visio to throw in a Class diagram after the fact.

Good luck, and post back if you like.

Bob
 
I have the database schema all laid out and set up in Access, that is old hat for me. It's getting VB to make things work that's the problem.

I see you posted my other thread, thanks ... this is just an internal program that will be used by about 2-3 people who currently use an Excel sheet. It's a good start for me to practice my new VB stuff anyway. Learning as I go...

thanks.
 
If it's old hat for you, then you already have a good handle on the basics of OOP. On your other thread, you're using things like collection objects and so on. Why aren't you just using ADO to get VB to make things work? What are you trying to do exactly?

Bob
 
I want to use collection objects because although this project is for work, I have a project to do to finish up my VB course that will also use collections. From what I've learned, I will be able to apply alot of what I've learned to my daily work, and I have already.

Using OOP in this particular project will also help me gain a better understanding in order to complete my course project. But, the guy here keeps asking me when I'm going to finish it. I may have to bite the bullet and just do ADO, but I wasn't sure how to get all the customer specs using one connection, I had like 4 or 5 different subroutines to get each value. I think another reply had some info I can use.

Yes, I know I need to learn this on my own, but I am finding it impossible with what I have on my own. I use examples that I find but really I have nowhere else to go. I only have my instructors online notes. That's it...zero, nada, nobody at work, no friends or mentors to help, and the instructor emails are not helpful and not too quick.

And, he will only help with my course project, not my work ones. So I come here for my work and I go to him for my course.

thanks for your interest :)

 
Well, ADO IS OOP, isn't it? They are objects, after all. Maybe you can use ADO to satisfy both requirements.

If you want to find anything and everything about OOP, try which has over 18,000 links to OO-related sites. If you feel overwhelmed there, you might start by investigating UML Class Diagrams.

HTH

Bob
 
Overwhelmed is my middle name [neutral]

Thank you for the link. I have a few sites bookmarked on class diagrams (Class Diagrams was one of my assignments a couple of months ago).

Now that I have all morning to work on this, I might gain some headway.
 
I just posted this faq faq708-5940 on your other thread, if you want a little demo on how to do classes in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top