| [19:45:58] | * svenn has quit (Ping timeout: 258 seconds) |
| [19:47:16] | * svenn has joined #farmos |
| [11:28:24] | * braught[m] has joined #farmos |
| [11:37:42] | <braught[m]> | I am considering creating some partially decoupled Drupal blocks using Vue.js within the FarmOS framework and was looking at the FarmOS.js library for the data access. There is a warning in the repo that it is unstable and for the FarmOS client only. Would it be better for me to just write my own JQuery or AXIOS calls to the FarmOS API or might FarmOS.js be stable enough for development (with the understanding that we |
| [11:37:43] | <braught[m]> | may need to make fixes as it evolves)? |
| [11:40:25] | <paul121[m]> | very cool! pinging jgaehring who maintains farmOS.js |
| [11:42:03] | <paul121[m]> | we're hoping to explore using Vue.js for similar things in farmOS 2.x |
| [11:43:24] | <braught[m]> | The basic idea is for something similar to QuickForms but with the ability for more interactivity and less Drupal/PHP. |
| [11:43:25] | <paul121[m]> | the farmOS.js API will be changing for farmOS 2.x, largely because the farmOS server API is changing a good amount |
| [11:44:13] | <braught[m]> | No worries there, that will be a big migration regardless. |
| [11:44:55] | <paul121[m]> | I think the only "gotcha" right now is that farmOS.js uses OAuth for authorization & bearer token for authentication.. in the context you're talking about, that wouldn't be required (I don't think?) |
| [11:47:04] | <jgaehring[m]> | interesting, I'm not familiar with Drupal blocks |
| [11:49:41] | <symbioquine[m]> | <paul121[m] "I think the only "gotcha" right "> I think this is true. The main question would be whether farmOS.js makes any assumptions about authentication - if it assumed oauth, you might have to take extra steps to circumvent that |
| [11:50:05] | <symbioquine[m]> | Since the browser would already be directly authenticated and on the same domain |
| [11:50:28] | <jgaehring[m]> | that's correct, it does assume OAuth |
| [11:51:30] | <paul121[m]> | can you make a request without specifying an oauth token? it might just fail because it would have an empty `Authorization` header, but maybe not? |
| [11:51:49] | <paul121[m]> | I know farmOS.py fails to send the request if no token is provided |
| [11:51:49] | <jgaehring[m]> | yea, I wondered that too |
| [11:54:00] | <jgaehring[m]> | I think we should consider this for farmOS.js 2.x, it shouldn't be too hard to allow instantiation of the client w/o OAuth, now that it's been separated into more isolated modules |
| [11:55:05] | <jgaehring[m]> | braught: concerning stability, we wanted to warn folks about that largely b/c we mainly intended it for use in Field Kit and wanted to be able to make changes quickly and easily... also some of the methods (like `DELETE`) were never fully implemented/tested, b/c we didn't need them in FK |
| [11:55:18] | <jgaehring[m]> | I think this will be a different story for farmOS.js 2.x |
| [11:56:24] | <jgaehring[m]> | also, we can probably "stabilize" farmOS.js 1.x to an extent once it's no longer in active development, since we won't be developing new features for FK 1.x |
| [11:58:59] | <braught[m]> | Sounds reasonable. I'll be experimenting to get the authorization piece figured out and see if I can get some sample API calls working over the next few days. Thanks for the thoughts. |
| [12:01:07] | <jgaehring[m]> | also, this might interest you: |
| [12:01:07] | <jgaehring[m]> | https://github.com/farmOS/farmOS-client/blob/develop/API.md |
| [12:02:03] | <jgaehring[m]> | TL:DR: for Field Kit 2.x we'll be releasing an API for building Field Modules, which are essentially plugins for Field Kit to create your own custom UI's, similar to Quick Forms |
| [12:02:50] | <jgaehring[m]> | ... built w/ Vue.js 😉 |
| [12:13:57] | <braught[m]> | Thanks. That sounds essentially like what we are exploring for our customization of FarmOS (FarmData2 https://github.com/DickinsonCollege/FarmData2). Essentially, building out a module that adds a tab to the farm menu with custom Vue.js forms in sub-tabs for common tasks done in the field. |
| [12:13:57] | <braught[m]> | With it all being Vue.js based, should provide a (relatively) smooth migration path to Field Kit 2.x when its ready! |
| [13:37:29] | * zedrickr11[m] has joined #farmos |
| [16:01:17] | <jgaehring[m]> | oh, just realized you're working on Dickinson's FarmData project, that's awesome, braught! |
| [16:09:18] | <braught[m]> | <jgaehring[m] "oh, just realized you're working"> We are finally starting to get it off of the ground. There is a course dedicated to working on it in the spring. So I am working now to figure out exactly what technologies the students will need to learn and use. But hopefully lots of activity on the project between the spring semester and next summer. |
| [16:09:58] | <mstenta[m]> | Super cool braught !! |
| [16:52:02] | <jgaehring[m]> | That's great to hear! We're hoping by this spring to have a lot done with the 2.x development, happy to discuss the ramifications of that in greater detail some time, or offer any insight that could prove helpful to you and your team |