Welcome to the Treehouse Community
Looking to learn something new?
Calvin Liem3,599 Points
understanding large Project
this is my first month with teamtreehouse
when we want to build a big project, what is the easy way to build that i watch the OOP in swift and so i understand a little bit about code
but something is not clear in my head like
should we make 1 swift file containing all the object(class) and then use it in another swift controller file that control user view?
make 1 swift file for 1 object then use it in another swift controller file?
make 1 controller swift file for 1 view (write object in there when needed and use it inside the file)
thanks i hope my question is clear
This is a awesome question. You never want to put all your classes in one file. Doing so it make it hard to scale the project later on. Each class should have its own file.
Check out this course: https://teamtreehouse.com/library/objectoriented-swift
Note: One of the things I do when building a new project is focus on the design. Design will always have an huge impact on the code we write. After the design is complete, I break things down into objects and functions. From there I start building my classes.
I hope that helps :)