473,807 Members | 2,853 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1189
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.c om> wrote in message
news:OO******** *****@tk2msftng p13.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.c om> wrote in message
news:eq******** *****@TK2MSFTNG P11.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
1110
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, 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...
2
2098
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. 2. I would also like to know whether to use Web Services or .Net Remoting in designing N-Tier application 3. General 3 Tier architecture has 3 Tier : Presentation Layer , Business Layer and Database Layer
7
1476
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) and think that using the .NET framework would be best. What programming language is ideal for programming in the .NET framework, just overall, and what has been people's experiences taking on a massive project like this? Right now, we use a...
0
9720
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9599
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10112
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9193
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.