版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Copyright 2008, Tim HayesDelphi for PHPWeb 2.0 / AJAXQuinjoCopyright 2008, Tim HayesTim Hayes : Software Product Designer and Developer Working in IT since 1974Started with Delphi I in 1996dbPAL database toolkit for developers published in 20012007 worked with Delphi for PHP for commercial websitePa
2、rtnering with Roland Potter to build a full Client-Server Javascript IDE called “Quinjo” Copyright 2008, Tim HayesDelphi for PHPCopyright 2008, Tim HayesDelphi for PHP 1st release February 2007 Version 2.0 “Aurora” due shortly “Crocodile” slated for early 2009 Mixed heritage Borland / CodeGear IDE O
3、pen Source VCL from Quadram Software Open Source QooxDoo Javascript Component Library Claims Visual data aware development environment for PHP AJAX enabledCopyright 2008, Tim HayesFirst Impressions * Look and feel of Delphi 2006 Familiar IDE Familiar Component Library Easy to build a simple web page
4、 that populates data controls Integrated Apache Webserver for easy debugging Integrated PHP debugger is very powerfulCopyright 2008, Tim HayesSecond Impressions Product was released a year early Far too many IDE crashes Many component properties and events not implemented Very poor documentation Mix
5、ture of Client and Server side processing Difficult to understand if writing event-driven code DB components not accessible client-side Integration with formal website difficult Graphics NavigationCopyright 2008, Tim HayesBehind the scenesCLIENTPHP ServerWeb Broswer ClientFORM SENDorAJAX CALLSERVERR
6、ESPONSESERVERUNSERIALIZEDATACONTROLOBJECTSSERIALIZEDATACONTROLOBJECTSSEMI-DATA AWAREVISUAL CONTROLSDATA OBJECTS(database, tables,datasources)VISUAL CONTROLSCopyright 2008, Tim HayesDivision of “duties”CLIENT Extensive HTML for visual interface Native FORM-based with manual inclusion of AJAX calls Em
7、bedded Javascript visual controls with limited data “awareness” Inability to access server-side data controls for validation Stateless environmentSERVER Creates PHP Objects for all data & visual controls, serializing them on send, de-serializing on receive Accesses database Needs to maintain sta
8、te control of client Creates / sends HTML page Can respond to AJAX Calls Copyright 2008, Tim HayesCode Generation - Less PrecisionPHPClasses& GeneratedScriptsGeneratedHTML,CSS/ EmbeddedJavaScriptObjects/JavaScriptClassLibrariesLess Precision - Greater code Complexity and Production Costs and /or
9、 Lower FunctionalityCopyright 2008, Tim HayesThe PLUS points of Delphi for PHP Great for PHP script development, testing and debugging Integrated Apache useful for raw JavaScript and HTML code development Good for simple, one-off data-driven web pages with limited HTML GraphicsCopyright 2008, Tim Ha
10、yesWeb 2.0 DevelopmentAJAXDOMRich Client with JavaScriptCopyright 2008, Tim HayesWhat is Web 2.0 development?building applications and services around the unique features of the Internet, as opposed to building applications and expecting the Internet to suit as a platform (effectively fighting the I
11、nternet). - Eric Schmit.an idea in peoples heads rather than a reality. Its actually an idea that the reciprocity between the user and the provider is whats emphasised. In other words, genuine interactivity, if you like, simply because people can upload as well as download. Stephen FryWeb2.0Copyrigh
12、t 2008, Tim HayesWhat is Web 2.0 technology?rich Internet application techniques, often Ajax-basedsemantically valid XHTML and HTML markup microformats extending pages with additional semantics folksonomies (in the form of tags or tagclouds, for example) Cascading Style Sheets to aid in the separati
13、on of presentation and content REST and/or XML- and/or JSON-based APIs syndication, aggregation and notification of data in RSS or Atom feeds mashups, merging content from different sources, client- and server-side weblog-publishing tools wiki or forum software, etc., to support user-generated conte
14、nt Web2.0Copyright 2008, Tim HayesWhat is AJAX?Web2.0CLIENTPHP ServerWeb Broswer ClientFORM SENDSERVERRESPONSESERVERAJAX CALLDIRECT CALL TO SERVER AVOIDS BROWSER PAGE REFRESHASYNCHRONOUS JAVASCRIPT AND XML available since 2000Copyright 2008, Tim HayesAJAX is NOT advanced technology!Web2.0function cr
15、eateXMLHttpRequest() var msg = ; if(window.ActiveXObject) try return new ActiveXObject(MSXML2.XMLHttp); catch (e) try return new ActiveXObject(Microsoft.XMLHttp); catch (e2) msg = e2.message; if (typeof XMLHttpRequest != undefined) try return new XMLHttpRequest(); catch (e3) msg = e3.message; else i
16、f (msg = ) msg = No xmlhttp object available; alert(XMLHttpRequest not supported:rn+ msg); return null;function AjaxCall(url,values,callback,errorHandler) var useasync = false; var xhr = com.quinjo.sysutils.createXMLHttpRequest();if (useasync) xhr.onreadystatechange = function() if (xhr.readyState=4
17、) if (xhr.status=200) callback(xhr.responseText); else alert(Message returned but with error : + xhr.statusText) var stage = open; try xhr.open(POST, url, useasync); stage = setheader; xhr.setRequestHeader(Content-Type,application/x-www-form-urlencoded);stage = send; xhr.send(AjaxEncode(values); cat
18、ch (e) alert(Exception in XMLHttp call at stage: + stage + rnurl: + url + rnexception: + e.message); return false; if (!useasync) try callback(xhr.responseText); catch (e2) if (confirm(e2.message + rnError occurred after XMLHttp Call.rnShow Response?) alert(url + rn + xhr.responseText ); return fals
19、e; return true;BUT IT DOES EXTEND THE USE OF CLIENT-SIDE SCRIPTINGCopyright 2008, Tim HayesThe Document Object Model (DOM)GraphicSub PanelDIVInputFieldInputFieldInputFieldInputFieldInputFieldSub PanelDIVMain PanelDIVOverlayPanelOverlayPanelDocumentBODYWeb2.0Copyright 2008, Tim HayesManipulating the
20、DOM HTML Created by HTML in order of presentation CSS can be used to apply uniform styles Scripting (JavaScript, VBScript) Create, append, detach nodes Update all style properties Attach and respond to event handlers Attach OBJECTS created by scriptsWeb2.0Copyright 2008, Tim HayesThin Client - Thick
21、 ClientWeb2.0Web1.0Web2.0HTML, STATIC PAGESRICH JAVASCRIPT, AJAX AND WEB SERVICESCopyright 2008, Tim HayesJustification for Thick Client Internet connection speeds approaching 10mbps early network speeds PCs, even mobile devices have sufficient processing power and memory which continues to increase
22、 Reduces server load Application control transferred to the client (client server again) Reduces server-side programming Enriched end-user experienceWeb2.0Copyright 2008, Tim HayesConcerns over Thick Client Security Access to server is published Client-side scripts are published Performance Complex
23、JavaScript Libraries can be 1mb upward More data / scripts can be loaded than are needed (requires same considerations as client-server architecture) Quality Control JavaScript is “loosely typed” and errors can go undetected until run-timeWeb2.0Copyright 2008, Tim HayesQuinjoQuintessential JavaScrip
24、t Objects IDECopyright 2008, Tim HayesQuinjo Project Objectives An IDE for developing browser-based client-server database applications 100% pure JavaScript client-side environment emulating traditional Windows features Object Class hierarchy based on jPersistent, JComponent and jControl Data Access
25、 controls based on jDatabase, jTable, jQuery and jDatasource Data Aware VCL similar to Delphi Integrated Apache and MySQL serversCopyright 2008, Tim HayesQuinjo interaction with DOM Quinjo manages DOM Quinjo visual controls attach to DOM nodes and manage their properties and behaviours DOM events (m
26、ouse, keyboard) handed back to Quinjo controls and passed on to traditional event handlers Windows visual effects managed by Quinjo object parenting and control alignment (Windows style) No HTML (other than lead page) required No CSS requiredCopyright 2008, Tim HayesQuinjo Client-side data Data controls reside on visual datamodule Quinjo has client-side datasets Table or query Calculated fields Master-detail relationships Temporary tables Record insert / delete / update Send by Ajax to server “on post” Datasource connects data aware components Developer responsible for restricting sizesCopyr
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 生产混合芳烃技术项目可行性研究报告
- 2026年国家高新区高质量发展评价指标体系题库
- 2026年不同段位制武艺考察要点解析
- 2026年四川单招语文古代诗歌分层试卷含答案适配不同水平
- 2026年青年文明号创建与管理实务题库
- 坚持传统文化的演讲稿
- 批生产记录的培训
- 少儿舞蹈教师培训
- 生命安全健康卫生演讲稿
- 2026年园区重点产品质量安全总监职责知识测试题
- 区块链金融(第二版)课件 项目三 区块链赋能数字银行业务
- 英语试卷+答案广东省江门市2026届普通高中高三调研测试(江门一模)(.5-.6)
- 2026年见证取样员试卷含答案详解【培优】
- 2025-2026学年苏教版小学四年级数学下册教学计划及进度表
- (新教材)2026人教版三年级下册数学 3.1 多边形 教学课件
- 《管道用哈夫节施工作业技术规程》
- 宝钢采购管理制度
- 公安机关人民警察内务条令试题库(附答案)
- 水处理厂卫生管理制度
- 南京2025年江苏南京师范大学招聘专职辅导员9人笔试历年参考题库附带答案详解
- 脚手架安全通道搭建方案
评论
0/150
提交评论