GithubHelp home page GithubHelp logo

Comments (10)

lucapiccinelli avatar lucapiccinelli commented on June 1, 2024 1

Hey there @sdeleuze, I would really be happy to take charge of this issue, if you think that it is possible. I love the DSL, but the main issue that I see for a large adoption is exactly the lack of documentation (compared to regular Spring). Then it would be an honour for me to contribute to it. What do you think about it?

from spring-fu.

lucapiccinelli avatar lucapiccinelli commented on June 1, 2024 1

Also... springboot or springwebflux?

from spring-fu.

lucapiccinelli avatar lucapiccinelli commented on June 1, 2024 1

Ok perfect. I was thinking about proposing to substitute mustache with Kotlin HTML DSL, which is more idiomatic. But if the goal is to provide also JaFu examples... then I suppose that mustache is a better choice as well 😄

from spring-fu.

sdeleuze avatar sdeleuze commented on June 1, 2024 1

Hey, thanks for working on that, looks great. I will discuss with @poutsma what should be the next steps and let you know.

from spring-fu.

sdeleuze avatar sdeleuze commented on June 1, 2024

Hi, your help on this would be appreciated since indeed we really lack of documentation. Happy to provide support if needed. I would suggest to use JDBC instead of JPA as done in https://github.com/spring-projects-experimental/spring-fu/tree/main/samples/kofu-petclinic-jdbc for the Kofu version. Could you write it in Asciidoc?

We could add Jafu version in a second time.

from spring-fu.

lucapiccinelli avatar lucapiccinelli commented on June 1, 2024

Yes, I think that writing in Asciidoc is not a problem. But where should I provide the documentation? Maybe a PR on this project with a new folder tutorial containing the new doc?

JDBC is ok for me... but why not Exposed? It is more Kotlin oriented. Anyway, also JDBC is fine.

Would you suggest starting with the Spring initializer even if there is no template for the functional main? Or maybe I could just go enumerating the maven dependencies?

from spring-fu.

sdeleuze avatar sdeleuze commented on June 1, 2024

Maybe a PR on this project with a new folder tutorial containing the new doc?

A PR on this project is fine yeah.

JDBC is ok for me... but why not Exposed? It is more Kotlin oriented. Anyway, also JDBC is fine.

The goal is to be able to provide both KoFu and JaFu samples so sticking to JDBC seems a better choice for that purpose.

Would you suggest starting with the Spring initializer even if there is no template for the functional main? Or maybe I could just go enumerating the maven dependencies?

Yes starting from start.spring.io and replacing the main function is probably the best way.

Also... springboot or springwebflux?

I assume you mean Spring MVC or Spring WebFlux. Let's use Spring MVC to target a wider audience and be consistent with JDBC blocking persistence.

from spring-fu.

lucapiccinelli avatar lucapiccinelli commented on June 1, 2024

Hi @sdeleuze, it took a while but I finally started on this task! I suppose no one did it yet, as the issue is still open.
Before writing the tutorial, I started implementing the example code.
Would you mind giving me some feedback? Here is the repository https://github.com/lucapiccinelli/spring-kofu-tutorial-draft.

I implemented:

I'm not a fan of JPA, but it is objective that when choosing not to use it, you lose some interesting features, like lazy fetching. Then I thought of giving a suggestion of how to implement it using lazy Kotlin delegate. Please have a look at this and this.

Also, I used sealed classes to model if a (domain) Entity needs to be inserted or updated. Have a look here and here

Please tell me if this is ok for you or it is too much for a tutorial. If you mind about Java examples, sealed classes semantics can be reproduced using a Visitor pattern. The lazy operator could just be avoided in Java examples.

If my approach is ok for you, I will continue with the rest of the examples. I can also have a step back and void using sealed classes and lazy delegate.
Thank you!

from spring-fu.

lucapiccinelli avatar lucapiccinelli commented on June 1, 2024

Hello @sdeleuze, I started writing the tutorial here https://github.com/lucapiccinelli/spring-fu/tree/kofu-tutorial/samples/kofu-tutorial. As an introduction, I copy/pasted your README of KoFu. I think it is good to introduce what we are talking about.

When you have time, please tell me your thought about it. Especially about Content of this tutorial.

Have a nice day!

from spring-fu.

lucapiccinelli avatar lucapiccinelli commented on June 1, 2024

The tutorial is done. I will proceed with a pull request, so that you can review it. I did the homework...but please verify that what I wrote is correct.

from spring-fu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.