← Retour

Modern web programming

par: Dr. AMIR DJOUAMA
Disponible
Pages 208
Dimensions 16*23,5
Publication 2026-09-10
Éditeur —
Papier : 1 250.00 DA Numérique: 625.00 DA

PLAN OF THE BOOK Thebook is organised as follows. Part I - The Front End: Structure and Style Chapter 1. The Web and How It Works. A short history of the web; clients, servers and the request–response cycle; HTTP and HTTPS; URLs; what a browser does with thecodeitreceives; static versus dynamicpages;thetools ofthe trade. Chapter2. HTML5: StructuringContent. Tags,attributesandtheanatomyofan HTML document; the head and its metadata; text, lists, links and images; semantic structure with header, nav, main, article, section, footer; tables done properly; forms in depth, with the HTML5 input types and built-in validation; audio and video; what changed since HTML4andwhat to unlearnfrom older material. Chapter3. CSS:StylingandLayout. HowCSSattachestoHTML;selectors,the cascadeandspecificity;unitsandcolours;typography;theboxmodel;backgroundsand borders;displayandpositioning;layoutwithFlexboxandGrid;responsivedesignand media queries; transitions, transformsandcustom properties; organisingastylesheet. Part II - JavaScript Chapter4. JavaScriptFundamentals. Values,variablesandtypes;operators;control flow; functions, arrow functions and scope; arrays andobjects; classes; modules; strict mode and modern(ES2015+)idioms. Chapter5. TheDOMandEvents. Thedocumentasatree;selectingandmodify- ing elements; creating and removing nodes; listening to events; event bubbling and delegation;formsandclient-sidevalidation;browser storage (localStorage). Chapter 6. Asynchronous JavaScript. Why the browser cannot wait; callbacks, promisesand async/await;fetchingwithfetch;JSON;talkingtoyourownPHPback end; errorhandling;asmall single-page application without a framework. Part III - The Back End: PHP and MySQL Chapter7. PHP8Fundamentals. HowPHPexecutesinsideawebserver;syntax, variables and types; operators and control structures; functions, named arguments and arrow functions; arrays; strings; classes, interfaces, enums and traits; namespaces and Composer;whatchangedfromPHP5to8.5. Chapter8. PHPfortheWeb: Forms,SessionsandSecurity. Superglobals;process- ing GET and POST data; file uploads; cookies and sessions; authentication basics; the security materialmost coursesleave out: escaping output,validating input, password hashing, CSRF,XSSand SQLinjection. Chapter9. MySQL andSQL.Relational databasesinbrief; creating databases and tables;datatypes;inserting,updatinganddeleting;queryingwith SELECT,joinsand aggregation;indexes; phpMyAdminandthe mysql client. Chapter10. PDO:PHPMeetstheDatabase. WhyPDOreplacedtheold mysql_* functions;connecting;preparedstatementsasthedefault;fetchingresults;transactions; errorhandling;a smalldata-access layer. Part IV - Modern Frameworks Chapter11. React. Whyfront-endframeworksexist;thinkingincomponents;JSX; props and state; the useState and useEffect hooks; lists and forms; fetching data; a small React application,builtanddeployed(React 19, Vite). Chapter12. Node.jsandExpress. JavaScriptoutsidethebrowser;npm;aminimal HTTPserver;Expressroutesandmiddleware;servingJSONAPIs;whentochoose Node overPHP. Chapter 13. Laravel: an Overview. The MVC pattern; routing, controllers and Bladetemplates;EloquentORM;migrations;validation;Artisan;onesmallCRUD application,end toend (Laravel 13). Chapter14. Symfony: anOverview. Symfony’sphilosophyandcomponents;rout- ing and controllers; Twig; Doctrine ORM; forms and validation; the same CRUD application rebuiltwith Symfony (7.4 LTS),for a side-by-sidecomparison. Part V - Workshops Chapter15. Workshops. Gradedlabexercisesforeverypartofthebook: HTML/CSS pagebuilding;JavaScriptinteractivity;PHP/MySQLmini-projects;andafinalproject: acomplete smallwebapplication, inthespirit ofthe original exam subjects. Appendices A.Settingupyourenvironment. XAMPP,orPHP+ MySQL+NodeviaDocker; VSCodeextensionsworthinstalling. B.HTMLandCSSquickreference. C.HTTP status

Afficher la table des matières
Table of Contents
Foreword i
Plan of the Book ix
THE FRONT END: STRUCTURE AND STYLE
1 The Web and How It Works 3
1.1 Introduction 4
1.2 Clients and servers 4
1.3 HTTP and HTTPS 5
1.4 Anatomy of a URL 6
1.5 What the browser does with your code 6
1.6 Static and dynamic pages 7
1.7 Your toolbox 7
1.8 Exercises 8
1.9 Answers 9
2 HTML5: Structuring Content 11
2.1 Introduction 12
2.2 Tags, elements and attributes 12
2.3 Anatomy of an HTML document 13
2.4 Text 15
2.5 Lists 16
2.6 Links 17
2.7 Images 18
2.8 Page structure: the semantic elements 19
2.9 Tables 20
2.10 Forms 21
2.11 Audio and video 24
2.12 What to unlearn from older HTML 24
2.13 Workshop 25
2.14 Exercises 25
2.15 Answers 26
3 CSS: Styling and Layout 29
3.1 Introduction 30
3.2 Attaching CSS to HTML 30
3.3 Selectors 31
3.4 Values and units 33
3.5 Text and fonts 33
3.6 The box model 34
3.7 Display and positioning 35
3.8 Layout with Flexbox 36
3.9 Layout with Grid 37
3.10 Responsive design 38
3.11 Polish: transitions, transforms, variables 39
3.12 Organising a stylesheet 39
3.13 Workshop 40
3.14 Exercises 40
3.15 Answers 41
JAVASCRIPT
4 JavaScript Fundamentals 45
4.1 Introduction 46
4.2 Values and types 46
4.3 Variables: let and const 47
4.4 Operators and comparisons 48
4.5 Control flow 48
4.6 Functions 49
4.7 Arrays 50
4.8 Objects 51
4.9 Classes 53
4.10 Modules 54
4.11 Idioms to carry forward 54
4.12 Workshop 55
4.13 Exercises 55
4.14 Answers 56
5 The DOM and Events 59
5.1 Introduction 60
5.2 Loading scripts into a page 60
5.3 Selecting elements 60
5.4 Reading and changing elements 61
5.5 Creating and removing elements 61
5.6 Events 62
5.7 Forms from JavaScript 64
5.8 Remembering things: localStorage 64
5.9 Workshop 65
5.10 Exercises 65
5.11 Answers 66
6 Asynchronous JavaScript 69
6.1 Introduction 70
6.2 Why the browser cannot wait 70
6.3 Promises 70
6.4 async and await 71
6.5 JSON: the data language 72
6.6 fetch in full 72
6.7 Putting it together: a small SPA 73
6.8 Workshop 74
6.9 Exercises 75
6.10 Answers 75
THE BACK END: PHP AND MYSQL
7 PHP 8 Fundamentals 79
7.1 Introduction 80
7.2 First script: PHP inside HTML 80
7.3 Variables and types 81
7.4 Strings 81
7.5 Operators and control structures 82
7.6 Functions 82
7.7 Arrays 83
7.8 Classes and objects 84
7.9 Organising code: namespaces and Composer 85
7.10 From PHP 5 to PHP 8: the update map 85
7.11 Workshop 86
7.12 Exercises 86
7.13 Answers 87
8 PHP for the Web: Forms, Sessions and Security 89
8.1 Introduction 90
8.2 Superglobals: what the request brings 90
8.3 Processing a form, properly 91
8.4 Escaping output: the XSS defence 92
8.5 File uploads 92
8.6 Cookies and sessions 93
8.7 Authentication done right 94
8.8 CSRF: the forged click 94
8.9 The security checklist so far 95
8.10 Workshop 95
8.11 Exercises 96
8.12 Answers 96
9 MySQL and SQL 99
9.1 Introduction 100
9.2 Databases and tables 100
9.3 Writing data 102
9.4 Reading data: SELECT 102
9.5 Indexes: why queries stay fast 104
9.6 Workshop 104
9.7 Exercises 104
9.8 Answers 105
10 PDO: PHP Meets the Database 107
10.1 Introduction 108
10.2 Connecting 108
10.3 Reading: query and fetch 109
10.4 SQL injection, and the prepared statement 109
10.5 Writing data 110
10.6 Transactions 111
10.7 A small data-access layer 111
10.8 Serving JSON: your first API 112
10.9 Workshop 113
10.10 Exercises 113
10.11 Answers 114
MODERN FRAMEWORKS
11 React 119
11.1 Why front-end frameworks exist 120
11.2 Getting started with Vite 120
11.3 Components and JSX 121
11.4 State: useState 122
11.5 Rendering lists and handling forms 123
11.6 Effects and data fetching: useEffect 123
11.7 Building and shipping 124
11.8 Workshop 125
11.9 Exercises 125
11.10 Answers 126
12 Node.js and Express 129
12.1 JavaScript leaves the browser 130
12.2 A server in ten lines 130
12.3 Express 131
12.4 Node or PHP? 133
12.5 Workshop 133
12.6 Exercises 134
12.7 Answers 134
13 Laravel: an Overview 137
13.1 Why frameworks, the server-side verse 138
13.2 Starting a project 138
13.3 Routes and controllers 138
13.4 Views: Blade 139
13.5 Models and migrations: Eloquent 140
13.6 Validation and the store action 141
13.7 Workshop 142
13.8 Exercises 142
13.9 Answers 143
14 Symfony: an Overview 147
14.1 The other great framework 148
14.2 Starting a project 148
14.3 Routes, controllers, Twig 148
14.4 Entities and Doctrine 150
14.5 Forms and validation 151
14.6 Choosing between them 151
14.7 Workshop 152
14.8 Exercises 152
14.9 Answers 153
WORKSHOPS
15 Workshops 159
15.1 How to use this chapter 160
15.2 Series A - Front end (Chapters 1-3) 160
15.3 Series B - JavaScript (Chapters 4-6) 161
15.4 Series C - PHP and MySQL (Chapters 7-10) 161
15.5 Series D - Frameworks (Chapters 11-14) 162
15.6 The final project 162
15.7 Exercises 163
15.8 Answers 164
Glossary 165
References and Further Reading 175
APPENDICES
A Setting Up Your Environment 183
A.1 The quick way: XAMPP 183
A.2 The reproducible way: Docker 183
A.3 The rest of the toolbox 184
A.4 First-day troubleshooting 184
B HTML and CSS Quick Reference 187
B.1 Document skeleton 187
B.2 Elements by purpose 187
B.3 Selectors 188
B.4 Properties by theme 188
C HTTP Status Codes 191
Index 1

Avis des lecteurs

Aucun avis pour le moment.