-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revel (considered harmful) #1193
Comments
@brendensoares You have expressed it objectively and clear. Thanks. |
Thanks for the reply @brendensoares, appreciate the information and the very level-headed response. |
IMHO this is a storm is a teacup, your coffee MUST be pure ground, not instant, the TIP must be green... As a hacker, I use golang cos it nice break from the subtle bugs on my systems.. I dont care if its not "pure go"... does the job, and that all i want,, and as today, get home and have spare time to add a comment to this issue... So it works for me big time..and logic is abstracted away in a module, that relly I could replace overnight with "something else".. Revel gets me up to speed and fast.. generally using py+bottle for dev and then into golang/revel.. Even the mobile developer loves go, cos it makes sense, unnlike the python stuff |
Maybe we need a counter with "why revel sucks".
|
I use Revel for an API that transacts millions of records daily. This framework is awesome and I have helped contribute to it! |
I haven't used Revel but I have been watching its development since its early release. I am really looking forward to be using it in my company when it gets approved. Here's my version of "13 Reasons Why"... I think Revel rules?
|
Hi @brendensoares, this is an old debate and I don't use revel anymore but clients of mine do. I did use it by 2 years so here are my two cents:
1.1. Imagine someone speaking bad english on purpose just because he feels it's fine. That's happens with idiomatic Go, the development team has made conventions, (and more!) in order to prevent headaches for newcomers and veterans. 1.2 Framework vs toolkit. Having the chance of replacing some part of your code when needed is agile enforced. But when you hit the framework limits then you are in troubles. And that's the point about a framework, all eventually reach a limit on flexibility and backwards compatibility that tries to fix with next major releases.
vs
When you open the config file you need a large monitor just to know what is going on.
Sorry for been rude but these problems can be fixed as I see it. What can I say about how to made revel better?
It's easy to say do that I know, so thats why I will try to implement some of these features by myself and see if works. My best regards. |
@jimmy-go Thanks for the feedback, and the points for making Revel better. The Go way is idiomatic, that is the whole idea behind Go. But it does not make you think about code organization until you realize that hey maybe that file that is 2000 lines long should have been split into two, and now I need to worry about packages and crap if I am moving stuff now I got circular references and ¯_(ツ)_/¯ . Revel forces you to think about planning your package layout at the beginning which is what a lot of beginners need. Do advanced programmers need this, likely not as much but I find it convenient that Revel does a skeleton layout for me. The
I agree with the framework vs toolkit issue, and part of the series of the latest releases was to make Revel more modular internally. Currently the server and template engine have both pluggable architectures. which avoids the issues you have with typical frameworks were you "hit the wall" with the configuration options available. Revel could communicate on an RS232 port now if you wanted it to. The config, routes, those are in the crosshairs to be dealt with in a different manner. My 2 cents :-D |
Coming from a java (spring) world i feel familiar with revel already with just a quick look on documentation. It looks straightforward but also required some understanding of the magic behind (just like spring framework). It may or may not follow the more idiomatic, but i like the way it is. But i strongly share @jimmy-go point of view on the I'd be pleased to use it for all the cool stuff and convention that comes with it, but the lack of main.go is a no-go for me 😢 |
To be fair... @anthonyraymond Hooks have been added (https://revel.github.io/manual/startup-shutdown.html#revel_event_hooks) allowing you to hook into the startup of Revel subsytems, and as always you had the OnAppStart (https://revel.github.io/manual/startup-shutdown.html) OnAppStop callbacks to perform whatever is needed on start or stop of the application. It would not be to difficult to include a setting to not include a main file but to use file XXX as main, because now the main generated file has been reduced to the following
|
hi @notzippy thanks for your answer. I've seen the hooks and OnAppStart already, but i i does not fit my use case, i want the webserver to a subcomment of my app, not main thing. It is suppose to started (or not) based on the outcome of the init process. There is some cases where i want my app to be running but without the webserver. I must admit this is not a regular use case. But go-gin supports thanks to the exposition of the start and shutdown method. Having that said, if you release this constraint someday i'll be happy to use revel. |
This is a open reply to a question raised in a go-kit issue which was locked preventing direct response. @fluxibox @peterbourgon @adamjacobmuller
First, it should be clear, that I'm the current maintainer of Revel (along with @notzippy @pedromorgan @shawncatz), so I am biased.
I've been told many times that Revel is less than ideal as a Go-based web app development framework and instead you should use another framework that is "more idiomatic" (or roll your own framework and use
net/http
).Why would this be said of Revel? After all the idioms of Go are still being actively developed (which is to be expected for a young language). However, when taking Revel for a spin for the first time you'll notice a few things:
revel
tool (which enables rebuild on file change, binary packaging, etc)main()
as therevel
cli does it for you as part of the build process (so that it can auto register your controllers and methods)revel.Controller
struct
from the Revel package to gain a "context" into the request/response flowSome people don't consider this pure i.e. idiomatic Go. They don't appreciate the "magic" that happens when following these conventions; they like to understand exactly what is happening under the hood at all times.
Others who view these choices as assets instead of liabilities appreciate being able to have a standard project file structure, rapid development time, and reduced boilerplate code.
Not that Revel uses Dependency Injection in any major way, but DI is actually a great pattern to use to make your code more modular and testable. Also, many others are interested in applying DI to Go and I can't find any critics of DI in Go or anyone claiming it as not idiomatic. The same applies to IoC.
In my own experience, Revel works great with DI. I've also been using DDD (Domain Driven Design) principles with Go and Revel. My Revel Web App has a app, infrastructure, and domain layer as well as a versioned, Restful API.
I'll stop here, even though there is a lot to be said about the evaluation of Revel as your choice of Go Web Framework (reflection, code generation, using FastHTTP instead of
net/http
, writing your ownmain()
, integrating Revel with another Go app, performance, conventions, etc). I simply wanted to make an objective reply (as much as that is possible in my role) to a hollow accusation (can we give some substance to the claim?).I'd love to hear more on this topic from critics and fans alike. My mind is open.
PS - I was personally looking into
go-kit
to compare approaches of developing microservices in Go when I learned that Revel is considered harmful. I'm still looking into it, because perspective is valuable and I acknowledge that I know nothing.The text was updated successfully, but these errors were encountered: