Client-side Applications with PHP Andrei Zmievski & Frank M. Kromann Track: PHP Conference Date: Friday, July 27 Time: 3:45pm – 4:30pm Location: Fairbanks.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

Aqua Data Studio. Find the application We are using Aqua Data Studio v11.
Stored procedures and views You can see definitions for stored procedures and views in the demo databases but you can’t change them. For views, expand.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
MSc IT UFIE8K-10-M Data Management Prakash Chatterjee Room 3P16
Multiple Tiers in Action
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
1 © Prentice Hall, 2002 The Client/Server Database Environment.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
Internet and Web Application Development Revision.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Meir Botner David Ben-David. Project Goal Build a messenger that allows a customer to communicate with a service provider for a fee.
Web Application Development. Define ER model in QSEE Generate SQL Create Database mySQL Write Script to use TableEditor class Process to create A simple.
Web Application Development. Tools to create a simple web- editable database QSEE MySQL (or PHPMyAdmin) PHP TableEditor.
Tutorial 11 Using and Writing Visual Basic for Applications Code
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Pradeep Tallogu Deepak Avanna Sharath Madathil
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Javascript. Outline Introduction Fundamental of JavaScript Javascript events management DOM and Dynamic HTML (DHTML)
Architectures Classic Client/Server Architecture Classic Web Architecture N-tier (multi-tier) Architecture FEN Databaser og Modellering.
Putting it all together Dynamic Data Base Access Norman White Stern School of Business.
What’s new? Update on Netrics Matching Engine V4.0 and V4.1 Dave Chamberlain
22/10/ June Changes I have seen. What I like about SIR/XS.
Team Members Team Members Tim Geiger Joe Hunsaker Kevin Kocher David May Advisor Dr. Juliet Hurtig November 8, 2001.
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
If statements and validation. If statement In programming the if statement allows one to test certain conditions and respond differently depending on.
® Microsoft Access 2010 Tutorial 10 Automating Tasks with Macros.
Guide to Linux Installation and Administration, 2e1 Chapter 11 Using Advanced Administration Techniques.
Michele Caselle INFN - BariITS Meeting 4 Jun 2002 LabVIEW&Windows – MySQL interface  SPD database general architecture  LabVIEW – MySQL interface. 
GUI With GTK+ Under Linux Fanfan Xiong. Introduction GTK+ (GIMP toolkit) : A library for creating graphical user interfaces(GUI) Two examples developed.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 8 Scott Marino.
Overview GUI Programming with GTK+ and GLADE 장정철.
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin.
Programming Paradigms By Tyler Smith. Event Driven Event driven paradigm means that the program executes code in reaction to events. The limitation of.
PhpMyAdmin Matthew Walsh April 28, 2003 CMSC Shawn Sivy.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Display Page (HTML/CSS)
GDT Tips and Tricks. GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July  Tucson, Arizona GDT Tips.
SQL Query Analyzer. Graphical tool that allows you to:  Create queries and other SQL scripts and execute them against SQL Server databases. (Query window)
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
CGS 3066: Web Programming and Design Spring 2016 PHP.
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
Technical Workshops | Esri International User Conference San Diego, California Branching and Iteration in ModelBuilder Shitij Mehta July 24, :15.
Presented By Sushil K. Chaturvedi Assistant Professor SRCEM,Banmore 1.
Writing Really Rad GTK+ & GNOME Applications in C, Python or Java
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
Building GUI applications with Python, GTK and Glade
PEL Vs MDX By Jeremy Kashel TVP, 17th July 2008
The Client/Server Database Environment
Computer Security Fundamentals
PHP / MySQL Introduction
GNOME/GTK+ Introduction
Module 1: Getting Started
GTK + Programming.
The Basic Usage and The Event Handling in Glade.
How to stop C programming problems at the source
Tutorial 10: Programming with javascript
PHP Forms and Databases.
SQL Server 2005 Reporting Services
PHP an introduction.
Introduction to JavaScript
Presentation transcript:

Client-side Applications with PHP Andrei Zmievski & Frank M. Kromann Track: PHP Conference Date: Friday, July 27 Time: 3:45pm – 4:30pm Location: Fairbanks C&D

PHP a General Scripting Language HTML-embeded scripting language Cross platform Rich on functions and extensions Also used for shell scripts

Adding a GUI to PHP With a GUI it is possible to write client side applications and tools. PHP becomes event driven.

What is GTK GTK+ A multi platform toolkit for creating graphical user interfaces. Glib Provides useful data types, type convertsions, macros, string utilites etc. GDK A wrapper for low-level windowing functions. GTK An advanced widget set.

Automated code generation The source code for the php-gtk extension is generated from a set of definition files. 600 constant definitions 95 Objects 970 Methods

Web applications Request driven Procedural execution Tight integration with the web server

Event driven applications Setup main window Create functions Connect functions to events Start the main loop

Loading the extension PHP-GTK is not a built-in extension <?php // this file is used to make sure the gtk-extension is loaded. if (!extension_loaded("gtk")) { if (strtoupper(substr(PHP_OS, 0,3) == "WIN")) dl("php_gtk.dll"); else dl("php_gtk.so"); } ?>

Creating Gtk objects The syntax for creating an object is: –$window = &new GtkWindow(); With globals in functions use: –$GLOBALS[”window”] = &new GtkHBox()

Hello World #!/cygdrive/d/php4/php_win <?php require "gtk.inc"; $window_width = 500; $window_height = 200; $window_xpos = (Gdk::screen_width() - $window_width) / 2; $window_ypos = (Gdk::screen_height() - $window_height) / 2; $main_window = &new GtkWindow(); $main_window->connect('destroy', 'destroy'); $main_window->set_policy(TRUE, TRUE, FALSE); $main_window->set_title("Gtk+ Hello World"); $main_window->set_uposition($window_xpos, $window_ypos); $main_window->set_usize($window_width, $window_height); $main_window->show_all(); Gtk::main(); ?>

Add a close-button … $main_window->set_usize($window_width, $window_height); $close_button = &new GtkButton("Close"); $close_button->connect('clicked', 'destroy'); $close_button->show(); $main_window->add($close_button); $main_window->show_all(); …

Connecting Signals Signals are used to connect user actions and system events with php-functions. Examples: –’clicked’ signals on buttons. –’destroy’ signals on windows.

Callback function Names are case-insensitive Names are passed as strings (lowercase) The object emitting the signal is the first parameter, can be changed with the connect_object() method. Additional parameters can be added

Popup Messagebox() $main_window = &new GtkWindow(); $main_window->set_position(GTK_WIN_POS_CENTER); $main_window->connect('destroy', 'destroy'); $main_window->set_policy(TRUE, TRUE, FALSE); $main_window->set_title("Gtk+ Hello World"); $main_window->set_usize($window_width, $window_height); function Confirm_Quit($calling_button) { if (MessageBox("Do you realy want to quit ?", "System Message", MB_YES | MB_NO) == MB_YES) destroy(); } $close_button = &new GtkButton("Close"); $close_button->connect('clicked', 'confirm_quit'); $close_button->show(); $main_window->add($close_button); $main_window->show_all(); Gtk::main();

The gtk.php samplegtk.php Shows basic and advanced features How to use Gtk objects –GtkWindow, GtkButton, GtkClist –GtkCursor, GtkCtree, GtkEntry, GtkLabel –GtkPixmap, GtkRadioButton, GtkTooltips

Database Manager Manage local or remote DBMS View status of databases Start and stop databases Demo

DB Query Tool A simple SQL tool Executing SQL Statements Exporting data Cross platform Support for mulitple databases Demo

Related technologies libGlade …

Future Development Adding support for aditional functions Compiling php-gtk as a built-in ext. Documentation

More Information ticles/article-php-gtk.htmlhttp://josefine.ben.tuwien.ac.at/~mfischer/ar ticles/article-php-gtk.html