mvc

MVC website confusion.

This is my first venture into Zend Framework and the MVC pattern. I have the CMS for a website built in MVC all going through /cms/public/index.php This works, but my question is, should all files be processed through the MVC pattern? We have up until now built dynamic php web pages that call from the CMS/Database, but I'm struggling as...

Find conditions like 'NOT EXISTS'

Hi all... I have 2 tables in my db... Entita id int(11) descrizione varchar(50) ..... Publicobjects .... model varchar(50) the model I need (in this case 'Entita') model_id int(11) I would like to make a query like this: select entita.* from entita where NOT EXISTS (select * from publicobjects where publicobjects.model = 'Entita' and ...

IIS7 Win 2008 + ASP MVC http result 504 status with static files css, js, images

Randomly accessing static files on our web site returns http 504 error status code From fiddler: Result Protocol Host URL Body Caching Content-Type Process Comments Custom 288 504 HTTP /assets/styles/site1.css 512 text/html ekrn:700 289 504 HTTP /assets/styles/rightmenu.css 512 text/html ekrn:700 291 504 HTTP /assets/s...

controller viewdata object into jquery

I am new to mvc and jquery In my controller I have ViewData["a"]="true"; I want to access the viewdata object in jquery <% if(ViewData["a"] == "true")%> { $('#div1').show(); } The above jquery doesn't work for me Can someone please shed light on this. Thanks in advance ...

How to access HttpContext outside of controllers in ASP.NET MVC?

Specifically, Session variables. I have an .ashx in my ASP.NET MVC project that is pulling some image data to display to a user, and I need to be able to access an object that I've stored in the session. From controllers I can pull the object fine, but in my ashx page, the context.Session is null. Any thoughts? Thanks! Here is an exampl...

Performance wise Is MVC better than Web Forms in ASP.NET

We are going to develop a website in ASP.NET. So is it better to use MVC or web forms. ...

Using mvccontrib's BlockRenderer to write to a file

We have an ASP.NET MVC 1.0 application that we use to host RESTful web services for some clients. These services all return XML that is built from ViewPage files (each client has their own set of custom formatted XML views but they all use the same controllers, models, etc.). There is a new web service that needs to write its XML to ou...

What is Ruby on Rails ORM in layman's terms? Please explain

I am having trouble understanding ORM in Ruby on Rails. From what I understand there is a 1:1 relationship between tables/columns and objects/attributes. So every record is an object. Also what exactly is a Model? I know it maps to a table. What I'm really after is a deeper understanding of the above. Thank you in advance for your help ...

What is the best way to implement a controller in PHP?

In the last couple of websites I made, I implemented a kind of MVC-style controller, I think. I used mod_rewrite to send everything through index.php, so the url became a querystring. It worked, but I'm wondering if it's a bit hacky, or just the accepted way of doing things. Is there a better way? I don't want a framework, I want to le...

MVC Partial Views - Qtip

Hi, I'm working with MVC's views I have a main view which contains a partial view. My partial view is rendered with the actions that are fired from the elements that it contains. I also have a jquery of tooltips from "Qtip". Everything works fine. My problem is that everytime I render the partial view, the complete functionality of t...

how to use asp.mvc masterpage on non mvc page

I have a mvc web site that contains one non-mvc page (it is using ajax and java-script, so mvc is not a good option). The problem is that I still want to use the same masterpage. If I set the masterpage (MasterPageFile="~/Views/Shared/Site.Master"), then I get this error: Runtime Error Description: An application error occurred on ...

CakePHP admin panel

I am new to CakePHP and want an admin panel on my custom CMS for a client. Is there any way other than just linking to an admin page to each controller that I can pull views from other controllers such as users and posts? ...

Wordpress website development in MVC style

Just wondering how other developer do that or if it's possible. To me Wordpress has a lot of useful template tags and can get developers kicked started quickly. Although when the site grows big, i often found the need to seperate the presentation layer and the business logic. Currently i am developing a semi large scale website with ...

modal views, or maybe not?

What I need is to correctly dismiss the picker controller's modal view with all subviews (some kind of AR app) and show app's features or in other case a map, and following code gets me only a blank screen: - (id)init { ... self.cameraController = [[[UIImagePickerController alloc] init] autorelease]; self.cameraController.so...

Passing parameters to controller's constructor

I have a controller which has several methods which should all share common informations. Let's say my URI format is like this: http://server/users/id/admin/index http://server/users/id/admin/new http://server/users/id/admin/list http://server/users/id/admin/delete I need to retrieve some informations from the database for id and have...

Need to assign multiple attributes to records - should I opt for one table or multiple tables?

I am using an MVC pattern to represent a table with many records of music albums. To each music album there are attributes (genre, artist, ratings, etc). Each attribute can have multiple values (so the genre of one album can be both "pop" and "latin", for example). I want to represent those attribute values using table(s). So there are ...

How to disable Browser Caching for a specific View in ASP.NET MVC Environment?

I want to disable Browser Caching in a specific View. I tried Response.Cache.SetCacheability(HttpCacheability.NoCache); in a controller that returns the View, but that does not work. Any suggestions are greatly appreciated. Thank you. ...

Add to <body> tag of a cakePHP app

Hello, I have an app where I need to call some JS in the onLoad event of the BODY tag of two forms. However, I can't find how to modify the tag for just them. Does anyone know? Frank ...

What is MVC in Ruby on Rails?

Could someone please explain MVC to me in Ruby on Rails, in layman terms. I am especially interested in understanding the Model in MVC (Can't get my head around the model) Thank you in advance. ...

Help with jQuery Grid in an ASP.Net MVC 2 RC with areas

I've followed Phil Haack's demo of jQuery Grid successfully in an mvc 2 rc project without areas. Now I'm trying to implement the same code in an areas project but the data is not being passed to the grid. The jquery grid url property from the demo appears to be in the format of: url:'/{controller}/{method}/' I'm attempting to inclu...