mvc

ASP.NET MVC with Spring.NET and ModelBinder

Hi all, I'm working on a demo that makes use of Spring.NET IoC capability in ASP.NET MVC . It's kind of like the MyBlog application presented on pair programming video tutorial on www.asp.net site. I've completed the same demo using Microsoft's Unity framework and now want to try out the Spring container. To that end I've implemented a ...

Do custom HTML Helper Classes violate the ASP.Net MVC model?

On a related post I mentioned that I have found custom HTML helpers to be just that, helpful, when developing. For instance, when I need paging for a "grid" I have a custom helper that I can call --> Html.Pager() Some have made a point that HTML helpers are a violation of the MVC model. Personally, I don't see it being any different t...

ASP.NET MVC - using the same form to both create and edit

Whats the best practice approach to creating a form that is used to both create new models and edit existing models? Are there any tutorials that people can point me in the direction of? Cheers ...

Should I use the same controller and view for editing and creating models in ASP.NET MVC?

Should I use the same controller and view for editing and creating models in ASP.NET MVC, or should I create a view and controller action for creating and a view and controller action for editing? The editing view is certainly likely to be different - it doesnt always make sense for the user interface for editing an object be the same a...

Nhibernate, MVC and ModelBinders

I want to configure my model binders with Nhibernate: So I have: <object id="GigModelBinder" type="App.ModelBinders.GigModelBinder, App.Web" singleton="false" > <property name="VenueManager" ref="VenueManager"/> <property name="ArtistManager" ref="ArtistManager"/> I have an attribute which marks controller actions so that they us...

What effect does Microsoft using MVC have on open source?

I was listening to the Hansel Minutes podcast from 11/24 talking about Moonlight. To paraphrase, Scott made the comment that Microsofts attitude about open source is quickly changing, especially with the adoption of MVC architecture. I admit I don't have the best 'big picture' grasp of what MVC means to the developement world, but spec...

Adding an action to an existing controller (Ruby on Rails)

I am new to Ruby on Rails, I have completed the Blog Tutorial. I am now trying to add an additional action to the controller, called 'start'. def start end I have added a view page "app/views/posts/start.html.erb" containing nothing but simple html. When I go to /posts/start i get the following error. ActiveRecord::RecordNotFound i...

Using ASP.NET MVC From Visual Web Developer Express 2008

I was wondering if there's a way (even a manual one) to setup an ASP.NET MVC project with unit tests under Visual Web Developer Express 2008 SP1. ...

What is the simplest way to create and call dynamically a class method in C++?

I want to fill a map with class name and method, a unique identifier and a pointer to the method. typedef std::map<std::string, std::string, std::string, int> actions_type; typedef actions_type::iterator actions_iterator; actions_type actions; actions.insert(make_pair(class_name, attribute_name, identifier, method_pointer)); //after w...

How to read GlobalResources in ASP.NET MVC Controller?

I can't find a way to read resource values in a controller ...

(ASP.NET MVC) Will this make my webapp slow if I use GlobalResources for localization only?

I have a multilingual site and I want to use Global resources only, I was wondering if it could cause my site runs slower? ...

MVC Model Patterns

What are the best practices for implementing models in the MVC pattern. Specifically, if I have "Users" do I need to implement 2 classes. One to manage all the users and one to manage a single user. So something like "Users" and "User"? I'm writing a Zend Framework app in php but this is more a general question. ...

ASP.NET MVC Beta upgrade problem with ajax form

I got this ajax form in a ASP.NET MVC beta application : <%using (this.Ajax.BeginForm("Edit", "Subscriber", new AjaxOptions { OnSuccess = "onEditResult", HttpMethod = "GET" })) {%> <%=Html.Hidden("idSub", p.Id.ToString())%> <input type="submit" value="Edit"/><% } %>...

Should I use a PHP Framework? If so, which one?

Hi, Ive been researching into PHP frameworks. I am trying to understand the utility of these frameworks. For e.g. does facebook use a framework? I guess not. Also, say I am developing a product which I want to sell users. Now suppose a use a framework like Zend, then I am unnecessarily imposing restrictions of using PHP 5 only. A lot...

Refactoring before_filters in Controller

I'm working on a rails app that has a whole bunch of before filters in the users_controller which look up user's stateful roles provided by Acts as State Machine. They look something like this: class UsersController < ApplicationController before_filter :not_logged_in_required, :only => [:new, :create] before_filter :find_user_or_curre...

.NET MVC - Call a controller Action from another controller action

I have a controller action which I would like to call another controller action. Is this a valid thing to do. Is it possible? ...

nhibernate burrow and ASP.Net MVC

I using nhibernate burrow for long conversation. I am preparing to migrate project to ASP.NET MVC, but burrow doesn't support MVC. I trying to change Burrow to work via MVC. But I have no idea what is the best way to do this. I am not sure that HTTP Module is a good way. I think about ActionFilters to initialize conversation. Thanks ...

.net mvc and editing data with forms

I have a form for editing gigs. The initial controller action is called "Edit". The form posts to a second controller action called "Update" So, once the form has posted, I use a bespoke ModelBinder which uses bindingContext.ModelState.AddModelError to add validation messages to the modelstate The Update copntroller action looks this...

LINQ Anonymous Types + MVC Views Help

I've seen many questions about this, but i've never really got the answer that I need. I'm converting a fairly large web application from Web Forms to MVC and after a while I encountred a problem with passing data to the view. In the Action I execute the code: //This is just an example ViewData["QProducts"] = from p in db.Products s...

Purpose of UIViewController

Hi everyone. I'm currently learning Objective-C, coming from a Java background where I have no trouble making GUI applications. As such, the way I'm thinking about some of these problems may be a bit off. Here's the question (please excuse the ramble) - What is the purpose of UIViewController? Let me give a specific example. Say...