3 issues LiveView development in Go resolve efficiently for small teams
Tags: go
Published: 2023-02-02 14:56:13

---
title: 3 issues LiveView development in Go resolve efficiently for small teams
published: true
description: LiveView like programming in Go language. Effective coding for a small teams.
tags: go
---

If you are a freelancer or working in a small development team, you are probably aware of many related benefits. [Many good articles](https://betterprogramming.pub/is-a-one-person-development-team-optimal-f8aca9872ccc) reference different research outcomes on that topic.

**We can mention just a few useful things that help small teams with sustainable software development.**

* an easy-to-understand implementation supporting a long-time software maintenance
* complex features implemented with less code
* using one development language (Go in this case) as much as possible
* using a limited amount of familiar technologies because whatever you use in your project, you will have to maintain for years

![Small teams](https://miro.medium.com/max/640/1*WDdyBuCnZTzrjzQosfmenw.webp)

And here it is, where LiveView programming concepts help us in a great way. [LiveView](https://github.com/jfyne/live) uses websockets to create a persistent connection between the client and the server, which enables the server to push updates to the client in real-time. This allows developers to build interactive user interfaces that can update dynamically in response to user actions or changes in the application state, without the need for traditional page reloads or AJAX requests. LiveView programming style is based on this excellent Live project that is an implementation of the LiveView approach in Go.

**[LiveView programming style](https://medium.com/@dmarko484/mastering-liveview-development-in-golang-5fdae1ebba2c) can bring a significant boost in at least 3 key areas:**

* **Smaller codebase (less code)** — the entire LiveView abstraction and internal implementation require less code for implementing a complex frontend to backend communication. No REST endpoints are needed, almost no JavaScript is needed, and no DTOs and converters are needed as all is being done in a backend. Browser-to-backend communication goes through the websocket and is fully managed by the LiveView library. We just rely on facts, that things just work.
 
* **Go language only** — as much as possible — most of the tasks providing communication between frontend and backend are managed by [Live](https://github.com/jfyne/live) internally. We use Go for updating UI stuff, the codebase is in one place and there is no need for endpoints, DTOs, ajax calls, etc. We don't need Angular/React or Vue developers in a team.
![Live](https://miro.medium.com/max/214/1*ufExBUwOQDKpcSB6D-b3hQ.webp)
 
* **Easy to understand code** — declarative approach — LiveView programming and implementation approach are sort of declarative. We define LiveView browser actions(events) as HTML tag attributes and LiveView provides instrumentation for making it live.
On the backend side, we are implementing event handlers in a declarative way also, and Live is responsible for internal routing so the appropriate event handler is called when the user triggers a button on the screen. (to be honest, you don't need to know anything about websockets to use LiveView programming)
 
![Template](https://miro.medium.com/max/720/1*gM8s3ueRB-bdyelSZ0DGOg.webp)

![Code](https://miro.medium.com/max/640/1*PGsQyIsu5j6oJ94mUfPxRQ.webp)

If you are a long-time developer, part of your job is to maintain existing applications running successfully for years. Understanding how the flow is going, and being able to fix something or add a new feature quickly is a key thing. LiveView programming approach is a real game changer here for the last couple of years and is available in Go now.

**Several useful links for supporting/explaining a LiveView idea:**
* https://medium.com/@dmarko484/mastering-liveview-development-in-golang-5fdae1ebba2c
* https://elixirschool.com/blog/phoenix-live-view/
* https://fly.io/blog/liveview-its-alive/
* https://github.com/jfyne/live (Go implementation of LiveApproach)

Are you still with me? Nice. If you are interested in details and can get a full idea how you can use Live View programming approach in Go, you are welcome to take a part in this new Udemy Course "[Mastering Live(View) development in Go](https://www.udemy.com/course/mastering-liveview-development-in-go-golang/?referralCode=17A93DEEFD7A2D0930CC)" .

![Course image](https://cdn-images-1.medium.com/max/800/1*8Eafo7BXQJFSUF0csrhwhQ.png)