LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-22-2020, 04:25 AM   #1
snowmagician
Member
 
Registered: Sep 2016
Distribution: Kubuntu
Posts: 62

Rep: Reputation: Disabled
Question Is my understanding of MVC correct?


( USER )

[ View ] deals with displaying to the user

[ Controller ] deals with dealing with user interactions

[ Model ] deals with the database and the mechanics of the overall application

{ DATABASE } such as Mongo db or MySQL
 
Old 01-22-2020, 07:42 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Seems accurate from the chapter and verse for MVC.

I have to be honest, I'm not a huge proponent of design patterns.

Can I ask, why you're asking?

For me the only reason why things like this ever come up is that they're part of a job description, and I've found many times that they are meaningless to the actual job in question.
 
Old 01-22-2020, 08:47 AM   #3
snowmagician
Member
 
Registered: Sep 2016
Distribution: Kubuntu
Posts: 62

Original Poster
Rep: Reputation: Disabled
1 - I am trying to get a job as a python developer
2 - Python developers are expected to have a GitHub repository and be aware of python frameworks such as Django
3 - Django is based on MVC

You are welcome to tell me advices

Last edited by snowmagician; 01-22-2020 at 08:49 AM.
 
Old 01-22-2020, 09:49 AM   #4
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,603

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
There are several subtly different interpretations/implementations of MVC, so you'll probably get conflicting advice.

For example, I disagree with what you've written and would say something more like:

M = deals with the data model of the application
V = deals with displaying and interacting with the user
C = connects the M and V and controls the flow

But do the differences there matter? So long as the application is correct, easily maintainable, and performs ok, it's not usually a big issue.

Exact definitions are less important than understanding how (e.g.) Django works, so if you're after a Python job then you should focus on learning & practising the skills that will help with that.

 
Old 01-22-2020, 10:10 AM   #5
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,226

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Your top post sounds sounds right for Django, yes.

Note that the reason these web frameworks were called "MVC" was largely to distinguish them from old-timey ASP, JSP and PHP, where you'd have all your code embedded in the HTML pages. Those HTML pages were sometimes called "server pages".

Last edited by dugan; 01-22-2020 at 10:54 AM.
 
Old 01-23-2020, 08:11 AM   #6
SoftSprocket
Member
 
Registered: Nov 2014
Posts: 399

Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post

Note that the reason these web frameworks were called "MVC" was largely to distinguish them from old-timey ASP, JSP and PHP, where you'd have all your code embedded in the HTML pages. Those HTML pages were sometimes called "server pages".
My memory suggests MVC goes back to Smalltalk and the GoF and migrated into Enterprise Java where they created an administrative mess of job titles in an effort to remove any creativity form the hands of programmers and give management the sense that their projects won't lead them on the path to ruin. I'm not sure it worked.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How should I use MVC meta pattern in Java viroos Programming 1 02-07-2009 06:20 AM
LXer: Develop Spring apps for WebSphere: Spring MVC LXer Syndicated Linux News 0 05-26-2007 12:17 AM
LXer: Spring MVC: Using Web view technologies LXer Syndicated Linux News 0 02-05-2007 08:33 PM
LXer: MyFaces and Facelet Java-based MVC Web apps LXer Syndicated Linux News 0 10-26-2006 12:03 AM
LXer: Struts, an open-source MVC implementation LXer Syndicated Linux News 0 09-02-2006 12:54 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration