<FromGitter>
<proyb6> @AllanKlaus Go web frameworks are usually faster than Crystal but it’s the libraries that’s matter. If your team can accept break changes and keen in binding C libraries in Crystal, that would be nice.
_whitelogger has joined #amber
<FromGitter>
<elorest> @proyb6 What is your source on this? ⏎ ⏎ > Go web frameworks are usually faster than Crystal but it’s the libraries that’s matter
<FromGitter>
<AllanKlaus> @proyb6 So its no recommended to create an API using crystal? I already used Go in my team but they dont like it
<FromGitter>
<drum445> @AllanKlaus why do you say that? Crystal has been great for creating APIs for me - REST JSON ones that is
<FromGitter>
<Blacksmoke16> athena would be great for that, however not sure how i would feel using it atm for a legit thing
<FromGitter>
<drum445> nice self plug
<FromGitter>
<Blacksmoke16> :shrug: is what i was intending it to be used for
<FromGitter>
<Blacksmoke16> is what i use it for
<FromGitter>
<drum445> It looks good man
<FromGitter>
<drum445> Hadn't seen it before
<FromGitter>
<Blacksmoke16> thanks, yea has some neat features that are unique in the crystal framework land
<FromGitter>
<Blacksmoke16> if crystal keeps heading in the annotation direction, im ahead of the curve ;)
<FromGitter>
<AllanKlaus> @drum445 Was a question based on what @proyb6 said
<FromGitter>
<Blacksmoke16> imo depends what you're doing
<FromGitter>
<drum445> @Blacksmoke16 how so mate?
<FromGitter>
<Blacksmoke16> like if you only have a few routes might just be easier to have one controller
<FromGitter>
<drum445> @AllanKlaus ah right, I wouldn't worry about benchmarks that much tbh. Unless something is drastically slower than it's competition it's fine; the end user doesn't care. In a real scenario they're sitting behind a reverse proxy anyway so you lose time there
<FromGitter>
<Blacksmoke16> but the more routes you have/need to manage, makes sense to split them out into more manageable controller files
<FromGitter>
<drum445> Yeah I do that atm, have many controller files, but I've seen frameworks that have a routes.xx file in a config dir, which then call the relevant controller
<FromGitter>
<Blacksmoke16> athena doesnt have that. its all auto registered when you inherit from `Athena::Routing::ClassController`
<FromGitter>
<Blacksmoke16> rails is like that for example, have to tell what controller manages what route and stuff
<FromGitter>
<drum445> both ways are fine I guess?
<FromGitter>
<Blacksmoke16> whatever works for you imo
<FromGitter>
<drum445> Cool, think I need to stop being concerned with the tiny details like that and just get on with coding
<FromGitter>
<Blacksmoke16> premature optimization can be evil
<FromGitter>
<drum445> "premature optimisation is the root of all evil"
<FromGitter>
<Blacksmoke16> context goes into it as well, a personal webapp project? doesnt really matter. Large scale prod api? maybe put more thought into how it will scale in future
<FromGitter>
<drum445> Very true
<FromGitter>
<Blacksmoke16> combining them like that, unless you are reusing some of the controller logic between routes, would result in a lot of extra code to do what you could just do in the route do block no?
<FromGitter>
<Blacksmoke16> controller approach would allow you to test some code more easily