A website I'm making has been growing larger and larger feature wise. Which means there's more URL parameters that get passed from page A to B or B to C, etc.
Does anyone have any tips for how to keep track of and use parameter keys and expected values?
Ex. Say a url I need to build is www.example.com?type=this&mode=a
Is there some kind of a system that will let me easily keep track of the fact that the "type" parameter key is in fact "type"?
I tried to keep them all in a constants class, but that class quickly grew out of hand.
public class URLParameters {
public static final String TYPE = "type" ;
public static final String MODE = "mode" ;
//more "keys"
public static class Values {
public static final String TYPE_THIS = "this" ;
public static final String TYPE_THAT = "that" ;
public static final String MODE_PRIMARY = "a" ;
public static final String MODE_SECONDARY = "b" ;
//more expected values
}
}