Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Framework agnostic packages for the win (ForumP...
Search
Jonathan Reinink
November 24, 2015
Technology
1.2k
8
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Framework agnostic packages for the win (ForumPHP 2015)
Jonathan Reinink
November 24, 2015
Transcript
70 slides
None
Jonathan Reinink Software developer from Canada. Been writing PHP for
over 15 years. Marketing agency for over a decade. Started contract development this year. I <3 open source.
None
What exactly does framework agnostic mean?
Code that works independent of frameworks.
Framework agnostic does not mean framework intolerant.
Why framework agnostic?
Framework agnostic code is more reusable than framework specific code.
Reusable code is code we don't have to write.
I believe creating reusable code is key to the continued
success of PHP.
As software become increasingly more complex, our reliance on existing,
quality code increases.
I see a future where the various PHP communities more
actively share code with one another.
So, why then are we using framework specific code?
Because we sort of had to.
1994 - 2004: 2005 - 2012: 2013 - Future: Vanilla
PHP Frameworks Packages
1994 - 2004: The age of vanilla PHP
Rasmus started working on PHP sometime in 1994.
PHP was this new amazing tool that let us build
dynamic websites easily.
PHP became a career for many of us.
We started finding ways to write code better and faster.
PHP had a decent standard library, but pieces were missing.
Routing Templating Database Abstraction Validation Session Handling Error Management Authentication
Caching Request Processing Responses Sending
Developers starting writing new, focused PHP libraries.
But…we had no easy way to share them.
So we manually downloaded zip files.
Introducing PEAR: PHP first attempt at a package manager.
1. To provide a consistent means for library code authors
to share their code with other devs. 2. To give the PHP community an infrastructure for sharing code. 3. To define standards that help developers write portable and reusable code. 4. To provide tools for code maintenance and distribution.
PEAR had some issues...
The community gave up on PEAR. :(
2005 - 2012: The age of frameworks
Reusable code was packaged up into libraries called frameworks.
Frameworks were easy to download, and they just worked.
Frameworks came with almost everything needed for the average project.
Frameworks allowed us to get work done quickly.
2015 became the year of PHP frameworks. Symfony, CakePHP, Solar,
Agavi, ezComponents
But, what if the framework didn't have some other functionality
you needed?
Frameworks grew to accommodate a wide range of use cases.
We continued to download zip files. :(
Then everything changed.
2013 - Future: The age of packages
1994 - 2004: 2005 - 2012: 2009: 2012: 2013 -
Future: Vanilla PHP Frameworks PHP-FIG Formed Composer Launched Packages
None
“We're a group of established PHP projects whose goal is
to talk about commonalities between our projects and find ways we can work better together.” (PHP-FIG goal)
“To define standards that help developers write portable and reusable
code.” (PEARs goal)
Their very first recommendation was an autoloading standard called PSR-0.
The PHP-FIG continues to develop standards that make sharing reusable
code easier.
www.php-fig.org
None
Unlike PEAR, Composer got a LOT of things right.
Downloaded packages. Resolved their dependencies. Autoloaded classes.
Composer was exactly what PHP needed to solve it's code
sharing problem.
Composer was an overnight success, and became mainstream in 2013.
Packages starting popping up everywhere. It was amazing!
So, why are we still using frameworks?
In the age of packages, the purpose of frameworks is
changing.
Frameworks no longer have to be everything to everyone.
Frameworks are now the glue between reusable framework agnostic packages.
Need something your framework doesn’t offer? No worries, just: >
composer require the/package
Even frameworks are now being built using framework agnostic code.
Framework agnostic code also pulls communities together.
Framework agnostic code is good for package maintainers.
If you’re a maintainer of a framework specific package, please
consider making it framework agnostic.
This will require a change in thinking. We’ve been in
the age of frameworks a long time.
Offer framework specific support for your package using service providers.
None
phppackagechecklist.com
None
So, why framework agnostic?
BECAUSE IT CAN BE!!!
Thanks! Follow me on Twitter at @reinink. Rate this talk
https://joind.in/15278.
More Decks by Jonathan Reinink
See All by Jonathan Reinink
The formula to awesome docs (phpDay 2017)
reinink
0
280
How to open source a PHP package (phpDay 2017)
reinink
1
260
The formula to awesome docs (Lone Star PHP 2016)
reinink
0
1.2k
The PHP Package Checklist (Lone Star PHP 2016)
reinink
0
420
Framework agnostic packages for the win (SkiPHP 2016)
reinink
1
480
Rethink image manipulations with Glide (ForumPHP 2015)
reinink
0
760
Rethink image manipulations with Glide
reinink
3
660
Enough about Classes, Let's Talk Templates
reinink
8
4k
Practical deployments for average projects
reinink
4
510
Other Decks in Technology
See All in Technology
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
3
400
Terraform 0 to 100:100個以上のリポジトリを常に最新にし続けるための自動化
sue445
2
150
おうち環境でも「なるべく止めたくない!」 ― おうち環境の機器冗長化の理想と現実
yuutosi
1
610
未来を描き変化の中で学び直す ヴァンガードから考える、AI時代のチーム開発
lamb_moko
0
110
AIネイティブ組織の作り方。1人のPOとAIから始める、自社での実験
ama_ch
2
1.2k
閉域網でのAPI公開の選択肢全部比較!
takano0131
4
570
共通基盤の実装に Kotlin - Quarkus を選定した理由と採用したアーキテクチャ
nealle
1
140
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
2
780
マネージャーをエスパーにしない マネジメントされる側から始める、働きやすい現場づくり
comi190327
1
800
小さなエージェントから始めてみよう!実践コンテキストエンジニアリング
iwamot
PRO
0
130
SORACOM × AWS IoT Core でSREする
butadora
0
110
変更差分を読むために環境を整備しよう
pipepasta
1
470
Featured
See All Featured
Being A Developer After 40
akosma
PRO
92
590k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
70
69k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Mind Mapping
helmedeiros
1
440
How to Talk to Developers About Accessibility
jct
2
620
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.6k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k