mvc

Zend Framework: How to get default param?

How do I get the 'default' param if not specified? Consider the following: http://localhost/controller/action/id/123 In my controller, I can get the value of 'id' using $request = $this->getRequest(); $id = $request->getParam('id'); If the URL is http://localhost/controller/action/456 how do I get the value of 456? What is the ...

suggest me a .net architecture to implement

Hello Experts, I am about to start a new project for the catering institute where following list of modules needs to be covered. TELEPHONIC INQUIRY PROCEDURE: where user will fill up online form and will be saved in db. Follow up module will be associated with it to manage follow up and after he paid the fees for prospects, his exam ...

Is Model-View-Controller the best design pattern for developing web apps?

Is Model-View-Controller (MVC) the best pattern for developing web applications? It seems most of the frameworks in use follow that pattern- Rails, Django, and now ASP.net MVC. ...

Puzzling behavior of ASP.NET MVC app

I've got a simple search page on my Index view with a dropdown and a text box. I'd like to remember the user's preference for the dropdown, so I store that in a table and retrieve it as needed. Here's the Controller function: Function Index(ByVal lob As String, ByVal filter As String) As ActionResult If If(lob, "") = "" Then ...

What is the mechanism that keeps various sections on page from being repositioned when browser resizes

In this web site when you shrink the browser window the white space on the left and right disapear first, following by the shrinking of the right panel, followed by the main container panel. I have recently started to use ASP.NET MVC and in my test case my containers drop below the other containers as I resize the browser window. I am us...

Why can't my Theme.Master find its Site.css?

<link href="Site.css" rel="stylesheet" type="text/css" /> This works fine from Theme.Master (Views/Themes/Blue/Theme.Master) on my local machine, but not from the hosted provider of its final home. The Theme.Master can find the css if the css is in the Content folder, in any subfolders of the Content folder, but not if the css is in th...

What's an alternative to MVC?

Seems like every project I'm on uses a Model View Controller architecture, and that's how I roll my own projects. Is there an alternative? How else would one create an application that has persistent storage and a user interface? ...

MVC - Conditions in views

Hi, Quoting from the NerdDinner ASP.NET MVC sample application <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <% if (Request.IsAuthenticated) { %> Welcome <b><%= Html.Encode(Page.User.Identity.Name) %></b>! [ <%= Html.ActionLink("Log Off", "LogOff", "Account") %> ] <% } else { %> ...

Naming conventions - One rule for Controllers, no rules for Models and Views

In ASP.NET MVC controllers exist in a folder called Controllers. Their names must end Controller otherwise things just don't work (you get an HTTP 404 error). However, Model names don't have to end Model and View names don't have to end with View. This seems inconsistent...why (from an MVC or design standpoint) do controller names have...

Keep getting "resource cannot be found" until I edit controller

My ASP.NET MVC project is returning "The resource cannot be found" if I start the app without first making a change to one of the controllers. If I go to a controller and just add a space, it works correctly. If I then go to a view, add a space, and hit Ctrl-F5 again, I get the error again. What's going on? ...

What defines the traditional "page" concept in MVC?

I currently use CodeIgniter as my framework of choice when using PHP. One of the things I am wrestling with is the idea of a "page" and how to represent that properly within MVC. To my knowledge, CodeIgniter has a front controller that delegates to page controllers. So in my thinking, each page would have it's own controller. But all...

Identity columns and security in a RESTful web application

Question Should autoincremented identity columns have a non-default seed/increment when used in a RESTful web application? Background I'm working on my first ASP.NET MVC application and trying to keep my urls RESTful. There is no separate administrative web site for the application. I use attributes to control who can access what pa...

MVC Views and the {

Duplicate: How do you get server blocks <% %> to format well in Visual Studio? Working with MVC Views, the Visual Studio editor keeps reformatting my code to look like this: <% foreach (var day in week.Days) { %> I'm trying to keep the MVC View as clean as possible, I'd rather it just look like: <% foreach (var day in w...

MVC for desktop app with no data layer.

Hi all. Question might be tricky (because of its nature or my way of describing it), so really read this before answering. I have this app to write: a) desktop app; b) no data layer in sense of database, files or any other repository (no need to save, store or load data); c) app will have some computation algorithms implemented (Genet...

Is this online tutorial a good starting point for creating a PHP5 framework for learning reasons?

I have found this tutorial online http://net.tutsplus.com/tutorials/php/creating-a-php5-framework-part-1/ I have created myself a simple sort of framework, but I have not been too knowledgeable whether I have followed best practices and the like... which I really would like to do. I am looking at making my framework more unified by th...

ASP.NET MVC Sharing JavaScript files from Class Library

Hi, I am building two ASP.NET MVC sites. There is a certain amount of content I wish to be able to share between the two sites. I created a class library and was able to share a large portion of what I needed too. However I would really like to know how I could share contents such as images and javascript files, so I do not have to d...

Currency Library

I am looking for a .Net class/library to use with currency acronyms in the same way the TimeZoneInfo class works with timezones. I need to populate a drop down list with these acronyms and store the result in a databse. This value will be used to retrieve up to date exchange rates from the web at a later stage. Any ideas? :] Thanks e...

What is the problem with not using Spring

I am trying to understand Spring. I have read about it and done some tutorials. I kind of get the IoC paradigm and the fact that DI is its implementation in Spring. My question is this: What do you lose by not using Spring? I understand this is a big question and somewhat subjective. But if you could write a few dot points or give an ex...

ASP.NET MVC - Is IsPostBack still here?

I know, I know, I know. I shouldn't be doing webforms inside of MVC, I completely agree. But, the people who sign my paycheck will not approve a complete conversion of our site to MVC right now. So I am taking incremental steps, page by page, to convert them over while adding new features in MVC. So my question is how can I access th...

Calendar in Zend Framework

Hello, I looking to create a custom calender with Zend Framework, I am hoping that it will be able to list all the days of the month for the coming years and then have a different bg color on the date if there is an event on this. I am however struggling to create this firstly because it needs to go into the layout view, rather than an...