Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical Web Development

You're reading from   Practical Web Development Learn CSS, JavaScript, PHP, and more with this vital guide to modern web development

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher
ISBN-13 9781782175919
Length 276 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Paul Wellens Paul Wellens
Author Profile Icon Paul Wellens
Paul Wellens
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. The World Wide Web FREE CHAPTER 2. HTML 3. CSS 4. JavaScript 5. PHP 6. PHP and MySQL 7. jQuery 8. Ajax 9. The History API – Not Forgetting Where We Are 10. XML and JSON 11. MongoDB 12. Mobile First, Responsive Design with Progressive Enhancement 13. Foundation – A Responsive CSS/JavaScript Framework 14. Node.js A. Bootstrap – An Alternative to Foundation Index

Templating and handlebars.js

There is one more Hello, world example to go! Throughout the book, we have been using PHP most of the time. We have used it to dynamically generate web pages, or portions thereof. So PHP code, often embedded inside HTML code in a file with .php as an extension, is executed on the server and what is rendered by the browser is pure HTML. You also learned how to generate HTML from a separate PHP file or even JavaScript on the client side, using data that comes from the server, and then inject it into a portion of a web page (Ajax).

Combining PHP and HTML and even a small chunk of client-side JavaScript inside a single file was made possible thanks to the <script> tag and by putting PHP code in between <?php and ?>. That is why they sometimes call PHP a templating language.

Now imagine an all-JavaScript ecosystem. Yes, we could still put our client JavaScript code in between <script> tags, but what about the server JavaScript code? There is no such...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime