13 ms·
Goravel: A Go framework inspired by Laravel
- dankobgd 2y agolooks horrible
- DeathArrow 2y agoFor someone who doesn't know Laravel it's worth explaining it a bit further.
- deleted 2y ago[deleted]
- martinsnow 2y agoGoogle is a thing
- DeathArrow 2y agoInteresting take. So you recommend to not give detailed info on a pruduct website and require people to Google? It's not about me not willing to use Google but about not having me to. I expect to find all relevant information on the website in an easy to find manner.
- hatefulmoron 2y agoTheoretically, it's probably better to get information about Laravel from their respective website. I would expect as this is a framework made for Laravel users, you're not really in their target audience anyway. It would be helpful to explain a little bit about why they like Laravel though, to entice you to read more by yourself.
- DeathArrow 2y agoThat would perfectly made sense if the framework intended only for Laravel users willing to work in Go. But they use the term "Laravel inspired" which can be understood as well as them catering also to regular Go users without prior Laravel experience. If that is the case, it might be worth to explain the features and usage of their product.
- lakomen 2y ago[dead]
- TiredOfLife 2y agoGoogle hasn't been a thing that works for years.
- dalemhurley 2y agoBatteries included very opinionated way of building amazing things. That said you can choose to go your completely own way and ignore the Laravel way. But good luck with hiring. I think Laravel is the best framework for getting an idea going, to MVP to MMP to scale. It just works. Purists hate it because it is PHP and they still think it is 1999. They also hate that there is the “Laravel way”, even though you can completely ignore it. Laravel is what the non-cool kids use to ship.
- leetnewb 2y agoLaravel seems to get a lot of hate from within the PHP community as well. I suppose every framework in use has its detractors.
- gjsman-1000 2y agoWho, the one guy pledging Trongate, or the people in the Symfony camp? I assure you React gets plenty of hate from the JavaScript community - enough to spawn over a dozen competitors. At some point, community love/hate is irrelevant.
- leetnewb 2y agoPeople in the Symfony camp want less magic. There is also a lot of activity around Tempest.
- dalemhurley 2y agoIs it really magic? I did some Java dev and that is full on "magic" especially Quarkus.
- panstromek 2y agoI wouldn't consider it that opinionated, there's many ways to do the same thing. I'd say there's implementation for most design patterns you'd want to use in this context, so you can choose the style pretty much within the boundaries of the framework.
- adamors 2y agoNever 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.
- weatherlite 2y agoNot 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?
- JodieBenitez 2y agoWe now have GO's equivalent of Rails and Go's equivalent of Laravel. Apparently Go's way is "start with the standard lib and glue whatever you need on top".
- kflgkans 2y ago> If I want an all inclusive MVC (or similar) web development framework with all batteries included I think that maybe you shouldn't want that. Go is a simple language with a very extensive standard library. It's quite easy to do most things you would want by just writing some code, leveraging the standard library, and maybe including a handful of external libraries. Frameworks are not needed and will eventually just get in the way.
- weatherlite 2y ago> It's quite easy to do most things you would want by just writing some code OK, I want a similar thing to ActiveRecord - with all the features, is that quite simple to build? Now you'll tell me I probably don't want an ORM at all. But lets say I do, lets say many people find value in these things.
- zsoltkacsandi 2y agoIMO there is definitely a place and need for such a framework in the Go ecosystem, but that does not mean that the whole API, structure and terminology need to be copied from Laravel as is. This will definitely hinder adoption.
- dalemhurley 2y agoAll languages, but some people hate opinionated frameworks.
- ofrzeta 2y agoWhile the API seems similar, the syntax of Laravel feels a bit lighter thanks to PHP.
- voodooEntity 2y agoSome time ago i wrote a short blog article about getting started with goravel - might be interresting: https://blog.laughingman.dev/article/Building_a_simple_demo_rest_api_with_goravel.html https://blog.laughingman.dev/article/Building_a_simple_demo_...
- mrbluecoat 2y agoVery helpful to see a full working coding example. Thank you.
- pknerd 2y agoWow, wow, wow! As someone who loves both Laravel and Go, this is a Godsend! I would get back to Go only for using this!
- Daril 2y agoI'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 opinion, it is better to create some simple methods for each object that implement the CRUD operations and build the SQL statements directly. It is possible to write a web application with GO using only some libraries, for example for routing and authentication. My favorite place to start is Autostrada : https://autostrada.dev/ https://autostrada.dev/
- movedx 2y ago> 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.
- skydhash 2y agoIf you’re only doing CRUD, you can use any reputable query builder or ORM. But sometimes the best model for business logic and the database table differs, and the methods for persistence are Load, Save or Add, Remove instead. That’s when you want custom SQL where the ORM/query builder is not great. Laravel is great, but that because they have nicely designed escape hatches and their architecture is very modular.
- movedx 2y agoSQLAlchemy doesn’t get in the way of anything you might want to do. In fact, you can do a “textual” query and then have the response mapped to classes for you :-)
- deleted 2y ago[deleted]
- lakomen 2y ago[dead]
- begueradj 2y agoA similar path was taken in the Node.js world, but it seems the framework in question (AdonisJs) is far from being that successful. Given the standard batteries included in Go, I think there is even less chess for this to succeed. But still that is a good thing to try. Why not. All the best.
- mkl95 2y agoIt 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?
- zero_shift 2y agoI 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, not pets."
- kflgkans 2y agoCould you give a few examples what such frameworks provide that you need, that Go plus a few simple libraries doesn't provide?
- zero_shift 2y agoIt's a long list. It might be more productive to start with just one example: OpenAPI validation. In large orgs with customer-facing APIs, it's imperative that you can validate and enforce OAS specifications against all routes. Customers need to know exactly what auth mechanisms they can use and shouldn't be enabled to call undocumented capabilities. It's also important from a practical perspective that developers can scaffold up new routes that are always-already bound to a specification. Depending on the context you either need to do "contract first" specification or "code first" generation based on type system introspection. Go can let you knock something together yourself but as your team gets larger, the overhead of reviewing and marshaling your team's practices gets more and more difficult. It's like the problem you have with NodeJS. It's very possible to assemble something that has easy to scaffold routes with strong type-to-spec validation, authn/z, no exposure of undocumented APIs. But without something like NestJS or Adonis each project becomes a special snowflake with no support for interop across repositories.
- gren236 2y agoWell, someone would've made this at some point anyway. I don't get why people tend to bring stuff from other languages to Go, but it's better to have something than not I guess...
- khantsithu 2y agojust use laravel bro
- _1tem 2y agoWhat I’ve really wanted is a Laravel-like framework in Rust.
- coder_san 2y agoNot sure how close it is to Laravel, but loco.rs claims to be Ruby on Rails for Rust, so it might be close to what you want. Link: https://loco.rs/ https://loco.rs/
- mogaal 2y agoOne of the things I love about Laravel is that I can just drop it into share-hosting and forget about it. At the same time, my daily work demands Golang 80% of the time. I keep having mix feelings when having this dichotomy
- someothherguyy 2y ago> One of the things I love about Laravel is that I can just drop it into share-hosting and forget about it Why can't you do that with anything?
- deleted 2y ago[deleted]
- christophilus 2y agoI think by share-hosting they mean the super cheap PHP hosting that really doesn’t have an equivalent in Go or really any other popular language I’m aware of.
- someothherguyy 2y agoLaravel is a gigantic memory hog as far as PHP apps go. I don't think it makes for a great shared hosting go to, unless you completely ignore PHP's common concurrency models and feel like you need to serve a few requests per second. There are some ways around this these days, but these seem unlikely to bolt in to common shared hosting providers.
- ulrischa 2y agoWhy not ust use Laravel itself? You can put it on the cheapest webhosting plan and go for it
- JadoJodo 2y agoI 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?
- tredre3 2y agoGoravel doesn't roll off the tongue either. They should have went with Gravel.
- eszed 2y agoI think if you pronounce it as "GORE-a-vel" it rolls off the tongue well enough. "Go-RA-vel" - which arguably better fits English orthography -> pronunciation conventions - sounds terrible. But... Yeah: I prefer "Gravel", too. Is there another project out there with that name? /English nerd
- deergomoo 2y agoSlightly weird that the logo seems to have copy-pasted the "ravel" part of the Laravel logotype too (the hard-right-angle "r"), just changing the colour to blue.
- dgunay 2y agoA lot of Go libraries are ports of famous libraries from other languages, with "go" shoehorned somewhere into the name.
- leetrout 2y agoIt's one thing to have MVC in Go. It's quiet another to match the productivity boost Laravel (or Rails or Django) give you. Admirable attempt... the docs don't say much on the template support in the views but I would imagine there's not a 1:1 with Blade yet.
- juwjfoobar 2y agoThe session interface is missing WithContext(ctx context.Context) unless something else is making it context aware
- thr0waway001 2y agoLooking forward to LaRust.
- liampulles 2y agoAt my last job I wrote web services using Spring (Java enterprise stuff). That was how I and a lot of my colleagues first learned how to write enterprise code: via lots of annotations. Then I discovered Go and learned a different way to make systems. At first it was strange - where was the IoC framework? How do I build up my db entities? And then I got into the philosophy of Go: how its better to make things that are clear rather than clever, and how its better to do things with an obvious control flow. In my current Go job, we wire singletons manually, build up our http server manually, and write raw SQL. It works gangbusters. Please lets keep Go raw and simple.
- mdavidn 2y agoThis works in Java too. Wire up classes yourself and eschew the IoC framework.
- xyzzy123 2y agoJava as a language totally lets you do this (and it's great!) but you'll be fighting the "culture" if you work like this in a bigger org. In enterprise you have template repos and engineering fora where teams standardise-ish how things are done. This converges on the standard patterns, Spring, Micronaut etc. Usually, you can deviate from these patterns at team discretion but you'll get questions from EMs and frowns from devs who roll on / off your project.
- jacurtis 2y agoThat sounds nice. Except find a company today that doesn't perceive spring framework and java as synonymous. Tbh, its not a whole lot different than where PHP is going where php is becoming synonymous with Laravel. Wordpress is probably one of the last few bastions keeping that framework from fully owning the language.
- charlie0 2y agoYou're missing the entire point of frameworks like Spring and Laravel. They are there to remove the power of choice and thereby actually create clarity and maintain speed over a long period of time. What happens with the "I'll build everything from scratch" apps is they are oftentimes not easy to understand, different patterns end up being used, 3rd party packages get slapped on ad-hoc and over time it just becomes a frankenstein. Much better to start with a hard set of rails that follow a set of conventions you just have to learn once. The whole "I can move faster" without a framework is just an illusion that appears at the beginning of building an app. It will quickly disappear as more devs and complex code features are requested.
- capitanazo77 2y agoCongratulations! Php is the weakest part of laravel. Please add inertia. It will make it extremely productive!
- pooingcode 2y agoYour cookie banner was the worst I’ve ever seen on any site. It has 100s of ad venders.