Make It Static

In object-oriented programming, "make it static" usually means "add the static keyword to that method definition".

In web design, "make it static" means "pre-render that page once and cache it, rather than dynamically re-creating it each time someone asks to see it".


static method

Make methods that do not influence the state of the containing class or its derivatives as static. This shows the user, that this method should not have been there, but exists there due to ease of access, convenience or lack of a better place. This helps in refactoring, as it shows where to start. -- VhIndukumar

--- What is meant by "this method should not have been there"? I usually start out a FactoryMethod as being static on the class that is being created until there is DesignPressure? to do otherwise.

The "main()" method is always static in Java. Typically SingletonPattern methods involve static methods.


static web page

Many web pages are dynamically re-created each time someone asks to see it. Some people speculate that pre-rendering them would save time, although others suggest that may be PrematureOptimization.

In particular, some people suspect that pre-rendering Wiki pages would make the wiki run better, somehow. (I seem to remember a page here discussing the advantages and disadvantages of trying to pre-render wiki pages. Am I just remembering FilesystemBasedWiki, or is there another one?)

There is StaticHtml.


EditText of this page (last edited December 21, 2014) or FindPage with title or text search