Live data from Hacker News

Goravel: A Go framework inspired by Laravel

goravel.dev

81–90 of 170 posts

Re: Goravel: A Go framework inspired by Laravel

#81
post #6

Never got the point of porting X framework from Y language in order to > simplifying the learning curve for Y language developers You'll just end up writing the same old patterns in the new language as you did in the old one. Especially with Go, it's really easier to adopt the existing tooling (most of which is in the standard lib) than to port whatever concepts Laravel/PHP had.

Not sure there's a Go equivalent of Laravel, so not sure which tooling you suggest people adopt. If I want an all inclusive MVC (or similar) web development framework with all batteries included - why not build a Go Laravel? Python has Django Java has Spring (among others) C# has asp.net Ruby has Rails PHP has Laravel What does Go have?

I live Django, but you cant compare it to Latavel, which is much more extensive

Re: Goravel: A Go framework inspired by Laravel

#82
post #20

I'm not a fan of the complexity added by this and other similar frameworks. PHP and Go are very different languages, so trying to replicate the same concepts for one language to another I don't think it is a good idea. One of the things I would discard would be the use of an ORM library : every library adds another level of complexity and doesn't allow to see what is happening when the SQL statements are built. In my…

"better" .... Only the Sith deal in absolutes.

Re: Goravel: A Go framework inspired by Laravel

#83
post #32

It seems like every middling company out there wants to bolt in popular architecture from other languages into Go, particularly Java enterprise patterns. Why not use the actual language or framework your engineers like instead?

Tale as old as time. Everyone wants new shiny language then tries to turn it into old familiar language.

Re: Goravel: A Go framework inspired by Laravel

#84
post #21

Earlier quoted context omitted.

> One of the things I would discard would be the use of an ORM library ... In my opinion, it is better to create some simple methods for each object that implement the CRUD operations and build the SQL statements directly. Have you done this for any complex system? I'd love to see you do this for the AzerothCore: it has 298 tables, 3,010,875 rows across those tables, and one table (quest_template) has 105 columns. In…

Writing SQL against systems much larger than that used to be the norm. You are correct that "using the right tool at the right time" is important, and often, that right tool is SQL. Other times it's not. Unfortunately there are many developers who don't really know SQL, so every problem is ORM-shaped.

> used to be the norm.

People also "used to" invest radioactive water and used radioactive cremes and toothpastes for health benefits in the 20's and 30's. So what's your point?

Re: Goravel: A Go framework inspired by Laravel

#85

I love Go and I love Laravel, but I do find the naming an odd choice; it seems like borrowed clout. Especially so when Laravel's own name is a soft reference to the work of C.S. Lewis. Why not pick a unique, "Go-esque" name and still nod to Laravel in the title/description?

Goravel doesn't roll off the tongue either. They should have went with Gravel.

Re: Goravel: A Go framework inspired by Laravel

#86

Earlier quoted context omitted.

Could you give a few examples what such frameworks provide that you need, that Go plus a few simple libraries doesn't provide?

Same reason IDEs — when you really know them — allow for quicker development compared to using primitive text editors with a bunch of third-party plugins duck-taped together. When you understand the framework, everything is written to the same standard, behaves in similar ways, and is where you expect it to be. Adding things like background job processing requires changing one line of config. Also, one major thing I'…

A simple Google search returns https://github.com/oapi-codegen/oapi-codegen

I get wanting to be productive and gravitating towards patterns you’re familiar with but in the end it’s all bloat. http can do routing and patterns and cookies and sessions. database/sql can do your DAL work. uuid (various implementations) work for user/tenant uid+oid obfuscation. JWT libs for auth. You can literally json.unmarshal your config for your whole application or use godotenv to use environment variables. template/html for views. Golang has batteries, it’s just you don’t know what you don’t know so you expect a certain perspective that isn’t how we do things. Like joining a new company, things are different here. If you spent some time to learn the “go way” you’d realize that you don’t need the bloat, you just need the structure. The “where I expect it”.

Re: Goravel: A Go framework inspired by Laravel

#87

Earlier quoted context omitted.

I don't think Laravel is particularly GoF-ish, if that's what you mean. In terms of patterns it's mostly fairly simple. > Why not use the actual language or framework your engineers like instead? Go does not provide "enough" by itself to completely furnish my needs. And having a framework that uses common terminology and patterns allows you to get s__t done and not waste time bikeshedding. "Microservices are cattle,…

Could you give a few examples what such frameworks provide that you need, that Go plus a few simple libraries doesn't provide?

I think it's the issues in "Go plus a few simple libraries". Frameworks come with all the extra features built in. If I need rate limiting, I can just open rate limiting docs and add it to my route, there is no need to search some library or blog post on the "best way" to implement rate limiting middleware in go.

Re: Goravel: A Go framework inspired by Laravel

#88
post #6

Never got the point of porting X framework from Y language in order to > simplifying the learning curve for Y language developers You'll just end up writing the same old patterns in the new language as you did in the old one. Especially with Go, it's really easier to adopt the existing tooling (most of which is in the standard lib) than to port whatever concepts Laravel/PHP had.

Not sure there's a Go equivalent of Laravel, so not sure which tooling you suggest people adopt. If I want an all inclusive MVC (or similar) web development framework with all batteries included - why not build a Go Laravel? Python has Django Java has Spring (among others) C# has asp.net Ruby has Rails PHP has Laravel What does Go have?

Go has go. You don’t need a framework when http can do pattern routing and cookies, database/sql can do data, and json is baked in.

It was literally designed to do away with this choice confusion and provide one path to servicedom.

Re: Goravel: A Go framework inspired by Laravel

#89
post #73
post #43

Earlier quoted context omitted.

I assume you have never used Django or Rails or Laravel then. With these, you get a web application with routing, middleware, schema validation, database connections, an ORM, authentication, sessions, job queues, email sending, distributed caching, dependency injection, logging,secret handling, view template rendering, websockets, metrics, and much more—right after the installation, set up with conventions allowing o…

Almost everything you listed already exists in the standard library. And for the little that’s not, such as an ORM, there are many third party libraries available if you want to go down that path although it’s not necessary. There’s nice things about a lot of these frameworks for sure, like ActiveRecord, but you usually just learn the patterns in Go and roll with it. The standard library has its own consistent style.

> Almost everything you listed already exists in the standard library.

That's a bold faced lie. In the list, the only things provided by Go are:

- routing: http.ServeMux has a router but until recently it was usually not used in real applications due to very limited capabilities (they finally added proper patterns in 1.22 which, in my view, finally makes it good enough).

- template: it's not even close to laravel's blade capabilities, but yes Go has good enough templating for most tasks.

Re: Goravel: A Go framework inspired by Laravel

#90
post #32

It seems like every middling company out there wants to bolt in popular architecture from other languages into Go, particularly Java enterprise patterns. Why not use the actual language or framework your engineers like instead?

Using layers and SRP will solve literally 99% of organizational issues.

No framework needed.

Post reply on HN