Does anyone know is there a way to implement Windows Live ID authentication into your ASP.NET MVC site. I am moving a project from Web Forms to a MVC solution and do not want to rebuild the database so ASP.NET Membership mentioned in windows-live-id-in-asp-net-mvc is not a valid solution.
And just to avoide this question the customer not...
Hello,
I think I'm beginning to be confused with the job of a controller in MVC.
I have a service that exposes five functions:
list packages in queue
get package
delete package
accept package
deny package
My ASP.NET MVC controller depends on this service, and can generally execute a service call on an Action. I'm happy so far.
Th...
Hello,
I've been playing with nhibernate.validator and xVal and JQuery and they work together quite nicely, until I try to have custom validators. According to the xVal codeplex side custom validators are supported if they implement the ICustomRule interface. and you supply the ToCustomRule function which returns a customRule with t...
I develop in php and all the tutorials or pages such as wikipedia that I see don't really explain what mvc really is.
In my understanding so far mvc is a file structure which includes your classes, websites with their html, external style sheets or 3rd party plugins (seperated in its own folder).
I have created a structure such as this...
What is the best practice when serving files from the Zend Framework MVC? These files have to be served from the MVC as they are protected.
I know you can read in the file and place it into the Response object but this seems like a bad practice as you would be reading the entire file into memory then serving it. Right now I usually do:
...
I'm going to be delivering a presentation to my company regarding MVC, MVP and MVVM patterns, test-driven development, and ORM solutions. I'm a .Net programmer and have found the NerdDinner application to be a nice example app to illustrate MVC, TDD and ORM. Is there a good example app in the Java world to demonstrate MVC or MVP with J...
Say you have 5 or 6 variables in the model which a certain View is interested in, do you write different functions for each, such as
int a;
int b;
int c;
void setA( newA ) {
a = newA;
notifyAObservers();
}
void setB( newB ) {
b = newB;
notifyBObservers();
}
void setC( newC ) {
b = newC;
notifyCObservers();
}
Or do...
Which do you guys prefer? I've been looking into both and there definitely seems to be some inconsistency in what people call them.
I will try and jot down what the differences are and you can correct me if I'm wrong.
MVC
Model holds references to it's own observers (Views), on updates to the model it notifies observers.
Views pass a...
I'm writing a new application with CakePHP (just-released 1.2.4), using SimpleTest 1.0.1. I have read the relevant sections of the Cookbook, searched on the Bakery, and read Mark Story's postings on controller testing (the hard way and with mocks).
Unfortunately, none of this talks about real-world testing of non-trivial controllers. Lo...
Hi all,
I'm trying to learn the MVC design pattern. Suppose I have a site with two layouts:
1) a home page: header1 - nav - content1 - footer
2) a subpage: header2 - nav - content2 - footer
My guess would be that I need two View classes for my two different layouts. But within these layouts there are repeating elements (the nav and t...
Hi Everyone,
I am using jQGrid in my ASP.NET MVC application with add row feature. My problem is I have to save XML data in some of the row fields. But while posting the new row with some fields having plain xml, to server I get Internal server error. By default jqGrid perhaps expects json or text data to be posted on server while addin...
How does one handle logging in and out/creating users, without using Google Users? I'd like a few more options then just email and password. Is it just a case of making a user model with the fields I need? Is that secure enough?
Alternatively, is there a way to get the user to log in using the Google ID, but without being redirected to ...
I'm a little ways into developing my first iphone app, and I've been running into exc_bad_access a lot. (I'm sure it's because I'm not designing stuff in a very MVC-proper way yet.)
It's extremely frustrating trying to hunt down why I'm running into these errors all the time... is there a way in the xcode debugger to keep a watch list ...
I have a view which contains multiple partial views, each of which is collecting information to populate different entity objects. My question is, upon the POST, how do I get a collection of objects that are populated with the right properties as a parameter to the Controller POST handler method?
so I would like something like this:
...
I've got some sample code that I'd like to refactor as I need it to work after a record is saved. It currently works after the record is first rendered (using the afterFilter). What it does is render the view that I want with the layout and saves it to a file.
function afterFilter() {
parent::afterFilter();
if($this->params['pas...
From the question itself:
class User
{
public function getByName($username)
{
//queries here
}
public function getById($id)
{
//queries here
}
}
...
I have a user class with static methods getById and getByUsername
I have the class in the application/libraries folder
How do I call the classes from a controller?
Theory 1:
$this->user = new User();
$this->user::getById;
Theory 2:
$user = new User();
$user::getById;
or is there a clean way of doing it much like how Kohana helpe...
I need to know how to use the asp.net mvc? i am new to this technology and i decided to use it and i have downloaded MVC release 1.0 so i need to know the steps needed fro setup the framework as after setting up the framework do i need to do any configurations in VS? i need a tutorial for creating mvc project and an example with code for...
Ok, so here's where I'm at. I've been studying MVC/OOP, trying to roll my own as an exercise. I think I've finally grepped the purpose of each letter in the MVC acronym - my question here pertains to a design decision.
I've set up an FC of sorts - it takes parameters from the $_GET array and loads the appropriate sub-template into a ma...
How do I implement a sidebar in Zend Framework?
I know that I can use a placeholder or something similar in Zend_layout, but how do I automatically generate the code for the sidebar in my controllers without having to call a sidebar class within every controller?
My setup is as follows
Application
- modules
- blog
- other modules
...