Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Front End Application #22

Open
pauljamescleary opened this issue Sep 6, 2017 · 11 comments
Open

Create Front End Application #22

pauljamescleary opened this issue Sep 6, 2017 · 11 comments

Comments

@pauljamescleary
Copy link
Owner

pauljamescleary commented Sep 6, 2017

The front end application should communicate securely (i.e. secure cookies / jwt / etc) to the backend api.

This will require some kind of authorization middleware to be setup.

The front end application should be a ScalaJS app and mimic the existing pet store app.

@hugofirth
Copy link

@pauljamescleary Out of interest - as this is intended to be an example of a production scala application, why not go for a scala.js front end e.g. using scala-js-react and diode? I'd be happy to contribute to such an effort.

@pauljamescleary
Copy link
Owner Author

@hugofirth Definitely would welcome a scala-js-react / diode front end.

I was thinking about taking the existing code and moving it to a sub-module, like "typelevel-tagless-final" and then have the front end to be a separate sub-module. This way, we could use the same front end with different backends.

I was thinking about creating a Free backend, may want to do eff, who knows what else.

Also, sorry for not responding earlier :(

@daddykotex
Copy link

Just dropping this in: https://github.com/OutWatch/outwatch

I think it is another interesting technology to look into.

👍 regarding the module split

@martin-g
Copy link

To make it a little bit more complex to decide which framework to use I'll also drop https://github.com/outr/youi here :-)

Thank you for this project, @pauljamescleary !

@pauljamescleary
Copy link
Owner Author

I think there are opportunities for several front ends. I haven't quite figured out if we should have a multi-module monolithic repo or perhaps an org with several repos of different flavors. This is small, so for the time being a multi-module project seems like a logical next step.

From a reference guide in scala standpoint, I think ScalaJS makes the most sense. The other viable alternative is a straight up javascript front end built in something like Vue.js.

@hugofirth
Copy link

Well I'm afraid I don't know the other frameworks mentioned, so I'll just start slowly chipping away at a scala-js-react app in a fork (probably next week) and let you know here when there is something worth looking at.

You're right that there are several possible options for front and back end frameworks/patterns/languages. If you were soliciting votes on the approaches (which you are aren't 😄 ) then mine would go to the "1 full stack application per repo" option.

You could encode all of the variations as sub-projects in this repo but for me the core value of something like this is as a packaged example of how I might write a production app using functional libraries. Including sub-projects would add noise to the project folder structure and build.sbt which could be unhelpful to somebody with that goal.

At the end of the day, someone can always build a fork using Free, Finch and Vue (for example). If they did you could even create a Scala Pet Store github org and encourage those contributors to "donate" the fork to the org for improved discoverability. You could imagine ending up with a matrix on each Readme which links to the fork for each combination.

@pauljamescleary
Copy link
Owner Author

Sounds good

@loicdescotte
Copy link

loicdescotte commented Dec 18, 2017

Another good lib in the same style as scala-js-react is binding.scala : https://github.com/ThoughtWorksInc/Binding.scala

I think the syntax is a bit easier to read than scala-js-react and it's a pure scala.js framework.

@pauljamescleary
Copy link
Owner Author

Thanks for the tip @loicdescotte . I will be sure to check it out :)

@pauljamescleary
Copy link
Owner Author

Might make sense to get the authentication in before this. Would be sweet to have an SPA with JWT for authentication against the user store all fully functional :)

@pauljamescleary
Copy link
Owner Author

We have some authentication bits in, at least the login bits. TSec is still developing, and I haven't been back to make the JWT pieces work yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants