Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Let's start your first OSS with CakePHP

Ad4c3c738e57a9bbcb800871e81c232d?s=47 itosho
November 10, 2019

Let's start your first OSS with CakePHP

On CakeFest 2019 Tokyo, Japan / By Sho ITO, Connehito Inc



November 10, 2019


  1. Let's start your first OSS with CakePHP by itosho /

    Connehito Inc. CakeFest 2019 Tokyo, Japan
  2. Hello, everyone!

  3. About Me Sho ITO @itosho - Backend Engineer, CakePHP Contributor

    - Like Baseball⚾, Basketball - CTO, Connehito Inc. - From the beginning, we used CakePHP in all backend systems
  4. About Our Company

  5. Creating services that people cannot live without Connehito uses the

    power of technology to provide support to mothers in their daily decision makings about family matter
  6. Brand that supports mothers' each step Business Lineup

  7. No.1 app for mothers in Japan! One third of mothers

    in Japan are using mamari Communication amongst users about their worries and experiences about childbearing and childcare Q&A Community App Delivery of useful articles about childbearing and childcare. Many articles are supervised by experts Web Media A subscription service provides more useful functions e.g. premium articles, shopping coupons, premium search functions Mamari Premium
  8. Have you ever wanted to create OSS?

  9. But, it's hard to take action, isn't it?

  10. Let’s take the first step TODAY!

  11. Today’s Topics 1. Let’s create OSS! 2. Make it better!

    3. Accelerate your OSS activity!
  12. 1. Let’s create OSS!

  13. About Easy Query - Behavior Plugin for CakePHP - https://github.com/itosho/easy-query

    - Easily some complicated queries - e.g. upsert, bulk upsert bulk insert, and insert once(insert select query) - Requirements: PHP 7.0+, CakePHP 3.5+, MySQL 5.6+ - Looking for someone to support PostgreSQL !
  14. Usage

  15. None
  16. Step1. Prepare an OSS

  17. Create a Repository - Well begun is half done. -

    If you don’t mind - on GitHub - MIT Licence - Naming is important - Googleability - cake prefix
  18. The name and meta infomartion Lists packages required Autoload mapping

  19. Step2. Write codes

  20. The most fun process - Describe only bulkInsert() - Please

    check the repository for details
  21. None
  22. Decomposed the Entity array data into fields and data Query

    builder realizes processing of the bulk inser
  23. Step3. Write test codes

  24. Test codes are necessary for OSS - We can release

    OSS without test codes - But, OSS without test codes is not reliable for developers - TDD is a good choice
  25. None
  26. None
  27. Assert Arrange Act

  28. Step4. Setup CI

  29. Finished writing code, not done yet - Travis CI is

    a best tool for OSS - Static code analysis and lint tool improve quality of OSS - Static code analysis: PHPStan - Lint tool: CakePHP Code Sniffer
  30. None
  31. None
  32. None
  33. None
  34. None
  35. Step5. Clean up the document

  36. README is like a entrance - README is very important

    - Requirements - Installation - Usage - It’s kind to have badges - https://poser.pugx.org/
  37. None
  38. Done!

  39. 2. Make it better

  40. I might as well - Making it useful for many

    people - not only for self-satisfaction - I researched some popular OSS - found some common points
  41. Good OSS has “3Cs” 1. Convenience 2. Clarity 3. Continuity

  42. Convenience - Big benefits required - The effort to solve

    a problem is often more bother than the pain that causes it... - Case: Easy Query - High performance of bulkInsert() - A CakePHP standard method, saveMany() doesn't have it - Inspection: insert 100 records to a tags table - saveMany() 2.93 sec - bulkInsert() 2.01 sec - Enviorment: CentOS6, MySQL5.6, CPU 2core, Memory 2GB (Docker for Mac)
  43. Clarity - Anyway can use it quickly - mature documentation

    - “When in Rome, do as the Romans do” - intuitive and simplie - Case: Easy Query - bulkInsert() has same interface with saveMany()
  44. None
  45. Continuity - GitHub’s star is not all! - The change

    is drastic - Even a popular OSS is not remembered half a year later - It is also important to improve continuously - Case: Easy Query - I updated it last week - I declare today that I will upgrade Easy Query to CakePHP4 within half a year!
  46. Done!

  47. 3. Accelerate your OSS activity!

  48. Next Step - OSS activity is fun and good! -

    But, it is difficult to continue...
  49. - Connehito has a company program for encouraging OSS activities

    - Smile Program! - To put it simply, it is an output support program - It started half a year ago Smile Program
  50. What is a smile program? - Save up miles when

    our members contribute to the outside community - Members can then spend miles Engineer A Miles bank Engineer B Save Up! (by Output) - OSS Contribution - Presenting and Writing Spend! (for Input) - Getting certified - Attend Oversea Conferences
  51. Concept - Money is not the motivation - When in

    need of support, a member can get it - Evaluating the value of output and input
  52. Let me show you how it actually works

  53. Smile Counter - CMS for Smile Program - Featutes -

    Request for output and input - Review for output and input - Mile management - Member management - Member Rankings - Made with CakePHP4!
  54. Why did we start Smile Program?

  55. We are raised by the engineer's community Engineer’s Community Connehito

    Inc Grow! - Using many OSS like CakePHP - Referring to other company’s case study
  56. Simply, I want to give back to it.

  57. Ecosystem Community Connehito Grow Take - Many OSS - Case

    Study - Conference Community Connehito Grow Take - Many OSS - Case Study - Conference Give - Contribution - Case Study - Sponsor
  58. Win-Win Relationship!

  59. Summary - If you have the will, you can create

    OSS now - Keep in mind the "3Cs" when creating OSS - “3Cs” are Convenience, Clarity and Continuity - Connehito will continue to use CakePHP - And we aim to be an indispensable company for CakePHP community!
  60. Thank you!