Hi guys,
I finally released purescript-sforce-remote-action v1.0.0! If you are working with salesforce give it try! Feedbacks are greatly appreciated.
Woody D.
Hi guys,
I finally released purescript-sforce-remote-action v1.0.0! If you are working with salesforce give it try! Feedbacks are greatly appreciated.
Woody D.
Have you thought about the doing codegen to generate the server side routine types which can be executed?
I am not really familiar with codegen. Are you implying to generate Apex Controller classes based on the purescript types? Can you give me a bit more detail about what you have in mind?
RemoteActions are server-side subroutines, right? And those have a type signature, yeah? It would be nice to be able to type-check a PureScript app which calls those remote actions. We can do that with a build-time step which parses RemoteAction subroutine names and types from the Apex files and then creates a PureScript file which has those subroutine names and types.
Some languages, like F# and Idris I think, have a “type provider” facility in the language which allows you to express this as part of the language compilation itself rather than a pre-compilation step, but PureScript doesn’t have that yet, nor has it been discussed much.
I realize that this practice hasn’t been used in the PureScript community at all, so I am just curious if you’ve thought about it.
Also, unrelated question: Do you know anyone who is parsing Salesforce metadata files from PureScript? I was thinking recently that it would be fun to parse all the Process Builders in rewrite them into a single Process Builder, as Salesforce recommends (but nobody does).
Oh, I see. No, I did not think about it, its sounds really interesting. Since, I had limited of time to get the project done I don’t think that I would have attempt to do that thought. Haha
So far, aside from you I don’t know anyone else in the purescript community that uses Salesforce. However, I do have a project that I started last year I believe (In Haskell) which parses Metadata. I stopped working on the project because I just ended up using SFDX.
Repo:
Oh fun! Because I know someone else who also uses Salesforce, I am more interested in making that metadata parser! I have other projects that are more important for me right now, though, so I won’t be able to start that for a few months.
A bit of topic but regarding:
I realize that this practice hasn’t been used in the PureScript community at all, so I am just curious if you’ve thought about it.
We (at foam) do similar thing http://github.com/f-o-a-m/purescript-web3-generator
given some etherium smart contract you can get ABI file (it stands for application binary interface) and given such file we generate Purescript module which has all functions needed to invoke methods of that smart contract in etherium.