Live data from Hacker News

Goravel: A Go framework inspired by Laravel

goravel.dev

21–30 of 170 posts

Re: Goravel: A Go framework inspired by Laravel

#21
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…

> 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.

Instead I've thrown SQLAlchemy in front of it and now I can query it without writing a single line of SQL.

I think tools are tools, and using the right tool at the right time is an important skill I think you've yet to develop.

Re: Goravel: A Go framework inspired by Laravel

#22
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.

In my experience building the site with Go (Echo) with Postgres and a vanilla frontend from scratch, I realised that maintaining my codebase as a solo developer for a medium-sized platform was challenging. At one point, it became unmaintainable, and I had to rewrite it three times. The third time? I switched to the Astro web framework, and it solved all my problems.

Go is indeed easy to get started with, but it's different when dealing with server-side rendering and not a single-page application where Go is a backend.

Re: Goravel: A Go framework inspired by Laravel

#23
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…

[dead]

Re: Goravel: A Go framework inspired by Laravel

#24
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…

What would you use if ORM is to be avoided?

Perhaps something like https://github.com/sqlc-dev/sqlc ?

Re: Goravel: A Go framework inspired by Laravel

#25
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?

JavaScript (Too many to list)

TypeScript has NestJS (among others)

Elixir has Phoenix

Re: Goravel: A Go framework inspired by Laravel

#26
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?

Even when using frameworks, typically Go devs, from what I see, prefer something simpler, like Fiber or Echo. Then they plug any libraries the like on top of it.

Re: Goravel: A Go framework inspired by Laravel

#28
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?

The standard library.

It’s honestly feature rich enough to do most things that the only other dependencies we really need to pull in is some third-party SDKs (e.g. AWS) and our database driver.

Re: Goravel: A Go framework inspired by Laravel

#30
post #24
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…

What would you use if ORM is to be avoided? Perhaps something like https://github.com/sqlc-dev/sqlc ?

I'm using this at the moment : https://jmoiron.github.io/sqlx/

Didnt' now about sqlc, it seems very interesting ! Thanks for sharing !

Post reply on HN