The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MVC-lite structure
#1
I am in a situation where I have the same data which must be presented in various different ways.

Has there been discussion about the best way to structure US so as to implement a lite version of MVC or at least separating the "view" from the "data collection"?

Basically I want the same SQL queries to be used for 2 different views. I could implement the 2 different views in a single script with a lot of complicated and hard-to-read conditionals or I could "require" the query stuff from a separate script but both seem forced and awkward...
  Reply
#2
UserSpice is pretty agnostic as to what you do with the pages it controls. My initial thought is that it makes the most sense to create the logic in your base file and then require in the views based on an if statement. I think that would produce the most readable and least redundant code. That's just my 2cents.
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)