mvc

Is it MVC when the view doesn't interact with the model?

I've designed an MVC (in .NET) where the View has no link to the Model. It only knows about the Controller. The traditional MVC pattern has all parts communicating with each other. In my case, the Controller is basically a mediator. This keeps any exceptions or logic out of the View. It has zero dependency on the Model. Is this no ...

MVC invoking default page when opening a different page?

I've got a simple MVC (RC1) app set up, and I'm seeing some odd behavior. The Home/Index page shows a list of items using a ListView. Here's the HomeController code: Function Index() ViewData("results") = From m In context.MyTable Return View() End Function The Home/Index.aspx page just has a ListView on it, and the code behin...

Naming for Conventions for Actions and Views (Revisited)

I'm brand new to MVC and, as a learning exercise, I'm trying to re-write an old application as an ASP.NET MVC application. I'm a little unclear about some conventions which the question Action Naming Conventions only partially covers. Lets say I have two controllers: JobController and ClientController. Both of the controllers are goin...

How do you determine what technology was used to build your favorite site?

Before the advent of all of the MVC web development frameworks available (Django, CakePHP, Rails, etc.), it wasn't too difficult to figure out what sort of tools were used to build a given website. You could usually look at the file extension on a given page and know right there. But now, a great many newer sites (such as this one) use...

Is MVC good for mobile device?

Is it good for develop MVC Framework by using J2ME (Resource,Speed,Performance,...)? ...

Java Web Project Structure Best Practice

Hi All I am starting a new Java Web Project which is using Hibernate and a standard MVC Architecture. I have just started to layout the projects structure and while doing this I started to look around to see if there was any standards in this area, about where Controllers should go and generally the best way to lay everything out. Howe...

Mvc Release Candidate "File" ActionResult...

K... I'm doing something obviously wrong. I have a simple page with a file input control on and a submit button. I'm trying out the new "File" ActionResult that was released with the Mvc RC... All, I want to happen is when the submit button is clicked the selected file is uploaded to the database. This all works fine... Then, after the...

how to incorporate subdomains into MVC framework

Over the time i developed my own framework and it's working great - it's light, it's fast and is proven that can handle decent load. Now I'm working on project that can be described as a online shop where every user will have his sub domain where his items will be available for sale. My framework works by splitting request url by / an...

Accessing the model from a layout view in Grails

I'm using the layout support (sitemesh) in Grails which works fine. I'd like to adjust my layout to have it depend on whether or not a user is logged in or not. My grails-app/views/layouts/main.gsp contains the following code: <g:if test="${user}"> Username: ${user.username} </g:if> However, it appears as if the layout-GSP:s are un...

UI interface and TDD babysteps

OK, having tried my first TDD attempt, it's time to reflect a little and get some guidance, because it wasn't that successful for me. The solution was partly being made with an existing framework, perhaps making TDD less ideal. The part that seemed to give me the biggest problem, was the interaction between the view and controller. I'll ...

ActionFilterAttribute problem in ASP.NET RC 1

Hullo I trying to devlop a facebook application with ASP.NET MVC and the facebook API. For authentication with facebook I have the following code public FacebookAttribute() : base() { ActionParameterFacebookSession = "facebookSession"; ActionParameterFacebookService = "facebookService"; } public override void OnActionExe...

ASP.NET MVC RC ajax problem onsubmit

The problem with onsubmit still continues when I even use preventDefault option. My problem is the same with Asp.net mvc beta ajax problem <% using (this.Ajax.BeginForm("den2", "Deneme", null, new AjaxOptions { Up...

ActionMailer best practices: Call method in the model or the controller?

Sending an email is usually called after an action on a model, but the email itself is a view operation. I'm looking for how you think about what question(s) to ask yourself to determine where to put the action mailer method call. I've seen/used them: In a model method - bad coupling of related but seperate concerns? In a callback i...

Ajax.BeginForm refresh partial..?

Okay so, I have a form that is posting using ajax... <% using(Ajax.BeginForm(new AjaxOptions() { OnBegin="onBegin", OnSuccess = "onSuccess", OnFailure="onFailure" })) { %> On the server side I am passing back from the controller a Json object. Now, when the OnSuccess event fires I can get to the Json object by using "result.get_respo...

Telerik Controls with ASP.NET MVC: Does this violate the MVC model?

Will using MVC enabled Telerik controls with ASP.NET MVC violate the MVC model? And if not, what kind of performance hit (versus features and development speed) will there be with using Telerik controls over manually coding the HTML? ...

How do I convert this from C# to VB.NET?

ASP.NET MVC - what is this in VB.NET? Html.TextBox( "name", null, new { @class = "css-class" } ); ...

MVC Framework - Server-side DOM manipulation

I'm building an MVC framework, and I'm looking for native solutions / frameworks / tag libraries to draw from or to replace my framework entirely. I'm interested in the following features specifically: server-side DOM manipulation server-side events (page reload, form submit, node insertion, etc.) traversing the DOM tree using css sel...

Problem publishing an MVC app on IIS6

I have a small MVC app that works locally, but when I publish it to the server (running IIS6), all the links get messed up. For example, a typical link when running locally would be: http://localhost:3467/Exceptions?exdate=20090108 However, when I publish it to our dev server at \\deverserver\apps\MyProject, note the duplication in t...

In the Model View Presenter pattern, can a presenter take and use two different view interfaces at the same time?

I'm curious about the situation where you have a user control that you want to reuse throughout an application, but you also have a page or other control that also needs a presenter. So say I have an upload view and control public partial class UploadControlView : System.Web.UI.UserControl, IUploadView but I also have a page view ...

How do you handle Membership/Roles when using NHibernate?

I'm about to kick off a new project using NHibernate and ASP.Net MVC and have come upon the question of membership. I'm wondering if I should use a 3rd party NHibernate Membership/Role provider, create my own, or just skip the providers all together. So far I've looked at: Manuel Abadia's NHCustomProviders - It seems like a lot of conf...