Practical Web Development
eBook - ePub

Practical Web Development

Paul Wellens

  1. 276 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Practical Web Development

Paul Wellens

Book details
Book preview
Table of contents
Citations

About This Book

This book is perfect for beginners who want to get started and learn the web development basics, but also offers experienced developers a web development roadmap that will help them to extend their capabilities.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Practical Web Development an online PDF/ePUB?
Yes, you can access Practical Web Development by Paul Wellens in PDF and/or ePUB format, as well as other popular books in Informatique & Programmation Web. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781782175919
Edition
1

Practical Web Development


Table of Contents

Practical Web Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. The World Wide Web
World Wide Web
The Internet
HTTP and HTML
HTML
HTTP
The World Wide Web Consortium (W3C)
Mosaic
The first browser
Netscape
Internet Explorer
The explosion of the Web
Amazon.com and e-commerce
Google and Yahoo!
Social networking
Web development
HTML
HTML editors and other tools
Browsers and web servers
CSS
JavaScript
PHP
Data
Summary
2. HTML
HTML versions
Semantic and presentational HTML
The structure and syntax of an HTML document
Doctype
<html>
<head>
<body>
Syntax for tags or elements inside the document
HTML comments
Links
The <a> tag and attributes
The href attribute
The <a> name attribute
The <a> target attribute
Classic document elements
<h1>, <h2>, <h3>, 
 <h6> – headings
<p> – paragraph
<span> – span
Lists
Images
<img> element and attributes
Image width and height
Input forms
Form elements
Form attributes
The label attribute
Input attributes
The name attribute
The value attribute
The checked attribute
The readonly attribute
Textarea
Drop-down lists
The disabled attribute
The selected attribute
Tables
Table elements
<table>
<thead> <tbody>
<tr>
<th> <td>
Table attributes
colspan (td)
rowspan (td)
<div>, the "uebertag"
HTML entities
HTML5-specific tags
Summary
3. CSS
Adding styles to our documents
External style sheets
Internal CSS
Inline styles
The Document Object Model (DOM)
Selectors
Multiple classes
Descendants
Selecting children or siblings
Specificity
Block elements and inline elements
Colors
Fonts
So what are fonts?
Font families
Serif fonts
Sans-serif fonts
Monospace fonts
The font-family property
Font-weight and font-style
Font-size
Line-height
The box model
Padding
Border
Margin
Collapsing margins
Positioning
Float
position:relative
position:absolute
Styling lists
list-style-type
list-style-image
list-style-position
Styling anchors – pseudo-classes
Firebug
Summary
4. JavaScript
Programming 101
Compiled and interpreted languages compared
JavaScript is not the same as Java
Java
JavaScript
Our first JavaScript program
Variables
Variable declarations
Values of variables
Numbers
Strings
Converting strings to numbers
Expressions and operators
Arithmetic operators
Addition(+)
Subtraction (-)
Multiplication (*)
Division (/)
Modulo (%)
Relational operators
Control flow
if
while
switch
Functions
Scope of variables
Objects
JSON
DOM objects, properties, methods, and events
The Window object
The Document object
write and writeln methods
Nodes and DOM traversing
Events
Summary
5. PHP
Introduction to PHP
Our first real PHP program
PHP and web hosting
Web hosting 101
Domain name
Web hosting companies
Server-side setup
Additional server-side services
PHP development environment
PHP as a web development language
Variables, values, operators, and expressions
Scope of variables
Local variables
Global variables
Static variables
String operators
To double quote or to single quote, that is the question
Control flow
Functions
String functions
strpos()
strlen()
substr()
Date functions
time()
date()
strtotime()
Arrays
Numeric arrays or indexed arrays
Associative arrays
Cool control statements for associative arrays
Sending data back to the server – forms
POST or GET, what should we get?
$_POST and $_GET arrays
Files
include, require, and require_once
Regular files
File functions or f-functions
fopen
file_exists(), is_file(), and is_dir()
fread and fwrite
One line at a time – fgets()
The printf family
Syntax of printf family of functions
Summary
6. PHP and MySQL
Databases
Relational databases
SQL
MySQL
phpMyAdmin
Creating databases
Creating and managing users
Creating and managing database tables
MySQLi in PHP
Connecting to the database
Our first SQL query, really!
Writing a MySQL query in PHP
Fetching the result
Obtaining data from more than one table
Adding data
Updating data
Summary
7. jQuery
Obtaining the jQuery library
Where to place the jQuery library on your page?
jQuery UI and jQuery Mobile
Using jQuery selectors and methods
html()
text()
attr()
.val()
show() and hide()
.find()
.parent()
.next()
.css()
jQuery documentation
Event handlers and jQuery
preventDefault()
$(this)
updateNewsContent()
Summary
8. Ajax
XMLHttpRequest
Ajax and jQuery
jQuery Ajax methods
$.load() method
$.post()
$.ajax()
Summary
9. The History API – Not Forgetting Where We Are
The problem we are trying to solve
The self-service restaurant
HTML5 History API and the history object
pushState()
popstate event
popstate and different browsers
The History plugin
Bookmarking
Summary
10. XML and JSON
XML
XML format
Displaying XML files
XML editors
XML Schema
SimpleXML
The XML file
The XML Schema file
The CSS file
The PHP file
Creating XML files with SimpleXML
Generating our HTML on the client side
XSLT
JSON
JSON syntax
JSON values
JSON objects
JSON strings
JSON arrays
JSON numbers
JSON and PHP
JSON with Ajax and jQuery
Two useful JSON methods
Summary
11. MongoDB
Relational database management systems
NoSQL databases
MongoDB
Installing MongoDB
The MongoDB shell
Creating databases, collections, and documents
_id and ObjectIds
Loading scripts
Removing documents
Updating documents
MongoDB data types
Basic data types
Dates
Embedded documents
One more example
MongoDB and PHP
Getting our gallery data
CRUD operations with MongoDB and PHP
Insert documents
Update documents
Queries with conditions
MongoDB cursor object
Summary
12. Mobile First, Responsive Design with Progressive Enhancement
Responsive design
DĂ©jĂ  vu
Media queries
Using the media attribute
Do more with less
Mobile fi...

Table of contents

Citation styles for Practical Web Development

APA 6 Citation

Wellens, P. (2015). Practical Web Development (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/4014/practical-web-development-pdf (Original work published 2015)

Chicago Citation

Wellens, Paul. (2015) 2015. Practical Web Development. 1st ed. Packt Publishing. https://www.perlego.com/book/4014/practical-web-development-pdf.

Harvard Citation

Wellens, P. (2015) Practical Web Development. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/4014/practical-web-development-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Wellens, Paul. Practical Web Development. 1st ed. Packt Publishing, 2015. Web. 14 Oct. 2022.