24. JSforce Open Source Project | Shinichi Tomita


jsforce

Shinichi Tomita is the Founder & CEO of mashmatrix, Inc., the honorable creator of JSforce among many of his popular open-source repositories.


Main Points

  1. What is JSforce, and what is the brief history (how/when/why did it start, how did it grow, etc)?
  2. How do we use JSforce from a developer’s point of view?
  3. What are the major challenges when developing JSforce?
  4. What has Shinich learned during this journey?
  5. What is the future roadmap? What new feature is coming?
  6. What does Shinich think about NodeJS development and Lighting Web Component?

Links


Thoughts – why contribute to open-source?

Open-source nowadays is no longer a new topic for the IT industry, but it is still relatively new to Salesforce developers. Also, you might want to listen to this episode with the topic of Salesforce open source.

There are many contents on the internet talking about why developers should contribute to open source. Obvious benefits are, for instance, branding self, improving programming skills.

But there are other subtle benefits too.

Cross time-zone communication

Many open-source projects are across time zones — contributors can be from everywhere in the world. By working in those projects, you get to learn skills that you don’t have a chance to learn in physical teams.

Technology makes the world become smaller. Working in virtual teams and communicate efficiently and effectively is one of those essential skills we all have to master.

Communication skill in writing

I have never seen one successful open source project without good documentation, none.

While the JSforce project is an exemplar, many other popular Salesforce open-source projects reflect this point too. For example, the Mass Action Scheduler README and Wiki from Doug Ayers have really amazed me the first time I looked at. I cannot imagine how much time Doug spent on writing clear and step-by-step setup instruction and FAQs.

Besides, submitting and responding to issues is how most open source projects evolve. It is crucial to guide users to create issues with concise information so that you can easily reproduce and fix the issue. Meanwhile, you also need to reply to these issues in a clear and to-the-point manner.

Perseverance

Nowadays it is increasingly hard to get ahead and gain people’s attention for almost anything. This applies to the open-source world too. In order to create a success repo, you need to spend a LOT of time and constantly maintain and improve it.

It takes dedication and perseverance to become a success. In other word, success comes very slow. It might take years before getting people’s attention, it is a boring and lonely journey that many ones quit in the halfway.

Yet, this is a perfect way to practice perseverance, which, IMO, is THE MOST IMPORTANT ability in our lives. This ability is something I am practicing and this is one of the reasons I admire very much the guest of this episode — Shinichi.


Questions of today

What is your story in the open-source world?

Contact Me

If you enjoy this podcast, please reach me out to let me know your thoughts or simply say Hello. My (Xi’s) contact info:

Take care, until next time :)!

Transcript

AI-generated, unedited.

[00:01] Hey, thanks for tuning to the Salesforce Way podcast, episode twenty-four. Now we're moving faster than before. In this episode, I had the chance to sit with Shinichi Tomita, who is the honorable creator of open source project JSForce. If you listen to this episode, you will see that Shinichi is not a show-off person. He is not very talkative, and he is very down to the ground. But his contribution to the Salesforce ecosystem is huge. For example, recently I had a chat with Matthias Rolke in Twitter. He told me that his open source project, Force Dev Tool, which was the CLI command line tool before the Salesforce CLI. That was heavily based on the JS Force project, and also he told me that the SF DX, the Salesforce CLI, is also heavily built on top of JS Force, which I was not aware of. So as you can see, the JS Force are not only used by all these Salesforce developers; they are also used by all these open source project builders and even the Salesforce internal teams. So one more hint I want to share with you when you listen to this episode is that not only listen to these guests that I invited to the podcast, do follow them and do

[01:31] track what they are doing, what the project they have done, what kind of code they write. This is the good way for you to reverse engineer their success. This is the way to help you to improve on your career path. Okay. With that out of the way, please enjoy the chat for this episode.

[01:52] Hey

[02:03] everybody, this is Xi Xiao. This is yet another episode of Salesforce Way podcast. Today I'm sitting with. Shinichi, one of the mysterious people in the Salesforce ecosystem. So your full name Shinichi Tomita, right? I just learned how to pronounce your name. Hello, hello, Shinichi. Hi, Shinichi. It's so great. It's so great to have you on the show. You know, you are living in Japan and living in Finland. We have a like a big time gap here. So, but finally, we get the chance to sit together. So. Shinichi, would you like to introduce yourself a little bit for the people who still maybe don't know you? Yeah, I'm Shinichi, and I'm living in Tokyo, Japan. And I'm running my own company named Mash Metrics, and it was founded in ten years ago, and. I I was previously a Salesforce.com Japan employee, and before the founding the MatchMatrix, and so after the. Founded the Matrix, I created several products, in the App Exchange, and now our company is providing the some some product, and also doing the consulting work

[03:33] to the Salesforce.com customers. That's cool. How is the ecosystem in Japan about Salesforce? Is it quite active? Ah, recently becoming very active, and many users groups are founded, and not only a developer community, but also a user and admin groups are available. And I think that there, there's not not so many English contents or English. Speaking people are coming out from the Japanese because I think that there are not so many Japanese people are fluent in speaking English, so. For example, I see your personal blog. You are using Japanese language to write a lot of content, right? There are several activities, but not not visible from the world, I think, because not not such a English content. But there are many Japanese content. That's good. Yeah, right. Yeah, that's cool. So today we're talking about one of your famous GitHub repository, the JS Force. Right, you know, one of my colleagues used this library. He created a little Node.js tool just to pull out because some of our companies that I have worked before is that we're using Salesforce Portal, so we manage our

[05:04] internal employees. So when there's a new employee joining the company. We can use that no just tool to easily pull out all the existing employees' phone number, names. You know, create the list and then import to the. Uh, Gmail, and then you can just sync your phone number. Immediately, you get all the new colleagues' phone number and the names into your mobile phone. That's a quite a neat application. So. A big thanks to the JS Force. So, so you are the original author of this repository. Yeah, right. Okay. Could you tell us a little about the history? Why you started this and how was the story? Yeah. Ah, I think that the first time I, I created the JS Force, and name was not the JS Force, and name was Node Salesforce. It's a library, but I renamed it to the JS force because not only in a Node JS environment, but also in a browser JS, we should support by this library. So I created the library for both JS environment and. So I named the it to JS Force, and first first time I create

[06:34] the Node Salesforce the. For my budget of the J S force, I just learning about how to use the Node J S application, how to create the lighter Node J S application, and as our company is creating the several products or several Salesforce.com customer, the API must be used. And so, I, I, I need the library for doing. So it was the by the time you were working in Salesforce.com. And then no no no. Okay. At that time, the library was available for the SOAP API, and the Ajax Toolkit is the name of the library for from accessing the JS environment. Okay. But the Ajax Toolkit is for only the browser JS and only for the SOAP API. Okay. And I need some server side version to access to the Salesforce. Com. I have a JavaScript skills, so the Node. Js was good for

[07:52] doing the writing application. So I created a Node. Js version of the library and. And then, at the time, the REST API is now this API is becoming open, and I create the library by using the Node JS for accessing the REST API. Ah, right. That's already many years ago, right? The first release. Yeah, maybe the, um, maybe not six years ago. I'm not sure. Okay. Yeah, this is one. It's really one of the famous GitHub Salesforce-related repository. We got like six or seven hundred stars already, and many forks. I understand. And and for our listeners, if you go to this repository in GitHub, you can see it has really good documentation. Tells you like step by step really how to install this, how to use this, how to connect it to different the Salesforce APIs. So that's fantastic. So how did you how did you do this? Are you always like uh paying attention to the documentation? Yeah, not always. But I'm I'm not so good at writing the English. But for Salesforce, the user

[09:23] must be the global. So the writing the. Japanese the only document is I I think that it's not so good one I I have to write the English document at the time and and also I previously I thought that the documentation. In English and some kind of the interactive one would be the great for such a API and maybe there recently there are several APIs that can easily access. Access to perform the web browsers, there are several agent, but I think that there are other JavaScript client that must be runnable from the web browser, so. Indeed. So I created a kind of interactive version with JavaScript client, and the documentation side is integrated to such as dynamic samples. Okay. Okay. Yeah. Indeed, I paid attention. This library supports the Node.js side, the client Node.js, the browser as well, and also you have a repo, right? Use install that the library can already in the actor in the command line. With all the the methods,

[10:53] so that's fantastic. It's like a modern language already.

[11:00] So in addition to that, I mean, I guess a lot of our listeners or the Salesforce Trailblazers definitely have somehow touched this library already. So what are the like the major challenges? I understand you started to just learn how to build the JS application, right? So what was your kind of journey? What were the major challenges for you? Major challenges, yeah. Oh, or too many. Yeah, too many. Maybe. Oh. The first one, I think that I think that not so many people are good at writing or reading JavaScript programs. No, not Salesforce developers. Yeah, yeah. Salesforce developers used to use the Lightning Apex code, or not so many people used to using the JavaScript. Maybe the tiny jQuery. Yeah, or might be useful, but there's not so many knowledge for writing the application by using the JavaScript, and then. I think that the Salesforce would be the kind of the entry point to write a JavaScript application

[12:30] and using the Salesforce through the JavaScript, and there there are several APIs are open in the Salesforce, so.

[12:47] But I think that there's some bridge. There should be a bridge for developers that are who who are there learning the JavaScript and starting to use Salesforce from the JavaScript. Yeah, yeah. That was the challenge. So that was like yeah, indeed that was a gap. But for for yourself, since you spent like six years of a lot of your spare time to develop this library, what things have you learned from this? Are you now are so much better, so much more experienced Java Super programmers? Yeah, I think that it was a kind of lucky. I think that because at at that time I created I I published the the JS force the Node JS is not not such a major in major stream, and there are several. Other options like Ruby or Python or and JavaScript is a kind of a not such a not such a popular server side. Now it's only for the browser side. But recently, the Node.js becoming the major in writing the server-side applications, and there are several support in other cloud

[14:17] platforms like AWS or GCP. So, and

[14:24] And mine already becomes very popular because when using a Node.js or some other client tools, uh, to access the. Salesforce API, which is the famous one, all Salesforce. So now become the automatically becoming famous as Node.js become the very mainstream. Yeah, I mean we have a lot of front end developers in Salesforce now. Like now we have Lightning Web Components. It's going closer and closer to the mainstream JavaScript development. So, for those JavaScript developers, do you think what they can learn from your JS Force repository? Hmm. I think that that's a very difficult question because right now, from the lightning, the JSOS cannot be used directly. There are several hacks. I think that yeah, available. But the first reason of the why we Cannot use JS flows in a Lightning component is that Lightning component doesn't have expose the API, less the API directly, because it has the locker security, right? Yeah, security restriction. I think, but.

[15:56] Visualforce we can use, but so when you bridging the Lightning component to the Visualforce, we can use the API, but not directly from the Lightning component. So now this is a kind of limitation. Yeah. Okay.

[16:18] Hi, here's a quick note. Don't forget to check the show notes of this episode, where you can find short video teasers, the guest contact information, the important complementary materials, and my own learning points, among many other useful information. In addition, I have also started a YouTube channel to share important stuff I learned from my guests. If you are serious about your Salesforce developer journey, you should definitely consider subscribing to this channel. And obviously, the name of this YouTube channel is Salesforce Way. Now let's get back to the show, shall we?

[17:03] I think you you are really humble when you say when I ask what we can learn from the the repository, you didn't really say too much because for me I understand it does a lot of work. It's it's like a big wrapper. Around different Salesforce APIs, we have the Streaming API, we have a Tooling API, we have a Metadata APIs. So, because I didn't really check the code because I'm not a JavaScript developer. So, how did you create those wrapper? You have to have a deep understanding how to talk with the API, right? How to make the authentication, how to use the OAuth, so use the username password. So those things. Do you think those things should be like? Ah, developers can they can go to your ah library to learn. How to write code to do this stuff? What Yeah, but because I I I said that I created a library folder just as kind of a sample work in the Node JS, but I. Just noticed that there are several usage usage requests to support metadata or streaming or touring. So I. I I created that kind of the bridges and after the I learned how to create

[18:33] this API client. I I would like to cover all of the Salesforce API. So I. Created as much as possible, but I think that now the Salesforce. dot com API has many, many ones, including their Wave or some. Marketing role or time, but I couldn't cover such a APIs. So, but I think that many mainstream APIs are now available through the Salesforce. So, I think that it is useful right now. Yeah, because. Since now we have the Lightning Web Components, and we have a lot of more people are interested in learning JavaScript. I think for these people, definitely they can use your repository to check, for example, how to create the npm packages, how to create the wrapper around Salesforce API. Because that's at least before digging into your code. I think that's kind of the things I'm really interested in seeing. Because creating a wrapper sometimes is not so easy because you have to handle all these different situations. If it's a success return, what if it's an error? You know, and you have to chain these different commands into one. So, so these things are kind of a really

[20:03] interesting topics for me. If I have time, I need to study that, right? And this is also the beauty of open source. Like what you just mentioned, you set the the framework. You set the baselines, and then people are starting to send pull requests to you. Okay, we want additional API support. So this is my work. Let's merge that in, right? And I see that you are quite active still in your repository to answer questions to accept the pull request. Is that your company is called Mash Matrix, right? Yes, Mash. If your company still have this kind of embracing open source. Kind of like a spirit. Yeah, yeah. My I think that my company is doing the such a, service cast consulting work or production creation and product creation for the service customers, and principle of this company is providing such a technology to the all. All of users to make their system is so much useful for many users and. By opening the such a source code to the users, I think that there are several developers are not seeing that they can

[21:33] do such a work in JavaScript or other platform, and and using the Salesforce.com platform, the this application might be very Good and I think that there are several feedbacks to the Salesforce.com itself, and I think that recently they noticed the importance of the JavaScript apps and on the they. Created a Lightning framework and recently created the LWC. And I think that previously it was an Apex and Visualforce. It's a kind of a very enterprise one, but recently they're not saying that they're web and open platform. And I think that it's kind of a good opportunity for the developers. To create some work to make more, make more useful. The system, yeah, yeah. One thing I really love is that the Salesforce is still catching up to the the mainstream. So there are a lot of gaps to fill in. So if our developers really have the passion, really want to come contribute back to the community, there are a lot of Like a blank field that they can fill in, like what you did a couple years ago, you write this JS force,

[23:04] and I think since now we have Lightning Web Components, there there must be a lot of other. You can call it business kind of opportunities there, or just a personal branding opportunities there as well. So definitely, that's that's a good thing. Yeah. Okay. Good. So Shinichi, I think we covered a lot. We mainly talk about the JS Force, a little bit about your background and the your company. So what is your personal roadmap? What I understand, you want continue in the Salesforce or Hana, right? What What do you still want to do? Yeah, the Salesforce itself is some some people pointing out that there's not so many commits recently. Okay, but I recently there have we have my own work in my company and Salesforce itself has several features already, so not so many active commit activities done. Previously, but we provide some some kind of updates to to Salesforce. Hopefully, in this year, to support TypeScript. Ah, yeah, this is great. Yeah, several people using the Salesforce are use trying to create a type definition

[24:35] for for the TypeScript. TypeScript is a kind of very becoming very major, listen web developers, and JavaScript has a kind of type definition, but not native support for from the. JavaScript and our companies also do providing their our application in TypeScript. So the JS force must be written in TypeScript because we actively using the JS force in our product. So I think that we should operate in. In in this year, I I said all the schedule, but I'm not I didn't commit. Okay, okay. Yeah, I mean personally, I really appreciate a lot what you have done. Even though you said okay, your company is supporting it, and you know it's it's part of your work. You just somehow open source that additional code to the community. But you don't have to do do that. It's not an obligation to do that. And a lot of people just you know in open source is like, why you haven't updated in recent years? I mean. You don't get paid to do that, so I I I wish people should be a bit more patient, a bit more grateful, and also. If if you really want to get the extra feature, why not contribute back? You know. Write your own code and support

[26:05] it. Yeah, that's true. From the author point of view, yeah, you also appreciate people like your work. Yeah, that's true. And my motivation for doing the open sourcing is not kind of such a such a volunteer work, but but kind of I I need it, and then I open. Yeah. So there are several optional software I'm providing other than Salesforce that are that are created by my own needs, and my company's need. May some of them? Yeah. From my company needs, but I think that uh. There, there are several people who are doing the managing the open source software, and they lost their attitude and exactly about the passion to because of the. Long, long maintenance. So, but I think that yeah, you were you were true, and we need to. I think that we need to share that the open source software is kind of first user is it author, and author and some kind of committer will decide how to do that, and so and and I think that other. As this condition,

[27:36] and if the if you are it's okay, you can use them, and then maybe that it it is useful because we we are using, yeah yeah yeah the the that's a thing yeah, excellent excellent comment. Thank you so much for your hard work and your open-mindedness. You know, we really love what you have done. I personally also have studied some of your other smaller repository. Like you have the SQL parser, right? We can in JavaScript you can parse the the SQL queries to see if it's correct or not. So all those things are really priceless for the front-end developers. They can just drag your your repository and start using it. Yeah, we really love that. Thank you, Shinichi. I think we can close the session now. Thank you. Thank you. Yeah. Talk to you later.

[28:39] If you enjoyed listening to this session and want to have a really easy way to support this podcast, why don't you give us a quick rating or even a review on whatever channel you are listening to this show? If you are using iTunes, just go to SalesforceWay dot com slash iTunes. It should open up the iTunes page for you. I read pretty much all the reviews you leave over there, and it really helps other people discover this show. So your support is very much appreciated, and I'm super grateful you have spent your invaluable time with me here. And I'd really love to hear how you think about this podcast. At last, I hope you are doing well, taking care, and see you next time.

Leave a Reply