"should sorting logic be placed in the model, the view, or the controller? [closed]" Code Answer
Answers related to “should sorting logic be placed in the model, the view, or the controller? [closed]”
- The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
- in MVC, where do you draw the line between a controller and model? [closed]
- Can a model link to a View in the database instead of a table in CakePHP?
- How should boolean expressions be written in PHP?
- What/Where are the Naming Rules for Controller actions in a Zend_Application App
- YII : How to Change datetime format displayed on the View
- CodeIgniter: How to get input from View and use it in the controller
- Zf3 controller not able to access the model class table located in another module
- Merge two arrays side by side where one can be shorter than the other
- Does user input go to the controller or model?
- cakephp model association/join with same table [closed]
- MVC Fundamentals: Passing work along to the view?
- How to update profile with current image when an image file is not chosen in the edit form? I am using Laravel 8
- how do i pass a view variable to the controller in codeigniter?
- CakePHP: paginating with search logic in a model
- Should sub-objects be fetched in the Model or the Model Mapper?
- How should a model be structured in MVC? [closed]
- Will two atomic writes to different locations in different threads always be seen in the same order by other threads?
- What is the purpose of shuffling and sorting phase in the reducer in Map Reduce Programming?
- Angular2 - should private variables be accessible in the template?
- PostgreSQL -must appear in the GROUP BY clause or be used in an aggregate function
- ASP.NET MVC - Should business logic exist in controllers?
- Should I store my images in the database or folders?
- Sorting NSArray of dictionaries by value of a key in the dictionaries
- What is MVC (Model View Controller)? [closed]
- must appear in the GROUP BY clause or be used in an aggregate function
- Why does '.sort()' cause the list to be 'None' in Python?
- Can an AngularJS controller inherit from another controller in the same module?
- CheckboxList in MVC3 View and get the checked items passed to the controller
- Should “node_modules” folder be included in the git repository
- Vagrant box could not be found or could not be accessed in the remote catalog - incompatible curl version
- When a Fragment is replaced and put in the back stack (or removed) does it stay in memory?
- Should image size be defined in the img tag height/width attributes or in CSS?
- Sorting Table is wrong when the sort button be pressed more than once?
- Should accessing SharedPreferences be done off the UI Thread?
- MVC (model-view-controller) - can it be explained in simple terms? [closed]
- MySQL Entity Framework Error - The specified store provider cannot be found in the configuration, or is not valid
- “Context cannot be used while the model is being created” exception with ASP.NET Identity
- Getting the name of the controller and action method in the view in ASP.Net MVC
- Which type of sorting is used in the std::sort()?
- Is a variable the name, the value, or the memory location?
- How to use a DI / IoC container with the model binder in ASP.NET MVC 2+?
- Should a collection of constants be placed in a class or interface?
- When extending a padded struct, why can't extra fields be placed in the tail padding?
- The context cannot be used while the model is being created
- Have multiple FXML files (created in SceneBuilder), but only one controller. Does each scene load it's own copy of...
- Should Javadoc comments be added to the implementation?
- Sorting on the server or on the client?
- Ruby on Rails: Is it better to validate in the model or the database?
- Models in the Zend Framework
- Alternatives to the MVC [closed]
- The ViewData item that has the key 'CategoryId' is of type 'System.Int32' but must be of type...
- What JavaScript should be included in the <head> and what included in the <body>? [closed]
- How can I prevent EF “The context cannot be used while the model is being created” errors?
- Rails Internationalization (I18n) in model validations: Possible or not?
- ldap_sasl_bind_s(GSSAPI) - What should be provided in the credentials BERVAL structure
- What exactly is the model in MVC
- How do you close an ASP.NET MVC page from the controller?
- Text in the message box should be the next next lines
- Does the compiler continue evaluating an expression where all must be true if the first is false?
- In MVC how can I use the controller to render a partial view only for approved users?
- SAPUI5 Expand the model in the manifest
- In a MVC application, should the controller or the model handle data access? [closed]
- CouchDB sorting and filtering in the same view
- Rails: POST 422 (Unprocessable Entity) in Rails? Due to the routes or the controller?
- Determine the model of a partial view from the controller within MVC
- Android ViewGroup: what should I do in the onLayout() override?
- Sorting an array based on an attribute that may be nil in some elements
- How do I make Espresso wait until Data Binding has updated the View with the data-model?
- How is TabItem used when placed in the layout XML?
- Is the Rails update_attributes method the best choice for doing an update of a model in the database?
- Where should beans.xml be placed?
- Where should I define global functions in ExtJS 4 MVC?
- should the user's Account balance be stored in the database or calculated dynamically?
- Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of...
- Is sa1200 All using directives must be placed inside the namespace (StyleCop) purely cosmetic?
- Change the model in OnActionExecuting event
- separation of logic and UI in titanium (javascript)
- How to SELECT * but without “Column names must be unique in each view”
- What kinds of C++ functions can be placed in a C function pointer?
- MVC4 bind model to ICollection or List in partial
- Where various variable and method types should be placed in a header
- Access ng-model data outside of the controller
- Should the cursor property be set in a rule with or without the :hover pseudo-class?
- ObservedObject view-model is still in memory after the view is dismissed
- the value -1 is outside the acceptable range of [0,2147483647]. Parameter name: value
- Model binding in the controller when form is posted - navigation properties are not loaded automatically
- Implementing the Controller part of MVC in Java Swing
- Django vs. Model View Controller [closed]
- Should interfaces be placed in a separate package? [closed]
- should Modernizr file be placed in head?
- Concrete examples on why the 'Anemic Domain Model' is considered an anti-pattern [closed]
- What should be included in the state-of-the-art error and exception handling strategy? [closed]
- Should null values be included in JSON responses from a REST API? [closed]
- eslint should be listed in the project's dependencies, not devDependencies
- Should I use the username, or the user's ID to reference authenticated users in ASP.NET
- Accessing Database Entities from Controller [closed]
- Why Shouldn't A UIWebView Be Placed in a UIScrollView?
- How to keep 2 objects in view at all time by scaling the field of view? (or z&y axis)
- What's the difference between a ViewModel and Controller?
- What is the actual pattern for MVC WRT WebApplications? [closed]
- Check if Model is valid outside of Controller
- Can anybody explain MVC in terms of UItableview when getting data for the table from the internet?
- How do I reference a file that is placed in the WEB-INF folder when using Arquillian?
- Can the shared layout view have a controller in ASP.NET MVC?
- Should mapping value be declared in a constant or as an enum?
- Rails & Ransack - Sorting/searching based on a definition in the model
- Can I ignore the gcc warning: ‘Foo::m_bar’ should be initialized in the member initialization list [-Weffc++]
- Should user interfaces be included in the class diagram and sequence diagram?
- PG::GroupingError: ERROR: column “events.id” must appear in the GROUP BY clause or be used in an aggregate function
- Are assignments to non-volatile member variables in one thread guaranteed to be seen in another thread?
- What should go in the 'default' branch of a Hg repository? [closed]
- Accessing the model from a layout view in Grails
- Heroku (PG::Error: ERROR: column must appear in the GROUP BY clause or be used in an aggregate function
- Is there a way to view blobs of managed disks in Microsoft Azure Storage Explorer or the Azure Portal?
- Should authorization be part of the model or controller?
- Can atomic loads be merged in the C++ memory model?
- Where should the definition of an explicit specialization of a class template be placed in C++?
- Does SessionStatus object.setComplete() clears all the session attributes or just work for the controller in which...
- How to order by maximum of two column which can be null in MySQL?
- When should you use Async Controllers in ASP.NET MVC?
- How to handle custom response in Backbone model
- Sorting one array in the same order as another array
- How to change the value of a config item in the controller? - Codeigniter
- Sorting an Array of X and Y Vertice Points ? iOS / Objective C [closed]
- From an AngularJS controller, how do I resolve another controller function defined in the module (dynamic...
- Json.NET in Unity throwing 'The type or namespace `Newtonsoft` could not be found'
- Get the Controller Name and Method Name in ASP.NET-Core 2.2 Controller
- MVC View: Type arguments Html helper DisplayFor cannot be inferred from the usage
- Should I use the input's onclick or the form's onsubmit event to validate form fields using JavaScript?
- Filtering the data at the controller before it is rendered in a view
- Should serialization logic be in the entity or other class
- Should std::move be used on members when initializing them in the constructor?
- Pad the left or right sides of a linq join to be the same number of rows
- Rails / Postgres: “must appear in the GROUP BY clause or be used in an aggregate function”
- Sorting a hash in Perl when the keys are dynamic
- Common Lisp's copy-tree: Which objects will be referenced in common by the original and the copy?
- MVC Razor View: How to render a list of text boxes for a List<Task> in the model?
- Rearrange an array to be optimal in comparison to another array
- When using open source libraries, should we compile against the source or the binaries? [closed]
- How should a `FormType` be structured in order to include an `EntityType` field which doesn't exist in the...
- How can i change these into CTL SPEC in NuSMV model?
- Pass C# Model from View to Javascript
- AngularJS date in ng-model value not pass to controller
- How to handle the validation of the model form when the model has a clean method if the model form excluded some...
- Rspec error: undefined local variable or method `cookies' for #<RSpec in the model for Sign_in method
- value assigned to a property in the model class disappears in the view/controller class
- Perl sorting hash by values in the hash
- Ok to instantiate an object in the View?
- Should this information be calculated in real time or stored in a seperate database?
- How to use the “number_to_currency” helper method in the model rather than view?
- Should unit tests be written before the code is written?
- What can be the efficient approach to solve the 8 puzzle problem?
- ASP.NET MVC - Partially updating model from view
- just curious to know the difference between spring mvc vs django [closed]
- Rails 3 how do I use link_to to change the value of a boolean in the db?
- What, specifically, belongs in a Model, a View, and a Controller?
- Ruby on Rails model inside namespace can't be found in controller
- Should PostgreSQL connections be pooled in a Python web app, or create a new connection per request?
- Oracle Error PLS-00323: subprogram or cursor is declared in a package specification and must be defined in the...
- How to set a field of the model in view using generic views?
- Should Exceptions be placed in a separate package?
- Should data validation be done at the database level?
- C# - IComparer - If datetime is null then should be sorted to the bottom not the top
- Can the MVC Design Pattern / architectural pattern be used in Desktop Application Development?
- How to Show/View or Read .dwg files on browser
- Can has_one association be used when the model has one or zero instances of another model?
- Communication between the View and Model in MVC
- Should boost::ptr_vector be used in place std::vector all of the time?
- Should Marshal.FreeHGlobal be placed in a finally block to ensure resources are disposed?
- DDD Book, Eric Evans: What is meant by “The FACTORY should be abstracted to the type desired rather than the...
- Where should ASP.NET MVC 2 validation go: in the model or viewmodel classes?
- How to avoid coupling the View and the Controller in Swing
- Should I dynamically recreate a PDF, rather than store it in either the database or the filesystem?
- How to call a function in the first controller after dismissing the second controller
- Should I move my custom methods to model from controller?
- SceneBuilder 2: Do controller classes need to necessarily be in the same folder as the view FXML files?
- When should mvn release be used in the project lifecycle?
- Why shouldn't javascript be placed in view if it is only used on specific pages?
- Rails Updating Data in one Model from another Model's Controller
- ActionMailer best practices: Call method in the model or the controller?
- Where should warden callbacks be placed in a rails app?
- What is the meaning of the “Pluralize or singularize generated object names” setting?
- What should own the model in an MVC pattern?
- Editing the model object with update view django by excluding fields
- Rails - include module into controller, to be used in the view
- React Starter Kit and Material UI: userAgent should be supplied in the muiTheme context for server-side rendering
- Should initialization logic (say for numerous singletons) be in OnCreate or OnResume?
- Is it MVC when the view doesn't interact with the model?
- When does logic belong in the Business Object/Entity, and when does it belong in a Service?
- Can @ManagedPropery and @PostConstruct be placed in a base class?
- In practice, should Contexts (Entity Framework) be used in controllers or in another layer of abstraction? [closed]
- Why is the CouchDB documentation suggesting docs should not be emitted in the view?
- Where to validate in Express.js project – Validation at the database layer (re. Mongoose)?
- Sort a dictionary by length of the value [closed]
- pass values from the view to the controller ruby on rails
- Referencing the element that's calling a controller function Angularjs
- Show the subcategories of the chosen category in Rails 4
- I want to sort the words extracted from image in order of their occurence using contours detection [closed]
- Is there any guarantee that results of globbing will be sorted in Perl?
- Sorting in the template, in Symfony2: using Twig to sort a collection of objects by property
- Should VARCHAR columns be put at the end of table definitions in MySQL?
- How can I sort an array, yet exclude certain elements (to be kept at the same position in the array)
- Error: $controller:ctrlreg The controller with the name '{0}' is not registered
- MVC 3 tries to launch URL to View instead of controller action
- How come internal members in my view model aren't accessible in the view?
- View only properties (eg: IsSelected) and the Model in MVVM
- Should dynamic query parameters be present in the Redirection URI for an OAuth2 (Autorization Code Grant Type)
- Where should selectlist logic sit in ASP.NET MVC, view, model or controller?
- How do I hide an element in the shared layout based on the controller in MVC
- ASP.NET MVC - putting controller & associated views in the same folder?
- How to conditionally set a model in asp.net MVC view?
- ASP.NET MVC 4, how to access/modify the view model object (and change view and action method) before it is used as...
- ASP.NET MVC3 Upload a file from a Partial view (and fill the corresponding field in the Model)
- Have a function in fortran return a reference that can be placed on the left-hand-side of an assignment
- MVVM- Trigger Storyboard in the View Model in Silverlight
- Unable to add a logic to sort with dates in the existing comparator in Java/android
- Is it possible in playframework to override the default save action in the CRUD controller and redirect to list after
- What is the "model" in the MVC pattern?
- Can a value from a JTextField be forced into the ValueModel (JGoodies)
- Why View source of the page is different than Inspecting the element of the page [closed]
- In MVC, MVP and MVVM the model could it be a collection of entities?
- Should IDs be unique in the React DOM?
- MVC: Variables used for only for user-registration. Placed in Controller helper or Model?
- MVC Model Notifying View of changes
- Difference in the property value fetched in validate and model method in Struts2
- How do I dynamically pass a checkbox value from the view to the controller when it is checked?
- In Rails how do I update form fields in the model?
- Resolve view helper location from within the controller or form
- The minSdk version should not be declared in the android manifest file
- In what model should I add the ManyToManyField?
- How should I write multiple condition in after_create callbacks
- How can I find out the name of the controller action that called my view in MVC3?
- Get the model type for a passed in backbone.js model instance
- Can multiple values be used in django a model validator?
- Coldfusion, whats the advantage of front controller design over page controller?
- How to create an ActionLink with Properties for the View Model
- How to get the previous or next view
- Ember not updating the view on model change
- Sorting a string that could contain either a time or distance
- What are the available MVC web frameworks in the Linux world?
- Buttons in a custom view when the custom view is in a tab
- Is it possible to check if a specific "TAB" in TabWidget is visible in current View or not?
- Path in SVG placed in front of the circles in D3 chart, despite the order of append
- Should ViewModels be used in every single View using MVC?
- when should i use multiple controllers in mvc?
- Why cant i get the answer to the zebra puzzle in prolog?
- Should Flutter widgets be created in the class or in the build() function?
- Should the Enum values be unique in the global scope?
- Play framework: merge action only works in the Controller that triggered it
Only authorized users can answer the Search term. Please sign in first, or register a free account.
(note: this quote and citation is taken from @dasblinkenlight's answer, but we disagree on our interpretation of it. read his post and make up your own mind).
according to mvc description,
sorting logic (e.g., the sorting comparator/sorting algorithm) belongs in the model since it contains business rules and state data. since altering the way the model data is sorted falls squarely into the "change the view's presentation of the model" category, the controller is responsible for "doing the sorting" by calling the model.changesortedstate() method.