Beruflich Dokumente
Kultur Dokumente
46 PHP: 40 C#: 21
potix
Server-side Integration
potix
If you study one project a day, it takes HALF YEAR to figure out
potix
potix
Cost!
potix
In
1994, we developed a Windowsbased accounting system In 2000, we developed a Web-based accounting system
potix
Your Application
Your Application
Your Application
Framework
Framework
Framework
Framework
Browser
Server
Browser
Server
potix
10
potix
11
potix
Does server-centric framework take fewer memory and shorter response time?
12
potix
13
potix
Client-Centric
Server-Centric
potix
14
Client-Centric
Server-Centric
potix
15
But,
WHY?
16
potix
Internet = Applications
Any time Any where Any device
potix
Web applications are great in every measurement, except no user want to use them
18
potix
(AJAX)
potix
What is Ajax?
Technical viewpoint
20
potix
What is Ajax?
Users viewpoint
21
potix
Ajax brings the friendly user experience to Web applications but adds more complexities and costs to already costly development of Web apps
22
potix
Issues
Incompatible,
Fat
Client Issues
Replication
of the application data model and business logic in the browser Maintaining the data consistency between clients and servers asynchronously
23
potix
uses XMLHttpRequest, while Internet Explorer uses ActiveObject. IE and Operas innerHTML doesnt support TABLE Safari uses collapse, while others uses removeAllRanges to unselect
potix
24
Synchronization Challenge
When you type item # and click submit, what is the unit price that server received?
Ajax
potix
Security Challenge
The more Ajax API you exposed, the more frangible your system is.
<INPUT id="customer" onchange="checkCredit()"/> <script> function checkCredit() { var el = document.getElementById('customer'); var credit = creditManager.getCredit(el.value); if (credit < 0) alert('Sorry but your credit limit JavaScript is readable by any client. bounces); A hostile attack can reverse your business logic, and } mimic the Ajax invocations to get all credit limits </script>
26
potix
(depends on distance)
potix
28
potix
Google Maps
<?xml version="1.0" encoding="UTF-8"?> <dwr> function setGinfo(){ callBackGinfo(locator.getInfo(location)); <allow> } <create creator="new" function callBackGinfo(data){ function position(location){ javascript="locator">= new GLatLng(lat,lng); var point callBackLat(locator.locate(locatio)); span_element } <param name="class" = document.createElement("span"); span_element.setAttribute("style","font-size:11px;fontfunction callBackLat(data){ family:verdana;"); value="org.zkoss.demo.Locator" /> lat = data[0]; txt_node = document.createTextNode(data); lng = data[1]; </create> span_element.appendChild(txt_node); load(); map.openInfoWindow(point,span_element); } </allow> } </script> </dwr> function load(){
if (GBrowserIsCompatible()) { var level = 16; map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(lat, lng), level); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); var point = new GLatLng(lat,lng);
</head> <body> <input id="location" type="textbox" onchange=move(this.value);" /> <div id="map_canvas" style="width: 500px; height: 300px"></div> </body> </html>
29
potix
Google Maps
30
potix
A Mobile Example:
Twitter Mobile Client
31
potix
Twitter Mobile:
import javax.microedition.lcdui.*; import javax.microedition.midlet.*; public class twitterMidlet extends MIDlet { private boolean started = false; private Display display; private List twitterList; public twitterMidlet() { }
protected void startApp() throws MIDletStateChangeException { if (!started ) { started = true; display = Display.getDisplay(this); createCommands(); createScreens(); createList();
Thousands of users have to MIDlet-1: test,,test MIDlet-2: software, upgrade the twitterMidlet,,twitterMidlet MIDlet-Jar-URL: twitter.jar MIDlet-Name: twitter if you release a newMidletMidlet Suite version Vendor MIDlet-Vendor: Suite
MIDlet-Version: 1.0.0 MicroEdition-Configuration: CLDC-1.1 MicroEdition-Profile: MIDP-2.1
32
display.setCurrent(twitterList); } }
potix
Twitter Mobile:
33
potix
Ajax brings the desktops friendly user experience to Web applications and a good server-centric framework brings the desktops productivity to Ajax applications
34
potix
Beyond Server-Centric
35
potix
Richness
Completeness
components
Grid,
of off-of-shelf UI
User
friendly features
Drag-and-drop,
36
potix
Simplicity
Programming
Event
model
driven, component-based
Threading
Server
model
Scripting
Java,
Ruby, Groovy
Database
Data-binding,
potix
Extensibility
Integrating
platforms
Google
Maps, Timeline
Integration
JSP,
JSF, portal
Integrating
Database,
Clustering
and Failover
38
potix
A Comparison
ZK DOJO EXT-JS
GWT Backbase Echo2 IceFaces
Client-centric solution Server-centric solution Server-side programming Client-side programming UI design in Markup Language Scripting language JSF and JSP support Data-binding w/o programming Mobile support Open source V Java
Optional
V
N/A
V
N/A
V Java Java
V V Java
.NET
Java Java
N/A N/A
JS
JS
Optional
XUL-based Ruby, JS
Yes
Yes
Java,
JSF, prop.
JSF,JSP V V V
JSF
JSF
V
39
potix
potix
Thank You!