Long time lurker, first time poster...
I'm now at the point where I'd almost call myself a professional grade PHP programmer and have a lot of code I re-use in various projects. Also, a lot of Open Source packages I've worked with use the MVC model and as a result I've done a lot of research recently into how it all works so I can bette...
We have a flex application that runs along side a mvc .net application. Our flex app communicates with .net via Weborb. We recently put our entire database schema into a single dbml file. Previously we had the database schema split out into several dbmls. The problem we have run into since consolodating into one dbml is that our weborb c...
We are running ASP.NET MVC on IIS6. We have started to notice a problem with IE8 clients.
Almost all the time, the ContentType returned is 'text/html' but occasionally, it will be returned as 'application/xhtml+xml'. This is causing IE8 to try and download the file instead of rendering the contents in the browsers.
I can't find any re...
I am building a blog based on a self-rolled MVC structure. I want to build my own, not used a 3rd party.
What is the best way to handle the creation of a new blog? Heres two options i can see...which is better, or is there something i haven't thought of?
Instantiate a blank (doesn't go fetch blog info from db) Blog model, set all the ...
When is the right time to use functions to set variables inside of my models, verse simply directly assigning them?
AKA...
When do I use:
$model->set('status','active');
...instead of:
$model->status = 'active';
...
I have a self-rolled MVC framework that I am building, and up to this point have managed to avoid the need for any AJAX calls. Now, however, I'd like to create a real-time updating feed.
My question is, where are the handlers for the ajax calls usually stored in an MVC? Should I store them in the same controller that is involved in maki...
In my View (using Zend_View so the the view is an object), I make calls to object properties and methods to populate the template like so:
<?= $this->user->name ?> // Outputs John Doe
<br/>
<?= $this->user->getCompany()->name ?> // Outputs Acme
<br/>
<?= $this->method() ?> // Outputs foobar
If I make it so that all property requests (...
This site is built using CakePHP 1.2*
I have an element that needs to be placed in multiple views under multiple controllers. This element is very dynamic, every time a page is loaded it needs to call a function (which is rather large) and then display what was returned.
There are a few options that I have thought of, none of which I ...
Hello, I am working on a codeigniter site, in which a page is built using multiple views, I have come to a point where I need to work with a variable that is being set in another view is it possible to access it from another view?
This is code I have
Controller:
public function index() {
// $this->output->enable_profiler(TRUE);
...
I have been using an Object-Oriented MVC architecture for a web project, and all the models are OO Perl. But I have noticed a couple on the team are reverting to procedural techniques and are essentially using "objects" as dumping grounds for related functions. Their functions basically read/write directly to/from the database.
What's t...
I am creating a site where users can upload there own background images, after upload they see each background they uploaded in a menu represented by a number, clicking on the number will in theory load in the new background, however I have noticed that does this calls in the view again as well (the view is already loaded from another fu...
Hello!
Before rendering into a view model should be formatted:
multilingual data localized;
date, time values formatted;
numbers formatted.
Who performs all this formatting - Controller or View?
Am I right that all the formatting is performed by the Controller which creates so called ViewModel containing only formatted values a...
In an MVC 1.0 C# app, what's the different between the following:
HttpContext.Current.Session["MyValue"] = "ItsValue";
and
Session["MyValue"] = "ItsValue";
...
So I have an interesting problem... I'm required to get my webapp to pass through an IBM app scanning appliance before I can push my changes to production. My latest changes include the AntiForgeryToken in ASP.NET MVC. Every browser I've tested this on works just fine, no issues. But when the appliance tries to submit the form, it ge...
I am using EntityFramework. I have an "Application" object (which has a field certificateReasonID) which can have one or zero CertificateReasons - so there is a ralationship to the "CertificateReason" table, and visiually on the edmx diagram we do not see the certificateReasonTypeID field.
When I update an Application - it INSERTS a new...
I know Rails' flash hash is nothing new, but I keep running into the same problem with it.
Controllers should be for business logic and db queries, not formatting strings for display to the user. But the flash hash is always set in the controller. This means that I need to hack and work around Rails to use Helpers that I made to format ...
I am trying to understand how best to organize some common Dropdown lists used in several views (some are cascading)
Is it best to create
a single \Models\CommonQueries
then create a webservice for each dropdown used in cascading situation
then have a single controller that contains actions for each dropdowns
This way I can follow DR...
Hi,
hope i can explain myself...
i have a login control in the masterpage. when you click the login button you go to the accountcontroller's logon method which checks your credentials. whether it is ok or not, you will be redirected to the homepage with a redirecttoaction("home","index").
but, in case login failed, i want to show a mess...
Hello,
I'm a heavy Codeignitor user and currently I have to build a page with extensive AJAX bits and pieces. I have been using JQuery all along the website and it's AJAX handling was perfect up until now. There is something that just doesn't feel right when i use a MVC with JQuery.
For example:
in Jquery I setup the callback URL easily...
Since upgrading from mvc 2 beta 2 to rc I'm having trouble with an ajax submission in Internet Explorer. Upon carrying out a jquery form post, the function returns a url to a controller action. This worked fine with the controller action picking up it was a ajaxrequest and then piping back a partial view to update the page. This still...