Introduction to Development of Dynamic Web Applications
Total Page:16
File Type:pdf, Size:1020Kb
INTRODUCTION TO DEVELOPMENT OF DYNAMIC WEB APPLICATIONS Svein Nordbotten Svein Nordbotten & Associates Bergen 2007 1 Table of Contents Preface ...................................................................................................................................................... 7 Session 1: Introduction ............................................................................................................................. 8 Web-pages and web sites ..................................................................................................................... 8 Dynamic web sites ................................................................................................................................ 9 CGI and PERL ....................................................................................................................................... 10 Applications Program Interfaces ......................................................................................................... 10 ColdFusion Markup Language ............................................................................................................. 11 Evaluating a web site .......................................................................................................................... 11 Visit counter example ......................................................................................................................... 12 Exercises .............................................................................................................................................. 13 Session 2: ColdFusion MX ....................................................................................................................... 15 ColdFusion Markup Language ............................................................................................................. 15 Data types ........................................................................................................................................... 15 Variables.............................................................................................................................................. 16 Expressions .......................................................................................................................................... 16 Flow control statements ..................................................................................................................... 18 Other components .............................................................................................................................. 19 Guessing game example ..................................................................................................................... 20 Exercises .............................................................................................................................................. 23 Session 3: Web market research ............................................................................................................ 24 Introduction ........................................................................................................................................ 24 Market research .................................................................................................................................. 24 Applications outline ............................................................................................................................ 24 Implementation .................................................................................................................................. 25 2 Exercises .............................................................................................................................................. 31 Session 4: Web database for opinion polls ............................................................................................. 33 Files and databases ............................................................................................................................. 33 Databases ............................................................................................................................................ 33 CFMX SQL ............................................................................................................................................ 34 Basic SQL elements ............................................................................................................................. 34 Opinion polling .................................................................................................................................... 35 INSERT statements .............................................................................................................................. 37 SELECT statements .............................................................................................................................. 40 UPDATE statements ............................................................................................................................ 41 Statistical report .................................................................................................................................. 45 DELETE statements ............................................................................................................................. 47 Exercises .............................................................................................................................................. 49 Session 5: Web perception application .................................................................................................. 50 Introduction ........................................................................................................................................ 50 Outline of the design ........................................................................................................................... 51 Design of the database ....................................................................................................................... 52 Design of the dynamic web process ................................................................................................... 53 Opening page ...................................................................................................................................... 53 Demographic form .............................................................................................................................. 54 Displaying the first chart ..................................................................................................................... 58 Perception report form ....................................................................................................................... 61 Next chart ............................................................................................................................................ 64 Thanks to the participants .................................................................................................................. 67 Exercises .............................................................................................................................................. 68 Session 6: Web search engine................................................................................................................. 69 A search engine ................................................................................................................................... 69 Selection menu ................................................................................................................................... 70 File collection ...................................................................................................................................... 71 Indexing the files ................................................................................................................................. 73 Searching the collection ...................................................................................................................... 75 Deleting a registered collection .......................................................................................................... 77 3 Final remarks ....................................................................................................................................... 79 Exercises .............................................................................................................................................. 79 Session 7: e-learning ............................................................................................................................... 80 Web courses ........................................................................................................................................ 80 Course architecture............................................................................................................................. 80 Authorization and authentication ....................................................................................................... 81 Registration and authorization ........................................................................................................... 82 Authentication ...................................................................................................................................