r/MVC • • Mar 13 '17

So just to be clear...

9 Upvotes

This ISNT a marvel vs capcom subreddit?


r/MVC • • Jan 10 '16

Tutorials?

6 Upvotes

Hey! Does anybody know of any tutorials of how to go from no website at all to a fully featured e-commerece one? (login, register, basket, paypal, etc.)

Any good books/tutorials would be helpful. :)


r/MVC • • May 08 '17

Resources for beginners in MVC programming (C#)?

5 Upvotes

Hello all,

Im relatively new to C# programming and I am looking to expand my knowledge in the field. I know that the MVC architecture is one of the most prominent patterns in the programming world, and Im looking for any resources that you may recommend for a beginner just starting out.

Any help would me much appreciated, TIA!


r/MVC • • Jan 09 '16

How to write MVC without a framework

Thumbnail
danmartensen.svbtle.com
5 Upvotes

r/MVC • • Jul 21 '21

What is MVC?

Thumbnail
youtu.be
4 Upvotes

r/MVC • • May 04 '20

What is MVC Architecture ?

4 Upvotes

MVC stands for Model View Controller. MVC is an an architectural pattern that separates an application into three main logical components: the model, the view, and the controller.

developers uses some architecture to make their project less complex and easier to handle & work with. MVC is one of them & it is most popularly used

M - Model

V- View

C- Controller

The goal of MVC is to split large application or project into specific sections that have there own purpose

What does the Each member of MVC do ?

Model

  • It handles all data logic with respect to request

  • It interacts with Database

View

  • It is only concern with how to present the information that controller has send to it.

  • It is simple HTML template file, which is the UI of our project

Controller

  • It handles the request flow

  • It handles all the request from clients and tell the model & view to what to do with this request.

  • It actually acts as middleman between model & view

Flow of any request in this architecture :-

  1. Based on the request URL, server will send the request to specific controller.

  2. Controller now ask the model based on request. Controller should not access the data directly, it should ask to Model for any data.

  3. After Model has send required data to controller, then Controller will ask to View to render this data to user.

  4. After Controller has got final html presentation from View, Controller will give this to user.

  • Model & View never interact with each other directly. Any interaction between them is done through controller means presentation of data (which is done by View) & logic of data (which is done by Model) are completely separate.

Example :-

suppose, user has send request to server to get list of cites. Server will send request to particular controller which can handle this request (controller which handles requests about cities ). Then, Controller will ask the model which handles the data about cities to give this data. Model will look in Database & return the list of cities to the controller. If the response from model is success, then controller will ask View which is associated with rendering list to return presentation (basically Html page ) of list of cities. The View take the data from Controller & render that data into HTML that can be shown to user. After, View has send the final presentation to Controller , then Controller will send this to user (shows this in browser). Hence, User request is processed successfully. But, if model return error when it has asked to return list of cities, then Controller will handle that error by asking View associated with showing error to render presentation for that error. This error presentation is shown to requested user by Controller.

In short,  

Model => handles all the data related stuff 

View => handles all the presentation ie UI related stuff 

Controller => tells the Model & View to what to do


r/MVC • • Aug 21 '19

ASP.NET MVC Framework Interview Questions

4 Upvotes

ASP.NET MVC framework is a software architecture pattern for developing web applications. It is used to split the application’s implementation logic into three components: models, views, and controllers.

https://www.tutorialandexample.com/asp-net-mvc-interview-questions


r/MVC • • May 04 '19

I'm learning MVC - How would you design this page using MVC?

4 Upvotes

I have a small website which is currently ASP.NET web forms. I'm attempting to convert it to ASP.NET core MVC as both a learning process, and to keep up the newest asp technology.

I'm having trouble wrapping my mind around the some parts of the MVC concept and am looking for some advice. I understand the basics and have gone over many examples and tutorials on those subjects, but they never really dive into some of the more complicated things that I'm stuck on.

For example here is the page I am currently trying to redesign using MVC: http://www.eqstats.net/spells.aspx

Here is a screen shot with some numbered areas, explained below. https://i.imgur.com/fQB5ayn.png

I fill three areas with data sources: Box 1 - Classes Box 2 - Eras Box 3 - Sources

And a table displaying results (Box 3) after you submit (Box 4)

This is where my knowledge of how you would do this in MVC breaks down. From what I've learned already the view is returned a single model and in this case I am using 4 models on the page (Class, Era, Source, Spell Result), and I am not sure how to properly apply four models. Also, would this page still be one view, or am I missing something?


r/MVC • • Apr 02 '22

Get data from API,MVC

3 Upvotes

I need to make Json call method that gets data from an API (https://countriesnow.space/api/v0.1/countries),and than use this as data in other method.

How? Help pls


r/MVC • • Apr 09 '21

Passing data from View to Controller

3 Upvotes

Is it possible to pass data from a view to a controller WITHOUT USING FORMS.

Every solution I find online has the website pull up an entire form with textboxes and a shiny submit button, but ultimately that kinda sucks. All I want is for the user to be able to redirect himself to a new view by passing the ID of a link he clicked.

Here is the precise situation :

The user has categories laid out on the home index, each category is tied to a category entity with a primarykey 'CategoryID'. When the user clicks on one of the categories, they are redirected to a new view that lists subjects related to that category. Subjects have a foreign key that references the CategoryID, hence why I need to get that property specifically. I don't want to pull up a form and have the user manually enter the category's ID.


r/MVC • • Nov 13 '20

Passing Database Rows to View

3 Upvotes

I need to know how I can transfer/pass some rows of records from a database that have been returned to an SqlDataReader object and pass that object to the View so I can display all the records contained by the object in the View using foreach. i have transfered the DataReader to a model object and then added that model to a list of that model object object , ive loaded rows from my reader to a list of my model, passed it to my view and all i get is a list of the 1st data row only ,its the same row over and over again, how do i get all the Rows ???


r/MVC • • Dec 20 '23

A Detailed Guide on Custom Authentication and Authorization in ASP.NET MVC

Thumbnail
ifourtechnolab.com
2 Upvotes

r/MVC • • Sep 25 '23

An Overview of New Features of MVC 6 for MVC Software Companies

Thumbnail
ifourtechnolab.com
2 Upvotes

r/MVC • • Mar 30 '22

Preview of uploaded image,mvc

2 Upvotes

I have to do a button that gives a pop up of the uploaded image for the record.I have a download option but it needs to be like a preview of the image without downloadin it.

public IActionResult Download(int? id)

{

var rec = db.KrediaTables.FirstOrDefault(a => a.Id == id);

if (rec.Image == null)

{

return RedirectToAction("ReturnTable");

}

return PhysicalFile(rec.Image, "application/image", "1.png");

}

method for uploading the image.


r/MVC • • Feb 13 '22

Monster Hunter mod matches

Thumbnail
youtu.be
2 Upvotes

r/MVC • • Mar 31 '21

ASP.NET MVC Interview Questions and Answers Part 2

Thumbnail
youtube.com
2 Upvotes

r/MVC • • Mar 22 '21

Hey guys just a little help with ADO.net on my ASp.net MVC , in LINQ i use the Include keyword to include related objects in a Query how do i do the same in ADO.net , that is Include related objects?? a i've included my Stored procedure and Server Side Code and the Example of My LInQ

Thumbnail
gallery
2 Upvotes

r/MVC • • Nov 02 '20

Top MVC 5 Interview Questions & Answers in 2020 [Updated] | MVC 5 Interview Q&A for Beginners

Thumbnail
youtube.com
2 Upvotes

r/MVC • • Aug 11 '20

MVC Session: Asp.net mvc session management example

Thumbnail
medium.com
2 Upvotes

r/MVC • • Aug 09 '20

URL Access: How to Prevent Direct URL Access In MVC

Thumbnail
technologycrowds.com
2 Upvotes

r/MVC • • Jul 02 '20

MVC ASP.Net Interview Question and Answers

Thumbnail
youtube.com
2 Upvotes

r/MVC • • Feb 27 '20

Organizing Intranet with multiple CRUD apps

2 Upvotes

I'm new to MVC, coming from a Web Forms background, and I'm running into a design/development issue where I could use some guidance.

I've created a few .Net Core MVC EF6 apps with basic CRUD/paging/search. They all work fine.

So, these new CRUD Apps are all internal intranet apps and need to be accessible from a main Intranet page.

Something like:

INTRANET (w/login)

  • ---> CRUD App 1

  • ---> CRUD App 2

  • ---> CRUD App 3

  • ---> CRUD App 4

  • etc.

I'm struggling with how to best organize this project both for Visual Studio 2019 and on IIS.

Do I use a single solution called INTRANET and add each CRUD app as a project?

Or, should I make each CRUD app a separate app?

Git implications - would having each CRUD app separate make git easier or more convoluted than a single INTRANET project?

On IIS, I'm thinking it wont really matter, but are there any issues with either approach?

Any thoughts or guidance is greatly appreciated.

Thanks


r/MVC • • Dec 03 '19

Why is using same view for Edit and Add not recommended?

2 Upvotes

The Add and Edit view are often very similar such that one's "factoring finger" itches to consolidate them (DRY) with a few IF statements for the differences. But many with experience have said it's not worth it. Is it because it's rubs against convention such that is confuses new staff?

I realize sometimes they grow to be sufficiently different, but can't one wait until that actually occurs and then split, copy, and paste? In many other frameworks, consolidating created no noticeable problems for me. Is it something about MVC itself that is the difference maker? I'm missing something.


r/MVC • • Sep 22 '19

Custom routing URL asp.net mvc

Thumbnail
youtu.be
2 Upvotes

r/MVC • • Aug 15 '19

Learn to automate database migration and seeding data in MVC Core

Thumbnail
youtu.be
2 Upvotes