SlideShare a Scribd company logo
1 of 80
Download to read offline
'' I HAVE A FRAMEWORK IDEA ''
REPEAT LESS, SHARE MORE.
FABIO MILANO - @IAMFABIOMILANO
I have an app idea.
— Someone, somewhere.
WHAT
IS A FRAMEWORK?
WHAT IS INSIDE A FRAMEWORK?
...
WHY
FRAMEWORKS?
!
WHY
FRAMEWORKS?
WITH A FRAMEWORK
SHARING IS
CARING
> separation of concerns
> separation of concerns *
*
It might affect app launch time (use DYLD_PRINT_STATISTICS for stats).
> separation of concerns
> encapsulation
> separation of concerns
> encapsulation
> maintanability
CREATE A FRAMEWORK
CREATE A FRAMEWORK
THE FOLDER
STRUCTURE
THE FOLDER STRUCTURE
example-package-awesome-library
!"" Sources
# !"" AwesomeStruct.swift
# !"" AwesomeClass.swift
# $"" AwesomeProtocol.swift
|"" Tests
# !"" AwesomeTests
# | !"" AwesomeClassTest.swift
DONE! !
..ALMOST..
CREATE FRAMEWORK
THE PLATFORMS
MULTI PLATFORM TESTS
!
⚠
THE BUILD SETTINGS
SUPPORTED PLATFORMS
THE BUILD SETTINGS
SUPPORTED PLATFORMS
THE BUILD SETTINGS
TARGETED DEVICE FAMILY
THE .xcconfig FILE
THE STRANGE CASE OF
TARGETED_DEVICE_FAMILY
// Config.xcconfig
TARGETED_DEVICE_FAMILY = 1,2,3,4
THE BUILD SETTINGS
THE DEPLOYMENT TARGET
/**
Authorize by requesting a device code.
- Parameters:
- completion: The completion block.
- String: The device code to use to finish the authorization flow.
- see: https://tools.ietf.org/html/draft-denniss-oauth-device-flow-00
*/
public func authorizeViaDeviceCode(completion: (String) -> Void) throws { ... }
#if os(iOS) || os(OSX)
import WebKit
/**
Authorize via standard OAuth 2.0 authorization flow.
- Parameters:
- completion: The completion block.
- WKWebView: The web page where the user can authorize the application.
*/
public func authorize(completion: (WKWebView) -> Void) throws { ... }
#endif
THE BUILD SETTINGS
RUN PATH SEARCH PATHS (A.K.A rpath)
PLAYGROUND:
A PLACE WHERE PEOPLE CAN PLAY
DEPENDENCY
MANAGERS
COCOAPODS
COCOAPODS - HOW
pod spec create MyAwesomeKit
COCOAPODS - PODSPEC FILE
Pod::Spec.new do |spec|
spec.name = 'MyAwesomeKit'
spec.version = '0.1.0'
spec.license = { :type => 'MIT' }
spec.homepage = 'https://pragmaconference.com'
spec.authors = { 'You' => 'you@me.com' }
spec.summary = 'Awesome code that works for your platform.'
spec.source = ....
spec.source_files = ....
spec.framework = 'SystemConfiguration'
spec.ios.deployment_target = '10.0'
spec.watchos.deployment_target = '3.0'
spec.tvos.deployment_target = '10.0'
spec.osx.deployment_target = '10.12'
spec.dependency "Result", "~> 2.1"
end
CARTHAGE
CARTHAGE
# Cartfile
github "ReactiveCocoa/ReactiveCocoa" # GitHub.com
github "https://enterprise.local/ghe/desktop/git-error-translations" # GitHub Enterprise
git "https://enterprise.local/desktop/git-error-translations2.git"
CARTHAGE
# Cartfile.private
github "Quick/Quick"
github "Quick/Nimble"
carthage update
xcconfig FILE ..AND CARTHAGE
// Carthage.xcconfig
#include "MyAwesomeConfig.xcconfig"
FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited)
FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited)
FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited)
FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited)
SWIFT PACKAGE
MANAGER (SPM)
SPM - THE PACKAGE FILE1
import PackageDescription
let package = Package(
name: "SwiftBackend",
dependencies: [
.Package(url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git",
majorVersion: 2, minor: 0
),
.Package(url: "https://github.com/PerfectlySoft/Perfect-PostgreSQL.git",
majorVersion: 2, minor: 0)
]
)
1
Example from Perfect: Server-Side Swift project.
$ swift build
$ swift test
SPM... AND XCODE
swift package generate-xcodeproj
BEING A
LIBRARY
CONTINUOUS
INTEGRATION
CONTINUOUS INTEGRATION
> catching probelms quickly, easily and early
CONTINUOUS INTEGRATION
> catching probelms quickly, easily and early
> enhancing collaboration
CONTINUOUS INTEGRATION
> catching probelms quickly, easily and early
> enhancing collaboration
> broadening test coverage
TRAVIS CI
# .travis.yml
language: objective-c
osx_image: xcode8
script:
- xcodebuild test -workspace MyAwesomeFramework.xcworkspace -scheme MyAwesomeFramework-Mac
- xcodebuild test -workspace MyAwesomeFramework.xcworkspace -scheme MyAwesomeFramework-iOS -sdk iphonesimulator
- xcodebuild test -workspace MyAwesomeFramework.xcworkspace -scheme MyAwesomeFramework-tvOS -sdk appletvsimulator
- xcodebuild build -workspace MyAwesomeFramework.xcworkspace -scheme MyAwesomeFramework-watchOS -sdk watchsimulator
# .travis.yml
language: objective-c
osx_image: xcode8
env:
- ACTION=test PLATFORM=Mac DESTINATION='platform=OS X'
- ACTION=test PLATFORM=iOS DESTINATION='platform=iOS Simulator,name=iPhone 6S'
- ACTION=build PLATFORM=watchOS DESTINATION='platform=watchOS Simulator,name=Apple Watch - 38mm'
- ACTION=test PLATFORM=tvOS DESTINATION='platform=tvOS Simulator,name=Apple TV 1080p'
script:
- set -o pipefail && xcodebuild -scheme MyAwesomeFramework -destination "$DESTINATION" $ACTION | xcpretty
DANGER FILE2
# Sometimes it's a README fix, or something like that - which isn't relevant for
# including in a project's CHANGELOG for example
not_declared_trivial = !(github.pr_title.include? "#trivial")
has_app_changes = !git.modified_files.grep(/Source/).empty?
# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]"
# Warn when there is a big PR
warn("Big PR") if git.lines_of_code > 500
# Changelog entries are required for changes to library files.
no_changelog_entry = !git.modified_files.include?("Changelog.md")
if has_app_changes && no_changelog_entry && not_declared_trivial
fail("Any changes to library code need a summary in the Changelog.")
end
# Added (or removed) library files need to be added (or removed) from the
# Carthage Xcode project to avoid breaking things for our Carthage users.
added_swift_library_files = git.added_files.grep(/Source.*.swift/).empty?
deleted_swift_library_files = git.deleted_files.grep(/Source.*.swift/).empty?
modified_carthage_xcode_project = !(git.deleted_files.grep(/Moya.xcodeproj/).empty?)
if (added_swift_library_files || deleted_swift_library_files) && modified_carthage_xcode_project
fail("Added or removed library files require the Carthage Xcode project to be updated.")
end
2
Example from https://github.com/Moya/Moya/blob/master/Dangerfile
DANGER
!
0 . 1 . 0
1 . 0 . 0
RECAP
RECAP
> framework or not framework?
RECAP
> framework or not framework?
> platform matters
RECAP
> framework or not framework?
> platform matters
> automate, automate, automate!
RECAP
> framework or not framework?
> platform matters
> automate, automate, automate!
> open source
THANK YOU!

More Related Content

What's hot

Intro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler JewellIntro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler Jewelljwi11iams
 
CocoaHeads Rennes #13 : CocoaPods
CocoaHeads Rennes #13 : CocoaPodsCocoaHeads Rennes #13 : CocoaPods
CocoaHeads Rennes #13 : CocoaPodsCocoaHeadsRNS
 
Calabash my understanding
Calabash my understandingCalabash my understanding
Calabash my understandingFARHAN SUMBUL
 
Continuous Integration for your Android projects
Continuous Integration for your Android projectsContinuous Integration for your Android projects
Continuous Integration for your Android projectsSergii Zhuk
 
iOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake DubliniOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake Dublinroland99
 
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty GenovaScale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty GenovaCorley S.r.l.
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projectsAleksandra Gavrilovska
 
Deploying ASP.Net Core apps in Docker Containers
Deploying ASP.Net Core apps in Docker ContainersDeploying ASP.Net Core apps in Docker Containers
Deploying ASP.Net Core apps in Docker ContainersAmal Dev
 
Accessors Vs Direct access to properties & Design Pattern
Accessors Vs Direct access to properties & Design PatternAccessors Vs Direct access to properties & Design Pattern
Accessors Vs Direct access to properties & Design PatternCocoaHeads France
 
Get started with AAR
Get started with AARGet started with AAR
Get started with AARRené Mertins
 
Ci system part i
Ci system part iCi system part i
Ci system part i振維 李
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPodsCocoaHeads France
 
Automate your build on Android with Jenkins
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with JenkinsBeMyApp
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with AppceleratorMatt Raible
 
Building the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersBuilding the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersWilliam Echlin
 
Automation Testing
Automation TestingAutomation Testing
Automation TestingRomSoft SRL
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using JenkinsCliffano Subagio
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkinsVinay H G
 

What's hot (20)

Intro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler JewellIntro to Eclipse Che, by Tyler Jewell
Intro to Eclipse Che, by Tyler Jewell
 
CocoaHeads Rennes #13 : CocoaPods
CocoaHeads Rennes #13 : CocoaPodsCocoaHeads Rennes #13 : CocoaPods
CocoaHeads Rennes #13 : CocoaPods
 
Calabash my understanding
Calabash my understandingCalabash my understanding
Calabash my understanding
 
Continuous Integration for your Android projects
Continuous Integration for your Android projectsContinuous Integration for your Android projects
Continuous Integration for your Android projects
 
Fastlane
FastlaneFastlane
Fastlane
 
iOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake DubliniOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake Dublin
 
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty GenovaScale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projects
 
Deploying ASP.Net Core apps in Docker Containers
Deploying ASP.Net Core apps in Docker ContainersDeploying ASP.Net Core apps in Docker Containers
Deploying ASP.Net Core apps in Docker Containers
 
Accessors Vs Direct access to properties & Design Pattern
Accessors Vs Direct access to properties & Design PatternAccessors Vs Direct access to properties & Design Pattern
Accessors Vs Direct access to properties & Design Pattern
 
Get started with AAR
Get started with AARGet started with AAR
Get started with AAR
 
Ci system part i
Ci system part iCi system part i
Ci system part i
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPods
 
Cocoa pods
Cocoa podsCocoa pods
Cocoa pods
 
Automate your build on Android with Jenkins
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with Jenkins
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
 
Building the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersBuilding the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for Testers
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Continuous integration using jenkins
Continuous integration using jenkinsContinuous integration using jenkins
Continuous integration using jenkins
 

Similar to "I have a framework idea" - Repeat less, share more.

BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesAlfresco Software
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php PresentationAlan Pinstein
 
Gigigo Workshop - Create an iOS Framework, document it and not die trying
Gigigo Workshop - Create an iOS Framework, document it and not die tryingGigigo Workshop - Create an iOS Framework, document it and not die trying
Gigigo Workshop - Create an iOS Framework, document it and not die tryingAlex Rupérez
 
TYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase frameworkTYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase frameworkChristian Trabold
 
IzPack at LyonJUG'11
IzPack at LyonJUG'11IzPack at LyonJUG'11
IzPack at LyonJUG'11julien.ponge
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerOrtus Solutions, Corp
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Ortus Solutions, Corp
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budgetDavid Lukac
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebJames Rakich
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSGunnar Hillert
 
One Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12cOne Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12cJosh Turner
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemAndres Almiray
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
 
Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012alexismidon
 

Similar to "I have a framework idea" - Repeat less, share more. (20)

BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best Practices
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Gigigo Workshop - Create an iOS Framework, document it and not die trying
Gigigo Workshop - Create an iOS Framework, document it and not die tryingGigigo Workshop - Create an iOS Framework, document it and not die trying
Gigigo Workshop - Create an iOS Framework, document it and not die trying
 
TYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase frameworkTYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase framework
 
Phing
PhingPhing
Phing
 
IzPack at LyonJUG'11
IzPack at LyonJUG'11IzPack at LyonJUG'11
IzPack at LyonJUG'11
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
R sharing 101
R sharing 101R sharing 101
R sharing 101
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
 
Ant vs Phing
Ant vs PhingAnt vs Phing
Ant vs Phing
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
One Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12cOne Click Provisioning With Enterprise Manager 12c
One Click Provisioning With Enterprise Manager 12c
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012Buildr In Action @devoxx france 2012
Buildr In Action @devoxx france 2012
 

Recently uploaded

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 

Recently uploaded (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

"I have a framework idea" - Repeat less, share more.

  • 1. '' I HAVE A FRAMEWORK IDEA '' REPEAT LESS, SHARE MORE. FABIO MILANO - @IAMFABIOMILANO
  • 2. I have an app idea. — Someone, somewhere.
  • 4. WHAT IS INSIDE A FRAMEWORK? ...
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. !
  • 12.
  • 16. > separation of concerns
  • 17. > separation of concerns * * It might affect app launch time (use DYLD_PRINT_STATISTICS for stats).
  • 18. > separation of concerns > encapsulation
  • 19. > separation of concerns > encapsulation > maintanability
  • 23. THE FOLDER STRUCTURE example-package-awesome-library !"" Sources # !"" AwesomeStruct.swift # !"" AwesomeClass.swift # $"" AwesomeProtocol.swift |"" Tests # !"" AwesomeTests # | !"" AwesomeClassTest.swift
  • 26.
  • 29. !
  • 30.
  • 35.
  • 36. THE STRANGE CASE OF TARGETED_DEVICE_FAMILY // Config.xcconfig TARGETED_DEVICE_FAMILY = 1,2,3,4
  • 37.
  • 38. THE BUILD SETTINGS THE DEPLOYMENT TARGET
  • 39. /** Authorize by requesting a device code. - Parameters: - completion: The completion block. - String: The device code to use to finish the authorization flow. - see: https://tools.ietf.org/html/draft-denniss-oauth-device-flow-00 */ public func authorizeViaDeviceCode(completion: (String) -> Void) throws { ... } #if os(iOS) || os(OSX) import WebKit /** Authorize via standard OAuth 2.0 authorization flow. - Parameters: - completion: The completion block. - WKWebView: The web page where the user can authorize the application. */ public func authorize(completion: (WKWebView) -> Void) throws { ... } #endif
  • 40. THE BUILD SETTINGS RUN PATH SEARCH PATHS (A.K.A rpath)
  • 41. PLAYGROUND: A PLACE WHERE PEOPLE CAN PLAY
  • 42.
  • 43.
  • 44.
  • 47.
  • 48. COCOAPODS - HOW pod spec create MyAwesomeKit
  • 49. COCOAPODS - PODSPEC FILE Pod::Spec.new do |spec| spec.name = 'MyAwesomeKit' spec.version = '0.1.0' spec.license = { :type => 'MIT' } spec.homepage = 'https://pragmaconference.com' spec.authors = { 'You' => 'you@me.com' } spec.summary = 'Awesome code that works for your platform.' spec.source = .... spec.source_files = .... spec.framework = 'SystemConfiguration' spec.ios.deployment_target = '10.0' spec.watchos.deployment_target = '3.0' spec.tvos.deployment_target = '10.0' spec.osx.deployment_target = '10.12' spec.dependency "Result", "~> 2.1" end
  • 51.
  • 52. CARTHAGE # Cartfile github "ReactiveCocoa/ReactiveCocoa" # GitHub.com github "https://enterprise.local/ghe/desktop/git-error-translations" # GitHub Enterprise git "https://enterprise.local/desktop/git-error-translations2.git"
  • 55. xcconfig FILE ..AND CARTHAGE // Carthage.xcconfig #include "MyAwesomeConfig.xcconfig" FRAMEWORK_SEARCH_PATHS[sdk=macosx*] = $(SRCROOT)/Carthage/Build/Mac/ $(inherited) FRAMEWORK_SEARCH_PATHS[sdk=iphone*] = $(SRCROOT)/Carthage/Build/iOS/ $(inherited) FRAMEWORK_SEARCH_PATHS[sdk=watch*] = $(SRCROOT)/Carthage/Build/watchOS/ $(inherited) FRAMEWORK_SEARCH_PATHS[sdk=appletv*] = $(SRCROOT)/Carthage/Build/tvOS/ $(inherited)
  • 56.
  • 58. SPM - THE PACKAGE FILE1 import PackageDescription let package = Package( name: "SwiftBackend", dependencies: [ .Package(url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git", majorVersion: 2, minor: 0 ), .Package(url: "https://github.com/PerfectlySoft/Perfect-PostgreSQL.git", majorVersion: 2, minor: 0) ] ) 1 Example from Perfect: Server-Side Swift project.
  • 59. $ swift build $ swift test
  • 60. SPM... AND XCODE swift package generate-xcodeproj
  • 63. CONTINUOUS INTEGRATION > catching probelms quickly, easily and early
  • 64. CONTINUOUS INTEGRATION > catching probelms quickly, easily and early > enhancing collaboration
  • 65. CONTINUOUS INTEGRATION > catching probelms quickly, easily and early > enhancing collaboration > broadening test coverage
  • 67. # .travis.yml language: objective-c osx_image: xcode8 script: - xcodebuild test -workspace MyAwesomeFramework.xcworkspace -scheme MyAwesomeFramework-Mac - xcodebuild test -workspace MyAwesomeFramework.xcworkspace -scheme MyAwesomeFramework-iOS -sdk iphonesimulator - xcodebuild test -workspace MyAwesomeFramework.xcworkspace -scheme MyAwesomeFramework-tvOS -sdk appletvsimulator - xcodebuild build -workspace MyAwesomeFramework.xcworkspace -scheme MyAwesomeFramework-watchOS -sdk watchsimulator
  • 68. # .travis.yml language: objective-c osx_image: xcode8 env: - ACTION=test PLATFORM=Mac DESTINATION='platform=OS X' - ACTION=test PLATFORM=iOS DESTINATION='platform=iOS Simulator,name=iPhone 6S' - ACTION=build PLATFORM=watchOS DESTINATION='platform=watchOS Simulator,name=Apple Watch - 38mm' - ACTION=test PLATFORM=tvOS DESTINATION='platform=tvOS Simulator,name=Apple TV 1080p' script: - set -o pipefail && xcodebuild -scheme MyAwesomeFramework -destination "$DESTINATION" $ACTION | xcpretty
  • 69.
  • 70. DANGER FILE2 # Sometimes it's a README fix, or something like that - which isn't relevant for # including in a project's CHANGELOG for example not_declared_trivial = !(github.pr_title.include? "#trivial") has_app_changes = !git.modified_files.grep(/Source/).empty? # Make it more obvious that a PR is a work in progress and shouldn't be merged yet warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]" # Warn when there is a big PR warn("Big PR") if git.lines_of_code > 500 # Changelog entries are required for changes to library files. no_changelog_entry = !git.modified_files.include?("Changelog.md") if has_app_changes && no_changelog_entry && not_declared_trivial fail("Any changes to library code need a summary in the Changelog.") end # Added (or removed) library files need to be added (or removed) from the # Carthage Xcode project to avoid breaking things for our Carthage users. added_swift_library_files = git.added_files.grep(/Source.*.swift/).empty? deleted_swift_library_files = git.deleted_files.grep(/Source.*.swift/).empty? modified_carthage_xcode_project = !(git.deleted_files.grep(/Moya.xcodeproj/).empty?) if (added_swift_library_files || deleted_swift_library_files) && modified_carthage_xcode_project fail("Added or removed library files require the Carthage Xcode project to be updated.") end 2 Example from https://github.com/Moya/Moya/blob/master/Dangerfile
  • 72. !
  • 73. 0 . 1 . 0
  • 74. 1 . 0 . 0
  • 75. RECAP
  • 76. RECAP > framework or not framework?
  • 77. RECAP > framework or not framework? > platform matters
  • 78. RECAP > framework or not framework? > platform matters > automate, automate, automate!
  • 79. RECAP > framework or not framework? > platform matters > automate, automate, automate! > open source