friends of ED

cover image
ISBN:
1903450160
Authors:

Steve Webster

Price:
US $39.99
Pages:
500
CD Rom:
No
Published:
September 2001
Foundation PHP for Flash
sample pdf
downloads
forums
errata
Available at all good bookstores, or buy this title now at one of these
There is a support site dedicated to Foundation PHP for Flash at phpforflash.com

PHP is a rapidly growing open source web scripting language - the most popular Apache web server module, used in over 7,000,000 domains. There is a huge demand to integrate dynamic content into Flash sites and, as a competitor with ASP, JSP and ColdFusion, PHP has the advantages of being free, easy to learn and capable of running on just about any platform.

When used in conjunction with Flash, PHP can process, store and create new data. PHP can also work as a bridge between the Flash movie and external data sources, enabling web designers to build dynamic, interactive web applications, incorporating information from a host of databases, and including features such as e-mail integration and dynamically-generated images.

As an ingredient to a website, PHP can help a designer develop the functional potential of their work and set them above the growing multitude of motion graphics artists.
Written completely with the designer in mind, this easy-to-follow Foundation book offers a thorough tutorial which will build your PHP skills from nothing to the point where processing, storing and creating new data is like second nature.

Who is this book for?

  • Any professional working designer who is interested in learning a new scripting language. Although the book uses Flash examples, it also serves as a designer-centric introduction to PHP and MySQL for those who want to use it outwith or beyond Flash.
  • Flash users at any level who want to get starting with dynamic data integration, adding a new edge to their Flash projects with a minimum of fuss.


What does this book cover?


Foundation PHP for Flash will take you through the basics of using dynamic information with Flash, from loading and sending data from Flash, through the essentials of PHP, into the world of database integration and then digging in with three huge in-depth case studies, building three major applications from scratch!

Summary of Contents


1: Dynamic Data for Flash; Sample Application: A User Registration FLA
2: Getting Started with PHP; Sample Application: A User Login FLA
3: Making PHP Work for You; Sample Application: A Tell-a-Friend Site Recommendation FLA
4: PHP and Information Handling; Sample Application: A simple search and replace Text Highlighter
5: Looking for Patterns; Sample Application: A Fully-searchable News Archive
6: Remembering Visitor Information; Sample Application: A Flash Cookie Cutter to fetch and store cookies
7: Tapping into External Files; Sample Application: A Flash Mailing List
8: Introducing the Database
9: Integrating PHP with MySQL; Sample Application: A Flash Content Management System
10: Case Study 1 – User Poll
11: Case Study 2 – Event Planner / Calendar
12: Case Study 3 – Flash Forum
Appendix A – Installing PHP, MySQL and Apache on Windows, Mac OS X and UNIX
Appendix B – PHP and Object Oriented Programming (for advanced users)
Sample Application – A Flash Shopping Basket
Appendix C - Resources

Reviews

www.edevcafe.com

Review by Matthew Kosoy 01.02.2002

"Foundation PHP for Flash is one of the best books a web developer can own. It is a guide that will help you use Flash to spruce up your forums, news pages, content management systems, shopping carts, or any other type of dynamic web app with a little bit of vector based pizzazz. For those of you who don't know, PHP is the open source alternative to ASP or Cold Fusion. This versatile programming language can help you create dynamic database driven web applications without hefty licensing fees. Yes, it's what open source is all about: being FREE! WHEE! That rhymes!

Written by Steve Webster with help from content architect Alan McCann, Foundation PHP for Flash has been helpful in my PHP learning process. This was the first book on the subject of PHP that I used in my learning experience. It is both very descriptive and helpful. It includes an appendix section on how to install PHP, Apache, and mySQL on a variety of platforms. Chapters are dedicated to learning databases, learning PHP, and, obviously, integrating the all-powerful Flash. Provided are three case studies, which are actual real world examples, of how a user can incorporate PHP and mySQL with a Flash front end.

I recommend this book for someone who is dedicated. Knowledge does not come overnight and many attempts later it still might not come. Developing database driven content can be time consuming and very frustrating. Fear not. Do not tread lightly. You will succeed in your quest for knowledge. Just so long as it begins with friends of ED."

 

www.pixelsurgeon.com

Review by Andy Barefoot.

8 out of 10.

"Before I start, I ought to mention that I am a developer rather than a designer and I still consider myself a Flash beginner having jumped on board at version 5 when it became possible to do something interesting with the Actionscript. I had also recently started dabbling in PHP and had done some work combining the two already. However, having read Friends of Ed books before whilst getting to grasp with Flash 5 I was looking forward to seeing the problems approached from a designer's perspective.

PHP is a server-side scripting language meaning that code is interpreted on the server before the finished document is sent back to the client's browser. Joyously, it is open source, as is MySQL, a database solution which interacts nicely with PHP. PHP for Flash does contain all the details you'll need for installing these programs in a sizeable Appendix, but I can't vouch for the clarity of these instructions as my ISP provides me with PHP and MySQL as part of my hosting bundle. (Most good ones do so you should be able to avoid installing them yourself unless you want them on your local machine). Instead I ploughed straight on into Chapter 1.

Once you are ready to start having a go the book breaks you in nice and easy. Chapter One covers getting data into and out of Flash and I was reassured to see that two of the biggest headaches I had when first trying to integrate PHP and Flash were pointed out straight away. Firstly, having requested data from the server, you have to make sure you've received it before continuing the movie. Secondly, Flash caches the results of a request, so if you send the same request again Flash will assume the results will be the same and you will 'receive' the same data. These two stumbling blocks alone had me puzzled for hours on my first Flash/PHP project before resorting to a plea for help on the flashkit.com bulletin boards. The fact that the book identifies them as pitfalls and addresses them immediately made me confident the author knew what he was on about.

Chapters Two to Five start the PHP scripting. Subjects covered include creating variables, statements, arrays, functions, manipulating strings, and pattern matching. Not the most exciting subject matter and Chapter Two in particular is a hefty 50 pages and seems quite daunting. However the casual style of the author and the simple approach makes a dry subject palatable. I was impressed by the general grounding in programming the book provides. It aims to teach good programming practice as well as the specifics of PHP. This means that once you have completed the book you should be able to produce robust code without having to resort to hacking at snippets contained in the examples. I was surprised by the amount of material that was new to me, as I had tried to plough through a couple of other PHP books when I first became interested in its possibilities. I wasn't expecting to find a better explanation of coding principals in a book aimed at designers than I had in books aimed at programmers, but not only was the information more thorough but the explanations seemed to make more sense than they had before.

Chapter Six explains how to set cookies so you can recall information about visitors when they next enter your site. Again, the author doesn't stop at just the basics of creating and deleting cookies but also takes you through the security issues surrounding them and you are left knowing not just how to implement cookies, but when and why you should use them.

Chapters Seven to Nine deal with reading from and writing to/creating external files. Chapter Seven deals with flat text files with Eight and Nine explaining how MySQL can be incorporated to query a database. This is where it starts to get exciting as you can see how Flash can be used as the front end to serious database applications. Again, the explanation of MySQL never strays into incomprehensible techno-blurb and the pace is relaxed and reassuring. Throughout these chapters the practicalities of integrating the PHP and MySQL into Flash are never neglected and as soon as you learn one aspect of the code there is immediately an example of how to use it.

Chapters Ten to Twelve take you through three larger Case Studies: a User Poll, an Event Planner, and a Forum. These are up to the high standards those of you familiar with Friends of Ed will have come to expect. You are taken through the planning, design and implementation of the projects and unlike many past experiences I did feel I could do actually go on to attempt similar projects on my own having completed them.

The book also contains three appendices. As mentioned earlier the first takes you through the installation of PHP, Apache and MySQL should you need to do it yourself, the second contains a lesson in Object Orientated Programming and the third a useful list of resources. The OOP appendix in particular impresses as it was above and beyond the level of programming I'd expected to find.

What you immediately appreciate about this book is the usefulness and relevance of what you are learning. Each chapter takes you through the theory of a new subject and then includes a step-by-step guide to building a useful application using what you have just learnt. Now, I've read several books in the past that claim to do this, but few that actually deliver. Either you're rushed through a perfunctory example with no real-world use at the end of a long and indigestible passage or the code is tacked on in an Appendix whilst the book explains how to build a flashing and swirling front end.

I expected that this book would be aimed at the design community and would therefore fit into the latter category, heavy on the Flash and light on the programming. In fact, it is surprisingly thorough, teaching the correct programming principals without ever getting too difficult. It doesn't cut corners in its haste to show you a working example but the exercises are in most cases genuinely useful. As I have stated earlier, I came to this book having already attempted to learn some PHP and integrate it with my Flash movies. Had I owned this book from the start I would have saved myself a lot of time and stress. All the amateurish mistakes that I spent hours puzzling over before eventually working out a complicated and inefficient solution to are identified as potential pitfalls in this book and solved frustratingly simply. It was a real surprise to see such detail in a relatively thin book and I finished it with a real confidence that I could have a go myself at seemingly complicated projects.

Overall an excellent introduction to putting dynamic content into your Flash movies and well worth the money.

Pixelsurgeon Rating: 8/10"