mvc

What is the difference between Models, Domains, Repositories and Services in the MVC paradigm?

Are Models and Domains and Repositories essentially the same thing? ...

Where should image proxy reside in a MVC structure? (PHP)

Hello, I'm trying to get to grips with the MVC structure and trying to decide where my files should go. I have a php script which reads an image from a non-web accessible location and outputs it. Does it belong in the Controller or the View? Likewise, should a script that loads a smarty template (from the view) and sets values ...

Struts 2 Validation and Input fields repopulation

If I have the following struts.xml config: <action name="input"> <result>/jsp/input.jsp</result> </action> <action name="result"> <result>/jsp/result.jsp</result> <result name="input">/jsp/input.jsp</result> </action> And a simple form with only one field: <s:form action="result"> <s:textfield name="firstName" label="...

How do I toggle the display for a dynamic id table?

I have a table that displays rows based on a drop down list option. The rows are dynamically created. I use the value on the ddl for the initial row, then a simple counter to make it unique. Is there a way to say something like show all the rows that start with "tableShoes" even though the rows are something like tableShoes1, tableShoe...

Is there a MVC approach that uses PHP for Model and Controller and pure HTML for view while transporting data between them with JSON?

Hello, I just wondered if there is any existing framework or someone has experiences with using entirely static HTML templates that get filled with data provided via JSON from the server. The HTML pages with JavaScript support should fulfill the role of the View whereas Controller and Model are handled by the PHP on the server side. V...

Sample MVC / MVP winforms Application (Non Trivial)

I'm looking for a non-trivial example of MVC/MVP implemented in Winforms (C# .NET). I searched the website but getting only trivial examples, a little more would be helpful. I'm Particularly looking at ways to implement views (view for a master-child model) and controllers/presenters. ...

Filling list data into a data model class C#

Hi All, I'm after some advice on the most efficient approach to stepping through a list of fields and filling in their values to a class object. I currently accessing fields via (code isn't exact but you get the idea =] ): private string fieldName; private int fillValue; SessionData rawdata = new SessionData(); var count = 1; fore...

Ajax.BeginForm uploud file inside html.beginform in MVC 2

how can i add Ajax.BeginForm uploud file inside html.beginform in MVC 2 , the problem the ajax form not working . the html.beginform was submited so how can i do that. please Help ...

What are the differences in the MVC pattern on the web vs desktop?

After doing some reading on the Model View Controller pattern it seems that the pattern is implemented quite differently in web frameworks vs desktop frameworks. With web based MVC frameworks the view and model never communicate directly. They can only communicate with the controller. But in desktop implementations, it seems that the vie...

Viemodel with stored Procedure

I am following the tutorial of scott gu from Here to retrieve the data using stored procedure. i am setting the return type of the stored procedure by dropping the SProc on class. Now my question is that can we set some viewmodel as the return type of the stored procedure, as my view is strongly typed with my viewmodel ...

Module-specific Controller plugins in Zend Framework

Hi, My Zend Framework project is divided into certain Modules. Each Module has some specific Controller Plugins. Now, the problem is that all plugins get loaded and registered (and thus, called) - no matter which module the user is trying to access. I could test in which module we are and stop execution directly in the plugins, but I ...

java MVC + vetoable/deferred property

I have an interface FooModel and a class DefaultFooModel that have a few simple properties. I am getting stuck on a boolean enable property because I want to have this be vetoable/deferred: public interface FooModel { public boolean isEnabled(); /** returns old value */ public boolean setEnable(boolean enable); public void...

mvc 2 jsonresult output

hello, how can i see the raw json output of mvc 2 jsonresult? i need this to enable me debug the results. thanks ...

Should I name my actual controller files the same as my view files in Codeigniter?

I'm writing my first Codeigniter site using the MVC pattern. I'm building some controllers that load views now (haven't gotten to Models yet) but I'm noticing that my View and Controller files have the same filename (like products.php). They are in their respective folders of course. For example I have an About controller, that loads ...

C# Software Design Question: IO Exception Handling Principles and MVC Architectural Strategy

Hi, I think it's a design question, and it's been haunting me since I started my project. I'm working on a project involving a lot IO operations, mainly reading and writing files. I'm trying to use MVC (Model-View-Controler) architectural strategy, but I found it's very difficult to implement, especially with the exception handling. ...

Does SproutCore's "Binding" feature let widgets initiate a call to the server to obtain data?

My team is tasked with quickly evaluating SproutCore and a couple of other alternatives. There's not really enough time for a deep dive, but our findings might let us convince the powers that be to allow for a deeper dive. (Right now, we're just taking a quick glance to see "what's out there"). So me and a teammate have started looking ...

C# 4.0 Generics and ASP.net MVC

It appears that in C# 4.0, variance specifiers are only applicable to interface types. So let's say I have ViewModel / EditModel classes and a simple hierarchy of models. class MyEditModel<T> where T : Base { ... } class Derived1 : Base { ... } class Derived2 : Base { ... } I have a partial view that accepts a MyEditModel of any type...

Recommend a recent PHP book for developing simple CMS

Please recommend a recent PHP book for developing simple CMS, ideally using a class based MVC structure ...

How to write reusable business logic in MVC models?

Hi guys, my problem is that we try to use a MVC (php) framework. After discussing a lot think that MVC is very good, but I´m missing the possibility to write reusable model-(application)logic. So, I´m not sure if we have the right approach to implement our software in a MVC framework. First I´ll describe the non-MVC, oo-approach which ...

Is it okay to load models in Helpers in CodeIgniter?

I'm trying to use helpers to handle processes that involve multiple models. Is this okay in terms of best practices? ...