To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

From Wikipedia, the free encyclopedia

In object-oriented programming, a helper class is used to assist in providing some functionality, which isn't the main goal of the application or class in which it is used.[1][2] An instance of a helper class is called a helper object (for example, in the delegation pattern).

Helper classes are often created in introductory programming lessons, after the novice programmer has moved beyond creating one or two classes.

A utility class is a special case of a helper class in which the methods are all static.[3] In general, helper classes do not have to have all static methods, but may have instance variables. Multiple instances of the helper class may exist as well.

YouTube Encyclopedic

  • 1/3
    Views:
    371
    638
    443
  • Classes Part 9: Helper Methods (Java)
  • C# Helper Class for Generating QR Codes using the Google Charts API
  • Profile Helper Class

Transcription

Example

This is also an example of a utility class. Below are extension methods on the string object.

public static class PrependHelper
{
    // static functions
    public static string MeowPrepend(this string text)
    {
        return $"Meow meow {text}!";
    }

    public static string WoofPrepend(this string text)
    {
        return $"Woof woof {text}!";
    }

    public static string WoohPrepend(this string text)
    {
        return $"Wooh {text}!";
    }
}

Alternative to helper class

Functions which are going to be helper classes could be placed close to where they are used. The other alternative is wrapping helper class parameters into a class as a field. That class can have a name from the business domain connected to the fields it has. The example below shows how to convert helper methods to methods on domain types:

public class Text
{
    string text;

    public string MeowPrepend()
    {
        return $"Meow meow {text}!";
    }

    public string WoofPrepend()
    {
        return $"Woof woof {text}!";
    }

    public string WoohPrepend()
    {
        return $"Wooh {text}!";
    }
}

References

  1. ^ Tee, Sim Hui (2009-12-03). "Eliminating method redundancy for the improvement of inner class design". ACM SIGSOFT Software Engineering Notes. 34 (6): 1–3. doi:10.1145/1640162.1640174. ISSN 0163-5948.
  2. ^ "What is a helper? Is it a design pattern? Is it an algorithm?". Software Engineering Stack Exchange. Retrieved 2023-10-31.
  3. ^ "Java Helper vs. Utility Classes | Baeldung". Baeldung. April 28, 2023. Retrieved October 31, 2023.

See also

This page was last edited on 10 March 2024, at 13:55
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.