smacgregor / SimpleAndroidToDoApp

Simple Android ToDo App For CodePath
0 stars 0 forks source link

[Android Bootcamp] Project 0: Todo - Ready For Review #4

Open smacgregor opened 8 years ago

smacgregor commented 8 years ago

My app is complete, please review. /cc @codepathreview @codepath

Since time is tight with class starting next week I thought I'd submit the MVP which meets the initial user story requirements before digging into the optional features.

I'm excited about the class and hoping we'll be able to explore some best practice architectures for building modern Android apps including frameworks like RxJava, DBFlow and retrofit. Ok, enough buzz word dropping! Thanks for looking at my sample to-do app.

nesquena commented 8 years ago

Scott,

Looks good, this exercise is intended in part to give you an introduction to the general rhythm of this course. The course is entirely project-based with an app being assigned each week and then due the following week. Each project builds on the last to help each engineer learn the practical elements of Android development and best practices as quickly as possible.

The next step is to continue working on extensions to your todo app. We will also be sending you additional details about the course very soon.

After reviewing your project, I'd encourage you to take a look at this guide on code organization best practices to cleanup your source code. Also, look forward to you adding additional functionality and iterating on the UI a bit. Of course, let me know if you have any questions.

nesquena commented 8 years ago

Would love to know if there's a way to automatically bind view elements in the XML to an activities member member variables.

You sure can using this new data binding framework. Read more here.

I'm excited about the class and hoping we'll be able to explore some best practice architectures for building modern Android apps including frameworks like RxJava, DBFlow and retrofit. Ok, enough buzz word dropping! Thanks for looking at my sample to-do app.

Yes, we will be covering many libraries and frameworks and best practices including touching on some of the ones you mentioned. RxJava isn't covered explicitly in this initial program as it's a bit complex and out of scope but we have a detailed guide started here and run alumni workshops on this.

smacgregor commented 8 years ago

Happy Sunday! I've updated the Simple Android To Do App with the following improvements:

  1. Use SQLite as the storage layer. See ToDoItemDatabase and ToDoItem
  2. Create a custom Adapter with the ViewHolder pattern. See ToDoAdapter and item_todo.xml
  3. Improve source code organization by packaging by feature (core, viewing, editing)

I did not improve the UI for how we display a To-Do.

Questions

When packaging by feature is it possible / a best practice to move the xml layout resources into each feature package instead of having a single layout package?

What's Next

  1. For learning purposes, I implemented a storage solution using SQLite directly. But in practice I would rather use an ORM. I'm going to replace my storage solution with ActiveAndroid in the next pass.
  2. If I have time before Monday - play around with the data binding - http://www.opgenorth.net/blog/2015/09/15/android-data-binding-intro/. Thanks for the link nesquena.
nesquena commented 8 years ago

Great to see you added a number of additional optionals to the app. Hopefully you found the pre-work project really helpful as an introduction to both the class structure and the Android platform.

When packaging by feature is it possible / a best practice to move the xml layout resources into each feature package instead of having a single layout package?

See this section for more on that. This is not something supported natively by Android Studio.

We look forward to kicking things off tomorrow!

smacgregor commented 8 years ago

One last update before class:

  1. Replace direct access of SQLite with Android Annotation. As a side effect, ToDoItemDatabase has been completely removed.
  2. Stop serializing our toDoItem model when passing between the view and edit activity. Instead pass an id for the todo item into the intent which is more efficient.
  3. Gradle and AndroidManifest changes to support Android Annotation
  4. Define AA_MODELS in AndroidManifest for a performance boost
nesquena commented 8 years ago

Nice, glad to see you were able to try both SQLite and then also ActiveAndroid now. Gives you good perspective on persistence. There will be an opportunity to try these again with a slightly more complicated schema during the course. See you tonight.