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 270721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:02:51+00:00 2026-05-12T00:02:51+00:00

I’m not using hibernate and that’s not a valid alternative at all. I developed

  • 0

I’m not using hibernate and that’s not a valid alternative at all. I developed a framework based on ADO.NET. This framework has default operators for each database entity.

For example, data access layers has default operators as the following:

Insert
Update
Delete
Get
GetAll

To access this methods, we work as tha sample code below:

DataAccess.Order daoOrder;

Entity.Order entityOrder;
DataAccess.Order daoOrder;

entityOrder = new Entity.Order();
entityOrder.ID = 1090;

daoOrder = new DataAccess.Order();
daoOrder.Insert(entityOrder);

I was thinking about use static methods, so the code would be simple as:

Entity.Order entityOrder;

entityOrder = new Entity.Order();
entityOrder.ID = 1090;

DataAccess.Order.Insert(entityOrder);

Suppose that the system has 30 tables and 30 entities. We need 30 DataAccess objects running as statics objects.
This static structure would save us some processor cycles and save some memory as its costs less for garbage collector.

Should I use static methods for Business and DataAccess common operators in these way?
Can you talk about advantages and drawbacks about this approach? (I mean, memory, performance…)

  • 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-12T00:02:51+00:00Added an answer on May 12, 2026 at 12:02 am

    The performance differential between the two options you mention above will be virtually non existent. I would go for the cleanest and most flexible design you can manage, taking into account your domain model and other business requirements, and then worry about performance tuning once you’re up and running; don’t try and second guess the bottlenecks before you have built your system.

    See this post by Greg Beech for an analysis of static versus instance performance..

    His conclusion:

    in calling a method two billion times you could save yourself around 5ms by making it static, which is a saving of approximately nothing for each method call

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I need a function that will clean a strings' special characters. I do NOT
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
this is what i have right now Drawing an RSS feed into the php,

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.