Skip to content

Reduce boilerplate for subclasses #172

Open
@d370urn3ur

Description

@d370urn3ur

I work with Parse in both Android and iOS and I'm wondering if it would be possible to reduce all the boilerplate when subclassing a ParseObject, something similar to Gson serialization? iOS already does this, I just have to subclass PFObject and implement a subclassing protocol and all my defined properties are automagically populated, no need to write things like

public String getDisplayName() {
  return getString("displayName");
}
public void setDisplayName(String value) {
  put("displayName", value);
}

So that's basically 4 lines for each property and I wrote "displayName" 4 times. Plus by hand because I'm not even defining properties where I could take advantage of code generation. It seems insane, if I have a ParseObject with 20 properties I'm writing 80 lines of code that quadruplicates each property name. Thanks for considering it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions