mvc

Having an issue understanding why NerdDinner MVC is returning an error

So I am following ScottGu's NerdDinner tutorials, and am having some trouble wrapping my head around this error. I am trying to implement CRUD, so at first, while editing data, I started with this code: public ActionResult Edit(int id) { Dinner dinner = dinnerRepository.GetDinner(id); return View(dinner); ...

Symfony Sandbox 1.2 returns a blank page after unpacking into web folder

I have symfony 1.0 running on my Windows XP machine but have recently wanted to try Symfony 1.2. I unpacked the sandbox and set up a virtual host. The page returned is blank. http://sf_sandbox/web/ returns a blank page http://sf_sandbox/web/frontend_dev.php/ returns a blank page PHP, SQLite, Mysql are all fine. I tired adding echo ...

ASP.Net Html.DropDownList Selected Element not Selected

Hi, I have a site that was using ASP.Net MVC Beta 5, and I have just upgraded it to ASP.Net MVC 1.0. I am having trouble with the selected item in a drop down list. The follow person has a similar question (http://stackoverflow.com/questions/589935/html-dropdownlist-in-asp-net-mvc-rc-refresh-not-pre-selecting-item) but I there is no an...

Choose between ASP MVC, Silverlight, or both?

Hi All I am about to make a web application that should contain grids with huge portions of data, where speed is of the essence (filtering, sorting, editing...), and the client wants it made with Silverlight controls; So, my question is, which path should I choose: make it in Silverlight from scratch, or combine ASP.NET MVC project w...

C++ MVC Model - How should it be implemented?

Hi, I'm a little confused as to how the model should 'work' in my basic C++ implementation, or rather how the data from say the database backend should be encapsulated/worked with. My thoughts at the moment are for a model with for example a static findById() method, which would return an instance of that same model, which would then r...

SelectedItem not being remembered in SelectList in ASPNET.MVC

I have the following code which is meant to populate a dropdown with a bunch of integer values and make the currently selected value (in this case, 13) be the selected item. I've used the same technique but for string values and it works great, remembering each time when I get to the view what the current value is. In controller: va...

Using ajax calendarextender with mvc

Hi, I'd like to use a calendar control to edit a date in my mvc application. The ajaxtoolkit's calendarextender seems like a good choice. However, when I reference the name given in markup, the application reports that the control cannot be found. How can I reference the textbox created with mvc html-extensions? Thanks, Anders, Denma...

How can one identify the operation to perform in a servlet?

Hello! I am trying to follow this example but I can't understand this part: Imagine also that the servlet's context path is myServer/myApp/servlets. The servlet container would direct a request with URL myServer/myApp/createUser.do myServlet to myServlet, because the request URL matches the pattern *.do. Servlet myServlet can extract th...

PHP and XML: The cost of parsing a large XML file every page request.

What is the cost of parsing a large XML file using PHP on every page request? I would like to implement custom tags in HTML. <?xml version="1.0"?> <html> <head> <title>The Title</title> </head> <body> <textbox name="txtUsername" /> </body> </html> After I load this XML file in PHP, I search for the cus...

asp.net mvc : custom ViewModel form post

Hi All, Just starting out with ASP.NET MVC and have come across a stumbling block already. The situation is that I have a custom ViewModel to pass to the view, which contains a list of items to be rated ( will be using the jQuery star rating ), so these are created using the radio button helper, to have the same name, just different va...

asp.net - how do i determine which checkbox correlates with each row (user)

I am using asp.net mvc. I have generated a view that retrieve all unapproved users in the asp.net membership table. I have put checkboxes next to them for someone to bring up a view. The goal is that someone should be able to check certain checkboxes, hit save and that will go back to asp.net membership and change the IsApprove flag t...

For a website, is it true the MVC pattern is only used on the server side?

I'm diving into the field of web development after ten years of desktop application development. I'm learning as fast as I can the high level concepts, one of them being MVC. I've noticed things like javascript, css, and html don't fall into the M, V, or the C. I haven't explicitly read it anywhere, but am I right to understand that t...

Ajax Architecture - MVC? Other?

Hey all, I'm looking at building an ajax-heavy site, and I'm trying to spend some time upfront thinking through the architecture. I'm using Code Igniter and jquery. My initial thought process was to figure out how to replicate MVC on the javascript side, but it seems the M and the C don't really have much of a place. A lot of the JS w...

How much logic do you put in views?

Hi, I am currently unconfident, if I can put a "if/else"-construct into my view? How much logic do you put in your views? My dilemma: I am rendering a navigation. So, I have to differ between the current/active menu item and the rest. The current menu item gets a special css class. I don't know how to handle this in a better way than...

What is the best practice for displaying multiple views in Codeigniter?

I'm trying to determine the best practice for calling multiple views from the same method in a controller. Is it preferable in the controller to make one view call, then have that view call all the views it needs, or call all the views you need in sequence in the controller? Example: function index(){ //set all data variables ...

(MVC) Controller in shared library?

In MVC, do controllers belong with an application, or can they go into a shared library? For example: //this is a shared library LibShared //these are two apps appA ->LibShared appB ->LibShared Shouldn't each app implement its own MVC and use any shared libraries as perhaps part of the app's logical model or simply another library r...

using MVC MVP patterns in winforms

I have read online about MVC, MVP patterns for UI design. But, I can't quite grasp how the it works even after re-reading it couple of times. I use C#/winforms for development. Can someone point me to a good book/blog/website? Something that will make me decide if I should adopt it or not. Thanks. ...

Facebook Libraries for .NET

I'm trying to create my first application for facebook using MVC, but can't decide on the API library to use. I found this post, but its over a year old and I'm sure a lot has changes since then. how would you say all these projects stack-up? Facebook Developer Toolkit 2.1 .NET Facebook API Client Facebook.NET Facebook Developer T...

MVC and the communication between them. What did i miss?

Hey all, trying to learn objective-c. It was going quite well, until I realized I was missing a link. When building in the spirit of MVC, I understand it as you Model and View should never talk to eachother. I have this problem I'm messing around with now. A model containing a polygon class. Contains an polygon object with attributes...

How to serve a MVC-view with image paths from directory?

I'm kind of new to the whole MVC concept, since I just recently started developing a web site using CakePHP framework. Therefore I turn to you asking for how to achieve the following in a best-practice-way. I want to be able to place a number of pictures in a directory, which then is scanned for all filenames in it. These filenames shou...