Postingan

Golang Interface Pattern

Gambar
Today I learn golang interface patterns from this article : https://dzone.com/articles/three-productive-go-patterns-to-put-on-your-radar , one of the interesting section is client-side interface pattern, and I wonder how it would looks for " Caller Side Interface Pattern". In this post I try to visualize and summarize it. Client Side Interface Pattern The idea of client-side interface pattern is to put the interface type on client package. by doing this, we only write interface once for all controllers,  less freedom when writing caller code. package controller import "project/usecase" func New(u usecase.Usecase) *controller { return &controller{ u, } } type controller struct{ u usecase.Usecase } func (c *controller) InsertData() { c.u.InsertDataToDB() } package usecase func New() Usecase { return &usecase{} } type Usecase interface{ InsertDataToDB() } type usecase struct{} func (u *usecase) InsertDataToDB(){ return } Caller Side Interface P...

Belajar Laravel

Gambar
Bagi para developer web, nama "Laravel" sudah tidak asing lagi didengar. Laravel adalah salah satu framework PHP yang memudahkan developer untuk membangun aplikasi berbasis web. Berbeda dari CodeIgniter dan framework lainnya. Laravel memiliki keunggulan yang katanya memungkinkan penulisan kode lebih singkat dan rapih. Berikut bookmark referensi yang saya gunakan untuk memulai menggunakan laravel. http://tutsnare.com/how-to-install-laravel-on-ubuntu-lamp/ http://code.tutsplus.com/tutorials/authentication-with-laravel-4--net-35593 http://laravel.com/docs/5.0/ https://laracasts.com/discuss/channels/general-discussion/laravel-5-forms http://id-laravel.com/ https://laracasts.com/series/laravel-5-fundamentals/