mvc

How to display error message on jQuery modal in MVC

Hello, I am trying to lookup an employee by their ID using a jQuery modal. My Modal has an input text box for the employee ID and a Search button. Once the search button is clicked I have the value looked up in a db and if no result exists I am looking for an error message to display on that same modal. My controller looks like this...

Does YUI compressor support bundling of multiple files?

I created a moduling system using jQuery. Is there any build system something similar to Dojo's Shrinksafe, that could combine all my module files into one single file for production? Does YUI Compresser is all about single file compression or does it support bundling the module files as well? JavascriptMVC uses a custom build of Shrin...

Up-to-date Swing MVC example + Question

Hi, I'm looking for an article or tutorial that gives an example of what an up-to-date MVC pattern (2.0?) should look like with the Swing framework. Also, being more used to a layered architecture, I'd like to know how the domain objects or POJOs fit into the picture. Am I right in assuming that they are separate and called by the mode...

ASP.NET MVC - Strongly typed view model, where does it belong?

I'm trying to create a strongly typed view model as John Sheehan suggests here. Where should it go? I can make arguments to myself for Model, View, and Controller. ...

Does running IIS7 in classic mode affect MVC output caching?

I have a need to run an application in classic mode for backwards compatibility with a specific application, and am trying to understand what kind of impact that will have on the performance of an MVC application that is running on the site. If we put a few static file maps (for .js, .css, .png, etc) above the ASP.NET wildcard map to re...

How to implement MVC from scratch in PHP?

I would like to implement MVC from scratch in PHP because I want full control of my own code and no extra bagage from existing frameworks. Anyone who has any advice? Yes, I've seen Lerdorfs article and it seems that it ain't so much code after all. Actually I would more like to have a controller-view solution for structuring my appli...

MVC: Cardinality relationships of Views and Controllers

In a generic sense of the MVC, is the relationship of the View and Controllers generally expected to be M:1? That is, many views will use the same controller? But a view will not use many different controllers? Or, should I be able to swap any view with any controller and have everything work? I see a rather tight dependency between th...

IPhone Application Design Decision?

I am writing a simple application that follows the MVC design pattern. In the Xcode project I have three bits: AppDelegate ViewController DataModel The DataModel object holds all the data for the application and I want to make sure it is saved on app-exit and reloaded at app-startup. I am not sure if this is the correct approach, I ...

Simple MVC setup / design?

I just want to make sure that I am heading in the right direction with how a simple MVC application is constructed. // MODEL @interface Reactor: NSObject { NSNumber *temperature; NSString *lastInspection; NSNumber *activeRods; } . // CONTROLLER @interface viewController: UIViewController { UITextField *tempTextFiel...

displaying viewcontroller modally

I have navigation controller with 2 view controllers. VC1 calls VC2. Based on button selection VC2 displays VC3 modally. After the display VC2 dismisses VC3. Here is my piece of code. VC3 has an imageview. Inside VC3 I have logic to display the image based on button selection in VC2. Could it be done in a better way (like moving all t...

How do I prevent Ajax.BeginForm from loading a new page?

I have an Ajax form with a single input and a button. On submit, the form should only post the entered value to an action method. My form is correctly posting to the User controller's Log method but when done, the page redirects to /User/Log. How can I avoid this? <% using (Ajax.BeginForm("Log", "User", null, new AjaxOptions {HttpMe...

Can / Should MVC be used on a SVN or HG type CLI application?

Can / Should MVC be used on a SVN or HG type CLI application? If so, how might one go about this? I've been trying to come up with a design and I've come to the conclusion that MVC and HG/SVN type interface simply doesn't work together; that they serve separate purposes. Just to be clear, what I mean by the Hg/SVN type interface is i...

I'm having trouble understanding this really simple PHP code. Please help?

Here's the code: <?php class Order extends Zend_Db_Table_Abstract { protected $_name = 'orders'; protected $_limit = 200; protected $_authorised = false; public function setLimit($limit) { $this->_limit = $limit; } public function setAuthorised($auth) { $this->_authorised = (bool) $auth; } public function insert(arra...

ASP.NET MVC or ASP.NET MVC2 RC2 -> RTM

I am designing an green field application, development will start on it tomorrow as all the User Stories, etc. have been finalized. I plan on using Windows Azure, with ASP.NET MVC, I noticed that MVC 2 RC2 is about to be released but there is a lot less literature on MVC 2 compared to MVC 1. Are there substantial differences between th...

In a MVC patterned framework where would a screen-scraping module be located?

In a MVC patterned framework where would a screen-scraping module most logically be located? In the model or the controller? Or is it completely outside of this pattern? ...

How do I decode a URL that was encoded with MVC's Url.Encode(string url)

I'm surprised the UrlHelper provides an encoder but not a decoder! Does anyone have the code for decoding or know where to find it in the MVC framework? ...

Dependency injection - am I missing something?

Hi, I am using structuremap in an asp.net (mvc) project and I am fairly happy with the functionality. One thing just came to me where I am not sure if I am too blind to see. I get several services instantiated in my controller class by structure map, but I want them to share methods that are base (hint) to all services. How can I achiev...

TDD'ing MVC Controllers to drive design

Hi, I am starting out on a new project (well, restarting an existing one), and trying to adopt TDD (for the nth time) for all the benefits that it should bring. I believe that TDD will result in my tests driving me to write only the code that I need to write, but it will drive me to write the code that I NEED and not leave some out. T...

dropdownlistfor fill values

i have a table T with fields id, parentid, name. i make relationship with own table so parentid=>id one to many, so if parentid=null it is a parent record, and if parentid not null it is child record after mapping i have class with 2 new properties- T1 (Collection of T) and T2 (Instance of T) so how can i fill dropdownlistfor, if i not...

getJSON not working if the mvc model view controller has a parameter

I'm having an issue with a callback. I'm not even getting an error in Firebug. If I alert before and after the getjson call both alerts show but the getjson call doesn't fire. public ActionResult TestPage() { return View(); } public ActionResult LoadMapLonLats(int mapId) { //some code return Json...