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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:49:49+00:00 2026-05-25T16:49:49+00:00

What are best practices in defining access controls for methods in MVC pattern. I’m

  • 0

What are best practices in defining access controls for methods in MVC pattern. I’m uncertain where to use static methods in a scenario like an ATM (client-server model). I’m using Java.

Appreciate if someone can shed some light on this.

Here’s my approach I used to come up with a class diagram.

  1. First I designed all the screens, sketched on a paper. (I’m kinda
    artist if you wonder and into graphic design stuff 🙂 )
  2. Then I created View classes Created Model classes by studying the scenario
    and use of data
  3. Created Controllers for each Model and some more additional ones
  4. Added methods to Controllers by looking at the buttons I got in the screens, which I think a straight forward way to never miss any method? + some additional ones for GUI controlling
    etc.

What do you think about my approach?

Thanks.

  • 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-25T16:49:50+00:00Added an answer on May 25, 2026 at 4:49 pm

    I don’t see what MVC has to do with it. A static method cannot access instance variables. Therefore static should only be used for methods that receive ALL their necessary data via parameters. Usually this is “utility” routines such as sort routines, formatters, common calculations, etc.

    The other place where you might use static routines is to access static variables in a class. But it’s rare that you want to do this without also accessing instance variables.

    Note that there’s no real requirement to make any routine static — you can have an instance method that doesn’t reference any instance variables. But a static method becomes accessible from situations where you don’t have an instance handy to invoke the method.

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

Sidebar

Related Questions

What best practices and methods would you enforce on a new .NET development team?
Possible Duplicate: What are best practices that you use when writing Objective-C and Cocoa?
Following best practices, I'm using Thread.currentThread().getContextClassLoader().getResourceAsStream to load resources in a web application (like
Are there best practices for when it's appropriate to use an interface ? Does
What are the best practices for naming WCF endpoints and methods? What are the
Best practices or tools for installing a SQL Server database I have a SQL
What best practices should be observed when implementing HDL code? What are the commonalities
Yahoo best practices states that putting JavaScript files on bottom might make your pages
What best practices have you used in unit testing embedded software that are peculiar
What are the best practices to consider when catching exceptions and re-throwing them? I

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.