Slide 1

Slide 1 text

PRESENTED BY Matt Stauffer @stauffermatt AND THE LARAVEL

Slide 2

Slide 2 text

“Sure, Laravel is great for fun little side projects…

Slide 3

Slide 3 text

…but can you use it for Enterprise?”

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

en•ter•prise [en-ter-PRAHYZ]
 noun !

Slide 7

Slide 7 text

Started with Wikipedia…

Slide 8

Slide 8 text

“[Enterprise software…] is computer software used to satisfy the needs of an organization rather than individual users.” WIKIPEDIA

Slide 9

Slide 9 text

“[Enterprise software is…] a collection of computer programs with common business applications, tools for modeling how the entire organization works, and development tools for building applications unique to the organization” WIKIPEDIA

Slide 10

Slide 10 text

“According to Martin Fowler, ‘[a]bout the display, manipulation, and storage of large amounts of often complex data and the support or automation of business processes with that data.’” WIKIPEDIA

Slide 11

Slide 11 text

Then asked on Twitter…

Slide 12

Slide 12 text

J.T. GRIMES I don't think you can find consensus on what "enterprise" means, which means your audience will spend an hour arguing "but that's not enterprise!" instead of learning. 
 
 Here there be elephpant-shaped dragons. @JT_GRIMES

Slide 13

Slide 13 text

JOHN CORRY [You know it’s enterprise if] we spend more time in meetings than we do building things. @JPCORRY

Slide 14

Slide 14 text

MATT JOHNSON “Enterprise” is just code for “I have no idea what I’m doing on a project this big, please take this money and give me a 1-800 number to call when $#!7 goes south”. @MATTJOHNSONSTL

Slide 15

Slide 15 text

• What is enterprise? • What is enterprise-ready code, and is Laravel enterprise-ready? • Key considerations for enterprise code, process, and dev-ops/deploys • Success stories • An aside on YAGNI Agenda

Slide 16

Slide 16 text

What is enterprise, really?

Slide 17

Slide 17 text

Factors in enterprise projects/teams Team size Customer base size Legal and compliance constraints Dev team size

Slide 18

Slide 18 text

Factors in enterprise projects/teams Complication of operations / deployments Distance to other teams (legal, QA, product, etc.) Length of projects Pain if offline

Slide 19

Slide 19 text

Factors in enterprise projects/teams Legal and compliance constraints Customer base size Dev team size Team size LARGE LARGE LOTS LARGE

Slide 20

Slide 20 text

Complication of operations / deployments Factors in enterprise projects/teams Length of projects Distance to other teams (legal, QA, product, etc.) Pain if offline LOTS GREAT LOTS LONG

Slide 21

Slide 21 text

Is Laravel enterprise-ready?

Slide 22

Slide 22 text

YES. #FightTheFUD

Slide 23

Slide 23 text

What is enterprise-ready? 1

Slide 24

Slide 24 text

WHAT IS ENTERPRISE-READY? CONCLUSION: 1 • Can connect to multiple providers of other services (database, cache, session, etc.), differentiated by config variables if needed • Trusted proxy and Scaling Laravel for node balancing, etc. • Easy pessimistic locking, transactions, etc. for complex database interactions • Maintenance mode etc. for suggested downtime solutions Dev-Ops and Deploy friendliness Enterprise Ready ✅

Slide 25

Slide 25 text

WHAT IS ENTERPRISE-READY? CONCLUSION: 1 • Bcrypt hashing by default, & easy encrypting/decrypting • Powerful validation options • CSRF & XSS protection out of the box • PDO, easy parameterization, mass assignment protection • Open source, AKA 10s of thousands of eyes on every LOC Security Enterprise Ready ✅

Slide 26

Slide 26 text

WHAT IS ENTERPRISE-READY? CONCLUSION: 1 • Contracts • Multi-driver (auth, etc.) • All services keyed to single keys (e.g. `logger`) and easy to swap out globally • It’s just PHP ™ Flexibility Enterprise Ready ✅

Slide 27

Slide 27 text

WHAT IS ENTERPRISE-READY? CONCLUSION: 1 • Step-by-step upgrade instructions in the docs • < 1 day for all recent upgrades; < 4 hours for most projects; latest upgrades much simpler • Laravel Shift, and Laravel Shift Human Assistance (laravelshift.com) • Tighten and other agencies help with bigger upgrades Ease of Upgrades Enterprise Ready ✅

Slide 28

Slide 28 text

WHAT IS ENTERPRISE-READY? CONCLUSION: 1 • LTS releases are 2 years of bug fixes, 3 years of security fixes • Laravel sponsors/partners get priority access to Taylor (https://laravel.com/partners) • Tighten is beginning to offer a level of enterprise long term care—still in the process of figuring out what everyone wants and needs, but we’re here
 (https://tighten.co/laravel/support) Long-term Support Basically Enterprise Ready ✅

Slide 29

Slide 29 text

What is Enterprise Ready? GeekyBoy.com (Adam Culp, of Zend) A little help from my friends:

Slide 30

Slide 30 text

WHAT IS ENTERPRISE-READY? CONCLUSION: 1 • Composer • PSR-1, PSR-2, PSR-3, PSR-4, PSR-7*, PSR-11, PSR-16 • PSR Bridges: ๏ PSR-6 (github/madewithlove/illuminate-psr-cache-bridge) ๏ PSR-15 (github/jshannon63/laravel-psr15-middleware) • Plus composer, and it’s just PHP ™ Interop(erability) Enterprise Ready ✅

Slide 31

Slide 31 text

WHAT IS ENTERPRISE-READY? CONCLUSION: 1 • What does lockin mean? “Can’t change to another vendor in the future.” • Can change all dependencies, port all controllers, write as much as you want in service class POPOs • ! Avoid lockin Enterprise Ready ✅

Slide 32

Slide 32 text

WHAT IS ENTERPRISE-READY? CONCLUSION: 1 • 1707 contributors • Jeffrey taking over • Tighten & Other companies supporting • What happens to Laravel if Taylor Otwell disappears? - mattstauffer.com/blog/what- happens-to-laravel-if-taylor-otwell-disappears/ Contributors Enterprise Ready ✅

Slide 33

Slide 33 text

WHAT IS ENTERPRISE-READY? CONCLUSION: 1 • Laravel documentation • Other learning resources ๏ Books & Blogs ๏ Podcasts ๏ Laracasts ๏ Training courses Documentation Enterprise Ready ✅

Slide 34

Slide 34 text

WHAT IS ENTERPRISE-READY? CONCLUSION: 1 • Follows Symfony release schedule and roadmap for all Symfony dependencies • No more or less roadmap available than any other PHP framework. Build the ideas as you come up with them Roadmaps Enterprise Ready ✅

Slide 35

Slide 35 text

Code considerations for the enterprise 2

Slide 36

Slide 36 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 [T]he biggest problems of “enterprise” level development is one of working in very large teams. Without good organization codebases can be difficult to navigate and conflicts can make mayhem - predictable places to find code and small files are my top 2 tips…
 - Gary Hockin (on Twitter) [D]iscoverability and consistency are paramount when you’re dealing with frequent onboarding. My enterprise exp. involves many non-Laravel devs too, so I always prefer conventions that help the tools help you (e.g. type-hints & docblocks promote discovery in IDE)…
 - Sara Bine (on Twitter) Conventions, predictability, & discoverability

Slide 37

Slide 37 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 • Use IDE-friendly verbosity like type-hints and doc blocks • Lean on Laravel’s established conventions whenever possible; less decisions to make and easier to onboard Laravel devs new to your codebase • Develop and communicate conventions of what goes where • Set and enforce coding standards (e.g. Nitpick-CI or StyleCI) Conventions, predictability, & discoverability (CONTINUED)

Slide 38

Slide 38 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 • Write tests • Lots of tests • Write the broadest tests you can for your context • Test your code and test that it works with the code it’s supposed to interact with, especially if you don’t maintain the code it’s supposed to interact with • Enterprise best testing practices == best testing practices Tests and test coverage (CONTINUED)

Slide 39

Slide 39 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 Tests and test coverage TestDrivenLaravel.com

Slide 40

Slide 40 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 It’s tempting to worry about performance etc but there are well known solutions to that problem like caching - maintainability is key to long living projects and being able to find the code you want to change is the number one problem when we were called in as consultants…
 - Gary Hockin (on Twitter) Performance

Slide 41

Slide 41 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 • DebugBar/query optimization, n+1 and eager loading, and the usuals (database indexing and chunking, etc.) • If possible, optimize later (premature optimization is almost always wrong) • Lead up: Performance issues aren’t bad, they’re opportunities to refactor with a lot of useful information • Queues, workers, cache, spin off microservices Performance (CONTINUED)

Slide 42

Slide 42 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 Performance (CONTINUED) ScalingLaravel.com

Slide 43

Slide 43 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 Build projections from older systems Database concerns Transactions and locking Multi- database connections Adjust for legacy table systems 1 2 3 4

Slide 44

Slide 44 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 Microservices and API-first

Slide 45

Slide 45 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 • It’s just PHP ™ Login/SSO

Slide 46

Slide 46 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 Scale friendliness Separation of architecture concerns Flexible configuration management Cache-ability Componentization 1 2 3 4

Slide 47

Slide 47 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 • Laravel’s ACL (or those offered in third party packages) are your best friends • https://github.com/owen-it/laravel-auditing ๏ Eloquent events $ ๏ Custom log handlers, especially in 5.6+ $ Events, auditing, transparency, & access

Slide 48

Slide 48 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 • DDD • Event Sourcing • Microservices • API-first • Enterprise Buzzwords

Slide 49

Slide 49 text

CODE CONSIDERATIONS FOR THE ENTERPRISE 2 • Audit security, up-to-date-ness, tests, responsitivity • Consider directly using PHP package instead of the Laravel bridge so you own the bootstrapping • Consider using Laravel components instead of third-party packages (unless third party is another major vendor) if possible for reliability • Limit API interfaces between external packages and your applications; consider building custom bridge/ client/interface Third party packages

Slide 50

Slide 50 text

Process considerations for the enterprise 3

Slide 51

Slide 51 text

PROCESS CONSIDERATIONS FOR THE ENTERPRISE 3 Why? • More developers; more new developers; more developers from other stacks; more junior developers How? • Better documentation, IDE-friendliness • Bin scripts for setup; pre-packaged local dev environments • Good tests Easy onboarding

Slide 52

Slide 52 text

PROCESS CONSIDERATIONS FOR THE ENTERPRISE 3 In large apps and orgs, it’s critical to keep the ball moving. Everything: requirements, to processes/ workflows, deployments, code standards & style guides, environments etc. One well known source.…
 - Anthony Terrell (on Twitter) Documentation

Slide 53

Slide 53 text

PROCESS CONSIDERATIONS FOR THE ENTERPRISE 3 Mentioned before as a code issue but: which conventions? • Predictable within organization/code-base and enforced via commit hooks or in CI • Preferably predictable within broader community for easier onboarding and code reuse Conventions about patterns, folders, tools and packages, code organization, config, DI, naming, code style, API style, testing. Conventions and organization

Slide 54

Slide 54 text

PROCESS CONSIDERATIONS FOR THE ENTERPRISE 3 • Mythical man month • More teams, more separate components • Architecture vs. Coding vs. Code Review Splitting responsibilities

Slide 55

Slide 55 text

PROCESS CONSIDERATIONS FOR THE ENTERPRISE 3 Sprint cycles and lower-case “a” agile ⚙

Slide 56

Slide 56 text

PROCESS CONSIDERATIONS FOR THE ENTERPRISE 3 Tech debt management strategy

Slide 57

Slide 57 text

PROCESS CONSIDERATIONS FOR THE ENTERPRISE 3 Source control & deploy strategy

Slide 58

Slide 58 text

PROCESS CONSIDERATIONS FOR THE ENTERPRISE 3 Hiring and contractors

Slide 59

Slide 59 text

PROCESS CONSIDERATIONS FOR THE ENTERPRISE 3 Laravel norms are key…unless they’re not ☝

Slide 60

Slide 60 text

Dev-ops/Deploy considerations for the enterprise 4

Slide 61

Slide 61 text

DEV-OPS CONSIDERATIONS FOR THE ENTERPRISE 4 It’s all out of your hands

Slide 62

Slide 62 text

DEV-OPS CONSIDERATIONS FOR THE ENTERPRISE 4 Scaling, sharding, replicating, load balancing ⚖

Slide 63

Slide 63 text

DEV-OPS CONSIDERATIONS FOR THE ENTERPRISE 4 Environments and Deploys

Slide 64

Slide 64 text

DEV-OPS CONSIDERATIONS FOR THE ENTERPRISE 4 Only run it once!

Slide 65

Slide 65 text

DEV-OPS CONSIDERATIONS FOR THE ENTERPRISE 4 Rate limiting ✅

Slide 66

Slide 66 text

DEV-OPS CONSIDERATIONS FOR THE ENTERPRISE 4 Measure and act

Slide 67

Slide 67 text

Success stories 5

Slide 68

Slide 68 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 • Powers gene.com through many millions of visits per month • Powers a significant number of backend tools; deployed by and within complex IT infrastructure • “It’s like PHP, but we actually enjoy working in it.” • “Laravel makes a nice abstraction layer on top of services we need to use, like Google Search Appliance” Genentech

Slide 69

Slide 69 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 • 42-year old company • Currently $432 million/year revenue; recently sold for $1.4billion • 380+ employees Bankrate, Inc.

Slide 70

Slide 70 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 • Direct connection—import and reporting—to the largest insurance providers in the U.S. • Complex business logic around scheduling, time zones, counsellors’ accreditation, missed sessions, and more • Event handling system on counseling session events • Complex auditing system One of the largest Telehealth companies in the world

Slide 71

Slide 71 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 100% Laravel, running on Red Hat / Apache / Maria / PHP: • All communications between corporate and field • 50k+ users daily • Complex legal compliance around tasks, communications, tracking actions through multiple connected systems • 1mil requests/day on average Unnamed 13-billion-dollar retail company

Slide 72

Slide 72 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 • At @FixicoNL we use Laravel 5 at the Enterprise level with #Kubernetes support. Our applications are running 24/7, no matter what. The developers are thrilled with the tech stack. . • 13 devs, 1390 shops serviced, custom dashboards for shops and mobile apps for users • Laravel and Lumen services with entirely decoupled frontend • Tried Doctrine and regretted it; moved to Eloquent with manual getters & setters FixicoNL

Slide 73

Slide 73 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 • Commerce platform for sandbox games—“Shopify for Minecraft” • Over 500k webstores; 169 countries • 16 million payments • 400-500k requests per hour with common 3-4x spikes • One Christmas 1.2m requests/hour Buycraft

Slide 74

Slide 74 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 • Largest Internet-based career network for matching security-cleared professionals with hiring companies. • Targets U.S. government contractors, federal agencies, national laboratories, and universities. • “We chose Laravel for its ease of use, features, and flexibility to integrate with our existing codebase.” • Migrated existing database tables into Eloquent ClearanceJobs.com

Slide 75

Slide 75 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 • Joe Lennon / • Startup supporting crucial business needs of enterprise clients • Multiple-provider SSO • AWS/EB, Load balancing, ElastiCache, SES/SNS/SQS/etc., Cloudfront, and more • Web- and native-based tools built in tandem • “[Our experiences have been] overwhelmingly positive.” Workvivo

Slide 76

Slide 76 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 • 40+ member dev team, interacting with dozens of external teams with different services and codebases • Single Laravel monolith • Read from and write to multiple databases of different database types • Maintain a custom ticketing system & work flow engine • “We have had nothing but a fantastic experience using Laravel.” Major unnamed telecom organization

Slide 77

Slide 77 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 • $20+ billion in transactions • Security audits of entire tech stack; e.g. Laravel, Git, Node, Vue, Nginx, etc. • Have to train non-developers on how to understand/fix entire dev tech stack • Hard to talk about publicly because of approvals, so people don’t know as much about enterprise users of Laravel • “As far as I’m concerned, people saying that Laravel isn’t enterprise ready simply have either no clue and/or have ulterior motives” Unnamed Top 10 U.S. bank

Slide 78

Slide 78 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 • SaaS for retail • POS • Processing for hospitality industry • Used by over 48,000 businesses around the world • Processes over $14 billion in transactions every year Major unnamed Point of Sale provider

Slide 79

Slide 79 text

ENTERPRISE LARAVEL SUCCESS STORIES 5 • Criterion Collection • Dun & Bradstreet • Network54 (acquired recently by Tapatalk) • Toyota • CampingWorld.com • State of Georgia’s official tourism site • Invicta Watches Found from BuiltWith/Google:

Slide 80

Slide 80 text

Laravel is in the enterprise already. And they love it. ❤

Slide 81

Slide 81 text

You can’t predict the future

Slide 82

Slide 82 text

You’ll never know less about a project than you do on the first day.

Slide 83

Slide 83 text

JIT (Just-in-Time) optimizations

Slide 84

Slide 84 text

“Let’s cross that bridge when we get to it.”

Slide 85

Slide 85 text

YAGNI

Slide 86

Slide 86 text

https://www.youtube.com/watch?v=uQUxJObxTUs

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

No content

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

Conclusions and stuff?

Slide 93

Slide 93 text

• What is the enterprise? • What is enterprise-ready code/framework? • Is Laravel enterprise-ready? • What are some code, process, and dev-ops considerations when writing enterprise-focused code? • Who else has used Laravel in the enterprise? • What does Matt want me to remember? Big questions

Slide 94

Slide 94 text

• ! • (bigger, larger, more) What is the enterprise?

Slide 95

Slide 95 text

• It’s complicated. • (flexible, secure, stable, clear, etc.) What is enterprise-ready code/framework?

Slide 96

Slide 96 text

• Yep! #FightTheFUD Is Laravel enterprise-ready?

Slide 97

Slide 97 text

• Write code for the “lots” of enterprise—lots of team members, lots of servers, lots of old tables with bad names, etc. What are some considerations for coding in enterprise contexts?

Slide 98

Slide 98 text

• Many huge, multibillion-dollar, highly regulated, complex, big companies from around the world Who else has used Laravel in the enterprise?

Slide 99

Slide 99 text

• “Cross that bridge when we’ll get to it” / “YAGNI” / “Code for Change” / “You can’t predict the future” / etc. • It’s just PHP ™ • Whatever issue you’ve run into, someone else has likely already hit it—and solved it—in Laravel What does Matt want you to remember?

Slide 100

Slide 100 text

One more thing!

Slide 101

Slide 101 text

My Offer https://enterpriselaravel.com/help-me

Slide 102

Slide 102 text

Resources https://enterpriselaravel.com/

Slide 103

Slide 103 text

This ain’t over…