Questions tagged [view]

40 questions
35
votes
3 answers

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 is basically just rendering the responses to the…
adrita
  • 355
  • 1
  • 4
  • 7
31
votes
7 answers

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 in the view layer of the application. In most…
vdaras
  • 453
  • 4
  • 8
25
votes
2 answers

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 Model-View-ViewModel (MVVM) design pattern or is…
Fearnbuster
  • 401
  • 1
  • 4
  • 11
25
votes
4 answers

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 view: Component diagram, Package diagram Process…
Sadeq Dousti
  • 369
  • 1
  • 3
  • 7
17
votes
6 answers

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, on many partials that are rendered dynamically…
Mr_Nizzle
  • 283
  • 1
  • 2
  • 7
10
votes
2 answers

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 view. As far as I see there are currently two…
Arturs Vancans
  • 395
  • 2
  • 9
9
votes
5 answers

WPF UserControl Reuse With MVVM

I'm struggling to find an elegant and idiomatic way of coding the following scenario using the MVVM paradigm in WPF and was wondering how other people would approach it. I have a UserControl in my WPF application which I want to reuse in a number of…
Pseudonymous
  • 313
  • 1
  • 2
  • 8
4
votes
3 answers

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 to user interaction with other parts of the…
Bishoy
  • 181
  • 2
  • 2
  • 6
4
votes
3 answers

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 views. Since there are obviously new sets of…
John
  • 773
  • 2
  • 7
  • 19
4
votes
1 answer

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 translation function. Always have as many views as…
trejder
  • 2,386
  • 3
  • 19
  • 39
4
votes
3 answers

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 working in blade templates in Laravel/PHP fwiw. My…
Damon
  • 175
  • 1
  • 5
4
votes
1 answer

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 the template. It seems jumbled up and messy for…
3
votes
3 answers

Does the Controller contain get methods in MVC?

I am at the stage of implementing a my 1st ever view, after developing a Model and Controller, however there is a problem. I have been reading this article on MVC, which is what I have been aiming for when implementing, but I kind of went off-script…
3
votes
1 answer

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 are doing with the current ORM. The views…
Mixxiphoid
  • 641
  • 1
  • 5
  • 15
2
votes
4 answers

How do I avoid tightly coupling one microservice to another microservice's feature that depends on specific views of the first's data?

I've seen this problem in a few different contexts now but I'm not sure what it's called or how to think about it. Suppose I have a service, AccountService, that serves accounts from a database,…
1
2 3