Looking for opinion on code size for presention tier asp.net application.

Discussion in 'ASP .Net' started by JollyK, Apr 27, 2004.

  1. JollyK

    JollyK Guest

    Hello everyone...
    I have created a user-control that has a fairly complex datagrid (with
    template columns) which includes localization, custom paging, sorting,
    filtering, searching, caching, options to add, edit, and delete record, and
    then enabling and disabling links inside the datagrid based on different
    conditions. Everything is working fine now. I have hand-coded everything and
    the total length of my code-behind file is around 1900 lines. My code-behind
    file contains only presentation logic. No other code is there in my
    code-behind file. Data-access logic and business logic code are totally
    seperate and are located in different assemblies. My code-behind file
    doesn't even contain designer code. All designer code are in the ASCX file.
    So my question is, is 1900 lines of code too large for presentation tier
    code ? I have to admit, there is also a fair amount of comments in the code
    to describe what I am doing. Also in the future, the size of this file will
    increase, cause I will have to implement some security features. Well there
    would be a seperate "security library" but my code will have to access it,
    so additional lines of code will be added.


    I will really like to hear from senior programmers and what you have to say
    about this. I am just worried, is this a bad thing that my presentation tier
    code is turning out to be so large ? I really don't know what to do cause
    there is so much logic on my presentation tier that I need to implement.

    Really looking forward for some opinions.

    Thanks

    JK
     
    JollyK, Apr 27, 2004
    #1
    1. Advertising

  2. My understanding is, as long as your presentation logic can be easily decopled from your business logic and any other tiers, then you are fine. The size of the actual presentation code shouldn't make a difference, Its how couples or tied it is to other tiers; the less the better

    Rasika Wijayaratne
     
    =?Utf-8?B?UmFzaWthIFdpamF5YXJhdG5l?=, Apr 27, 2004
    #2
    1. Advertising

  3. There may be some things you can do to "lighten the load" in your page.
    First, is all of this functionality necessary in a single page, or can you
    split it out into more than one smaller page? For example, you say that this
    page has functionality for adding, editing, and deleting records. This could
    be split into 3 different pages. Can you do any dynamic loading of controls?
    In other words, are all the controls in the page used for every Request, or
    is a smaller subset of controls loaded depending upon conditions? By making
    controls that are not always needed to load dynamically, you are not loading
    them when you don't need them.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "JollyK" <> wrote in message
    news:...
    > Hello everyone...
    > I have created a user-control that has a fairly complex datagrid (with
    > template columns) which includes localization, custom paging, sorting,
    > filtering, searching, caching, options to add, edit, and delete record,

    and
    > then enabling and disabling links inside the datagrid based on different
    > conditions. Everything is working fine now. I have hand-coded everything

    and
    > the total length of my code-behind file is around 1900 lines. My

    code-behind
    > file contains only presentation logic. No other code is there in my
    > code-behind file. Data-access logic and business logic code are totally
    > seperate and are located in different assemblies. My code-behind file
    > doesn't even contain designer code. All designer code are in the ASCX

    file.
    > So my question is, is 1900 lines of code too large for presentation tier
    > code ? I have to admit, there is also a fair amount of comments in the

    code
    > to describe what I am doing. Also in the future, the size of this file

    will
    > increase, cause I will have to implement some security features. Well

    there
    > would be a seperate "security library" but my code will have to access it,
    > so additional lines of code will be added.
    >
    >
    > I will really like to hear from senior programmers and what you have to

    say
    > about this. I am just worried, is this a bad thing that my presentation

    tier
    > code is turning out to be so large ? I really don't know what to do cause
    > there is so much logic on my presentation tier that I need to implement.
    >
    > Really looking forward for some opinions.
    >
    > Thanks
    >
    > JK
    >
    >
     
    Kevin Spencer, Apr 27, 2004
    #3
  4. JollyK

    JollyK Guest

    Thanks for your input. I am just wondering, is it unusual to have
    presentation tier code going above 1900 lines of code. :-(
     
    JollyK, Apr 27, 2004
    #4
  5. Unusual? I couldn't answer that, as I'm not aware of any statistics. It is
    certainly unusual from my own experience. However, it is not necessarily
    beyond the bounds of what is appropriate under the right circumstances.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "JollyK" <> wrote in message
    news:...
    > Thanks for your input. I am just wondering, is it unusual to have
    > presentation tier code going above 1900 lines of code. :-(
    >
    >
     
    Kevin Spencer, Apr 27, 2004
    #5
    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. rob

    ASP v2 & 3-tier or 2-tier

    rob, Aug 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    425
    Steve C. Orr [MVP, MCSD]
    Aug 13, 2004
  2. NOSPAM

    2 tier to 3 tier?

    NOSPAM, Oct 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    455
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Oct 14, 2004
  3. Steve Kershaw

    Setting up a new tier in a 3-tier system?

    Steve Kershaw, Mar 28, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    466
    Steve Kershaw
    Mar 29, 2006
  4. Shantanu Bhattacharya
    Replies:
    2
    Views:
    575
    Christopher Benson-Manica
    Dec 26, 2003
  5. Shantanu Bhattacharya

    Converting a 2-tier application to 3-tier application

    Shantanu Bhattacharya, Dec 25, 2003, in forum: C Programming
    Replies:
    2
    Views:
    477
    Christopher Benson-Manica
    Dec 26, 2003
Loading...

Share This Page