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

The Archive Base Latest Questions

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

Currently i`m interesting in play framework because this framework promise faster development. When i

  • 0

Currently i`m interesting in play framework because this framework promise faster development.

When i see the code, there are so many static code. even the controller declared as static function. Thus all the code that called inside static function must be static right?

My question is, is this approach is right? are there any side effect of using to many static function?

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

    Couple of things about static methods in an object oriented language: Let me try to explain the problems if you choose to have all static methods.

    Using all static functions may not be idiomatic in an Object oriented language.
    You cannot override static functions in a subclass. Therefore you lose the ability to do runtime polymorphism by overriding.

    The variables that you define all become class variables automatically (since all your methods are static), so essentially you do not have any state associated with the instance.

    Static methods are difficult to Mock. You might need frameworks like PowerMock to do the mocking for you. So testing becomes difficult.

    Design becomes a bit complex as you won’t be able to create immutable classes as you really only have the class and no instance. So designing thread-safe classes becomes difficult.

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

Sidebar

Related Questions

I'm interesting in start a game development. I currently did some openGL in C++,
Greetings, currently I am refactoring one of my programs, and I found an interesting
I'm currently using ISAPI Rewrite I'd interesting in moving my ColdFusion app to Apache
I have run into an interesting problem. I am currently developing php page and
I am currently involved in some interesting programming language research which has, up until
So I have an interesting problem. I currently have a grid of four block
I've just noticed something interesting with my UIButton. I'm currently fading the button out
I am currently working on ServiceStack , just very new to it. (Quite interesting;
I'm currently working on an interesting graph problem, I can't find any algorithms or
I have an interesting problem. I currently have a basic template library that renders

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.