473,395 Members | 1,972 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,395 software developers and data experts.

Using objects in ASP.NET?

In Coldfusion MX 6.1, they offer a feature named CFC or Coldfusion
components. These are basically classes that offer inheritence. I put
database calls, calculations, constants, etc, into these classes or
components. I instantiate them once for each user session through the
Application.cfm. Now the objects are loaded and available to the user
persistently because they are stored in session variables. This keeps me
from having to do file includes in my templates and avoids unnecessary disk
hits (file includes).

Does ASP.NET offer anything similar to the above?

Thanks,
Brett
Nov 19 '05 #1
2 893
ASP.Net doesn't, but object oriented programming does. Luckily, ASP.Net
runs off of object oriented languages, such as C# and VB.Net, which both
support static/shared members

public class Utility
public shared function DoSomething() as string
return "something"
end function
end class
in your code you can create
Utility.DoSomething()

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Brett" <no@spam.com> wrote in message
news:OZ**************@TK2MSFTNGP10.phx.gbl...
In Coldfusion MX 6.1, they offer a feature named CFC or Coldfusion
components. These are basically classes that offer inheritence. I put
database calls, calculations, constants, etc, into these classes or
components. I instantiate them once for each user session through the
Application.cfm. Now the objects are loaded and available to the user
persistently because they are stored in session variables. This keeps me
from having to do file includes in my templates and avoids unnecessary disk hits (file includes).

Does ASP.NET offer anything similar to the above?

Thanks,
Brett

Nov 19 '05 #2
Yes
You have Session and Cache objects, also Application object...

Regards,
Kostadin Kostov

"Brett" wrote:
In Coldfusion MX 6.1, they offer a feature named CFC or Coldfusion
components. These are basically classes that offer inheritence. I put
database calls, calculations, constants, etc, into these classes or
components. I instantiate them once for each user session through the
Application.cfm. Now the objects are loaded and available to the user
persistently because they are stored in session variables. This keeps me
from having to do file includes in my templates and avoids unnecessary disk
hits (file includes).

Does ASP.NET offer anything similar to the above?

Thanks,
Brett

Nov 19 '05 #3

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

Similar topics

40
by: Elijah Bailey | last post by:
I want to sort a set of records using STL's sort() function, but dont see an easy way to do it. I have a char *data; which has size mn bytes where m is size of the record and n is the...
19
by: Kamilche | last post by:
I have looked at many object-oriented programming frameworks out there for C. Though the ideas presented are intriguing, and I've used some of them in my own work, they all suffered some drawback...
5
by: Anders Borum | last post by:
Hello! Whilst refactoring an application, I was looking at optimizing a ModelFactory with generics. Unfortunately, the business objects created by the ModelFactory doesn't provide public...
13
by: Andy Baxter | last post by:
Can anyone recommend a good online guide to using objects in javascript? The book I bought (DHTML Utopia) suggests using objects to keep the code clean and stop namespace clashes between different...
10
by: mg | last post by:
I'm migrating from VB6 and have a question about using 'Using' and the best way to use it. Here is a example of a small bit of code: dbConx("open") Using CN Dim CMD As New OleDbCommand(sSQL,...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.