How to design MVC with Go Fiber

Hello community,

I am looking for tutorial to build full stack web site with MVC pattern.
Can anyone recommend me the good resource to start with?

BR, TONY.

Hello! There are several excellent online resources for learning how to develop a full stack web application using the MVC paradigm. Here are a few I would suggest:

Microsoft’s “Getting Started with ASP. NET MVC 5”: This instructional series will lead you through the process of creating a basic MVC web application with C# and Visual Studio. It covers everything from configuring your development environment to hosting your application on a web server. It is available at ASP.NET MVC Getting Started | Microsoft Learn.

“The Complete Node.js Developer Course” by Andrew Mead: This Udemy course will show you how to build a full-stack web application using Node.js, Express, and MongoDB. It goes over MVC design as well as other important web development concepts like authentication and security.

William S. Vincent’s “Django for Beginners”: This book will teach you how to create a web application with Django, a Python web framework that adheres to the MVC design. It covers everything from configuring your development environment to hosting your application on a web server.

These links should help you get started learning how to construct full-stack web apps using the MVC framework. Good luck with your studies!

Have a great day.

What part are you struggling with? You can start with the docs and have a working app pretty quickly. When you say “MVC” I’m assuming that means server-side rendering with a templating engine, right? That’s a pretty generic term but GENERALLY in web dev I’ve used it to describe something like:

  • The controller is more or less your routing engine and associated plumbing therein.
  • The model is usually going to be a struct that represents a DB object or something similar.
  • The view is a templating engine which sends HTML back to the client.

Definitions get more complicated if you have a RESTful API and a SPA on top of that (since then you have multiple patterns of MVC) but again, this is generally what I see people refer to as “MVC pattern” with regard to web development. Is that what you’re after more or less?

Anyway, check out the recipes:

Decide on a templating engine:

… and go to town. Here are a few more links for inspiration:

All that said, fiber doesn’t use net/http and is thus a bit of an outlier. Are you sure you need to use fiber? You might be able to find more official support if you use net/http:

https://gowebexamples.com/

Anyway, I don’t think there’s anything wrong with fiber or fasthttp per se. But it seems like you might be a new gopher and it could be a bit jarring to go from that to a web app built using net/http. :slight_smile:

Thanks @Dean_Davidson for good reply. Yes, I new to gopher and I need to build web site for my client fast. After searching awhile I see fiber is good to start, but I don’t realise that it not using net/http. And yes MVC I refer to design patterns (Model, View, Controller).

MVC is a design pattren that sperate an application’s concern into three interconnect components: model included data and logic and the view( user interface), controller ( mediator between model and view). 1. The model contains the application’s data and business logic. Define your data models and any functions that will interact with the data.
2. Define your views: The views are responsible for rendering the applications user interface. In Go Fiber, you can use templates to render your views. then define your routes to map incoming request to appropiate controller fuctions.

Now various framworks are available in mark that are these pattren such as model, view and controller. mainly it has been used in web and desktop field.

Can you share few of them?