Function Library

Discussion in 'ASP .Net' started by Chris Jackson, Jun 24, 2003.

  1. In clasic asp you could have some include files that had all your common
    functions in them so you could include them in your application by <!
    Include ing them.


    Ok - Im new to asp.net -
    im wanting to construct a function library in asp.net - but i heard someone
    in the list say that that is the older way of thinking - we are now to think
    in OOP style and classes stuff.

    Help - where on the web can i read about this type of method of including
    classes into my asp.net pages...?

    Thanks.
     
    Chris Jackson, Jun 24, 2003
    #1
    1. Advertising

  2. Chris Jackson

    PJ Guest

    ASP.net pages ARE classes. New webforms are set to inherit from
    System.Web.UI.Page. However you can create your own base page and have your
    asp.net code behind classes inherit from that page. Your base page would
    include common elements(UI)/functions used by the rest of your pages
    (classes). I think you will find that you will not need as many generic
    "helper functions" as you once wrote in an asp application as the .net
    framework is rich w/ it's functionality. You can also create a class w/ a
    private constructor w/ only static methods much the same way you use :
    System.DateTime.Now :

    This is a good guide on architecture for asp.net applications.
    http://msdn.microsoft.com/practices/type/Patterns/default.asp

    ~PJ

    "Chris Jackson" <> wrote in message
    news:...
    > In clasic asp you could have some include files that had all your common
    > functions in them so you could include them in your application by <!
    > Include ing them.
    >
    >
    > Ok - Im new to asp.net -
    > im wanting to construct a function library in asp.net - but i heard

    someone
    > in the list say that that is the older way of thinking - we are now to

    think
    > in OOP style and classes stuff.
    >
    > Help - where on the web can i read about this type of method of including
    > classes into my asp.net pages...?
    >
    > Thanks.
    >
    >
     
    PJ, Jun 25, 2003
    #2
    1. Advertising

  3. Hello Chris,

    I replied the question in another of your post. Just now I saw PJ's answer.
    I am not sure of whether I misunderstand your questions before.

    I agree with PJ that you could inherit a page to create an own page. The
    points here is that what you want to reuse. If it is a function library,
    such as email sending library, you could use a class library as I
    mentioned. If you want to reuse a page, you could create a base page as PJ
    suggested.

    Please feel free to post if you have any more concerns.

    Best regards,
    yhhuang
    VS.NET, Visual C++
    Microsoft

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Got .Net? http://www.gotdotnet.com
    --------------------
    !From: "Chris Jackson" <>
    !Subject: Function Library
    !Date: Tue, 24 Jun 2003 14:30:44 -0500
    !Lines: 16
    !X-Priority: 3
    !X-MSMail-Priority: Normal
    !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    !Message-ID: <>
    !Newsgroups: microsoft.public.dotnet.framework.aspnet
    !NNTP-Posting-Host: 66.49.58.146.nw.nuvox.net 66.49.58.146
    !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
    !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:154567
    !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    !
    !In clasic asp you could have some include files that had all your common
    !functions in them so you could include them in your application by <!
    !Include ing them.
    !
    !
    !Ok - Im new to asp.net -
    !im wanting to construct a function library in asp.net - but i heard someone
    !in the list say that that is the older way of thinking - we are now to
    think
    !in OOP style and classes stuff.
    !
    !Help - where on the web can i read about this type of method of including
    !classes into my asp.net pages...?
    !
    !Thanks.
    !
    !
    !
     
    Yan-Hong Huang[MSFT], Jun 25, 2003
    #3
  4. ASP is procedural in nature. Therefore, you used "function libraries" as you
    describe it for storing commonly-used functions. As you have pointed out,
    ASP.Net is object-oriented. This means that you use classes instead. A class
    is basically a collection of data, functions, and executable code that are
    treated as an atomic unit, with certain characteristics shared by all parts
    of the class. It hides much of its' internal data and exposes only the data
    and functionality that is useful and safe to be accessed. Object-oriented
    programming involves a good bit more than this, however, so your request for
    a source of information is well taken.

    I would recommend downloading the free .Net SDK from Microsoft for more
    information (at least to start with). This is the most excellent software
    documentation I have ever used for any product, and it is not only a
    reference, but has many articles and samples as well. The URL for download
    is:

    http://msdn.microsoft.com/library/default.asp?url=/downloads/list/netdevframework.asp

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer
    http://www.takempis.com
    Big things are made up of
    lots of Little things.

    "Chris Jackson" <> wrote in message
    news:...
    > In clasic asp you could have some include files that had all your common
    > functions in them so you could include them in your application by <!
    > Include ing them.
    >
    >
    > Ok - Im new to asp.net -
    > im wanting to construct a function library in asp.net - but i heard

    someone
    > in the list say that that is the older way of thinking - we are now to

    think
    > in OOP style and classes stuff.
    >
    > Help - where on the web can i read about this type of method of including
    > classes into my asp.net pages...?
    >
    > Thanks.
    >
    >
     
    Kevin Spencer, Jun 25, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mythran
    Replies:
    0
    Views:
    2,450
    Mythran
    Aug 24, 2004
  2. Alan Ferrandiz [MCT]
    Replies:
    0
    Views:
    454
    Alan Ferrandiz [MCT]
    Sep 11, 2004
  3. Deniz Bahar
    Replies:
    43
    Views:
    974
    Gordon Burditt
    Mar 2, 2005
  4. Angus
    Replies:
    32
    Views:
    827
    Richard
    Apr 15, 2008
  5. Sammy
    Replies:
    1
    Views:
    324
    NET_NET_2003
    Aug 18, 2003
Loading...

Share This Page