Fork me on GitHub
#cljsrn
<
2018-05-05
>
3Jane08:05:51

Hi, I’m trying to figure out what the pain factors would be in writing something that works both as a website and an app, with maximum code reuse (then both communicating with the same backend via an API.) Would something created with luminus+re-frame be portable to an iOS app?

carocad09:05:06

@lady3janepl I think your best chance might be with something like https://github.com/necolas/react-native-web. Check out their glitch project to get a feel of it. Most likely all the cljsrn tooling would be useful to you. If so, please dont forget to write something about it in the cljsrn wiki 😉

👍 4
3Jane09:05:58

Thank you 🙂

3Jane09:05:55

(oof. I’m a backend person, the sheer amount of tooling required to get something with a simple gui these days is crazy…)

carocad09:05:14

@lady3janepl is you just want simple, make a standard website and just display it with a webview in a native app. That is the simplest and fastest way to develop it. If you dont need anything special that would work

3Jane09:05:16

isn’t that horribly slow though?

3Jane09:05:29

(or maybe it’s just my bad experiences)

3Jane09:05:02

(my biggest reason for adding a mobile option is just-in-time data input: people are much more likely to have their phone on them “in the field” than wait until they’re home and log things retroactively)

3Jane10:05:29

(since I’m looking at producing an MVP, cost is an issue too)

carocad10:05:31

@lady3janepl just go with a website in a webview. That would get you through the MVP. If it turns out well you can transform it into a react native app without much hassle, as all the logic remains.

carocad10:05:51

it if doesnt work, well it was an MVP after all, that is what they are for 😉

3Jane10:05:38

True :) I was looking to remove as much handcrafting html as possible but yeah, for an MVP that’ll be offset by the cost of environment setup and learning.

3Jane10:05:18

What kind of a web view wrapper would you recommend? A lot of people mentioned phonegap, but after digging around it looks like there are alternatives.

carocad11:05:50

Dont know 😄 . I used phonegap at it was ok. There are lots of alternatives out there … almost too many to be honest. So I would recommend you go to with a normal website and try to use the web apis that you have available. If you see that it is not enough then start looking around for more. Otherwise you would be overwhelm with options and decisions without knowing what you need

3Jane17:05:47

yeahhh the options-overwhelm is a thing 🙂 I will start from a thing as minimal as possible, for own use, and build from there I think. Thank you for showing me all the options and advice!

4
Oliver George10:05:19

I'm looking at navigation options. Has anyone had good experiences with https://github.com/seantempesta/cljs-react-navigation

carocad10:05:38

@olivergeorge yeah I am using it, but at a very basic level. I think others here have more complex set up so they can give you better info

Oliver George10:05:13

Thanks. Did you choose it after trying pure React Navigation?

carocad11:05:54

I never tried pure react navigation. It gets pretty messy pretty fast because of all the interop. If you check the source code of cljs-react-navigation it is pretty much a thin wrapper with specs added, so it is pretty straightforward to use base on react navigation docs

jeaye16:05:38

We're just using react-navigation and it does the job well.

jeaye16:05:37

There is some interop junk to get through, but it's a one time cost and everything on top can be none the wiser.

Oliver George22:05:54

Thanks @jeaye. I think I'll try that first. If it's troublesome I'll know to appreciate the wrapper.