programming technique question

Results 1 to 3 of 3

Thread: programming technique question

  1. #1
    Join Date
    Dec 1969

    Default programming technique question

    Hi,<BR>I just started learning ASP several months ago and I am trying to use it to build a webstore. Within the webstore, there are many different utilities I need to build, and inside of each utility, there are several processes. For example, I will be building an inventory utility. Within this utility, I will have processes like: add, edit, and delete inventory. My question is: would it be better (in terms of proper programming technique) to build one script (inventory.asp) and within the script have seperate functions to handle the different processes, OR should I build seperate scripts for each process? Is this kind of a gray area or are there some kind of rules I should follow? Thanks for your input - Trevor

  2. #2
    Join Date
    Dec 1969

    Default Probably personal choice

    I like to try and do everything I can on one page without cluttering things up. It&#039;s all down to the interface you have ... but ideally &#039;confirmation pages&#039; that do the processing, but take you away from the nut and bolts of what&#039;s going on, kinda suck. IMHO.<BR><BR>HOWEVER, if you have one table that just displays data, then to modify it you might display the same data in form fields on a seperate page, so the modify and (perhaps) insert routines would be away from the displayed information.<BR><BR>I&#039;d put the delete routine on the display page for instant visual results.

  3. #3
    Join Date
    Dec 1969

    Default RE: programming technique question

    The best solution would be to put everthing in a COM object. E.g. you create a class Inventory and add the proper methods. <BR><BR>If you&#039;re not familiar with this, you could also create a class in VBscript.<BR><BR>Very simple you would do this<BR><BR>Class FriendlyVoice<BR> Public Function SayHello (strName)<BR> SayHello = "Hello " & strName<BR> End Function<BR>End Class<BR><BR>Now in your asp code you would do<BR><BR>Set objHello = NEW FriendlyVoice<BR><BR>Response.write objHello.SayHello("Dutch")<BR><BR>this would write<BR><BR>Hello Dutch<BR><BR>You can extend this pretty far. When you would create the above example in VB, C++ and compiled it as a DLL, you get a COM object.<BR><BR>If you have time, check some examples on the web.<BR><BR>

Posting Permissions

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