diff --git a/MVCcallange.xcodeproj/project.pbxproj b/MVCcallange.xcodeproj/project.pbxproj new file mode 100644 index 0000000..07efc02 --- /dev/null +++ b/MVCcallange.xcodeproj/project.pbxproj @@ -0,0 +1,345 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + A5339C7F2192358F0005DCB9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5339C7E2192358F0005DCB9 /* AppDelegate.swift */; }; + A5339C812192358F0005DCB9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5339C802192358F0005DCB9 /* ViewController.swift */; }; + A5339C842192358F0005DCB9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A5339C822192358F0005DCB9 /* Main.storyboard */; }; + A5339C86219235900005DCB9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A5339C85219235900005DCB9 /* Assets.xcassets */; }; + A5339C89219235900005DCB9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A5339C87219235900005DCB9 /* LaunchScreen.storyboard */; }; + A5339C91219235D80005DCB9 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5339C90219235D80005DCB9 /* Model.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + A5339C7B2192358F0005DCB9 /* MVCcallange.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MVCcallange.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A5339C7E2192358F0005DCB9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + A5339C802192358F0005DCB9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + A5339C832192358F0005DCB9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + A5339C85219235900005DCB9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A5339C88219235900005DCB9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + A5339C8A219235900005DCB9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A5339C90219235D80005DCB9 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A5339C782192358F0005DCB9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + A5339C722192358F0005DCB9 = { + isa = PBXGroup; + children = ( + A5339C7D2192358F0005DCB9 /* MVCcallange */, + A5339C7C2192358F0005DCB9 /* Products */, + ); + sourceTree = ""; + }; + A5339C7C2192358F0005DCB9 /* Products */ = { + isa = PBXGroup; + children = ( + A5339C7B2192358F0005DCB9 /* MVCcallange.app */, + ); + name = Products; + sourceTree = ""; + }; + A5339C7D2192358F0005DCB9 /* MVCcallange */ = { + isa = PBXGroup; + children = ( + A5339C7E2192358F0005DCB9 /* AppDelegate.swift */, + A5339C802192358F0005DCB9 /* ViewController.swift */, + A5339C90219235D80005DCB9 /* Model.swift */, + A5339C822192358F0005DCB9 /* Main.storyboard */, + A5339C85219235900005DCB9 /* Assets.xcassets */, + A5339C87219235900005DCB9 /* LaunchScreen.storyboard */, + A5339C8A219235900005DCB9 /* Info.plist */, + ); + path = MVCcallange; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + A5339C7A2192358F0005DCB9 /* MVCcallange */ = { + isa = PBXNativeTarget; + buildConfigurationList = A5339C8D219235900005DCB9 /* Build configuration list for PBXNativeTarget "MVCcallange" */; + buildPhases = ( + A5339C772192358F0005DCB9 /* Sources */, + A5339C782192358F0005DCB9 /* Frameworks */, + A5339C792192358F0005DCB9 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MVCcallange; + productName = MVCcallange; + productReference = A5339C7B2192358F0005DCB9 /* MVCcallange.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A5339C732192358F0005DCB9 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = "Sergey Osipyan"; + TargetAttributes = { + A5339C7A2192358F0005DCB9 = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = A5339C762192358F0005DCB9 /* Build configuration list for PBXProject "MVCcallange" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = A5339C722192358F0005DCB9; + productRefGroup = A5339C7C2192358F0005DCB9 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A5339C7A2192358F0005DCB9 /* MVCcallange */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + A5339C792192358F0005DCB9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A5339C89219235900005DCB9 /* LaunchScreen.storyboard in Resources */, + A5339C86219235900005DCB9 /* Assets.xcassets in Resources */, + A5339C842192358F0005DCB9 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A5339C772192358F0005DCB9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A5339C91219235D80005DCB9 /* Model.swift in Sources */, + A5339C812192358F0005DCB9 /* ViewController.swift in Sources */, + A5339C7F2192358F0005DCB9 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + A5339C822192358F0005DCB9 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A5339C832192358F0005DCB9 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + A5339C87219235900005DCB9 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + A5339C88219235900005DCB9 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + A5339C8B219235900005DCB9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + A5339C8C219235900005DCB9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + A5339C8E219235900005DCB9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = KF4QEGAU36; + INFOPLIST_FILE = MVCcallange/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = Sergey.MVCcallange; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + A5339C8F219235900005DCB9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = KF4QEGAU36; + INFOPLIST_FILE = MVCcallange/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = Sergey.MVCcallange; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A5339C762192358F0005DCB9 /* Build configuration list for PBXProject "MVCcallange" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A5339C8B219235900005DCB9 /* Debug */, + A5339C8C219235900005DCB9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A5339C8D219235900005DCB9 /* Build configuration list for PBXNativeTarget "MVCcallange" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A5339C8E219235900005DCB9 /* Debug */, + A5339C8F219235900005DCB9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A5339C732192358F0005DCB9 /* Project object */; +} diff --git a/MVCcallange/AppDelegate.swift b/MVCcallange/AppDelegate.swift new file mode 100644 index 0000000..d13a827 --- /dev/null +++ b/MVCcallange/AppDelegate.swift @@ -0,0 +1,9 @@ + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? +} + diff --git a/MVCcallange/Assets.xcassets/AppIcon.appiconset/Contents.json b/MVCcallange/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/MVCcallange/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MVCcallange/Assets.xcassets/Contents.json b/MVCcallange/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/MVCcallange/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MVCcallange/Base.lproj/LaunchScreen.storyboard b/MVCcallange/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/MVCcallange/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MVCcallange/Base.lproj/Main.storyboard b/MVCcallange/Base.lproj/Main.storyboard new file mode 100644 index 0000000..38baeac --- /dev/null +++ b/MVCcallange/Base.lproj/Main.storyboard @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MVCcallange/Info.plist b/MVCcallange/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/MVCcallange/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/MVCcallange/Model.swift b/MVCcallange/Model.swift new file mode 100644 index 0000000..c48c745 --- /dev/null +++ b/MVCcallange/Model.swift @@ -0,0 +1,21 @@ + +import Foundation + +class Model { + static let shared = Model() + private init() {} + + private(set) var items: [String] = [] + + func add(_ item: String) { + items.append(item) + // add the item to your items list + } + + func resetItems() { + + items = [] + // reset your items list here + } + +} diff --git a/MVCcallange/ViewController.swift b/MVCcallange/ViewController.swift new file mode 100644 index 0000000..4e2e0e9 --- /dev/null +++ b/MVCcallange/ViewController.swift @@ -0,0 +1,27 @@ + +import UIKit + +class ViewController: UIViewController { + + @IBOutlet weak var textField: UITextField! + + + @IBOutlet weak var label: UILabel! + + + + @IBAction func shouldAdd(_ sender: UIButton) { + + let text = textField.text ?? "" + if !text.isEmpty { + Model.shared.add(text) + textField.text = "" + let joined = Model.shared.items.joined(separator: "\n") + label.text = joined + } + } + @IBAction func shouldReset(_ sender: UIButton) { + Model.shared.resetItems() + label.text = "" + } +} diff --git a/Questions.md b/Questions.md new file mode 100644 index 0000000..9adc887 --- /dev/null +++ b/Questions.md @@ -0,0 +1,24 @@ + +What is Interface Builder's object library? +The Interface Builder's object library is a collection of objects that are use to build +difference interactions within the interface.... buttons, text fields, views and etc... + +What is the difference between an outlet and an action? +An IBOutlet is a variable which is a reference to a UI component. +An IBAction is a function which is called when a specific user interaction occurs. + +What is the role of a View Controller? +A View Controller manages a portion of interface as well as the interactions between +the interface and the underlying data. View controllers also facilitate transitions +between different parts of the user interface + +What is Model-View-Controller? +A Model View Controller is a design pattern made up of the three parts. +Model − is responsible for maintaining data. +View − is responsible for displaying all or a portion of the data to the user. +Controller − is software code that controls the interactions between the Model and View. + +Why use Model-View-Controller? +The MVC should be use for code reuse, better structure/organization and allowing for +faster development process. MVC can allow difference individuals/teams to work on +separate parts of the MVC application.