Tagged Questions
MVC (Model-View-Controller) is a software architecture pattern that enforces separation of concerns.
-1
votes
0answers
15 views
What should be set in the vhost and what should be set in config
When using a framework in PHP, is it better to set the environment (DEV, STAGING, LIVE) and directory specific php environment variables as ignored files in the repo, or in the individual vhosts?
...
1
vote
0answers
37 views
Wicket MVC architecture, where is the Controller?
I have been developing in Wicket for over a year now and this one really bugs me. From my point of view, Wicket's models just plainly omit the Controller layer of an MVC application. Yet, I'm not ...
0
votes
0answers
54 views
How to implement dependent (searchable) select boxes
I have implemented a screen which has a number of select boxes (dropdowns) which are dependent on the contents of other fields (usually other select boxes). They also need to be searchable (e.g., like ...
1
vote
1answer
123 views
MVP pattern and references
I am doing a Windows C# application.
I asked this question and I was told that the viewer/presenter should never know anything about the model. Does this mean that I should not add a reference of my ...
2
votes
3answers
70 views
Where should user permission checks take place in and MVC and by who?
Should user permission checks take place in the model or the controller? And who should handle the permission checks, the User object or some UserManagement helper?
Where should it happen?
Checking ...
1
vote
4answers
252 views
+50
MVC to create desktop and mobile webapps?
I'm planning the creation of a webapp with a dedicated mobile web interface and a dedicated desktop/tablet interface.
I am considering ASP.NET MVC, but it is clear to me that MVC is for separation of ...
1
vote
1answer
45 views
HMVC and Database Connections
Whilst I have good experience with OOP, I'm fairly new to the concept of (H)MVC. I understand the basic concept of modular design that comes with HMVC, it's the great attraction of it. But one thing ...
2
votes
2answers
71 views
We have a custom program that generates all the stored procs and classes for the Data Tier. Where will I put the generated classes?
This is more of an architectural question regarding MVC and Data Access:
We have a custom program that generates all the stored procs and classes for the Data Tier from the MS SQL database. It's ...
1
vote
2answers
208 views
Is there a design pattern that describes the separation of a Form from a Model
I am working on a web application implemented in C#, that follows MVC conventions.
This application contains a page that allows me to create or update a Wingding. The view passes a complete Wingding ...
0
votes
0answers
50 views
MVC structure suggestions
I want to create an application i.e svg-edit that use javascript for client side operations but I want to integrate it with ExpressJS.
Svg-Edit on the client side contains the folder containing the ...
0
votes
1answer
63 views
How to update User interface form through database update
I have a client server application. Assume I work as a Support executive, resolving customer tickets. We(our support team) have got two tickets to work on.
Ticket 1: Client "Liver" raised a ticket ...
0
votes
1answer
23 views
how do you style content when querying a data structure nested n-levels deep?
This question has come up while writing a simple text adventure game where your character has an inventory, which can include containers that also have things in them. I want a clean way to style the ...
0
votes
2answers
36 views
What could be the Model Layer when consuming Web-Services and no Database in Django?
I'm using Django as an application framework and it only needs to consume web services (no need to have traditional Django Models and the related ORM).
In this case, since Django is a variant on the ...
2
votes
0answers
138 views
Is this any form of service pattern, some other pattern, SOA or just an anti-pattern?
I'm going to set out a scenario/pattern I've encountered and then I have a few questions pertaining to it.
During an MVC request in a web framework (PHP, Laravel in my case), if I have an abstract ...
0
votes
2answers
78 views
MVC sending information from view to controller
I am using the MVC pattern.
Lets say I want to create a new object and add it to my database.
Where is it better to create the new object:
View:
Boo boo = new Boo("awesomness");
...
0
votes
1answer
220 views
REST API at backend and MVC Javascript framework at client side
I am building an online social network. I have finished writing RESTful API service using Django. This will return only JSON response (No HTML will be generated from server side) so that this JSON ...
0
votes
3answers
206 views
MVC Design Pattern to Combine Multiple Models for use
In my design, I have multiple models and each model has a controller. I need to use all the models to process some operation. Most examples I see are pretty simple with 1 view, 1 controller, and 1 ...
0
votes
1answer
338 views
Making Class Diagram for MVC Pattern Project
I have a question about making a class diagram for an MVC based college senior project.
If we have 2 actors of users in my system, lets say Undergrad and Graduate students are the children of ...
1
vote
3answers
132 views
MVC is a GUI Architecture or a Architecture to GUI and Domain?
Fowler refers to the MVC, as a GUI architecture:
There have been many different ways to organize the code for a rich client system. Here I discuss a selection of those that I feel have been the ...
1
vote
5answers
344 views
Business Logic Layer in MVC Application
In my ASP MVC application I decided to add another Business Layer and made the model only to have properties.
All other functionality like save to db, get from db is done on this new Business layer. ...
0
votes
2answers
104 views
What are the steps to grouping related classes into packages
What are the steps needed to be taken to group related classes into packages in Java?
In my case, I have about a number of .java files that I'd like to group into 3 packages according to the MVC ...
0
votes
1answer
140 views
Implementing separation of concerns via MVC
I'm creating a question to see if my understanding of MVC separation is correct, I haven't been able to find a clear answer anywhere online. So is this the right way to implement it (in Java):
I ...
4
votes
3answers
203 views
Tell a user whether they have already viewed an item in a list. How?
It is pretty common for a web application to display a list of items and for each item in the list to indicate to the current user whether they have already viewed the associated item.
An approach ...
1
vote
3answers
134 views
Law of Demeter in MVC regarding Controller-View communication
The scenario: Having a Controller that controls a view composed of complex subviews.
Each one of those subviews is a separated class in a separate file. For example, one of those subviews is called ...
2
votes
1answer
117 views
Is it bad practice to call a controller action from a view that was rendered by another controller?
Let's say I have an OrderController which handles orders. The user adds products to it through the view, and then the final price gets calculated through an AJAX call to a controller action.
The ...
13
votes
4answers
571 views
Switch vs Polymorphism when dealing with model and view
I can't figure out a better solution to my problem. I have a view controller that presents a list of elements. Those elements are models that can be an instance of B, C, D, etc and inherit from A. So ...
2
votes
2answers
140 views
Permissions and MVC
I’m in the progress of developing a web application. This web application is mostly a CRUD interface, although some users are only allowed to perform some actions and see only some parts of views.
...
4
votes
4answers
195 views
Business rule to display data in all uppercase - how to handle?
Part of a system I am working on manages some securities information (stocks, bonds, etc...) and business rules specify certain fields be displayed only in all CAPS (stock symbols and CUSIPs for ...
0
votes
2answers
165 views
ASP.NET MVC create a draft without persisting to DB
I have a requirement to allow users to suggest updates to their profiles on a site I'm working. They would be able to view their profile details, then click on and "edit" button, which would basically ...
4
votes
2answers
504 views
Best Practices PHP mvc routing
I have a custom MVC framework that is in a constant state of evolution. There's a long standing debate with a co-worker how the routing should work. Considering the following directory structure:
...
3
votes
2answers
899 views
.NET MVC project architecture / layering
When planning the architecture for a mid-large scale MVC web application how do you implement the layers to be as decoupled as possible and easy to test? (basically follow best practices) Let's say ...
4
votes
2answers
395 views
Managing threads in Java with a good pattern
This morning I began writing a minimal chat using Java socket and threads but it took some minutes for me to experience a lot of problems in the MVC management.
Currently I have 3 classes:
Main, ...
1
vote
1answer
747 views
Java desktop application using MVC + Hibernate
I'm developing a Java desktop application. I'm planning to use MVC architecture described at Oracle site: Java SE Application Design With MVC.
I need to store data in database so I decide to use ...
1
vote
2answers
377 views
Use a service layer with MVC
If a controller gets to fat and model instantation starts to add up a service layer could be used.
If I just wrap the logic inside a service class I will get a bunch of Services with one/two ...
1
vote
2answers
93 views
MVC Models instantiation
Where should the Models be instatiated in a MVC arhitecture? I understand the preferred way would be outside controllers, in a bootstrap file and injected using a Dependecy Injection Container. But ...
1
vote
1answer
73 views
how to model a connection to a resource, with rudimentary event processing
For my simple MUD client I'm using Apache Telnet (no, not ssh). A mud client is a strange beast:
Generally, a MUD client is a very basic telnet client that lacks VT100 terminal emulation and the ...
4
votes
2answers
555 views
How does MVC work with the principle “Tell, Don't ask”?
Procedural code gets information then makes decisions. Object-oriented
code tells objects to do things.
— Alec Sharp
So, when a view wants to display some information that is suppose to be ...
2
votes
1answer
1k views
Template for Visual Studio for starting AngularJS / ASP.NET Web API dev. Do I need ASP.NETMVC anymore? [closed]
Anyone know of a template.. or information on a proper structure to create a Angular/Web API site? I have been trying to find a good starting point. Should I use the MVC/Web API as a starting point ? ...
8
votes
2answers
4k views
Mixing Angular and ASP.NET MVC/Web api?
I come from using ASP.NET MVC/Web API and now I am starting to use Angular but I am not clear on the proper way to mix them.
Once I am using Angular does the MVC sever side concepts still provide any ...
1
vote
2answers
307 views
What about using MVC as the way to provide Responsive Web Design?
Responsive Web Design shows the user different elements -- or elements arranged in different ways -- by using media queries (if the device is a desktop or laptop, show them this; if a tablet, show ...
1
vote
0answers
122 views
Identity Design ASP.NET
I am trying to design a system with the below features, and am currently trying to figure out best way to handle Identity :
There will be multiple decoupled parts of the system, with same customers ...
2
votes
2answers
193 views
Is state pattern a good solution for implementing UI changes for Landscape and Portrait modes?
For our iOS app, a lot of complicated UI logic depends on the interface orientation of the ViewController. This conditional logic is present in a lot of places.
Can it be segregated into different ...
6
votes
4answers
378 views
Clean, Modular Code vs MV* Frameworks [closed]
I've been hearing a-lot about the "new" MV* frameworks. I've tinkered with KnockoutJS, creating an invoicing application, but I much prefer to write clean, modular code in raw JavaScript - leveraging ...
2
votes
3answers
466 views
Good practice for object instantiation in MVC
In MVC the Domain Models(from Model Layer) should instantiate other Domain Models or all the Domain Models should be instantiate in the controllers and passed down using Dependency Injections?
How do ...
22
votes
8answers
2k views
MVC Architecture — How many Controllers do I need?
I have been coding for a while, but mostly scripts and simple applications. I've moved into a new role where it is all about developing Web Apps and using a proper MVC architecture, so I am ...
2
votes
1answer
445 views
Do MVC web frameworks favor anemic domain model in order to avoid duplication?
Binding directly the form to your model helps a lot to get rid of boiler plate code, but that means that your model must have a getter/setter for each property otherwise it wouldn't be possible. ...
32
votes
5answers
2k views
What are the downfalls of MVC? [closed]
I've been using MVC/MV* since I started actually organizing my code years ago. I've been using it so long that I can't even think of any other way to structure my code and every job I've had after ...
2
votes
0answers
93 views
Should I use JavaFx properties?
I'm usually very careful to keep my Model, View, and Controller code separate. The thing is JavaFx properties are so convenient to bind them all together. The issue is that it makes my entire code ...
1
vote
4answers
317 views
Is it fair to call a database or a document a “Model”, as in Model/View/Controller?
Part of my job is working on line-of-business applications built around client-side databases, such as Access or FoxPro. Other times these local LOBA's have direct document access, such as an exact ...
0
votes
1answer
157 views
Zend Framework 2 - Keeping all the models and mappers in Application module?
I am in process of planning web application by following the best practices and approaches of software development. I am building this application using zend framework 2 and going through its ...