In a project focused on the maximum possible number of feature phones (Nokia 3110 Classic, Samsung E250, Motorola SLVR L7, etc.), how should it be developed at a high level in terms of code structure? I do not mean phone support, since we use Polish for this.
I am an experienced C # developer moving towards developing J2ME in my company. A few months ago, management hired a senior J2ME developer, as existing developers lacked J2ME experience. Now I join this team with another C # developer, and we have some reservations about what we see. Although the software works and meets the requirements of the business, the design of the application seems to me completely wrong.
Instead of using OO, most of the code consists of static methods and constants and has as few classes as possible (15, as far as I can tell) due to “memory limitations on mobile phones”. Some of them make up thousands of lines. Apparently, none of the built-in user interface elements are used, with the exception of Canvas, since they "do not provide sufficient control."
All forms / windows / pages (not sure of the correct term) have a static method in one class, in which we have code to configure the interface of this form / window / page. It looks like this:
UiElement items[] = new UiElement[8 + (fieldCount * 4)];
int y = 0;
items[y++] = new UiElement("name", UiElement.TYPE_TEXT_FIELD, "Name", TextField.ANY, true, "", true, null, -1, 0);
items[y++] = new UiElement("address", UiElement.TYPE_TEXT_FIELD, "Mobile", TextField.PHONENUMBER, true, "", true, null, -1, 0);
items[y++] = UiElement.LINE;
items[y++] = new UiElement("button", UiElement.TYPE_BUTTON, "Save", -1, false, "", true, null, UiElement.TYPE_LINK, ActionHandler.LINK_UPDATE_USER);
items[y++] = new UiElement("", UiElement.TYPE_RED_BUTTON, "Delete user", -1, false, "", true, null, UiElement.TYPE_LINK, ActionHandler.LINK_DELETE_USER);
items[y++] = UiElement.LINE;
items[y++] = new UiElement("", UiElement.TYPE_LINK_ARROWS, "Back to choose category", 0, false, "", true, null, -1, ActionHandler.LINK_MC_SELECT_CATEGORY);
items[y++] = UiElement.LINE;
The main constructor for UiElement is
public UiElement(String RMSref, int inputType, String displayText, int additionalInputType, boolean mandatory, String aditional, boolean selectable, Image img, int displayType, int actionLink)
, Canvas. , UiElement. "", "" "" .
, , , , OO, . , Control, , , .., UiElement, , -, , . , Java-, . , .
, , . , , .
? ? TheDailyWTF.