Code Monkey home page Code Monkey logo

Comments (4)

oderwat avatar oderwat commented on June 18, 2024 1

@JulienLecoq Maybe write up some larger code examples here and show the difference and why your way helps with coding. We wrote lots of Go-App style HTML code and do not see a problem with the current method. What Maxence is pointing out is what I would fear too: You can't see the attributes that way without scrolling down to closing parenthesis and I think this may make it hard to make adjustments to the code. Especially with large structures that are nested multiple levels.

P.S.: You do not have to call body for every HTML tag. There is a lot of code app.Div().Class("....").Text("....") and similar with other elements.

P.P.S.: Before I saw what Go-App is doing I was following https://www.gomponents.com/ development for some time. Right now I like the Go-App way better. We can read and reason about it very easily in the team too.

from go-app.

maxence-charriere avatar maxence-charriere commented on June 18, 2024

Thats mean all the attributes and event handlers are set after the body which feels less readable in my opinion.

from go-app.

JulienLecoq avatar JulienLecoq commented on June 18, 2024

Maybe we could keep the Body method for those who prefer your way but also add "my" way for the others?
But that would introduce two ways of doing basically the same thing, so that's maybe not the best.

from go-app.

maxence-charriere avatar maxence-charriere commented on June 18, 2024

But that would introduce two ways of doing basically the same thing, so that's maybe not the best.

You said it all :)

from go-app.

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.