Click here to Skip to main content
15,888,351 members
Home / Discussions / Web Development
   

Web Development

 
QuestionAdd second Master Pages Pin
Member 1180506324-Apr-16 22:04
Member 1180506324-Apr-16 22:04 
AnswerRe: Add second Master Pages Pin
Richard Deeming25-Apr-16 2:05
mveRichard Deeming25-Apr-16 2:05 
Questionabout java discussion Pin
Ankit Raut23-Apr-16 22:02
Ankit Raut23-Apr-16 22:02 
AnswerRe: about java discussion Pin
Richard MacCutchan24-Apr-16 2:59
mveRichard MacCutchan24-Apr-16 2:59 
AnswerRe: about java discussion Pin
ZurdoDev25-Apr-16 1:41
professionalZurdoDev25-Apr-16 1:41 
QuestionShow messages with Next and Previous Pin
Jassim Rahma20-Apr-16 6:35
Jassim Rahma20-Apr-16 6:35 
AnswerRe: Show messages with Next and Previous Pin
ZurdoDev25-Apr-16 1:41
professionalZurdoDev25-Apr-16 1:41 
QuestionPHP Best Practices - Decomposition Pin
User 1218466519-Apr-16 2:54
User 1218466519-Apr-16 2:54 
Hello all,

PHP was one of the first programming languages I learned. However, during this phase, I was not really introduced to OOP in PHP or, honestly, many good practices. Now that I have experience with heavily OOP languages such as Java and C#, I have to say, my previous PHP, while functional, was a bit of a mess. As I am now working on a new project that will be using PHP (an eCommerce one), I would like to do it right from the start.

So (my apologies for the long introduction) here is my real question - how would you recommend separating presentation from logic?

I have a a custom class that handles access and database queries, and will be working on another to represent an item. How would y'all recommend 'presenting' this data to the user? I have a function within my database access class that retrieves the necessary data (either a list of items by category or details for a specific item), but would you advise writing a method within the database access class that uses "echo/print" to display the HTML (and all you would have to do is call the appropriate method of the class instance within the main HTML/PHP page), OR, would you advise, within the main "View" page to simply call the method that just retrieves the necessary data and then write the PHP code necessary to display the data (such as a for loop to print out all the items for a specific category) within the "display" page itself.

I apologize if my question is not clear. I realize either way will work, but I am curious what others consider a good practice.

Thanks!

modified 19-Nov-20 21:01pm.

Questioni am beginner in webs how can i make this blogger theme SEO and Google friendly? Pin
Chat4Enjoy18-Apr-16 21:27
professionalChat4Enjoy18-Apr-16 21:27 
RantRe: i am beginner in webs how can i make this blogger theme SEO and Google friendly? Pin
Richard Deeming19-Apr-16 2:07
mveRichard Deeming19-Apr-16 2:07 
RantBest practice for html5 design Pin
Jassim Rahma17-Apr-16 12:15
Jassim Rahma17-Apr-16 12:15 
GeneralRe: Best practice for html5 design Pin
Nathan Minier18-Apr-16 3:38
professionalNathan Minier18-Apr-16 3:38 
Questionprint 1 to 100 using a php code with the following instructions: Pin
Kelvin Ng'ethe13-Apr-16 5:19
Kelvin Ng'ethe13-Apr-16 5:19 
AnswerRe: print 1 to 100 using a php code with the following instructions: Pin
Richard MacCutchan13-Apr-16 20:48
mveRichard MacCutchan13-Apr-16 20:48 
GeneralRe: print 1 to 100 using a php code with the following instructions: Pin
Peter_in_278013-Apr-16 20:56
professionalPeter_in_278013-Apr-16 20:56 
AnswerRe: print 1 to 100 using a php code with the following instructions: Pin
ZurdoDev25-Apr-16 1:42
professionalZurdoDev25-Apr-16 1:42 
QuestionAngularJS and page bookmarking Pin
Member 179509711-Apr-16 23:06
Member 179509711-Apr-16 23:06 
AnswerRe: AngularJS and page bookmarking Pin
Nathan Minier14-Apr-16 3:10
professionalNathan Minier14-Apr-16 3:10 
Questionrun vb.net web app in browser that has enough room Pin
dcof11-Apr-16 17:55
dcof11-Apr-16 17:55 
AnswerRe: run vb.net web app in browser that has enough room Pin
Richard MacCutchan11-Apr-16 21:35
mveRichard MacCutchan11-Apr-16 21:35 
QuestionmaxTimeout setting in Machine.config file Pin
Prasanth P1-Apr-16 15:16
Prasanth P1-Apr-16 15:16 
QuestionPHP - Warning: fopen(): Filename cannot be empty Pin
M Riaz Bashir29-Mar-16 22:15
M Riaz Bashir29-Mar-16 22:15 
AnswerRe: PHP - Warning: fopen(): Filename cannot be empty Pin
Jochen Arndt29-Mar-16 22:38
professionalJochen Arndt29-Mar-16 22:38 
GeneralRe: PHP - Warning: fopen(): Filename cannot be empty Pin
M Riaz Bashir30-Mar-16 0:06
M Riaz Bashir30-Mar-16 0:06 
AnswerRe: PHP - Warning: fopen(): Filename cannot be empty Pin
W Balboos, GHB11-Apr-16 5:30
W Balboos, GHB11-Apr-16 5:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.