Results 1 to 4 of 4

Thread: Small Probs

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2009
    Posts
    116

    Small Probs

    1) What are the benefits of using Class Library?

    Secondly tell me one thing, I was asked in one of my interviews.Different types of cursors??
    As u all know, cursors are of diff types in ADO,RDO,DAO??? So which answer to give???? Do I all have to know all the cursor types!!!

    3)Where Delegates should they be used? what are the situations where we require them?

    4) Close & End -Noth are used to close the application.
    But i Read.Can u all tel me exactly?
    close():closing the application
    end():stops the execution of the page/function/procedure
    Last edited by mansi sharma; Sep 30th, 2009 at 09:07 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Small Probs

    Moved To General Developer

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Small Probs

    Personally, if I were trying to find answers to question I was asked, I wouldn't be satisfied with some answer given to me on a forum. I'd want to see it in writing from the source and/or see answers from someone I felt was "qualified" to give the answer vs. a potential guess.

    But since you asked:
    The benefits of class libraries can be summarized as follows:

    * Objects and their corresponding classes break down complex programming problems into many smaller, simpler problems.
    * Encapsulation enforces data abstraction: the organization of data into small, independent objects that can communicate with each other. Encapsulation protects the data in an object from accidental damage, but allows other objects to interact with that data by calling the object's member functions.
    * Subclassing and inheritance make it possible to extend and modify objects: that is, to derive new kinds of objects from the standard classes available in the system, thereby creating new capabilities without having to start from scratch.
    * Polymorphism and multiple inheritance make it possible for different programmers to mix and match characteristics of many different classes and create specialized objects that can still work with related objects in predictable ways.
    * Class hierarchies and containment hierarchies provide a flexible mechanism for modeling real-world objects and the relationships among them.
    Cursors: There really are not that many to know

    Delegates: Here's one worthwhile read, you may want to research more on your own.

    Close & End. Both are not used to close an application. End is and Close is generally a method of a class for terminating connections and similar. End is bad. However, if Close is an app termination method for other languages, I stand corrected.

    Edited. As a general rule of thumb: Interviewers may not be looking for 100% perfect answers but rather your general knowledge and whether or not you are trying to b**s** them when you don't know the answer. Guessing is not the best way to go, but knowing a little about a lot is better than knowing a lot about a little. Exceptions to this general rule of thumb of course exist, especially in jobs that require strong/unwaiveringly expertise in the subject matter.
    Last edited by LaVolpe; Sep 30th, 2009 at 11:22 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,957

    Re: Small Probs

    1) Class libraries allow you to separate areas of functionality from the main application. There are three main advantages I can think of:-
    a. (Probably the more important) It means more than one application can use the same functionality. E.G. You might have a desktop that a company uses to handle customer enquiries, orders etc and a web application that that company's salesmen use out on the road. Both of those applications are probably going to need to be able to retrieve and edit a customers details. If the functionality to do that is in a class library you can use it in bothapplications, saving you having write the code twice and ensuring that the behviour is consisten across both apps.
    b. It also means you can swap that area of functionality out reasonably trivially. For example, in the above scenario you might decide you want to change the way orders are handled. You could simply implement a new class library andput it in place of the original. Provided the new class library exposed the same interface as the existing one your app will just continue to work. This isn't the best example because it would probably easier to just update the existing class library but if you're changing large swathes of functionality it can become a considerable benefit.
    c. It means you can develop and ship functionality that operates as an independent component. Take ADO, the guys who develop ADO don't care what your interface looks like, or about your business logic, or the design of your database. They developed a component that you could use in a million and one scenarios and it makes sense for it to be independent of the rest of your application.

    2. I doubt very much that the question referred to ADO, RDO etc. They were probably asking about forward only cursors, dynamic cursors etc. There are several types so just google for 'cursor types' and you should get all the information you're looking for.

    3. Not sure about delegates, they're one of those things that have happened to other people and passed me by.

    4. Again, I'm rusty on this. From memory, End stops all execution but it's not controlled. It's like a sledge hammer. It stops everything. Close is a more controlled command than closes an instance of a form. Generally End is considered to be bad practice because you've done no clean up etc. The correct (IMO) way to end an app is to close each open form at the point your finished with it and allow the main sub to reach it's natural conclusion.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width