mvc

Spring MVC Form tags: Is there a standard way to add "No selection" item?

There is a select dropdown and I want to add "No selection" item to the list wich should give me 'null' when submitted. I'm using SimpleFormController derived controller. protected Map referenceData(HttpServletRequest httpServletRequest, Object o, Errors errors) throws Exception { Map<String, Object> map = new HashMap<String, Object...

Should Model make service calls to get data

We are build a website using MVC pattern. So far all the pages we built used models which had to operate on Reference data(which is cached when the website loads for the first time). But now we have reached that stage of the flow where we have to deal with Transactional data (which is specific to that flow). Till now we created model cla...

Do MembershipProviders in ASP.net MVC affect stylesheet links?

I changed the MembershipProvider in my ASP.net MVC website, and now the stylesheet for the login page isn't referenced correctly. Below is a copy of the forms tag in my web.config if that could be the reason. It looks identical though to the one generated by a new project with the exception of the name and timeout attribute. <authentica...

Recommended books on Desktop Application development using MVC

I'm looking for recommendations on books about MVC on the desktop. If they use Java, that is a bonus. Some background: I'm writing a desktop application in Java. It's an audio application that has a number of views and a central model called a Library with playlists, effects lists and a folder structure to organize them. In this appl...

MVC Frameworks for Windows Mobile Native Code

Are there any good MVC frameworks for native Windows Mobile code? Barring that could someone link to an open source Windows Mobile or CE project that uses the MVC pattern? ...

Difference Between ViewData and TempData?

I know what ViewData is and use it all the time, but in ASP.NET Preview 5 they introduced something new called TempData. I normally strongly type my ViewData, instead of using the dictionary of objects approach. So, when should I use TempData instead of ViewData? Are there any best practices for this? ...

Refactoring an application.

If you had to fix and stabilize a MVC application, where would you start: the Model, Controller or View? The problems are spread equally throughout the application, with bad programming practices that make it hard to add functionality. The application is written in PHP if it makes a difference. ...

Best practices: What's the best way for constructing headers and footers? Call it all from the controller, or include from the view file?

Best practices: What's the best way for constructing headers and footers? Call it all from the controller, or include from the view file? I'm using Codeigniter. What's best practice? Loading all the included view files from the controller, like this? class Page extends Controller { function index() { $data['page_title'...

How to apply the MVC pattern to GUI development

I am primary a web developer but I do have a very good understanding of C++ and C#. However, recently I have writing a GUI application and I have started to get lost in how to handle the relationship between my controller and view logic. In PHP it was very easy - and I could write my own MVC pattern with my eyes closed - mainly because o...

Under an MVC framework, which directory structure would be expected by other developers?

Generally, MVC frameeworks have a structure that looks something like: /models /views /controllers /utils However, in a web application suite, I've decided that clumping all models, views, and controllers together probably wouldn't be the best for clarity, unless I treated the system as one application instead of an application suite....

Should new web applications follow the MVC or MVP pattern?

Note that I am not asking which to choose (MVC or MVP), but rather if one of the two should be used for a web application. I realize that it might be too much work to convert an older application from its current design to a MVC or MVP pattern. However, what about for a new app? It appears these are the most popular architecture pattern...

ASP.NET MVC in a virtual directory

I have the following in my Global.asax.cs routes.MapRoute( "Arrival", "{partnerID}", new { controller = "Search", action = "Index", partnerID="1000" } ); routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } ); My SearchController looks like this publ...

Graphing/Crystal Reports with ASP.Net MVC

Hi stack overflow community, I would like to add graphing to my User Controls in ASP.NET MVC. I'm fairly new to MVC just jumped into it about 2 Weeks ago and was hoping for some ideas or a guide on how to approach this issue. I have searched around and found no helpful answers to resolve this issue. I was thinking of doing crystal report...

I'm confused about something in the Zend Framework.

How do you decide if something goes in the view or the controller? Here are some specific examples: Zend_Captcha: Does the controller generate the captcha and pass it to the view or does the view generate it? Zend_Alc: Does the view decide if a segment of the view should be displayed to the user or do you have multiple views dependin...

How do I determine my controllers in MVC?

Hello, I'm fairly new to MVC coming from a php background where I designed by view and created pages when I needed something like say a login form. I'd have a file called login. This only sucked when I needed a new login form to login a different type of user. Say an admin. I'd then have to create a new page called login-admin.php o...

MVC model structure in Python

Hi all, I'm having problems structuring classes in the Model part of an MVC pattern in my Python app. No matter how I turn things, I keep running into circular imports. Here's what I have: Model/__init__p.y should hold all Model class names so I can do a "from Model import User" e.g. from a Controller or a unit test case Model/Data...

What's the best way to cache a user control or its associated data in asp.net mvc

Hi guys, I am in the middle of implementing an application using ASP.NET MVC and would love to cache the data passed to user controls or the output rendering on some user controls that I render using the Html.RenderPartial, that way I don't have to query the DB with every request I do to the controller for a new view. Thanks. ...

Cross-component Communication within a View (MVC)

What are some best practices to orchestrate the interaction between complex components that are in your View? I'm not talking about simple widgets like a combo box or a grid control but components that are made up of multiple widgets and that may deserve being unit tested on their own. Would you: Define abstract interfaces for each c...

Is using a front controller and headers the best way to mimic a response in PHP?

I've been researching PHP frameworks as of late for some personal projects, and it looks like most of them use a front controller to mimic a response. The controller gets the params from the request, and re-routes by sending the appropriate headers depending on the logic. This is the "response". Is this the best way to do this in PHP, or...

How best to decide on an MVC framework between developers with different backgrounds?

Let's say that Developer Alex has a strong background in Perl and is familiar with the Catalyst framework. Developer Bob, meanwhile, has a strong background in Ruby and is familiar with the Rails framework. Alex and Bob get together on a start-up. Of course, each will have very good arguments for their own specialty. Each will have a go...