mvc

Overuse of polymorphism in MVC pattern?

I am surely missing something huge, I've seen this problem several times so I would like to know your opinion on resolving these code-smells. Background is a windows forms app organized using the MVC architecture pattern. Data is organized in a hierarchical way (tree model), with different types of nodes representing different types of...

model and controller structure in cakePHP.

Hi, I Want to separate the database functionality and logic part by having the database operations in the model and the logic part in the controller. Earlier I had all the code in the action part of the controller itself. I have tried something, but it doesn't work. Some one guide me. This is what I had earlier. /* Controller *...

Repository Pattern Question

Hi, I have two repository classes below, MoneyTransferRepository class is used by other classes in my project. I have designed it this way - is it right? If not, what is the best way? Thanks public interface IMoneyTransferRepository { void UpdateBalance(); } public interface IOrderRepository { void Checkout(); void SaveOr...

The V part in an MVC model when applied to a CMS

With a CMS (PHP/MySQL) that's getting bigger and bigger and its code harder to maintain, I'm thinking of applying an MVC model to make it more maintainable and transparent. I've been doing some catch-up on the subject, and I think I have it pretty much figured out, except for the views part. Here's what I have in mind so far: index => c...

ASP.NET MVC 2.0 overview information?

I have heard that Microsoft is developing a MVC 2.0 platform for Visual Studio 2010. Does anyone have a good source of information about the upcoming project? Specifically, an overview of the changes and new features? ...

MVC Question... where to put code in Controller, and how to have UIView subclasses nest.

I have a feeling I've botched the design of my app from a high level. Right now, I have one Controller, the App Delegate, Two UIViews (one is a subclass of Scrollview) and one nib for the controller. In IB, I have set the class of the file owner to MusicGridController and then set the class of the UIView to MusicGridView. Thus, the...

Updating my Model in MVC pattern to WCF REST - Services Layer Implementation

I have a MVC pattern in place where I have been developing WinForms and WebForms against. Now, I would like to move onto Silverlight and thus need to 'web services'-enable my Model layer. Where do I start? I can't seem to find any good resources. Many talk about EF or ADO.NET Data Services. What do I need to do to my Model layer t...

Partial Validation ASP.NET MVC

I've read a number of articles now in regard to validation and asp.net mvc and the majority tend to point to validation in the model. The problem I see with all of them is that they don't handle different scenarios, or at least, they don't show how they would be achieved e.g. When creating or updating a user account the email address mu...

.NET MVC Localization and Globalization

Hi, i continue with a MVC Web App, and now im between the concepts of DRY (dont repeat yourself) and decoupling (be independent), the question is i divided my big Web Site in diferent projects within a Solution, and as you may already now in MVC the Validations are done in the Model or Service Layer, that in my case its in a diferent pr...

ASP MVC Select list with JSON

I've got a project were there are a number of select boxes that are loaded with reference data, ie customer types. To do this, I've create a seperate Controller that returns the data as a JSON result. This is called on page load via a jQuery function to load select list. On submit to the customer controller, if an option has been select...

.net mvc redirect to calling page without parameter

I've seen some questions about e.g redirecting to the calling page but the general suggestion is to pass in the redirect url as a parameter or check the referrer url. 1. Are these really the only 2 solutions? 2. What about keeping track of the latest page visited.. Is that viable and/or possible? 3. Any other options? Forgot to add I n...

MVC: Where to load views?

Hi, I have a relatively simple app. I have a fullscreen UIView subclass (musicGridView) that the user interacts with, and a UIScrollView subclass (scrollView) that loads this class in, as well as a ViewController and mainWindow.xib. Right now, I have a viewController instance loaded in the nib, which is of type myViewController. ...

Simple MVC mod-rewrite

...

Django pre_save signal called when commit=False

I am writing a Django application that will track changes to the models, in a similar way to the admin interface. For example, I will be able to display a list of changes to a model, that look something like Changed Status from Open to Closed. I am using the pre_save signal to do this, comparing the relevant fields between the existing ...

Diagnosing Rails Application Hang on Element Update

In the course of building a rails application to help small hotels' manage bookings, I'm encountering a strange application hang. Building the reservation works fine; adding guests, assigning them to rooms, etc, without issue. However, when the merchant goes to 'confirm' an inquiry, Mongrel hangs me out to dry. The index page for reserv...

ASP.NET MVC parsing variables wihout URL query string

Heading I want to pass some variables from one page to another but I don't want them to appear in the URL. When I use a form to post the an ActionResult it works fine. However, when I do this return RedirectToAction("Trackers",new{page = 1, orderby=desc}); I get the URL: http://examplesite.com/Trackers?page=1&orderby=desc Is ...

GUI: Changing panels based on value of combo box

Hi, I have a question about GUI design, specifically with Java Swing and creating clean separation between presentation and model. It's a bit difficult to describe, but essentially we have lots of reference data in our system (i.e. that would correspond to lookup tables in the DB). We want people to be able to edit them all from one scr...

.NET MVC jQuery relative path for window.location

Hi, I have a real simple problem, but can't seem to figure it out. The following doesn't work because of the way MVC builds the URL (It includes all the route information). I want pathname to return the virtual directory path only. All I'm doing is redirecting to a different route when a user selects an ID from a drop down list. $(...

Live sorting of JTable

I've figured out how to get a JTable to be sorted properly, but I can't figure out how to get it to automatically update the sort order when a table cell is changed. Right now, I have this (admittedly long) code, mostly based on that in the Java Tutorial's How to Use Tables. I've highlighted the changes I've made with // ADDED. In this ...

Problem with "Security" and the ASP.NET Routing Engine

I´m developing an ASP.NET Web Application and want to use the ASP.NET Routing Engine (System.Web.Routing) with it. My Application works fine in Cassini, but when I start it in IIS7 (Integrated Application Pool, of course) I always get an error on this line: User.Identity.IsAuthenticated What could be the reason for this? Is there an...