mvc

iPhone GLPaint sample has architecture design flaw?

Hi, I'm brand new to iphone dev, but am familiar with the MVC pattern. Can anyone please explain why the GLPaint sample class PaintingView.m (the View) actually gets the data required from disk to write the "Shake Me!" text? The Data is the Model and should be read from the disk by the controller and passed to the View to render IMO. ...

Multipage Control in ASP.net MVC

I am working with asp.net mvc framework. In my application I want to have a master page and multiple child pages. All the child pages should load if any one page gets loaded. Say i have 4 child pages i want to have link 1 2 3 .. in the master page. If i click on any one link the related page must be immediately available with out reque...

Is controller-based class loading better? (CodeIgniter/KohanaPHP/etc..)

If you have worked with some of the frameworks like CodeIgniter or KohanaPHP, then you probably have seen that they are built so that the controller loads everything. Therefore, if you are in a library and wish to load additional resources you must get a copy of the controller instance and then use that to load the additional classes. $...

S#arp Architecture Template

I am having a VS problem with S#arp Architecture; the template does not appear in the new -> project; what I can do? I've tried already registering the installvstemplates and the setup command in the VS prompt. ...

How to display common information in multiple views in an MVC application?

What is the best way to share common objects between multiple views in an MVC application? Say I have a LoginController that takes a user name and password and authenticates the user and loads their data (account info, full name, etc.). I want to display this on each page - something like a header with "Welcome <user name>, you have <a...

create controller base class(partial)

ok here goes, since my html.renderaction crashes my dev and prod servers i have to use partials(crap) i tried creating public partial controller{} class so i can set needed data for all my views but i am having no luck (everything breaks) i am coming from LAMP cakePHP background and really need simplicity. i need to know how to create...

MVC, UpdateModel OR delete depending on form field value?

Hi, I'm very new to this, so any help is appreciated. I'll use the Dinners/RSVPs relationship for detailing my problem. One Dinner has many RSVPs. On my Dinner edit page/view I want to be able to edit the Dinner information AND the RSVPs information. I have that part working, based on the answer given here by James S: int i = 0; for...

Best way to get server values into JavaScript in .NET MVC?

Using ASP.NET MVC + jQuery: I need to use some values owned by the server in my client-side JavaScript. Right now, I've temporarily got a script tag in the actual view like this: <script> var savePath = '<%= Url.Action("Save") %>'; </script> But I want to move it into something cleaner and more maintainable. I'm thinking of somethin...

Paging search results with asp.net MVC

I have a situation that I couldn't find a solution for through my searches on here. Here is the scenario: I have a search form with 2 required fields and multiple optional ones. The form posts to an action method that determines which fields are selected and builds a List<> of objects that match the search criteria. I then pass that Lis...

CodeIgniter: Simple URL routing question

I'm new to CI and URI routing in general. I created a new app. Set the default controller to Main. In Main, I have an index method, a popular method and a recent method. When I load my app, the url shows up as http://localhost/myapp... this obviously loads up the index method in the Main controller... that's fine. Now how do I route m...

Code Igniter Function Call 404

I was going through the official Code Igniter tutorial when I hit a snag... The tutorial had me save and run this code: <?php class Blog extends Controller { function index() { echo 'Hello World!'; } function comments() { echo 'Look at this!'; } } ?> IF I enter the following URL: ind...

MVC Multiple ViewPage items in aspx required

Hi I need to pass in 2 objects to a page to access Model.NewsItems and Model.Links (the first is a class of news item objects with heading, content etc and the Links are a set of strings for hyperlink depending on whether the system is up or down. This is the page declaration <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site....

Any experience combining JS / CSS in MVC?

I'm planning to implement a solution for combining multiple js/css files into single files in my MVC project, but currently I doubt between the following two possibilities: Telerik Extensions for ASP.NET MVC (www.telerik.com/products/aspnet-mvc.aspx) Supports combining multiple files into one request Supports groups of web assets Sup...

how to check which event caused the post back in asp.net mvc application

I have one View and one Controller in my ASP.net MVC Application. I have one "Submit" button & one "Cancel" button in my view. When I click any of the botton below action will be triggered. AcceptVerbs(HttpVerbs.Post) public ActionResult Result() { } Now the Question is how i will know in my public ActionResult Result() , whethe...

Rails - Namespacing models

Usually there are a lot of models in a Ruby on Rails project, so: Is it a good practice to namespace them (in modules/folders)? What are the downsides? EG: Shop category.rb details.rb Products category.rb base.rb etc (instead of ShopCategory, to have Shop::Category?) Should also the controllers be namespaced in the same man...

Retain data from views while navigating through multiple views in ASP.NET MVC App

I have 5 views in my ASP.NET MVC application. Some data were captured from these views and I am navigating through these views using 2 buttons: the Previous and Next buttons. So I fill the data in View 1 and I go to view 2 and enter the data there and so on.. till View 5. Now the question is: If I come back again to previous views, ho...

asp.net mvc mono 2.4

I am thinking of getting a $20/month VPS Ubuntu box with Slicehost.com or linode.com and running asp.net MVC on mono. Has anyone done this? I have successfully configured asp.net MVC with Apache on my local ubuntu box but I just am not sure how stable this would be? I really like the idea of root access VPS plus being able to run asp.net...

Where do I put a FileSystemWatcher in my mvc application?

We have an asp.net mvc application that we would like to integrate a FileSystemWatcher with. I have seen many good examples on how to implement the FileSystemWatcher but I don't really know where to put it in my application. It seems like it should be started with the application. Any ideas? ...

Only Home Page not working with IIS 6 and Windows Authentication in MVC

I am trying to convert my mvc applcation to run under windows authentication and have followed the steps here: http://go.microsoft.com/?LinkId=9394801 This doesn't work - localhost/myapp/Home.mvc/index - home is my entry view with controller. I get a 403 error when I load the applciaiton at first and then a 404 error if I try to access...

How to disable layout inside a plugin ?

Here is what i'm trying to do <?php class My_Controller_Plugin_SomePlugin extends Zend_Controller_Plugin_Abstract { public function preDispatch(Zend_Controller_Request_Abstract $request) { $this->_helper->layout()->disableLayout(); } } but it doesn't work, any ideas on how could i disable the layout inside a ...