cpcolin / ceylon-spring-experiments Goto Github PK
View Code? Open in Web Editor NEWExperimenting with using Spring Boot from Ceylon
Experimenting with using Spring Boot from Ceylon
Ceylon's enumerated classes don't work well with Hibernate's default conversion paths. We should see if we can make a ProductType
class and a reusable converter.
An example using WebFlux with RouterFunctions could be a great addition. It does not seem to directly translate into Ceylon.
The form-controls-fragments
branch modifies productForm.html
to use fragments, which makes that file much shorter and simpler. Unfortunately, this also makes that template much less natural, because Layout.js
only processes the layout fragment. We should be able to expand the JavaScript functionality to process the new form controls fragment.
The Thymol library exists, but explicitly targets Thymeleaf 2.1, so it might not work for us.
The Entity.dateCreated
attribute is supposed to be set once and never update again, but it currently updates every time an entity is saved.
It would be nice to be able to use the ceylon.time
module for things like date and timestamp columns and give Spring/Hibernate/JPA/Thymeleaf the ability to translate to and from the Ceylon values. The values should be able to translate to and from the database and be used in HTML inputs via the data-th-field
support Thymeleaf-Spring provides.
Ceylon Type | Java Type | HTML input type | String format |
---|---|---|---|
Date |
java.util.Date |
date |
yyyy-mm-dd |
DateTime |
java.util.Date |
datetime-local |
yyyy-mm-ddThh:mm:ss.sss |
Instant |
java.util.Date (Converted to UTC) |
datetime-local |
yyyy-mm-ddThh:mm:ss.sss |
Time |
java.lang.String |
time |
hh:mm:ss.sss |
YearMonth |
java.lang.String |
week |
yyyy-mm |
Currently, only Eclipse can compile the code successfully, because its compiler jumps through extra hoops to avoid "name clash" errors in CeylonRepository
and CeylonRepositoryImpl
. The Java 9 compiler might work, but we should see if we can get Java 8 to compile this code, because we probably need to wait for Ceylon 1.4 in order to use Java 9.
The "Sign Out" link currently does a GET, which isn't quite right and necessitates CSRF protection being disabled. We should change it into a button that POSTs a form. We then either need to style the button to look like a link or style the "Sign In" link to look like a button.
The User
and Role
classes each have fields annotated manyToMany
. These fields use java.util
collections, because Hibernate (and Spring?) does not know how to handle Ceylon collections by default. We should see if we can make a converter for ceylon.lang::List
(or even ceylon.lang::Iterable
).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.