AdityaHegde / InstagramImageViewer

0 stars 0 forks source link

[Android Bootcamp] Project 2: Instagram Image Viewer Project - Ready for Review #1

Open AdityaHegde opened 9 years ago

AdityaHegde commented 9 years ago

App is complete. Have missed a few user stories. Will get to them sometime next week. I was wondering, why do we struggle so much to pass data to other activities by serializing? Why cant we pass by reference? Do they have different memory spaces?? When i was using ORM and passed an object by serializing, calling save on an existing row was creating a new row (something went wrong when deserializing?)

@nidhi1608 @thecodepath

Aditya Shridhar Hegde (adityash@yahoo-inc.com)

nidhi1608 commented 9 years ago

We cannot pass objects by reference because this has been added as a limitation in android platform. It has been added to ensure interoperability between different activities belonging to different processes. The way android platform is designed, an activity can be invoked by any process based on intent-filter. So if you pass object by reference from Activity A1 of application A to Activity B1 of application B, the reference wont mean anything in memory heap of application B To provide this flexibility and to ensure consistent behavior, data between activities has to be marshaled.

Its hard to say what went wrong with ORM without looking at the code. Here are some of the possibilities:

Foo for = Foo.load(Foo.class, 1);//1 is the id
foo.bar = "new value";
foo.save();
nidhi1608 commented 9 years ago

:+1: Looks good overall. I have provided a detailed Feedback Guide here which covers the most common issues with this submitted project. Read through the feedback guide point-by-point to determine how you could improve your submission.

Hopefully this first project has given you a better sense of working with RelativeLayout which is a very flexible layout system. This assignment also gave us our first introduction to networking, working with APIs and loading remote images. The next assignment will introduce new concepts such as accepting user input and navigating between activities and will also reinforce important concepts such as networking, using APIs, handling remote images.

Let us know if you have any other thoughts or questions about this assignment.