mvc

Where does Zend_Form fit in the Model View Controller paradigma

The Zend Framework is mainly meant for MVC use. One of the very usefull components is Zend_Form. I have a bit trouble finding the place of Zend_Form. Is it part of the view, model, or controller and which responsibilities should I give it. The thing is, Zend_Form does two things: decorate and render the form and validate it. The first ...

MVP or MVC - Which one allows to write loosely coupled code?

Though I have gone through some articles regarding MVC and MVP, I am not able to take decision to write code with MVP or MVC pattern? Which pattern will allow us to write loosely coupled code? Can I assume Asp.Net web forms is MVP by default? ...

How can I combine @Aspect with @Controller in Spring 3?

Hello! I'm trying to setup a Spring 3 Web MVC project, using the @Controller, annotation-based approach. package my.package @Controller @RequestMapping("/admin/*") public class AdminMultiActionController { @RequestMapping(value = "admin.htm", method = RequestMethod.GET) public String showAdminSection() { return "admin"; } My di...

Java web application MVC refactor from procedural to Object Oriented

I have a controller servlet that will either call the service of Editing (adding/deleting appointments) the calendar or just Displaying it. actionMap.put(null, new DisplayCalendarAction()); actionMap.put("display", new DisplayCalendarAction()); actionMap.put("modify", new EditCalendarAction()); DisplayCalendarAction and EditCalendarAc...

CakePHP: changing link to 'tags/index/php' to just 'tags/php'

Hi, I have a controller called TagsController that takes the tag name from the url in the index action to get a list of projects with that tag. <?php foreach($tags as $tag){ echo "<span class='homepagetags'>".$html->link($tag['t']['tag'], array('controller' => 'tags', $tag['t']['tag'])) . "</span> x " . $tag[0]['NumOccurrances'] ...

MVC: Property change events for nested models

I'm building a GUI application and try to adhere to the MVC principle as good as I can. Therefore my model fires PropertyChangeEvents with the help of PropertyChangeSupport so the GUI knows what to update when. The model of my application is nested, i.e. I have a main model class that contains some properties or Lists of other model cl...

CakePHP: URL Routing Advice

Hi folks, I have a website that I want to modify the routing on. My problem is that in this specific scenario I'm not sure that what I want is even possible. I have a projects controller with an index action/view and a view action/view. When I go to projects/ i see a list of projects. when I go to projects/view/project-slug I see that ...

Java/Spring: Beans for the View

I have a dilemma and I'm not sure about the best way to start solving it. I'm working with an old code base at work. Some of the domain objects (and db tables behind them) don't make a lot of sense. eg, deleted is stored as a long, age is stored as a String, etc. Which I've been able to work with fine. In the view I can say if (deleted ...

IRepository, IService, Unity in an ASP.NET MVC Application, reference question

I'm new to Unity, but this question is more generic to IoC, and I’m pretty new to implementing IoC as a whole. I have VS2010 solution with this project structure (simplified slightly): Business Objects – Folder DomainModel (Class Lib prj.) – Entity Framework 2 POCO entities Data Layer – Folder DataAccess (Class Lib prj.) – EF2 EDMX...

Boilerplate code for MVC web-app?

I've never had the joy of putting together a java web-app in the MVC form myself before? Stopping shy of a letmegooglethatforyou.com request, would any on here be able to recommend a good place I might find a good boilerplate src to learn from? I seem to learn best that way... With Thanks, Mike ...

MVC Model View for Complex Object

I am very new to MVC and I have a Model like this User : FirstName : TextBox LastName : TexBox User Commitee : [CheckBox Textbox] [CheckBox Textbox] [CheckBox Textbox] I store if user is in committee in a separate table.I need to insert selected check box value and related text box to database.How can I achieve this ? Can this be po...

In your opinion, when using the Zend Framework is it bad practice to have a view script with out an associated action?

I ask because in my Zend Framework app I use some view scrips that do not have an action associated with them. (Similar to the example on page 102 in the Zend Pro Framework Techniques book http://books.google.com/books?id=znA1LgQSxsoC&amp;lpg=PP1&amp;dq=Pro%20Zend%20Framework%20Techniques%3A%20Build%20a%20Full%20CMS%20Project&amp;pg=PP1#...

MVC Model Design

I am having issues to understand MVC model structure.I have 3 tables connected by Foreign keys. Users,UsersInCommittee,Committees .Tables can be though of as below. User: UserId FirstName Last Name Committees: CommitteeId Name UsersIncommitee: Id UserID CommitteeID ExpirationDate I need to create a Users create , edit , list page so...

asp.net MVC "Add View" wizard won't pre-populate fields when using a ViewModel

In VS 2010, When you use the "Add View" wizard to create an Edit view with a strongly typed view, such as Models.Person, the template generates all of Person fields for you. If you use a view model instead, like this: public class PersonVM { public Person person; public List<Team> TeamList = new TeamServices().TeamPickList(); ...

Rename Web Role in VS 2010 Cloud Service Project

I just started using VS 2010 to create a Cloud Service (HealthTracker), and I attached a MVC2 web project to it. When I hit Debug, the dev fabric was started and I was able to navigate my web app on my machine as expected. I decided MVCWebRole2 was a bad name for my web app, so I renamed it to HealthTrackerMVC. I used Refactor --> Ren...

ASP .NET MVC AJAX BeginForm InsertionMode.Replace Not Working well

I can see the result when entering anything in text field. The result does go to the DIV I want. However, I look at the source code for the page, I don't see the replacement element. For example, I enter 'aaaaaaaaaaaaaaaa', click submit button, I see the result as You entered aaaaaaaaaaaaaaaa; But right click to open source, I don't see...

Error Message Using Ajax in MVC when javascript disabled

Hi New to stackoverfloow and in need of help, when submitting a form using ajax with javascript disabled, i get the following error: Exception Details: System.InvalidOperationException: The model item passed into the dictionary is of type '<>f__AnonymousType11[System.String]', but this dictionary requires a model item of ...

What is ASP.NET MVC about ?- is it just about URL's?

MVC frameworks in general? Is it different from MVC in desktop GUI applications? What exactly is it that makes it easier to test than WebForms ? (Can't you test Code Behind in a similar way to MVC controllers) I have the impression that ASP.NET MVC is mostly about clean URL's - with controllers processing user input in the form of URLs....

MVC Logon just refreshes page - doesn't log on

Hi I have 2 MVC sites on a shared hosting environment. The first one works fine and I can log on and use the membership provider etc.. no problems. A second site can see the database and retrieve other (site specific) data on its pages. However when I try to log in I simply get a page refresh - no error messages with invalid UC/PW, and n...

How to display data from 2 related tables in Zend Framework

Hello I need help with displaying data from 2 table. So i Have 2 models: //Klasy.php class Model_Klasy extends Zend_Db_Table_Abstract { protected $_name = 'klasy'; protected $_primary = 'id'; protected $_referenceMap = array( 'Nauczyciele' => array( 'columns' => array('Wychowawca'), 'refTableCla...