Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Apex on Local - Better Alternative to Salesforce DX

378 views

Published on

Japan Dreaminの発表資料です

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Apex on Local - Better Alternative to Salesforce DX

  1. 1. Apex on Local - Better Alternative to Salesforce DX -
  2. 2. • Twitter: @tzm_freedom • GitHub: tzmfreedom • Blog: https://blog.freedom-man.com • • Ruby 3 Rails 2 • Symfony PHP • Salesforce 5 • Salesforce (^o^) •
  3. 3. • • Salesforce • [Salesforce] • Yet Another Salesforce Dataloader • Land Playground • Salesforce Apex • DML Salesforce soql-cli • [Salesforce] Apex • migration.fm • #8 => • #27, #28 =>
  4. 4. • Land (Apex on Local) • Apex • • • Apex • • SOQL • •
  5. 5. Land
  6. 6. Land • Apex • Not Cloud • Local Apex for Numerous Development • (Land) <=> (Cloud), (Lightning) • https://github.com/tzmfreedom/goland
  7. 7. Apex
  8. 8. Apex • • Web • • System.debug WebUI • Ctrl + F • • • CI • 
 git CVS 
 Web •
  9. 9. Salesforce • Salesforce DX • Scratch Orgs • Salesforce Git/GitHub/CI 
 Web • *1 Sandbox*1 Scratch Orgs*N https://blog.texei.com/our-move-to-salesforce-dx-and-developer-controlled-packages-7470c08cbc5c
  10. 10. SFDX • • Web • • System.debug WebUI • Ctrl + F • • • CI • 
 git CVS 
 Web •
  11. 11. Land • • Web • • System.debug WebUI • Ctrl + F • • • CI • 
 git CVS 
 Web •
  12. 12. DEMO
  13. 13. Linux/MacOS $ curl -sL http://install.freedom-man.com/land.sh | bash Windows @"%SystemRoot%System32WindowsPowerShellv1.0powershell.exe" - NoProfile ^ -InputFormat None -ExecutionPolicy Bypass ^ -Command "iex ((New-Object System.Net.WebClient).DownloadString('http://install.freedom- man.com/land.ps1'))" ^ && SET "PATH=%PATH%;%APPDATA%landbin" Golang $ go get -u github.com/tzmfreedom/goland
  14. 14. $ land run -a "{CLASS_NAME}#{METHOD_NAME}" -f /path/to/apex.{cls,apxc} $ land run -a “{CLASS_NAME}#{METHOD_NAME}" -d /path/to/dir $ land check ... $ land test ...
  15. 15. • Apex • Apex 
 Syntax • REPL • • • DB sqlite3 SOQL • • • SOQL IN LOOP • Apex REST
  16. 16. Apex 

  17. 17. • AST • AST • AST public void action() { Integer i = 3; i = 5; }
  18. 18. ANTLR • • https://github.com/antlr/grammars-v4/blob/master/apex/apex.g4 • Apex ANTLR PMD ANTLR • Apex 2012 • http://blogjp.sforce.com/2012/02/apex---apex-byt-f6a5.html • ANTLR Java, C#, C++, Python, JavaScript, Golang • Land ANTLR + Golang • Ruby Racc/Rex => • ANTLR + Node.js => Node.js • ANTLR + Golang =>
  19. 19. SOQL • SOQL SQL SOQL • LEFT JOIN … • DB sqlite3 • MySQL, Postgres Heroku CI • Salesforce `land db:setup` SELECT Id, Account.Name FROM Contact SELECT t0.Id, t1.Name FROM Contact t0 LEFT JOIN Account t1 ON t0.AccountId = t1.Id
  20. 20. • • Ruby byebug • • public void action() { Integer i = 3; // #debugger i = 5; } public void action() { Integer i = 3; _Debugger.debug(); i = 5; }
  21. 21. • Salesforce 70% • • • • • VS Code SFDX 
 Land 

  22. 22. Apex
  23. 23. Land
  24. 24. Contribute to Land • Land • GitHub PullRequest • https://github.com/tzmfreedom/goland • Issue • Issue • • •
  25. 25. DX
  26. 26. Salesforce on Local
  27. 27. Salesforce on Local • Salesfore Salesforce • Salesforce • CRUD • • Visualforce • Lightning Component • Visual flow • … Comming Soon?
  28. 28. • Apex Land • Land • Salesforce on Local

×