Mobile App Development for Perl Mongers

Mobile App Development for Perl Mongers

A talk about Client-Fontend and Client-Backend on YAPC::Asia 2014

6139fd48daa26e786794598c4a6b546a?s=128

ninjinkun

August 30, 2014
Tweet

Transcript

  1. .PCJMF"QQ%FWFMPQNFOU
 GPS1FSM.POHFST OJOKJOLVOYHGY :"1$"TJB 5PLZP

  2. w $MJFOU'SPOUFOE&OHJOFFSJOHOJOKJOLVO w $MJFOU#BDLFOE&OHJOFFSJOHHGY w :"1$GN5BMLTIPX "HFOEB

  3. $MJFOU'SPOFOE&OHJOFFSJOH 'BCMJDJOD
 OJOKJOLVO

  4. OJOKJOLVO w J04"OESPJEFOHJOFFS w IUUQHJUIVCDPNOJOKJOLVO w /+,8FC7JFX1SPHSFTTˑ w /+,4DSPMM'VMM4DSFFOˑ

  5. OJOKJOLVO w 'SPOUFOEFOHJOFFS w *OUFSFTUFEJO w #FUUFSVTFSFYQFSJFODF w -FTTDPEF IJHIQFSGPSNBODF

  6. 'BCMJDJOD w 'MFBNBSLFUBQQl'SJMz w 8PNFOPOMZ w )VOESFETNJMMJPOVTFST w .PCJMF"QQpSTU w

    ZFBSTPME4UBSUVQ
  7. "HFOEB w 6*%FTJHOJOH w 'SPOUFOE&OHJOFFSJOH w 0QFO4PVSJOH

  8. 6*%FTJHOJOH

  9. %FTJHOFSBOE&OHJOFFS w 8FC"QQ w )5.- $44P⒎FSFEEJWJTJPOPGXPSL w /BUJWF"QQ w *NQMFNFOUWJFXTXJUI0CK$+BWB

    w &OHJOFFSTNVTUJNQMFNFOUNPTUPGUIF6*
  10. 8IZFOHJOFFSTTIPVMEEFTJHO6* w &OHJOFFSTIBWFLOPXMFEHFDPEFBOE4%, w $PTUJOHBOEBWPJESPMMCBDL w &OHJOFFSTTIPVMEKPJO6*EFTJHOQSPDFTT

  11. 1BQFS1SPUPUZQJOH w %SBXNPDLXJUIQBQFS w &BTZGPSFOHJOFFST w %PO`UOFFEHSBQIJDBMUFDIOJRVF w %SBX6*JEFBT w

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VMUVSFJTBDUJWFBMTPJONPCJMFBQQT

  31. 8FBSFIJSJOH w J04"OESPJEFOHJOFFST w +PJOPVS69EFTJHOQSPDFTT w 8FCBQQMJDBUJPOFOHJOFFST w 3BJMT &MBTUJDTFBSDI

    4FBSDIl'BCMJDz
  32. Client-Backend Engineering Fuji, Goro Cookpad Inc. Mobile Application Development for

    Perl Mongers YAPC::Asia 2014, Tokyo, 2014/8/30
  33. @__gfx__ • A client-backend engineer • Working on libraries, environments,

    and CI on both Android and iOS apps • As a CPAN author: Data::Validator, Text::Xslate • Loving Android Studio and AppCode
  34. None
  35. None
  36. The number of monthly users 0M 3.6M 7.2M 10.8M 14.4M

    18M Jul Oct Jan Apr Jul Oct Jan Apr PC Smartpohone browsers Smartpohone apps Feature phones Others 44.04 million ʢAs of April 2014ʣ
  37. The number of installations iOS 1,010m Android 990m ʢAs of

    April 2014ʣ
  38. How Mobile Application Development Runs

  39. A long time ago in a galaxy far, far away…

  40. Lots of problems • Communication cost: • service teams <~>

    mobile app team • Different release cycle: • web: 10/day • app: 2/month • The will of installations • Each user sees a random version of apps • Continuous integration is really difficult
  41. How our mobile teams were • Cookpad started as a

    web service • Cookpad mobile apps had followed the web • Service teams were tend to order the new features to the mobile app team (web-first)
  42. Lots of good problems ;)

  43. Communication Cost

  44. Before “Mobile First” Era

  45. 1SFNJVN4FSWJDF 5FBN 0UIFS 5FBNT )BQQZ"VUIPS 5FBN 'FBUVSF 3FRVFTU 'FBUVSF Entrusted

    Development 'FBUVSF 3FRVFTU 'FBUVSF 3FRVFTU .PCJMF'JSTU 5FBN
  46. After “Mobile First” Era

  47. 1SFNJVN4FSWJDF 5FBN 0UIFS 5FBNT )BQQZ"VUIPS 5FBN .PCJMF'JSTU 5FBN )FMQ There

    are 20+ engineers on mobile applications 'FBUVSF 'FBUVSF 'FBUVSF 'FBUVSF 3FMFBTF .BOBHFNFOU Service Oriented Development
  48. Our Adventure Has Just Begun

  49. Release Cycle

  50. Web and Mobile Apps • Cookpad has a successful workflow:

    continuous delivery • Mobile app development should be successful with the same way!
  51. None
  52. Defects Rise No rollbacks

  53. Differences in Release Cycle • Web: • continuous delivery •

    easily rollbacks code on problems • App: • frequent release makes users irritated • no rollbacks; all the versions remain in the world
  54. Different release cycle should make different workflow

  55. Branching Model • Web: github-flow • Keeps the master branch

    deployable • App: git-flow • Makes a release branch on code freeze
  56. Pull-Request Development • All the changes are merged via pull

    requests • Do not commit changes to master directly • All the pull requests should be reviewed
  57. $PEF 'SFF[F NBTUFS GFBUVSF 3$ JNQPSUBOU CVHpY OFX GFBUVSF TVCNJUUFE

    2" 4UBSU .PCJMF"QQT #SBODIJOH.PEFM
  58. The Principle: KISS ! but not to be too simple

  59. Continuous Integration w #VJMEJU w -JOUJU w 5FTUJU w %FQMPZCFUBT

  60. %FQMPZ(BUF 5FTU'MJHIU -PDBM.BDIJOF QVTI LJDL QVCMJTI CVJME Development Workflow

  61. Release Engineering Tasks • Kicks the Jenkins job for a

    release package • Builds it, lints it, tests it, makes a tag • Uploads the package to Google Play / AppStore • Writes recent changes • Publishes it (in iOS: after Apple reviewing)
  62. Too Many Tasks in Releng

  63. Release Engineering as Code • External repositories that build app

    projects • Android Publisher API (Google Play Developer API) • No API on AppStore / iTunes Connect yet • Monitoring - not yet, but will try
  64. That’s all.

  65. We are hiring ;) • There are a lot of

    good problems in Cookpad!
  66. Free Talks: YAPC.fm • How to test mobile apps? •

    How about IDE / programming languages? • What to learn from the Perl community?