Learn Buffalo in Go - Part 2 Models
HTML-код
- Опубликовано: 18 сен 2021
- Part 2. Intro to Models and test-driven development
Using Buffalo version 16.26
Topics covered:
* Models as part of the MVC paradigm
* Buffalo patterns inspired by Ruby on Rails and the influence of test-driven development
* configure database connections in database.yml file
* use the Buffalo cli to generate a model; specify additional fields and field types
* running buffalo test command
* writing tests using the ModelSuite
* testing with the database
Github repo with code used in this series.
github.com/briwagner/learn-bu...
Part 2 of video series playlist:
• Web application develo...
so cool lessons! Simple and clear
Thanks!
Can you say more about If I want don't like ORM like Pop, and use standard database/sql or pgx what would I do?
thanks 😊.
Hello, thanks for the suggestion. I am planning to cover something like that in a future video. Basically you need to create a database connection as a global variable, or package-level var, and then use that. Pretty much all of the changes happen in your models package, where you would manually perform operations to query, save, update, etc.
Hey, why is sound of the video distorted? I can't hear your voice.
It is working on my desktop machine, only on my Android phone I can't hear audio.
Great tutorials, I really like your style of explaining.
@@keza5078 Thanks, glad you find it useful. I will take a look at the audio. Maybe something is going on with stereo audio split or something, when it is converted to mp4.
@@keza5078 I can confirm I have the same issue, not ok on android tablet (even when using web interface instead of youtube app), fine on desktop.