mvc

What is the best way to split up MVC controller functionality?

Hi, When making Controllers, what are the best ways to split it up? If I have an admin section that has a bunch of .ascx web user controls underneath it and a few .aspx pages. Should I have one AdminController? Or should I have a Controller for each individual admin pages/web user controls? It seems as though being responsible for a s...

Rails Best Practices for Refactoring Dynamic Behavior

I have developed contingent country-state select dropdowns, and I'd like to factor out this behavior to an Address model so that I don't have to copy the dynamic behavior (more or less split between view and controller) each and every time I want the user to be able to enter a full address. Basically I'm trying to dip my toes a little d...

Please share your experience with JavaScriptMVC, alternatives

Hi I have been reading through the documentation on the JavaScriptMVC framework and it looks interesting. I am wondering if anybody here has used the framework, and with what success. So please share your experience with JavaScriptMVC, if you have any. If you can suggest another MVC javascript framework that is fine to. Best regards, ...

MVC on Lift/Scala

Has anyone tried to do a scala/lift application using MVC instead of view-first? I know that you can create Controllers/views as: package test.test.test.view ... Lots of imports ... class MvcRocks extends LiftView { def dispatch = { case "rule" => ruleDispatch _ case "bar" => barDispatch _ } def barDispatch(): Box[NodeSe...

ASP.NET MVC - Model binding a set of dynamically generated checkboxes - how to

Hi, I'm trying to model bind a set of dynamically generated checkboxes so as to process them in the controller action but can't get the model binding to occur. This is the scenario: My ViewModel class (DocumentAddEditModel) contains a dictionary (Dictionary<string,bool>) with the string of each entry being the name/label for each check...

C#: How to cleverly design a GUI for a Desktop Application with encapsulation in mind

Hey everyone! I am developing a desktop application with a MainForm that's grown rather large. There are lots controls in several containers on different levels (SplitContainers, TabPages, Panels). Now I want to refactor this class by separating all the controller code responsible for data binding & clearing the controls or carrying ou...

ASP.NET MVC ValidateInput(false) stops working with xVal and [RegularExpression] DataAnnotation

I would like to intercept the "<" character in the form field by a regex validator. I will describe the problem in 3 steps: Step 1: When I try to submit a form with a field containing the "<" character, I get the "Potentially dangerous request..." - as expected in ASP.NET. Step 2: To avoid ASP.NET's RequestValidation, I decorate my Upd...

Perl REST flow layout

I'm using Apache and Perl (modperl), with Handlers to handle requests. I'm new to this, and I'm not quite sure how to lay things out in a sensible way. Right now I have the following: package MyClass::Handler; use warnings; use strict; # includes our %action = ( 'a' => \&a, # And more ); sub handler { my $a = shift; ...

Problem with two tables with the same name in different MVC models?

I've got an ASP.NET MVC (VB) project with two models that represent two different databases. Each model needs to include a table from its database with the same name. For example, model1.dbml needs to have db1.MyTable in it, and model2.dbml needs to have db2.MyTable in it. I can't do this because both models try to create a "Partial Pub...

Database Development with ASP.NET MVC and other MVC frameworks?

Does the MVC framework, whether it be ASP.NET or Rails enforce you to develop better databases? Since your database tables and fields will most likely map to classes and properties using OR/M, it only makes sense that this would force you to create a proper database structure from the beginning of development. ...

Cakephp: maintaining hasMany/belongsTo relationships in controller actions

Forgive the title of the question; spent 20 minutes trying to write something coherent (doubtful if succeeded). Anyways, using a blog as an example, our models look like this: Post hasMany Comment Comment belongsTo Post Let's say I want to add a new comment: when saving the comment, I need to include the foreign key to the parent Pos...

Blog in CodeIgniter : Where does the Model start and the Controller end?

Hello, I'm testing codeigniter, trying to create a simple blog. The video tutorial on codeigniter' site is nice, but very incomplete. I'm not too familiar with the MVC structure, and am wondering exactly what goes in a "model". For instance, I'm currently doing the "admin" part of the site : add a new entry, delete, modify, and so on....

Contents Folder Convention in MVC

I am wondering what the history behind the convention for a /contents folder in ASP.NET MVC project is; where it originates; and the reasoning behind it. Our team is considering to move our /images and /styles out of /contents to decrease the folder levels in the project. It will be nice to know why the convention was in place in the fi...

Dynamic Help for MVC in Visual Studio?

I wonder if it would be possible to download the MSDN MVC documentation, so i can use it with visual studio 2008 to get dynamic help (which is very handy).. anyone know of such a thing? ...

Getting a view to respond to a sibling's touch event / message

I'm sure there is a correct way to do this, I'm new to objective-c and cocoa touch so I don't know what it is. I have an application that has a (simplified) view hierarchy of Window --Button --Button --Subview --Sub-Subview What I'm trying to do is get the subview to do something in response to a touch event on one of the b...

ActionFilter to set a controller.action parameter but param req on ActionLink in View

We have a [UserNameFilter] ActionFilterAtrribute which populates the controller actions username parameter. This works nicely. However, when I use the Html.ActionLink helper stringly typed to the controller, the compiler requests said username parameter in the View. Has anyone come across this and know how to recitify? Controller Actio...

Model Framework for Actionscript 3.0

What is Model Framework for Actionscript 3.0? ...

what is Data Transfer Object?

what is a Data Transfer Object? In MVC are the model classes DTO, and if not what are the differences and do we need both? ...

ASP.NET MVC how to implement link which returns to previous page?

Title said it all. Some context: I got a search mechanism - search view, search results view and a details view (which represents one item of results, like a formview in webforms). I want a link in details view, which would return user to search results view. Ideas: Just read about TempData, but i guess that wouldn't help, cause user...

VB.NET/ASP.NET With and New keyword muddle

Can someone explain how New works with the With keyword in this example from the MVC framework. routes.MapRoute("Default", "{controller}/{action}/{id}", New With {.controller = "Home", .action = "Index", .id = ""}) ...