Forum Moderators: coopster

Message Too Old, No Replies

All methods of separating presentation from code

         

tpb101

11:51 am on Sep 4, 2018 (gmt 0)

10+ Year Member



I need to figure out the topic of separating presentation from code (all methods). I know that there is Smarty and this is called a templating engine. Do I always use something like a templating engine, or how would this work. I basically need to create a simple website with all possible methods of separating presentation from code.

Thanks.

TorontoBoy

1:11 pm on Sep 4, 2018 (gmt 0)

5+ Year Member Top Contributors Of The Month



Of course you can grow your own, but there are many packages out there already that have done the heavy lifting, such as Wordpress, Grav and others. Some use MySQL as a database. All have a separation between the presentation layer and the base code. Grav is a flat file site generator that uses no database. It also has themes.

You could still hack a theme to how you like it. Both systems allow you to add your own code, if you wish. I have long ago stopped rolling my own and prefer to do a package. There is ample opportunity to hack your site. There is so much to learn of other tech issues than rolling your own.

tpb101

1:20 pm on Sep 4, 2018 (gmt 0)

10+ Year Member



I want to write tube script (videos and pic galleries), blog (cms) and a forum script. One procedural and one OOP so six total. I basically need to figure out how to do the separation of presentation and code for this, like what would be the best option as of now. Making my own is one of the options too. From somewhere else people recommend Twig. I am not familiar with this yet and I need to figure this out, what is the current reality out there and what is the best for me (having like 3 or 5 the best things would be the best, I could research from there). Thanks.