mvc

Does the MVC pattern describe Roles or Layers?

I read a text recently saying the MVC pattern describes the layers in an application. But personally I see MVC showing several key roles in an application. Which word do you think is better, layer or role, to describe the three main pieces of MVC? ...

Are there any MVC web frameworks that support multiple request types?

In every MVC framework I've tried (Rails, Merb, Waves, Spring, and Struts), the idea of a Request (and Response) is tied to the HTTP notion of a Request. That is, even if there is an AbstractRequest that is a superclass of Request, the AbstractRequest has things like headers, request method (GET, POST, etc.), and all of the other things...

What are some good resources for the document/view or composite application architecture?

Lately I've been working on applications that are relatively data-oriented. In general, they tend to be editors for data represented by classes that are related in odd ways. I've been handling it by having a UserControl for each type of object and as the selection changes the program displays the appropriate editor for the object. The...

Action Naming Convention

Has anybody established a good naming convention for action in MVC? I was specifically looking at ASP.net MVC but it is a general question. For instance I have an action which displays the login screen (Login) and one which process the login request from that page (LoginTest). I'm not keen on the names and I have a lot of the applicai...

Design Problem with VetoableChangeListener

Hello i have a problem with the design of a VetoableChangeListener: I implement the VetoableChangeListener interface to listen changes of a property in a model class, when the model fires the vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException i try to save the change in a DB, which could fail (by a SQLException,...

Cyclic Dependencies

Consider a normal customer-orders application based on MVC pattern using WinForms. The view part has grown too much (over 4000 files) and it needs to be split into smaller ones. For this example we are going to use 3 projects for the view part: Main - has dependencies to the other 2 projects. Instantiates the forms with the lists. C...

MVC frameworks on hosted servers

Hi all This may seem like a daft question, but i was wondering about how to use MVC frameworks on hosted servers. I am playing about (albeit slowly) at home with the RoR on Ubuntu and understand that if i want to do a live site then i need hosting with Rails and Ruby. However, what happens about the PHP frameworks. For example i have ...

How would you implement MVC in a WindowsForms application?

I don't develop too many desktop / Windows Forms applications, but it had occurred to me that there may be some benefit to using the MVC (Model View Controller) pattern for Windows Forms .NET development. Has anyone implemented MVC in Windows Forms? If so, do you have any tips on the design? ...

Reuse MVC arhitecture; Have two layers of UI : ASP.NET MVC and .NET Winforms

Although my question might seem abstract I hope it's not. Suppose I develop an application, an ASP.NET MVC site and later I am tasked to build an Winforms client for this application how much and how can I reuse from the existing application? I defined the models, I defined controllers and views. They all work well. Now the boss comes ...

Best Way to Conditional Redirect?

Using Rails v2.1, lets say you have an action for a controller that is accessible from more than one location. For example, within the Rails app, you have a link to edit a user from two different views, one on the users index view, and another from another view (lets say from the nav bar on every page). I'm wondering what is the best w...

What is the best practice for view file/directory structure in ASP.NET MVC?

I'm confused with how views are organized. Under the views directory, there are subdirectories. Inside these subdirectories are views. I'm assuming that the subdirectories map to controllers, and the controllers act on the views contained within their subdirectories. Is there an emerging expectation of what types of views are contain...

How can I write a unit test for a controller class that uses winforms for views?

Has anyone been able to successfully unit test methods that are, by necessity, coupled to the System.Windows.Forms.Form class? I've recently been working on a C# winforms application, trying to build it with an MVC structure. This is difficult enough, given that the framework isn't really built with this in mind. However, it gets even...

MVC model design / inheritance

Forgive the vague title, I wasn't sure how to describe it. If you have a generic model "Archive", how do you show different views/forms based on a user selected 'type'? For example, the user creates a new "Archive", then gets the choice of video, book, audio etc. From there they get different forms based on the archive type. Or would ...

How do you RedirectToAction using POST instead of GET?

When you call RedirectToAction within a Controller, it automatically redirects using an HTTP GET. How do I explicitly tell it to use an HTTP POST? I have an Action that accepts both GET and POST requests, and I want to be able to RedirectToAction using a POST and send it some values. Like this: this.RedirectToAction("actionname", new ...

What is MVC (Model View Controller)?

I've heard the term MVC (Model View Controller) tossed about with a ton of Buzz lately, but what really is it? ...

ASP.net MVC HomeController URL

By default the MVC Preview 5 web project comes with a HomeController.vb class. This sets the web URL to http://www.mywebsite.com/home/ by default. If I just wanted this to be http://www.mywebsite.com/ by default, how would I accomplish that? ...

Do fancy MVC URLs affect how caching is done?

When reading some answers to aquestion on clearing cache for JS files, somebody pointed to this part of the http spec. It basically says that URLS containing a ? should not be pulled from the cache, unless a specific expiry date is given. How do query string absent URLs which are so common with MVC websites (RoR, ASP.Net MVC, etc.) get...

What is the best PHP MVC framework for scalability?

There are a lot of MVC frameworks for PHP. Which one is the best in terms of scalability? Is there any framework that supports splitting applications on many front end and database servers? Sharding? Other enterprise features? Ideally the framework should support sites with thousands of concurrent users per server. I would greatly...

Different layouts and i18n in JSP application

I have a bunch of JSP files and backend in Tomcat. I have 3 different versions of JSP with same logic inside but with different layouts. So if I change some logic I have three JSP file to fix. What is the proper soution for such a scenario? I thought of some XML and XSLT stack: backend gives only data in XML and than for each layout I h...

Migrating web application to asp.net mvc

Hi, I need your advice regarding migration. I want to migrate existing project to ASP.NET MVC and I can figure out the proccess except of url rewriting issue: for example how can I make following route: http://www.eireads.com/ireland/mayo/cars-3/1263-used-cars-citroen-c5-for-sale.aspx Or maybe I could somehow keep supporting legacy ...