Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [view]

The tag has no usage guidance.

0
votes
0answers
21 views

Changing UserControl based on property in ViewModel

I want to change the view inside of a ContentControl based on an enum property in the ViewModel for the Window hosting these controls. Below are two sample UserControls: <UserControl x:Class="...
12
votes
2answers
2k views

Clean Architecture: What is the View Model?

In his book 'Clean Architecture', Uncle Bob says that the Presenter should put the data that it receives into something he calls the 'View Model'. Is this the same thing as the 'ViewModel' from the ...
0
votes
1answer
66 views

Is creating near duplicate partial views solely for populating html elements with Ajax returns violating DRY?

Maybe anti-pattern is a better word for this question. I do not know, but I mean a violation of DRY. Id like to reuse a partial view, and I can, but that partial view has other things in it I don't ...
1
vote
2answers
5k views

MVVM Correct way to switch between views occupying the same footprint on the screen

An example is switching the main view according to the selected item in a hamburger menu. Also sometimes it is just a small part of the GUI that changes according to the application state or according ...
0
votes
1answer
168 views

Which should subscribe to view events - the presenter or the view?

I have some Views and Presenters. In my architecture, they have a circular dependency, so the View has a reference to the Presenter and vice-versa. Now, which is the more commonly used: class View { ...
0
votes
2answers
33 views

Organizing specific human messaging in the web applicaiton code

Python (Flask) web application has a big portion of email/SMS messages generated by templates, translated by Flask-Babel. To my eye, having literal constants for the message in views, among other ...
1
vote
1answer
290 views

Why might we need multiple views based on a single viewpoint?

As defined in Software Systems Architecture (chapter 3 - Viewpoints and Views) a view describes a particular aspect of architecture, and a viewpoint is a collection of patterns, templates, and ...
3
votes
1answer
3k views

Is it bad practice to insert and update through database views?

Currently we are slowly replacing a custom made ORM framework with Entity Framework (EF). One of the steps is to make sure we can update and insert records through database views with EF, just like we ...
1
vote
1answer
97 views

If I have to check integrity of the strings coming from the View, where should I do it?

The scenario: I have a GUI with textfields and radio buttons where the user insert information for a 'Person' Here are the classes of the model and of the view-model: enum Gender { case Male, ...
0
votes
2answers
270 views

Abstraction from database - handling ID types

I am using MongoDB in a project, where relationships between collections are created via referencing a unique document ID of a special BSON ObjectID type. So I can have a School document like this: {...
4
votes
3answers
662 views

Best practices for front-end project with many views

We are a small front-end dev-team working with 18 months of experience and recently we got in touch with a first major project, ie. a medium complexity back-office web app, but with lots and lots of ...
0
votes
1answer
171 views

Is MVC (or variations) the right pattern when retrieving data, then parsing and displaying it?

Due to these answers, I've decided to implement MVC (or a variation of it) into my application. But the more I read the more confused about this topic I get. Some people say the business logic belongs ...
1
vote
3answers
182 views

Is there a design pattern which describes separated join-only views and format-only views

When I'm building views in SQL, I tend to do one of the following: Views that contain logic and criteria for selecting and joining records. I.e. "what records am I interested in and how do they fit ...
2
votes
1answer
95 views

Database Object That Reads From Two Tables and Writes to One

I am updating a database design that must be compatible with old and new applications. My goal is to make a design change which minimizes impact on the existing code. The Design Change Currently our ...
1
vote
0answers
58 views

Where does export file code belong in an MVC implementation that is designed mainly for HTML

I have an MVC website set up with a base view (Layout.php) containing HTML header and footer code. Other views (such as CarView.php) will extend this class. One of the methods in this class is CarView-...
1
vote
1answer
37 views

MVC Set or Read View Components

I often see the follwing example when reading about MVC (example is in Java, but question adapts to all OOP languages): class View{ JTextField tfName; public String getTfNameText(){ ...
2
votes
3answers
236 views

Best practise for databinding when a non-data object is included with the data

I'm using .NET with Windows Forms, but I believe there may be similar concerns with other toolkits. Suppose we have a list of objects of a certain type. Using an example to make the following easier ...
10
votes
2answers
684 views

How much should a view know about model?

I am building an application in python with a python wrapper for WPF and with DAG support. I am currently at a point where I have to decide a consistent way of interacting between the data and the ...
2
votes
3answers
1k views

Database view performance - good practice?

Often times at work we opt to create views in the database to expose the data that we want to work with instead of building some monster query in our code. Being somewhat new to this field my ...
0
votes
1answer
5k views

Javascript function should call python logic in django web development without additional triiger

I have been trying to solve this problem for sometime now. This is regarding django web development. I have an HTML page which has a Javascript function to upload an image file from the users local ...
22
votes
3answers
12k views

where exactly should python business logic be placed in django

I have just begun to learn Django/Python/Web Development. This problem has been troubling me for a while now. I am creating an application with multiple templates in Django. I have a views.py which ...
3
votes
1answer
955 views

Translating views in MVC

What is the best practice, when it comes to views' translation in MVC design pattern, in multilingual website: Always have only one view file and translate its particular strings with a framework ...
1
vote
2answers
1k views

MVC Best practices (view acquiring data directly from model) and Yii Framework

I'm using Yii for a few years and only right now I realized, that their demo application (empowered by CRUD auto-generation tool -- Gii) seems to be breaking key MVC architecture pattern. I'd like to ...
31
votes
7answers
3k views

Is it possible for business logic not to creep into the view?

I've developed for several web application projects for the last 3 years, both personal and at work, and I can't seem to figure out whether it's possible for at least some business logic not ending up ...
14
votes
3answers
30k views

Mapping between 4+1 architectural view model & UML

I'm a bit confused about how the 4+1 architectural view model maps to UML. Wikipedia gives the following mapping: Logical view: Class diagram, Communication diagram, Sequence diagram. Development ...
1
vote
1answer
132 views

What is the best way to keep both html document structure and php control structure strongly visible in complex view file

I create a lot of views in my work as part of the common MVC pattern applied in web frameworks like Code Igniter and Cake. I also adhere to the following maxim as best I can: fat models and library ...
4
votes
3answers
4k views

Arrays vs Objects in view template

I am wondering, in view templates, what would contribute to me choosing between using arrays or objects for getting things printed out in arrays {{$user->zip_code}} vs {{$user['zip_code']}} I'm ...
2
votes
5answers
3k views

What are the reasons to create UIView subclass?

I've noticed that there are a lot of UIView subclasses in my legacy project. Mostly the only reason of such a subclass is to split bigger view into custom subviews and provide layout for its subviews ...
1
vote
1answer
2k views

PHP MVC error handling, view display and user permissions

I am building a moderation panel from scratch in a MVC approach and a lot of questions cropped up during development. I would like to hear from others how they handle these situations. Error handling ...
2
votes
3answers
220 views

Where should “display functions” live in an MVC web app?

I'm using the Yii Framework which is an MVC php framework that is pretty similar to your standard web-based MVC framework. I want to display the related data from a many-to-many table as a list of ...
16
votes
6answers
15k views

Rails - Does using partials slow views rendering?

I'm having performance issues on a Rails 3.1.0 application, now I've done dome changes on my queries with AR and so but views still takes too many time to render, I've divided the views, loops and so, ...
4
votes
1answer
198 views

What conventions or frameworks exist for MVVM in Perl?

We're using Catalyst to render lots of webforms in what will become a large application. I don't like the way all the form data is confusingly into a big hash in the Controller, before being passed to ...
1
vote
8answers
1k views

Should PHP view files be called something other than '.php'?

By default, any file that PHP touches is usually suffixed with .php. It's universally understood by Apache / Nginx as the default for PHP files and most setups expect PHP files to end in this ...