Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

About your design decisions #18

Open
NutanNiraula opened this issue Nov 4, 2020 · 1 comment
Open

About your design decisions #18

NutanNiraula opened this issue Nov 4, 2020 · 1 comment

Comments

@NutanNiraula
Copy link

Hi, I want to just point out some of your decisions and try to understand your reasons for making them. Feel free to share you thought process and rationale behind your decision. This is to understand your app design process and level of understanding of various parts of the app development.

  1. Its really interesting to see you go extra mile to add fastlane to the project. What kind of lanes do you usually write in a typical project and how do you usually tie it up in continuous integration system? I saw that you are directly using api token in your fastfile, is there a way we can extract it out of git repo?

  2. I saw that you are using storyboards in your app, I just want to discuss the pros and cons of using storyboard vs programmatic UI. Which one would you prefer?

  3. You are actually using two separate JSON libraries in app, ObjectMapper and Swity JSON, have you tried working with swift Codable? Alamofire 5 even supports automatic decoding right?

  4. Do you think creating an interceptor layer in network service would be beneficial at this stage of app development?

  5. I saw that you have stored Auth key and secret in constants file. I have two questions here, do you think there is a better way to namespace Constants than using a struct? How do you think we can manage secrets in our app without leaking it to the git repo?

  6. One last thing I want to discuss is your choice of folder structure. It is good but I want to know why you chose to bundle up viewModels of each module into a single folder structure? What would be the benefit of bundling viewModels in same folder vs bundling viewModel, views and controllers of each feature or module in same folder.

@markgravity
Copy link
Owner

markgravity commented Nov 4, 2020

Hi @NutanNiraula

  1. There are 2 types of lane that I usually use:
  • test: build app in staging env & upload to AppCenter, then notify to testers
  • beta: build app in production env & upload to Testflight (through AppCenter), then testers will review it again. Finally, submit this build to AppStore
    Also, I believe we can put Api Token in a json file, ignore it from git
  1. Storyboard
  • Pros:
    • Easy to use & visual
    • Develop faster
    • Code more cleaner
  • Cons:
    • Lower performance vs programmatic UI (autolayout, xib)
    • Less control

Personally, I love to use Storyboard more. Life is happier! 🤟
3. I tried using it before, but it makes me feel like not enough elegant, nice, flexible ... Also, I don't see Alomofire supports the feature that you mention 😄
4. Sorry, I don't have experimented with using an interceptor layer in network service, so just have no ideas about it 😄
5.

  • Q1: For me now, I think struct is my best solution right now.
  • Q2: Yea, we can store in xconfig file, ignore it from git repo and share it directly
  1. It's kindly personally, I like to look it straight forward (view in views folder, controller in controllers folder, viewmodel in viewModels folder), also match with my mindset and the flow of my thinking.
    And it's inspired by Laravel (my favorite BE framework)
    P/s: I also agree, it makes me harder when I want to find view-model then find the controller for the same feature.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants