Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Looking for opinion on code size for presention tier asp.net application.

Reply
Thread Tools

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

 
 
JollyK
Guest
Posts: n/a
 
      04-27-2004
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?UmFzaWthIFdpamF5YXJhdG5l?=
Guest
Posts: n/a
 
      04-27-2004
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
 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      04-27-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
JollyK
Guest
Posts: n/a
 
      04-27-2004
Thanks for your input. I am just wondering, is it unusual to have
presentation tier code going above 1900 lines of code.


 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      04-27-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks for your input. I am just wondering, is it unusual to have
> presentation tier code going above 1900 lines of code.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up a new tier in a 3-tier system? Steve Kershaw ASP .Net 3 03-29-2006 01:09 AM
2 tier to 3 tier? NOSPAM ASP .Net 1 10-14-2004 10:51 PM
ASP v2 & 3-tier or 2-tier rob ASP .Net 1 08-13-2004 06:04 AM
Converting a 2-tier application to 3-tier application Shantanu Bhattacharya C Programming 2 12-26-2003 02:04 PM
Converting a 2-tier application to 3-tier application Shantanu Bhattacharya C++ 2 12-26-2003 02:04 PM



Advertisments