mvc

template language for ASP.NET MVC

Hi, is there any template language for ASP.NET MVC like JSTL and OGNL? Thanks in advance. ...

Null file when uploading via MVC

I have the following form on an .NET MVC View: <form method="post" enctype="multipart/form-data" action="/Video/UploadDocument"> <input type="file" id="document1" name="document1"/> <input type="submit" value="Save"/> </form> And the controller has the following signature that gets called: public ActionResult UploadDocument(Http...

Two UIViews, one UIViewController (in one UINavigationController)

Given an iPhone app with a UITableViewController pushed onto a UINavigationController, I would like to add a right bar button item to toggle between the table view and an "alternate" view of the same data. Let's also say that this other view uses the same data but is not a UITableView. Now, I know variations on this question already exi...

How should nested components interact with model in a GUI application?

Broad design/architecture question. If you have nested components in a GUI, what's the most common way for those components to interact with data? For example, let's say a component receives a click on one of its buttons to save data. Should the save request be delegated up that component's ancestors, with the uppermost ancestor ultimat...

How to access controller dynamic properties within a base controller's constructor in Grails?

Basically, I want to be able to assign objects created within filters to members in a base controller from which every controller extends. Any possible way to do that? Here's how I tried, but haven't got to make it work. What I'm trying to achieve is to have all my controllers extend a base controller. The base controller's constructor...

PHP, MVC, 404 - How can I redirect to 404?

I'm trying to build my own MVC as a practice and learning experience. So far, this is what I have (index.php): <?php require "config.php"; $page = $_GET['page']; if( isset( $page ) ) { if( file_exists( MVCROOT . "/$page.php" ) ) { include "$page.php"; } else { header("HTTP/1.0 404 Not Found"); } } ?> My...

Converting DTOs to View Models

Does anyone know of a good (read: quick to code) method for converting DTOs to View Models or mapping DTO members to View Model members? Lately I've been finding myself writing many conversion and helper methods but this is a very arduous and tedious task. Moreover, it will often needs to be done twice (DTO -> View Model, View Model -> D...

Class Interface in PCMEF

Hello, I have one question of PCMEF. The "interface" class between the layer, are is essential? How can I choise it's? ...

Restrict file types allowed for upload asp.net

Hi, I want to limit the allowed uploaded file types to images, pdfs, and docs. What is the recommended way to approach this? I assume checking the file extension alone is not enough, since an attacked can change the file extension as he wishes. I also thought about checking against MIME Type using PostedFile.ContentType. I still don...

Difference between MVC1 and MVC2

Can any one please let me know what is the difference between MVC1 and MVC2 and are they different from MVC Architecture? ...

MVC architecture EJB funcionallity

HI would like to understand how do ejbs work in an MVC architecture, what i do not get is: When the web app starts, the system creates an ejb for each record in every table of db or an ejb with all the records of all tables? Thank you very much ...

Which are aggregates in this DDD application?

I have been doing ASP.NET for many years and now playing catch up with MVC and DDD. I understand the majority of the concepts. I am re-developing a website which is for a sports website. Its essentially a CRUD style application but would like to DDD for learning and flexibility purposes. Have chosen not to do CQRS as that seems overkill ...

Quick question. Html.ActionLink and creating Internal Links ( #home, #about, etc. )

Hi there, quick question... How can I best create internal links? This is the markup I want to achieve: <h3>Title</h3> <ul> <li><a href="#prod1">Product 1</li> <li><a href="#prod2">Product 2</li> <li><a href="#prod3">Product 3</li> ... <li><a href="#prod100">Product 100</li> </ul> <div id="prod1"> <!-- content here --> </d...

What/Where are the Naming Rules for Controller actions in a Zend_Application App

I've created a Zend_Application using the zf tool that's bundled with Zend Framework (1.96, if that matters) What at the rules for formatting action names and how those action names get translated into into URL paths, and where in the Framework codebase does this happen? I ask because I tried to create an action like public function c...

.load is doing a post instead of get

Hi All, $('#div1').load(url, { id1=ident1, id2=ident2 }, function() { // Foo }) is doing a post instead of what I thought should be a get. Is there a way to make it a get? Thanks, rod. ...

Where to do an HTTP request when a model changes and be able to send a url to access it with the request

I'm trying to implement a PuSH Publisher on rails. To do that I need to send an HTTP POST request to another server (a PuSH Hub) when my model updates and one of the parameters is a url to my feed (the model that changed). Where in rails (in the MVC) am I able to do this request when my model changes and can build the url to the changed...

In Ruby on Rails, how is view code able to use instance variables that are set inside the controller code?

In Ruby on Rails, how is an ActionView object able to access the instance variables of ActionController object (how is view code able to use instance variables that are set inside the controller code)? ...

How do I reference members of a single object passed to the View?

I'm new to MVC2 in ASP.NET/C#, so please forgive me if I misunderstand something. I have code similar to this in my Controller: var singleInstance = new Person("John"); ViewData["myInstance"] = singleInstance; return View(); So in my view, Index.aspx, I want to be able to reference members in that object. For example, Person has a mem...

Project doing in mvc pattern using cairngorm framework.

hii .. I wish to do my project in mvc pattern. so I chose cairngorm framework and just read some of the document about this framework.But I cant understand deeply to do project using this framework. Have any methods or examples to study doing project in cairngorm framework?? If u can pleas help me. ...

Passing a string parameter in a JavaScript function on MVC

Hi there, I tried to pass a string value into a JavaScript function like below: <%= "'" + prop.property_description + "'") %>) But it does not seems to be the best option, is there a better way to do the above without concatenate the string values with "'"? Thanks ...