473,396 Members | 2,081 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,396 software developers and data experts.

help with basic OOP and asp.net

i am learning c# and trying to use it to do a asp.net project at the same
time. one of the biggest problems i have had was getting to understand all
this OOP stuff since i last programmed in assembler, basic and pascal. i
understand most of the theory but have had difficulties in breaking down
projects into creating appropriate classes, and I am really struggling to
see where classes fit in with codebehind asp.net routines that do simple
things like process form entries.

Am i right in understanding that OOP practice of seperating classes into
seperate .cs files don't apply to asp.net and that every aspx page can only
have one codebehind file associated with it, and that in general OOP
programming isn't really applicable to codebehind pages.

Do you guys who do a lot of asp.net find yourselves mostly writing small
functions and loop and routines that simply modify response html rather
than creating large OOP environments with your codebehind files?

Any advice/links to articles would be greatly appreciated.
Nov 15 '05 #1
2 942
Tony,

You hit upon a good point, the fact that page processing starts off as a
procedural operation. However, that doesn't mean that you can't use OOP
^within^ the procedure to perform your work. It is still a good idea to
separate out functionality into logical groups/entities (classes). This
promotes their reuse, and not only could you theoretically use these classes
in just your ASP.NET code, but any other application code as well.

Personally, I prefer creating reusable object libraries, but that's just
me, I'm a stickler for good design.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"tony collier" <me*****@hotmail.com> wrote in message
news:Xn*******************************@140.99.99.1 30...
i am learning c# and trying to use it to do a asp.net project at the same
time. one of the biggest problems i have had was getting to understand all this OOP stuff since i last programmed in assembler, basic and pascal. i
understand most of the theory but have had difficulties in breaking down
projects into creating appropriate classes, and I am really struggling to
see where classes fit in with codebehind asp.net routines that do simple
things like process form entries.

Am i right in understanding that OOP practice of seperating classes into
seperate .cs files don't apply to asp.net and that every aspx page can only have one codebehind file associated with it, and that in general OOP
programming isn't really applicable to codebehind pages.

Do you guys who do a lot of asp.net find yourselves mostly writing small
functions and loop and routines that simply modify response html rather
than creating large OOP environments with your codebehind files?

Any advice/links to articles would be greatly appreciated.

Nov 15 '05 #2
Similar to Nicolas, I tend to break as much as possible into reusable code
so that if at any time I want to make a windows gui or asp.net portal then I
have got one set of classes for data access, business objects etc. then I
can simply apply the front end to it.

Martin

"tony collier" <me*****@hotmail.com> wrote in message
news:Xn*******************************@140.99.99.1 30...
i am learning c# and trying to use it to do a asp.net project at the same
time. one of the biggest problems i have had was getting to understand all this OOP stuff since i last programmed in assembler, basic and pascal. i
understand most of the theory but have had difficulties in breaking down
projects into creating appropriate classes, and I am really struggling to
see where classes fit in with codebehind asp.net routines that do simple
things like process form entries.

Am i right in understanding that OOP practice of seperating classes into
seperate .cs files don't apply to asp.net and that every aspx page can only have one codebehind file associated with it, and that in general OOP
programming isn't really applicable to codebehind pages.

Do you guys who do a lot of asp.net find yourselves mostly writing small
functions and loop and routines that simply modify response html rather
than creating large OOP environments with your codebehind files?

Any advice/links to articles would be greatly appreciated.

Nov 15 '05 #3

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

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
1
by: Rookie | last post by:
I have done a lot of programming some time ago using Fortran and various varieties of the Basic programming languages, Hewlett Packard Technical Basic, QBasic, Quick Basic. With each of these...
16
by: ranger | last post by:
Hi, I'm a beginner with C++, studying on my own from a book and I've encoutered quite some problems.. If possible, someone out there might help me out.. The problem is the following.. I've...
4
by: Terencetrent | last post by:
I having been using Access '97/2002 for about 4 years now and have never really had the need or the time to learn visual basic. Well, I think the time has finally come. I need help with Visual...
7
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
2
by: Chad Beckner | last post by:
Hi everyone, I am developing a site in which the root will be set with Anonymous & Basic permissions. Past that I will have an application (directory) in which I will be developing...
0
by: BobJones | last post by:
After inserting the third CD during the installation process, the program starts rolling back the installation and displays an error message. I am running Windows 2000 SP4, installing VB.Net from...
6
by: deejayquai | last post by:
Hi I'm attempting to append multiple values into a new record, using multiple criteria from a listbox. I've got the basics for the code below but I get an "Error 3085 Undefined Function" for...
53
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
51
by: Steven Spits | last post by:
Hi, Plannig to buy Vista, but not sure what version to get. I do VS.NET development, mostly ASP.NET. Can IIS be installed on Vista home premium? Or do I need business or ultimate? Steven
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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...
0
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...
0
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,...

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.