mvc

Cappuccino, Django, AJAX, and fitting it all together - review my architecture!

I'm trying to get my head around Cappuccino. I'd like my StackOverview peers to review the architecture below and see if it makes sense - the aim is to utilize the unique benefits of Django and Cappuccino without doubling up where the technologies overlap... When the web browser requests a 'friendly' URL (eg, /, /articles, etc): DJang...

MVC vs Dependency Injection

Can anyone summarize or bulleted list the types of things that go in each layer, and what layers are there in an MVC type design if you account for Dependency Injection? I haven't found any clean diagrams that help me figure out where or try to go more in detail without writing an entire book. I've been doing windows forms apps (inclu...

Is it acceptable to use role based controllers in a MVC framework

If my site has several user roles say Admin, User, Manager and there are several modules of functionality that may be used by one particular user or by all users how should I go about naming my controllers? Is it OK to have role based controllers such as an Admin, User and Manager controller as well as controllers for shared functionali...

Can a subclass of UIViewController directly control a UIImageView

Is it bad form to point the view property of my UIViewController subclass directly at a UIImageView? Or should my UIImageView be embedded in a UIView? I can't think of any problems with it, and it seems to work alright, but I thought I'd ask the hive-mind if there are any negative consequences to doing this. ...

Why would i use ASP.NET MVC over just a plain ASP.NET application

Hi, If i have to develop a small CRM application, why would i choose ASP.NET MVC application over a conventional ASP.NET application ? Thanks, Chak. ...

.NET MVC custom routing

I was wondering if I could create a routing map with one more higher level than the controller. The typical routing would include "/controller/action/id". What I am looking for is something like "section/controller/action/id" or "controller/section/action/id". How can i do this? ...

Saving selected items values from dropdownlist to db in MVC asp.net with edmx

i want to save selected values from dropdownlist in edit mode. can u plz tell me how to do that...? here's my code: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit( Requirements reqToEdit, FormCollection frm) { try { // var dropdownlistname= int.Parse(frm["aa"]); // TODO: Add update...

MVC 1.0 DropDownList static data select not working

I'm new to MVC and C#. I'm trying to get a static list to work with a DropDownList control such that the selected value rendered is set by the current Model value from the DB. In the controller, I have: ViewData["GenderList"] = new SelectList(new[] { "Female", "Male", "Unknown" }, donor.Gender); In the view: Gender:<%=Html.DropDo...

PHP MVC framework for ASP.NET MVC/NHibernate developer

For class, I would like a to use PHP MVC framework very similar to ASP.NET MVC with NHibernate. I am very comfortable with ASP.NET MVC. I need to use PHP and MySQL. I would not like to be concerned with the SQL to save me time. I would like to just design my PHP model classes and controllers without all of that data-access logic behind i...

Helper method or Model or Controller?

Say I have a form_for with a select menu to assign a User on a belongs_to association: ... form.select :user_id, @users, :prompt => "Select a User" ... Currently I have @users in the controller as follows: @users = User.all.map { |u| [u.full_name, u.id] } I feel like this logic should maybe moved into a helper or even to the model....

string.Contains with Linq To Sql return an Null exception

My Linq To Sql query PROJETS = PROJETS.Where(p => (p.VilleArrive != "" && p.VilleArrive != null) && p.VilleArrive.Contains(alerte.VilleArrive)); is translated like this SELECT * // (many columns) FROM [dbo].[cov_Projet] AS [t0] WHERE ([t0].[VilleArrive] <> @p0) // city != "" AND ([t0].[VilleArrive] IS NOT NULL) // city != nul...

HtmlHelper Extension - User Conrol

Hi, I have a custom user control called ErrorNotificationBox. To place that on my page I do the old... <%@ Register Src="~/PathTo/ErrorNotificationBox.ascx" TagName="ErrorNotificationBox" TagPrefix="uc" %> <uc:ErrorNotificationBox Runat="server" id="myEnb" Caption="My Test Caption" /> Is it possible to extend HtmlHelper to include ...

Model Binding ASP.NET MVC

So I have a method like the following [AcceptVerbs("POST")] [RequiresAuthentication()] public JsonResult SomeEvent(ClientObject myObject) { } On my localhost/DEV/QA box the model binding works perfectly. However, when I move this to my production server, no dice. However if I change it to [AcceptVerbs("POST")] [Req...

MATLAB functions refusing to function depending on placement

I've written a very simple GUI in MATLAB that will convert temperatures. It is meant to serve as a tutorial for a class of students. A strange thing has happened though. As with any MVC design pattern, there is a model object, a view object and a controller function. In order to set the output field of the GUI (the converted temperat...

Can I return to the controller when loading a partial view? - asp.net MVC

I have a partial view that I want to basically "take care of itself" and not have to pass it a preloaded Model from my parent view other than a single ID. My partial view would then take the ID and load the relevant data from a db using code in the controller and pass it back to its view to display it. ...

MVC Design Patterns: seperating model and datasource

Obviously MVC promotes separation of concerns. One thing we are struggling with is proper separation of Model from the datasource, with IDs being the main sticking point. The interfaces that define our model call for an ID of type X Currently the datasource is SQL server.. but what if it is an xml file for some reason and our ID is of...

ASP.NET MVC: How to send an html email using a controller?

Hey There, What would be the simplest way to send a customised html email using asp.net? I suppose ideally I would like to send html via email rather than returning it to the browser via a ActionResult, as I normally would. This way I could build the email as a view, supply it with data via a model and then fire it using standard .NET e...

Form APIs for ASP.NET

I want to know about the availability of Forms APIs for ASP.NET, either for MVC or WebForms. I am learning about Django right now, and I really love their forms APIs. Having a similar thing in .net will be very interesting as most of my time is wasted on UI issues. Microsoft Dynamic Data gives me similar features, but it's not mature en...

Progress reporting from background task

I have a background task that imports files into a database. I want the user to see what is currently happening (collecting files/ importing files), which file is currently processed and how far the task has progressed. How can I do this in an easy way? The interaction between Model and Controller is so close, that I could almost put the...

How to go about planning a modular eCommerce web application?

I have been tasked with doing some planning and research for a home grown in house application. Our primary development language is ColdFusion and Flex3, so I wanted to attack this problem with a modular solution, using an MVC framework. I must mention that I am not a huge ColdFusion developer, but will be one of the architects behind ...