Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1062203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:35:17+00:00 2026-05-16T18:35:17+00:00

I have got myself saddled with an existing application – which attempts do do

  • 0

I have got myself saddled with an existing application – which attempts do do a lot of things by itself and does most of it badly!

This application is an ASP.net 3.5 Web application having the typical UI -> Business –> DAL kind of pattern.

The problem i am faced with is the fact that when multiple users are requesting the same information, even if only to view it, the same business objects are being instantiated, the same data is being retrieved all the way from the DB.

Currently, there is no single point of instantiation of these objects like a factory implementation or something on those lines. The object instantiation is just scattered all over the place.

One option i have been thinking of is to encapsulate the entire instatiation logic in factories – and build in logic in the factories to cache objects and return accordingly.

Another option that i am considering – I have used CSLA in the past in one of my projects and i think i remember that it used to do caching of business objects. How it used to achieve that, however, is not something that i am aware of. I am considering the use of some framework like CSLA which provides such a facility for caching my business objects.

However, both the above options are quite invasive and would involve a major if not complete revamp impacting the entire business layer, which is a major concern to me, as there is NO (read zilch, nada, zero, the big -O) automated unit tests for any part of the code.

What i wanted to find out is :

  1. Does anyone know of any frameworks / products which provide a less invasive way for me to be able to achieve this without redesigning / rewriting the entire business layer?

  2. In absence of 1, are there any easier to implement suggestions that people might have compared to the two options above?

And No, quitting the company is not an option – not just yet anyways! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:35:18+00:00Added an answer on May 16, 2026 at 6:35 pm

    Find the worst offenders via profiling and memoize their calls.

    response to comment

    Memoization is indifferent to usage patterns it is really just replacing an expensive operation (hitting the database) with a less expensive lookup in core. The pattern of usage certainly impacts the effectiveness of the memoization within the system but does not inform how memoization code is written.

    Here’s a cheap example:

    define square_root(n):
       if cache[n] does not exist then
          cache[n] = compute_root(n)
    
       return cache[n]
    

    This means that the first time you call square_root(1729) it will take time to compute the root. All subsequent calls of square_root(1729) will only require the cache lookup. If that call is never made again, you’ll have wasted the caching time and space.

    Thus, the memoization of square_root only requires that there be a unique result for n. Whether it is useful optimization is a factor of actual usage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.