Skip to content

Instantly share code, notes, and snippets.

@phpdave
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phpdave/ebe0aee7a65381bc4718 to your computer and use it in GitHub Desktop.
Save phpdave/ebe0aee7a65381bc4718 to your computer and use it in GitHub Desktop.
PHP/Web development to iOS Swift Development - notes about switching from PHP dev to swift development
Doctrine ~ Core Data (Database Abstration Layer)
Create Database Schema ~ New File - Core Data -> Data Model (Visual Map)
Table Name and columns ~ Entities and Attributes
mysql_connect ~ UIManagedObjectContext (adds managedObjectContext var to AppDelegate) or UIManagedDocument (allows syncing with iCloud)
DB select = NSManagedObjectContext's executeFetchReqest()
DB insert statement = NSEntityDescription.insertNewObjectForEntityForName
DB bind class variable to databse = @NSManaged var (getting and setting this var comes from the Database)
DB bind Select to UI Table = NSFetchedResultsController takes a fetchRequest and associate it with a table view and it will show
Using the filesystem
http://php.net/manual/en/ref.filesystem.php - NSFileManager
GET/POST http request to a controller ~ Segue (displays a new page/view) (pass along data in a prepare for segue, we do GET POST to pass long data in web world)
Model ~ variables in PHP ~ vars in a view controller
View ~ HTML output ~ StoryBoard UIs (UIView)
Controller ~ PHP files ~ swift files that are used by ui
Responsive CSS framework + custom CSS ~ Auto-layout
Google Maps ~ MapKit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment