Mobile Design Question

  • 0

    I find for mobile engineer, the system design focus on different areas than backend engineer. Anyone has idea how to prepare it?

  • 2

    @chenkai1812 You could prepare for common design patterns used in mobile development, REST apis, how to request and handle resources from backend, event-driven programming, different multi threading technique on mobile, MVC/MVP/MVVM, ways to save memory... Are you looking for Android or iOS?

  • 0

    @genius1wjc Android. I am not the creator of this post but I can use or advice.

  • 2

    @chenkai1812 if you are applying for a Mobile Developer type role, I am assuming that you have some experience in the field. If you do not, you can still follow this advice.

    • Learn by doing: Come up with a basic idea of an app to develop. Define all its requirements, down to the last bit and then think of what is needed to make it workable.

    • Learn by failing: While you are developing said app, you will have the opportunity to learn what NOT to do and those types of questions are usually asked in interviews.

    • Publish your app When you make a basic submission of this app, you most probably will have not put any consideration into design patterns, event flow, storage optimization, security, etc. Now, when you publish an app through Google Developer console, you are provided with some insight into what to do write and how. This is very important feedback. If your app gets approved, distribute it and have your friends and family use it. They will give you feedback on the non functional aspects of the app. This information is helpful too.

    Obviously, reading from online forums, interview questions for the specific company you are applying to, and last but not the least, books, helps too but these things will help you learn what is exactly expected of you when you start working. Preparing this way will give you a confidence that will be unparalleled and the knowledge to support the confidence.

    Good luck!

  • 1

    @chenkai1812 : Things are quite different on Mobile devices than Server. Good thing Mobile is catching up on processing power and Storage. Key areas to focus when designing/developing a mobile app or sdk:

    1. Making REST api calls: I recommend looking at retrofit library for this. It will handle the request asynchronously for you. Android had AsyncTask and iOS has Dispatch methods. They both have evolved way too much today. But I still like to use retrofit for Android and Alamofire for iOS. Alamofire also gives you the ability to cancel a request. Follow Single responsibility paradigm. Requests job is not to process data. Off load this job to a different class.
    2. Handling Response: Parse you response, hydrate your POJOs. You can use SQLite or any OODB or LRUCache to store it in memory. Make sure read a lot about LRUCache. Its the most amazing thing I use daily.
    3. UI Design: Mobile Engineers eventually develop a niche skill for designing UI. Its a small real estate so designers come up with brilliant UX/UIs to display your data which developers bring to life. Make sure you know XML layouts for Android and AutoLayouts for XIBs for iOS. I find Cartography library for iOS very useful. It does require me to run the changes on simulator all the time but it does save me some hassle to deal with AutoLayouts.
    4. Messaging between Screens: Consider EventBus or Otto for this. When a specific asynchronous talks is finished, you initiate an event which is broadcasted internally and which ever class is listening to it absorbs it. Make sure you register and unregister the events on OnResume and OnPause of the activity or ViewController(which has different lifecycle methods). Once this events are caught, you can continue processing data.

    Activity talks to -> Fragment
    Fragment -> Initiates a request to API
    Request class (API) -> onSuccess - Do something (Save the data) -> Initiate bus event
    Fragment -> Catches the event -> Fetches data from storage -> Inflates view with data.

    Libraries: Otto, Dagger, Retrofit, FasterXML.
    IDE: Android Studio

    Backend is the back bone for any application unless the app just does local stuff.

    Keep us posted.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.