473,386 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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
Nov 18 '05 #1
4 1173
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
Nov 18 '05 #2
Thanks for your input. I am just wondering, is it unusual to have
presentation tier code going above 1900 lines of code. :-(
Nov 18 '05 #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" <Jo****@email.com> wrote in message
news:OO*************@tk2msftngp13.phx.gbl...
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

Nov 18 '05 #4
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" <Jo****@email.com> wrote in message
news:eq*************@TK2MSFTNGP11.phx.gbl...
Thanks for your input. I am just wondering, is it unusual to have
presentation tier code going above 1900 lines of code. :-(

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JollyK | last post by:
Looking for opinion on code size for presention tier asp.net application. I have created a user-control that has a fairly complex datagrid which includes localization, custom paging, sorting,...
2
by: Silent Ocean | last post by:
Hi 1. I am in process of designing N-Tier Application using ASP.NET. Can anyone guide me the right material or microsoft guidelines document which I can used in designing the N-Tier application....
7
by: Brent White | last post by:
We're looking into building an in-house integrated enterprise system to manage inventory, work-in-process, and finances, among others. I am somewhat familiar with VB.NET (veteran VB 6 programmer)...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.