model-view-controller

MVC frameworks for .NET desktop applications [closed]

吃可爱长大的小学妹 提交于 2019-12-21 10:15:53
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I've been playing a lot with MVC lately in the forms of ASP.NET MVC and Django (MTV actually) and I must say that I love it. Are there

rails 3 - code shared between multiple controllers - where to put it?

会有一股神秘感。 提交于 2019-12-21 09:15:17
问题 I have a piece of code that is needed in 2 of my controllers, but not all of them. Where does this method belong? I have read about helpers, but those seem to be for view-related code. Someone proposed the lib-folder, but that seems 'too far away' from the controller logic, i don't need it in views or models. Has someone experience with that sort of problem? 回答1: There are three options, the easiest (though, the most unclean) is the application controller. The other two options are a shared

In Domain-Driven Design, can you use your domain entities in your UI?

我们两清 提交于 2019-12-21 08:26:09
问题 In many leading DDD projects, especially MVC style, I see the UI using display objects that mirror domain entities, rather than using those domain objects directly. This style is obviously for decoupling and separation of concerns, and I personally prefer this style. But what I'm not sure of, is whether this a strict tenet of DDD, or whether this is more just different developers' interpretation of it. Can you use your domain objects directly in the UI, and still be following the DDD

Serving static content with Spring 3

可紊 提交于 2019-12-21 08:06:12
问题 I'm trying to use resources mapping feature of Spring 3 and it does not seem to be working. Here is what I have: <servlet> <servlet-name>aaa</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>aaa</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> in my web.xml then in my aaa-servlet.xml I have the following: <resources mapping="/resources/**" location="

Using Rails helpers to render partials

丶灬走出姿态 提交于 2019-12-21 07:53:26
问题 From my understanding, helpers are mainly used to clean up views from some view-specific logic. But on my currently new project (legacy application), I've stumbled upon a lot of helpers that look like this def itemprepare render :partial => 'items/itemlist_summary' end Is this correct? Rendering a partial to me seems like something you would want to do in the view, as it doesn't include any logic that needs to be abstracted. Should I just inline all of these helpers? 回答1: Rendering a partial

Using Rails helpers to render partials

折月煮酒 提交于 2019-12-21 07:51:14
问题 From my understanding, helpers are mainly used to clean up views from some view-specific logic. But on my currently new project (legacy application), I've stumbled upon a lot of helpers that look like this def itemprepare render :partial => 'items/itemlist_summary' end Is this correct? Rendering a partial to me seems like something you would want to do in the view, as it doesn't include any logic that needs to be abstracted. Should I just inline all of these helpers? 回答1: Rendering a partial

Backbone.js singular Models not in collection

落花浮王杯 提交于 2019-12-21 07:33:57
问题 Being new to Backbone.js, just wanted to clarify the correct way to go about this simple task. Developing a web app, almost always, you'll have user accounts, where users can login to your app, and view their personalized data. Generally, their page might show some widgets, their user information (name, avatar, etc). Now creating a Model per widget and grouping these in a Collection is an easy concept. However, would their user info be stored in a singular Model, which would not be apart of a

Backbone.js singular Models not in collection

断了今生、忘了曾经 提交于 2019-12-21 07:33:49
问题 Being new to Backbone.js, just wanted to clarify the correct way to go about this simple task. Developing a web app, almost always, you'll have user accounts, where users can login to your app, and view their personalized data. Generally, their page might show some widgets, their user information (name, avatar, etc). Now creating a Model per widget and grouping these in a Collection is an easy concept. However, would their user info be stored in a singular Model, which would not be apart of a

MVC 3 keeping short url

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 06:24:00
问题 I have MVC3 application, where I want to keep short URL. what is the best or clean way to do this? Lets say I have two controllers Account and Home. I have all the account related tasks Logon, Logoff, Profile, FAQs etc. in Account controller. All the main tasks in home controller like TaskA, TaskB, and TaskC. I am looking for URL as below: www.mydomain.com/Logon www.mydomain.com/Logoff www.mydomain.com/Profile www.mydomain.com/FAQs www.mydomain.com/TaskA www.mydomain.com/TaskB when user first

Sencha Touch & ExtJS profiles for desktop and mobile in one web project/vhost?

社会主义新天地 提交于 2019-12-21 06:22:24
问题 I'm creating a web application with desktop and mobile versions using ExtJS and Sencha Touch. ExtJS 4 and Sencha Touch 2 use an MVC approach, and Sencha Touch 2 incorporates "profiles" for different devices (iPhone, tablet, etc.). ExtJs 4, however, has no notion of profiles. Is it realistically feasible to for dependencies for desktop, iPhone, and iPad versions of the app to live under one vhost, in the same app directory hierarchy? Or, is it generally more acceptable to use different vhosts