from forms to classes

So now that I've finally got the whole client end solution development thing under control, I've been asked to develop a web based solution, and I don't know where to start.

Any help in this regard would be appreciated. Someone told me that apparently, I need to move from forms to classes. So there. That's all I know.

Please help

Comments

  • [b][red]This message was edited by Genjuro at 2003-8-6 3:6:11[/red][/b][hr]
    : So now that I've finally got the whole client end solution development thing under control, I've been asked to develop a web based solution, and I don't know where to start.
    :
    : Any help in this regard would be appreciated. Someone told me that apparently, I need to move from forms to classes. So there. That's all I know.
    :
    : Please help

    Well, it's not that complicated, but you need to understand what you're going to do.
    First, if you've never used classes (which I don't believe, since ADO is object oriented - what I mean is that an "ADODB.Recordset" is a class, after all), learn something about them (search Google for "object oriented programming", just in case you're not sure about that).

    Next step: create an ActiveX Dll, with a Class inside it. This class "Instancing" property must be "MultiUse".
    Let's say you have a project named "MyFirstWebDll", and inside it you have a class named "MyClass", containing this code.
    [code]
    Public Function SayHello() as string
    SayHello = "Hello !"
    End Function
    [/code]

    Compile the Dll, and you're done.

    Now, get a WebServer program (either PersonalWebServer or Internet Information Server - one or the other should be in your Windows CD), and make sure it's active.
    Once you get it up and running, and you have the Dll ready, you can use this code in an ASP page:

    [code]
    <%
    Dim Obj
    Dim TempString
    Set Obj=CreateObject("MyFirstWebDll.MyClass")
    TempString = Obj.SayHello
    Response.Write TempString
    %>
    [/code]
    This will load your VB Dll, and create one instance of "MyClass" (the class we created earlier). Then it will call a method of that class, "SayHello", and store the result in TempString.
    The last line means "Add the content of TempString to the page that the client will view".

    This is how to interface VB and ASP for Web development (a crash course, actually *LOL*).
    Hope it helps. If you have any questions, of course, post them.


  • * Gosh *

    Thanx a mil. I'm going to take some time to try and process what I just read. You can be certain that I'll have more questions later on :o)

    Thanx in the meantime. I'm going to look into what you posted first.

    ^J^
  • : * Gosh *
    :
    : Thanx a mil. I'm going to take some time to try and process what I just read. You can be certain that I'll have more questions later on :o)
    :
    : Thanx in the meantime. I'm going to look into what you posted first.
    :
    : ^J^

    Don't mind that.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories