3 ms·
But in this situation, why don’t I just use Go and it’s templating engine? Even faster to develop and slimmer when running in production.
by didip 4y ago
But in this situation, why don’t I just use Go and it’s templating engine?
Even faster to develop and slimmer when running in production.
- idoubtit 4y agoI doubt Go is really a better offer than Java to serve HTML pages. Go promoters are clearly focused on the backend (web APIs). For instance, my experience with HTML templating in Go using the standard library is that it's really slow. And that's even after taking the pain to optimize them as recommended (caching, etc). But, most of all, each frontend web project in Go has to decide if it's going to reinvent the wheel, or select one of the many short-lived frameworks.
- richbell 4y agoIf you're familiar with Go, go for it. But there isn't really a compelling reason for a person or team to switch from Java to Go; Java also has a rich ecosystem of templating engines.
- jrjarrett 4y agoGarbage collection.
- dehrmann 4y agoThis complaint is getting old. Java GCs have become really good. I've seen more issues on startup with empty connection pools, empty caches, and no compiled code than GC pauses.
- pjmlp 4y agoYou mean the poor experience of Go's GC that requires allocation of unused GB to keep it under control at scale, because the authors refuse to provide fine tuning options?
- exabrial 4y agoGo w/ templates is more an analog to JSP tech than JSF tech, I think that's the key differentiator. I'm guessing JSP is significantly faster and Go would be more memory efficient, but I hardly doubt any of that matters at the scale these two would be used. JSF OTTH is a component framework and is much higher level than JSP|go/template. JSF performance probably falls below both JSP and Go templates. But, at a much lower cognitive load that both by an order of magnitude. For instance, to put a street map on a page with PrimeFaces, you simply type: <p:gm ::tab-space:: and let the autocomplete in your Java IDE fill in the rest of the characters to form: <p:gmap id="googleMap" apiKey="xyz" />. Ultimate it's a tradeoff between getting exact control over the HTML (which you often don't need) and developer productivity.
- pjmlp 4y agoBecause we don't miss Java 5.
- dehrmann 4y agoEven Java 5 had generics.
- pjmlp 4y agoGo finally as wel. (since 1.18), otherwise my reference would be to Java 4. Let see how many years they will take for proper enums instead of the strange dance of type and const. I have an idea, what about something like type colors (red, blue, violet, ...)