Scala Stack with Google Flexible Environment
(this article is not yet completed)
(updated 2016-11-11)
(updated 2016-11-11)
Goal
To produce all frontend from Scala backend utilizing shared code and to be fully tested.
Infographic
Scala servlets creates HTML with CSS and JavaScript. |
This is a graphic representation of how it works.
- All code is written in Scala
- Code may share
- Resources
- Validation
- Routes
- Logic
- Translations and other data
- Structure of
- HTML
- CSS
- A servlet can read Scala JS source code and compile a JavaScript
- This includes the shared code
- A servlet can build HTML with CSS
- Other servlets can provide REST API and also use the shared code
- All code can be unit tested and all code can be tested in the same test
This means that the Scala stack covers both frontend and backend.
Code
There is a repository called Scala Stack at Github. There is one branch for jQuery in development and one branch for Angular which is only started:
- https://github.com/AIMMOTH/scala-stack/tree/master
(live)* - https://github.com/AIMMOTH/scala-stack-jquery
(live)* - https://github.com/AIMMOTH/scala-stack-angular
(live)*
*Unfortunately I can't afford Google Compute Engine running 24/7 and was forced to shut them down. If Google Compute Engine would scale from 0 to minimize expense I could start them again.
Examples
Note that Scala JS source is placed in webapp, an alternative could be resources |
Inga kommentarer:
Skicka en kommentar