Hacker News new | ask | show | jobs
by dominotw 2374 days ago
what if I just want to build a quick CRUD website. Why would i want to assemble bunch of libraries, instead of using a web framework. Framework is pattern of assembly that fits a specific need, why would everyone create their own.
2 comments

From my experience with micro, it is pretty easy. You can use the template commands with `micro new user` to make a service and `micro new api --type=api` to create the api. Add a data layer to the User service for persistence. Next, you can create a user service client called by the routes in the api. Then running the micro runtime via `micro api` will allow you to make calls to domain.com/api/{RPC}.
net/http is all you need. You don't need any library or framework.
not sure if you are joking but does net/http have

1. server side templating of html pages

2. database access/migration

3. asset packing/versioning

5. css compliation/ asset pipeline

6. authetication/authorization support

While Golang could be used for that, the original target was to be a "systems language", more of a niche. There are people building websites and even games, but you won't find all the expected bells and whistles. There could even be current shortcomings in the language itself for such use cases, so you would be more "on your own" with such a solution, at the moment.
> what if I just want to build a quick CRUD website
RoR might have effected my definition of what 'quick' means :D. Things I mentioned in the comment above are indeed 'quick' in ror.

I assume you are implying these are not quick in golang ? I think it proves my point that assemble everything yourself is a silly ideology when applied generically to all things.

It does not.