Generic code for developing application

I have to develop a Application for  a enterprise. can anyone suggest how to make a foundation class / code to reduce the coding. i dont want to code for each form for navigation, save , delete etc. what should i use ado bound control form or  ado code form .
sandeepjaiswalAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

david_levineCommented:
Check out the following framework: http://www.alstra.com/ .  I don't have any hands-on experience with the product. I'm just aware of it's existence.

I wouldn't suggest building your own. The reason is it's even harder and time consuming building a specific app since you need to write very generically. You'd spend more time building the framework then you could ever build the app. The payback would not be on the first app, or possibly even the 2nd. It would start to have a payback once the development/maintenance of apps recoupes the cost of the framework development.

David
0
MarineCommented:
Definately building your own class objects will be very usefull. At first it might take you time to build the structure behind it but in a long run it will help you to maintain it easier. If you going to create a class that would be responsible for moving your recordset and doing updates,editings,deletes go with the unbound mode. Say you have 2 tables in a database where you even just have to browse the data you will have to write the code 2 times or even if you do write it in functions it won't be as robust as the class object. Take a look at something like this
say this is cObjRs class
------Class cObjRs--------------
Public Sub Movenext(rs as AdoDB.Recordset)
if not rs.eof then
rs.movenext
end if
end Sub

Public Sub MovePreviouse(rs as AdoDb.Recordset)
if not rs.bof then
rs.movepreviouse
end if
end Sub
this is very simple browsing example
--------End Class-----------------

--------Form Code-----------------

Public rs as ADODB.Recordset
some place in Form_Load event of the form delcare the instance of the cObjRs class.
Private table as cObjRs
now you can use that objects recordset browsing. Its pretty cool since now only you can browse the first table but also the other tabes as well.
table.movenext
table2.movenext
--------END Form CODE-------------
if you declare 2 recordset they both can use your cObjRs class to browse the data pretty cool.
0
MisledmanCommented:
I think the question you are asking has to do with polymorhism and inheritance. You want to be able to write one "Save" routine for all saves. VB does not provide true inheritance. It provides what MS calls "implemented inheritance". It is well beyond the scope of this answer to explain inheritance. However, If you figure out what the "Implements" keyword in VB is all about you will in the process figure out what implemented inheritance is. I would suggest reading "Doing Objects in Visual Basic 6" as a start. By Deborah Kurata.

In a class module you would use the Implements keyword in the declarations section for an interface called "IInterface" as follows:

Implements IInterface
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.