mvc

Form Collection item coming up as null

hi everyone, I am trying to use form collection and this is what i am using to submit the form <%=Html.ActionLink("Update", "Calendar", ViewData["sub"], new { onclick = "this.form.submit();" })%> just for the heck of it i tried replacing it with a dropdownlist that retains its value and all of a sudden i get all my form collection ...

Why should I use an MVC framework for PHP?

There are lots and lots of opinions available about what framework is the best choice as well as resources and tutorials to help you learn to use them. What I'm having a hard time finding is a clear explanation of what the "ah-ha this is why I learned all this" moment. So just to clarify, I have never used any framework and don't reall...

MVC: Data Models and View Models

I've read some MVC advice in the past regarding models stating that you should not reuse the same model objects for the domain and the view; but I haven't been able to find anyone willing to discuss why this is bad. It is my opinion that creating two separate models - one for the domain, one for the view - and then mapping between them ...

WebForms to MVC conversion...

I've got a pretty simple site (around 8 pages) with only one way page containing any significant codebehind, and I'd like to try learning MVC, using it as the test. Is it best to start a new MVC Web App from scratch and cut-and-paste the HTML in, or will it be easier to retool the existing files. Basically, what am I in for? What's it ...

Best way for authentication in PHP

Hi Folks, What's the best and most secure way to go when writing an authentication library in a model-view-controller way? The things that give me a hard time are keeping track of the users activity and remembering users via a cookie or storing sessions in the database? Thanks in advance :). ...

MVC and Observer pattern

Hi, I am having problems with implementing Observer pattern in my project. The project has to be made as MVC in C#, like a Windows application. In my domain model I have for example Country class and Country repository. I have a Country controller and views for seeing all countries(a list on a form), adding new country, and editing exis...

What is the Linux friendly MVC Web based framework with highest amount of developers?

MVC is a great concept, but choosing among all the variety and flavors out there is not a simple task. Very soon we are going to start a new web development project and we want to do it in a solid, enterprise class, long lasting language. We are choosing linux friendly language. Even we know that MONO will allow us to run .NET in linu...

Any way to get the size attribute from LINQ generated class members ?

I would like to avoid to specify manually maxlength attributes for all form input elements, and instead to use size information from the Data Model if possible: e.g. <%= Html.TextBox("Titel", ViewData.Model.Titel, (object)new { @maxlength = "10" })%> would it be possible "translate" the DbType Attribute in the LINQ class ? [Column(S...

.NET MVC: How to create form from controller?

In .NET 3.5 winforms, I've created an MVC. I'd like to take the controller part and put it into a separate assembly, so that it has no knowledge of the view. My app uses five forms in its view. The controller takes care of initializing the forms at different times, which means the controller has a reference to the view (something I'd ...

Slow operations in the Model-View-Presenter pattern

How do you handle slow operations in the Model-View-Presenter (or MVC or M-V-VM or whatever variant you are using)? When you have a slow operation in WinForms or SWT/JFace or whatever desktop framework you are using, you have to run it on a background thread to avoid completely locking up the application. Where do you handle this? I ca...

How do I maintain scroll position in MVC?

Im working on a project in MVC and have enjoyed learning about it. There are a few growing pains but once you figure them out it's not bad. One thing that is really simple in the WebForms world is maintaining the scroll position on a page. All you do is set the MaintainScrollPositionOnPostback property to true. However, in MVC, Im no...

Is there a non-microsoft / open-source MVC framework for ASP.net ?

I have seen in the past that before MS takes a dash at something, there is awareness in the .net community for it already. I am talking here about the ALT NET and Open Source folks who are like " If MS has come up with Entity Framework, we have NHibernate ". I was just wondering if an MVC framework exits that is worth looking at which is...

MVC: Multiple submit forms in one form tag

I'm just starting to play with MVC, and something isn't clicking with me. I understand how to make a simple input form, and use a submit button to post the form set up like this: <form runat="server" method="post" action="/Home/CreateNew" > But what happens if you're whole app is inside one form tag, and you want to have multiple inpu...

A Generic, catch-all action in Zend Framework... can it be done?

This situation arises from someone wanting to create their own "pages" in their web site without having to get into creating the corresponding actions. So say they have a URL like mysite.com/index/books... they want to be able to create mysite.com/index/booksmore or mysite.com/index/pancakes but not have to create any actions in the in...

MVC with different presentation

I have a controller build for a web application with a web presentation. But now I need to create a iphone (mobile phone) version of this application. Basically this is a blog application with comments. In the regular version comments are loaded at the same time as the entry. But on the mobile application I want to comments to be load o...

Moving a system from sort of a class system to an MVC format

I am working on a fairly large system developed by another programmer who no longer works here. And since i am the manic serial killer who is maintaining it and knows where he lives. But fun things aside, the system is kinda developed as a class system and kinda not and i have already setup a developer version and can deploy new versi...

Best designs for breaking down business logic and data layer when they seem to overlap?

I'm building a MVC web application (using the Spring MVC framework), and I'm a little stumped on the best way to design a particular area. The application has to interact with a series of web services which are not really all that greatly designed, and don't offer much abstraction in and of themselves - basically there is a web service ...

ASP.Net MVC RC Unit Testing Ajax Requests

We have just started using ASP.Net MVC Release Candidate and the test project we have was previously testing Ajax requests with MVC beta. The old code looked something like this: Mock<HttpRequestBase> request = new Mock<HttpRequestBase>(); Mock<HttpResponseBase> response = new Mock<HttpResponseBase>(); Mock<HttpContextBase> context = n...

ASP.NET MVC Framework 'REST-like' API

Hi all, I have developed a 'REST-like' XML API that I wish to expose for consumption by third-party web applications. I'm now looking to implement a security model for the exchange of data between a third-party application and the 'REST-like' XML API. I would appreciate suggestions for a suitable asymmetric encryption model. Thanks. ...

Problem with ASP.NET MVC routing

Hi everyone!! I have a page that I want it to have 2 different routes: "/Admin/Schedules" AND "/Schedules" "/Admin/Schedules" if for admin users and the page will render some admin features and it needs to log in... on the other hand, "/Schedules" is for non-logged users and it will render non-admin features... But, the page is t...