Config settings.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • George Ter-Saakov

    #1

    Config settings.

    Hi.

    I have couple config setting for my Application.
    I created class with static members.

    Application_Sta rt method reads settingg from ConfigurationSe ttings.AppSetti ngs and populates static class. I just found it more convenient (since now I can have default settings).

    Does this approach have any flaws?



    Thanks.

    George.

  • Cowboy \(Gregory A. Beamer\)

    #2
    Re: Config settings.

    Downside? Just the memory taken up if you are not using the settings.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    Author: ADO.NET and XML: ASP.NET on the Edge

    *************** *************** *************** *************** *************** *
    ****
    Think Outside the Box!
    *************** *************** *************** *************** *************** *
    ****
    "George Ter-Saakov" <we@hotmail.com > wrote in message
    news:%23bf1DMgS DHA.2092@TK2MSF TNGP10.phx.gbl. ..
    Hi.

    I have couple config setting for my Application.
    I created class with static members.
    Application_Sta rt method reads settingg from
    ConfigurationSe ttings.AppSetti ngs and populates static class. I just found
    it more convenient (since now I can have default settings).
    Does this approach have any flaws?

    Thanks.
    George.


    Comment

    • Cowboy \(Gregory A. Beamer\)

      #3
      Re: Config settings.

      Downside? Just the memory taken up if you are not using the settings.

      --
      Gregory A. Beamer
      MVP; MCP: +I, SE, SD, DBA
      Author: ADO.NET and XML: ASP.NET on the Edge

      *************** *************** *************** *************** *************** *
      ****
      Think Outside the Box!
      *************** *************** *************** *************** *************** *
      ****
      "George Ter-Saakov" <we@hotmail.com > wrote in message
      news:%23bf1DMgS DHA.2092@TK2MSF TNGP10.phx.gbl. ..
      Hi.

      I have couple config setting for my Application.
      I created class with static members.
      Application_Sta rt method reads settingg from
      ConfigurationSe ttings.AppSetti ngs and populates static class. I just found
      it more convenient (since now I can have default settings).
      Does this approach have any flaws?

      Thanks.
      George.


      Comment

      • Ravikanth[MVP]

        #4
        Config settings.

        Hi george

        Can you tell me in detail why u r populating all settings
        in to static class.

        U can store all settings in application variables and use
        these variables in all the pages.


        HTH
        Ravikanth

        [color=blue]
        >-----Original Message-----
        >Hi.
        >
        >I have couple config setting for my Application.
        >I created class with static members.
        >
        >Application_St art method reads settingg from[/color]
        ConfigurationSe ttings.AppSetti ngs and populates static
        class. I just found it more convenient (since now I can
        have default settings).[color=blue]
        >
        >Does this approach have any flaws?
        >
        >
        >
        >Thanks.
        >
        >George.
        >[/color]

        Comment

        • Ravikanth[MVP]

          #5
          Config settings.

          Hi george

          Can you tell me in detail why u r populating all settings
          in to static class.

          U can store all settings in application variables and use
          these variables in all the pages.


          HTH
          Ravikanth

          [color=blue]
          >-----Original Message-----
          >Hi.
          >
          >I have couple config setting for my Application.
          >I created class with static members.
          >
          >Application_St art method reads settingg from[/color]
          ConfigurationSe ttings.AppSetti ngs and populates static
          class. I just found it more convenient (since now I can
          have default settings).[color=blue]
          >
          >Does this approach have any flaws?
          >
          >
          >
          >Thanks.
          >
          >George.
          >[/color]

          Comment

          • George Ter-Saakov

            #6
            Re: Config settings.

            1. Performance is better when referencing variable rather than lookup in
            Collection.
            2. It makes my business classes more independent from ASPX context (which is
            more important than 1).

            They can access connection string as long as there is clsGlobal loaded.
            If I were using Application then they explicitly rely on the ASPX
            environment which makes them not pure business classes (since they have
            knowledge about GUI).


            George.



            "Ravikanth[MVP]" <dvravikanth@ho tmail.com> wrote in message
            news:0a4b01c34a 23$25f35280$a50 1280a@phx.gbl.. .[color=blue]
            > Hi george
            >
            > Can you tell me in detail why u r populating all settings
            > in to static class.
            >
            > U can store all settings in application variables and use
            > these variables in all the pages.
            >
            >
            > HTH
            > Ravikanth
            >
            >[color=green]
            > >-----Original Message-----
            > >Hi.
            > >
            > >I have couple config setting for my Application.
            > >I created class with static members.
            > >
            > >Application_St art method reads settingg from[/color]
            > ConfigurationSe ttings.AppSetti ngs and populates static
            > class. I just found it more convenient (since now I can
            > have default settings).[color=green]
            > >
            > >Does this approach have any flaws?
            > >
            > >
            > >
            > >Thanks.
            > >
            > >George.
            > >[/color][/color]


            Comment

            • George Ter-Saakov

              #7
              Re: Config settings.

              1. Performance is better when referencing variable rather than lookup in
              Collection.
              2. It makes my business classes more independent from ASPX context (which is
              more important than 1).

              They can access connection string as long as there is clsGlobal loaded.
              If I were using Application then they explicitly rely on the ASPX
              environment which makes them not pure business classes (since they have
              knowledge about GUI).


              George.



              "Ravikanth[MVP]" <dvravikanth@ho tmail.com> wrote in message
              news:0a4b01c34a 23$25f35280$a50 1280a@phx.gbl.. .[color=blue]
              > Hi george
              >
              > Can you tell me in detail why u r populating all settings
              > in to static class.
              >
              > U can store all settings in application variables and use
              > these variables in all the pages.
              >
              >
              > HTH
              > Ravikanth
              >
              >[color=green]
              > >-----Original Message-----
              > >Hi.
              > >
              > >I have couple config setting for my Application.
              > >I created class with static members.
              > >
              > >Application_St art method reads settingg from[/color]
              > ConfigurationSe ttings.AppSetti ngs and populates static
              > class. I just found it more convenient (since now I can
              > have default settings).[color=green]
              > >
              > >Does this approach have any flaws?
              > >
              > >
              > >
              > >Thanks.
              > >
              > >George.
              > >[/color][/color]


              Comment

              Working...