MVC (Model-View-Controller) is a software architecture pattern that enforces separation of concerns.
-1
votes
0answers
14 views
MVC Application Extension reusing the service / dao layers
I am about to start my own project spun off a greater Opensource project. I am trying to get my head around best practice, both in terms of application portability and stability.
To explain: ...
-4
votes
0answers
25 views
How to remove session id from asp.net mvc url when cookieless is set to true? [on hold]
To achieve session per browser tab, cookieless is set to true. But this is creating url in the format "{site url}/{session id guid}/{controller}/{action}".
But, I need url of the format "{site ...
3
votes
0answers
183 views
MVC: Where is the right place to set error messages?
I have a ASP.NET MVC application where in all my Models have an Errors Property used to store non-validation errors which I than display in my Views. Where is the right place to populate the error ...
0
votes
0answers
57 views
The finer points of HMVC
I'm new to HMVC and whilst tutorials are great about dealing with the overall details of keeping modules separate and only letting controllers communicate, they aren't so great at explaining the ...
0
votes
0answers
38 views
Should there only be one controller per page within a JavaScript-based MVC architecture?
Let's say that I create a page in my marketplace web application where buyers can see a catalog of all products offered by some or all sellers or sellers can see just their own products in a preview ...
0
votes
0answers
8 views
Access public property of object on view
When we are working with some MVC FW on PHP, generally we have a view loading function like load(string viewName, optional array viewVariables). My doubt here is: if we are working with some object, ...
1
vote
0answers
74 views
How to efficiently handle related data in MVC?
Talking about MVC with servlets and JSP's, in a context about products and manufacturers , when querying the application for a list of products:
the servlet loads a list of products from the ...
2
votes
1answer
82 views
Should this interpretation happen in the Controller or the Model?
Imagine an application where the user is allowed to create his/her own musical scales. The user selects notes from a list, arranges them to a group and presses a button to create the scale.
In an MVC ...
0
votes
1answer
16 views
How to run a function and load Viewbag on every page load?
Here is my issue. On my _Layout, I have a help button that shows up on every page in my MVC application. Is there a way to assign the Viewbag with my simple model without having to put in every ...
1
vote
1answer
90 views
How to tell the View to create a cookie?
I have a LoginService class with loginUser($email, $password, $remember = false) method in the application layer of my model layer.
Now, if $remember is true it needs to create a persistent user ...
0
votes
0answers
28 views
How to determine what should get it's own respective controller?
I'm using the MVC pattern in my web application built with PHP.
I'm always struggling to determine whether I need a new dedicated controller for a set of actions or if I should place them inside an ...
0
votes
1answer
34 views
How to avoid model duplication in JavaEE web applications with a JSON front end
Recently we developed a web app that uses the following tech stack:
hibernate as orm
spring
extjs (MVC javascript front end)
For 1 business object, let it be a Personnel, we have:
1) a Personnel ...
1
vote
1answer
134 views
In MVC design, do I use a base class over an interface?
In web MVC most designs I've seen, (just choosing model layer as an example) the domain problem class, say students, always inherits the superclass "Model." The name is irrelevant, but why do they ...
0
votes
0answers
91 views
Login from external application in MVC
We have an ASP.Net MVC application that use Identity provider to authenticate users. A new customer now wants to access owr application pressing a button inside their winform app.
I started to modify ...
-1
votes
0answers
65 views
Helping with creating own PHP MVC - how to write good router
1 year ago I created wannabe-MVC in PHP (some parts procedural, some in classes), now I'm intending to expand it a further to be more like real MVC.
Folder/files structure:
html/
html/images/
...
0
votes
1answer
135 views
How do I keep my classes in MVC from becoming bloated?
I'm not sure how I should have worded the question.
If I have a Student and Classes database, and I have queries that involve both. Where do I put my queries? In one case, someone wants student ...
1
vote
1answer
84 views
Is routing a site with RESTful not the best when you have very long URLs?
I've read a lot about RESTful, but I have always had a hard time figuring out how I'd use it with a very long query string. This is an in-house project, and it won't always have a simple /someAction ...
0
votes
0answers
146 views
Using ng-init to initialize data in Angular controller
Recently I came across the following in one of our projects. In one of our mvc views they are passing model data to an Angular controller through ngInit directive
In xxx.cshtml
<div ...
0
votes
2answers
42 views
Issues regarding new instances of controllers on view pages [closed]
Is there any issue with creating a new controller within the ascx view pages. I don't want to create a model, are there any issues with doing it this way.
Normally, the controllers control variables ...
0
votes
1answer
50 views
The ViewController design in iOS vs MVC in tradiational web apps design
As I came from the background of webapps and move to iOS programming, I am wondering why we can't just apply the MVC design approach to native apps,
i.e. in iOS, the view and controller are tightly ...
1
vote
0answers
104 views
Why should ViewModel route actions to Controller when using the MVCVM pattern?
When reading examples across the Internet (including the MSDN reference) I have found that code examples are all doing the following type of thing:
public class FooViewModel : BaseViewModel {
...
0
votes
1answer
18 views
MVC helper functions business logic
I am creating some helper functions (mvc.net) for creating common controls that I need in almost every project such as alert boxes, dialogs etc.
If these do not contain any business logic and it's ...
4
votes
2answers
132 views
Strategy to use two different measurement systems in software
I have an application that needs to accept and output values in both US Custom Units and Metric system.
Right now the conversion and input and output is a mess. You can only enter in US system, but ...
0
votes
1answer
139 views
In MVC, why can't a model create a view?
I have a web application written in Perl with a controller, some "views" and some "Models". Each "Model" is corresponding to one "View". The controller (one file) creates an Model object ...
3
votes
1answer
149 views
Project structure: where to put business logic
First of all, I'm not asking where does business logic belong. This has been asked before and most answers I've read agree in that it belongs in the model:
Where to put business logic in MVC design?
...
0
votes
1answer
98 views
Can't understand on how to implement MVP/MVC for my software requirements [closed]
Recently I decided to start developing a client/service based system using WCF and a Duplex Channel (callbacks from Service to client). The clients will behave as "slaves", that is, they will only ...
0
votes
2answers
38 views
Separating roles authorization and database
Something really bothers me about the way authorization tends to be done with roles in ASP.NET MVC.
The way it is normally done is that you have a Users table and a Roles table. A User can have many ...
3
votes
0answers
85 views
Are promises suitable for Model Controller communication?
I have an Express app built with the Yeoman Angular fullstack generator to build an API to send JSON to Angular.
I'm trying to work out the best way to pass back information from my model to my ...
0
votes
1answer
29 views
How to update last accessed with Forms Authentication cookie
I've got an MVC 4 site where I'm using Forms Authentication. I'm setting a cookie when a user logs in. The majority of my site does NOT require a user to be logged in though.
What I'd like to do, ...
1
vote
1answer
65 views
Should my internal MVC/MVVM application use Web Services for Persistence?
Just talking about internal applications or intranet web apps... At some companies I've seen their business-logic piece (Model in MVC/VM in MVVM) on one (or both) sides of a Web Service. And on the ...
1
vote
2answers
117 views
Implementing a simple controller in embedded C
Is there a known method or pattern to implement a simple controller for an MVC design in pure C or the switch case approach is the standard?
Background :
I have an embedded application and I'm ...
1
vote
1answer
113 views
Clarification about MVC Design pattern
I've been reading up on MVC and I had a doubt. The example where the Model, View and Controller are all individual classes whose objects are created and used to deploy the application in another ...
0
votes
1answer
27 views
What is the Controller in Django MVC?
Learning Django MVC and the way I thought of it is:
Models are the database tables represented in Django as Python classes.
Views are the HTML returned from function in views.py.
Controllers are the ...
1
vote
1answer
220 views
Best practices for implementing MVVM and MVC in delphi Pascal
I'm a Delphi pascal programmer, I use the latest Embarcadero delphi XE, and I would like to take advantage of design patterns such as Model view controller and model view view-model.
However, there ...
0
votes
0answers
44 views
MVC class modeling
I have following requirement and I am trying to design class diagram. This is the first time I am creating class diagram so I would like to get some advice from experts.. :)
This is a simple login ...
1
vote
0answers
38 views
MVC: view/sidebar.php can load model?
I have a Route that activates a Controller which returns to me a page through a View. Let's call it master page.
route -> controller -> view [master page]
The master page is divided into header, ...
0
votes
0answers
27 views
Proper program design for submitting a form
I have been stuck wondering what the best solution to the problem below:
I am developing a form like GUI with quite a few places for input. Currently, I am storing each UI element in an ArrayList ...
9
votes
6answers
2k views
Can someone help me understand MVC? [duplicate]
I've read a few articles on the MVC pattern and tried to understand what it exactly is. But till now, what I get is a plain diagram showing 3 modules of Model, View and Controller. Some say that it ...
0
votes
1answer
97 views
Where and how to reference composite MVP components?
I am learning about the MVP (Model-View-Presenter) Passive View flavour of MVC. I intend to expose events from view interfaces rather than using the observer pattern to remove explicit coupling with ...
0
votes
2answers
98 views
Should I Make my ASP.NET MVC N-tier?
I'm currently building a very small website, around 20 to 30 views, 10 controllers.
I know MVC is only a design pattern and should only be the top presentation layer.
I'm currently at a stage in ...
2
votes
1answer
141 views
Choosing between the view and the controller for my code
I'm aware there are a lot of topics about MVC design but it's hard to find good explanations: what I should do, what are the consequences of the different possibilities...
So I'm working on an ASP ...
0
votes
1answer
78 views
Developing pages in MVC website that will be specifically used as an iframe by another website
I have a website where I'm going to be partnering with another website. They want to view one specific page of mine, in their [WordPress] website. They aren't developers, so I looked into how to do ...
4
votes
3answers
142 views
MVC and the business rule
I need to know where in the MVC should I apply the business rule.
Imagine the situation: I have a school and I need to generate a calendar of classes for teachers. Each teacher has a school subject ...
0
votes
0answers
55 views
what is the technical term for this presentation model?
I have an application I've inherited that I'd call "proto-MVC", and I love the concept of MVC but am new to it.
In my ideal dream of a lightweight application, all of the document's content is stored ...
1
vote
0answers
234 views
MVC content management framework with an admin panel
I've lately been developing my own MVC content management system using PHP and, at least in my mind, am a little stuck with the system design. I believe this would apply to building a content ...
1
vote
2answers
220 views
Entirely separate business logic layer from MVC
We are currently refactoring our controller methods in ASP.NET MVC application.
At the beginning we've separated data access layer (our goal was to remove LINQ from controllers entirely). Now we are ...
2
votes
1answer
80 views
Translating views in MVC
What is the best practice, when it comes to views' translation in MVC design pattern, in multilingual website:
Always have only one view file and translate its particular strings with a framework ...
3
votes
2answers
98 views
Should a view call a function?
Should a view call a helper function?
Say I pass in data from the DB to the view. The data is a unix timestamp. Should I make a call in my view to convert it to a human readable TS or should I ...
0
votes
2answers
152 views
Is it ok to start with templates in MVC development?
I'm new to web development and I've started working on a project in my company that uses DJANGO. I feel it flexible to start my development straight first from the templates. I think it will be easier ...
1
vote
3answers
131 views
What to consider when choosing a framework for a development team? [closed]
As I'm finishing a web development course with a few friends with whom I have worked in many projects we're aiming to begin a professional team of developers. Functions are well defined between ...