Presentation is loading. Please wait.

Presentation is loading. Please wait.

Java System Architectures David Davenport Bilkent University Ankara – Turkey

Similar presentations


Presentation on theme: "Java System Architectures David Davenport Bilkent University Ankara – Turkey"— Presentation transcript:

1 Java System Architectures David Davenport Bilkent University Ankara – Turkey Email: david@bilkent.edu.tr

2 Basic Forms of Java Programs Console Applications ( MSDOS-like ) –text only! GUI Applications ( Windows-like ) –text & graphics –menus, buttons, mouse, keyboard Applets –GUI programs restricted for use in web-browsers

3 Other Forms of Java Programs Web Server Applications –html client –data only ~ XML, JSON… Mobile Applications –Android only Java –html5, Javascript, CSS using libraries, e.g. JQuery Mobile, phonegap, … –Java for everything? Cards, TV, … –misc!

4 Java Applications Java Program network Java applications (console & GUI) have full access to local machine resources, including local files, databases & network connections.

5 Java Applet Web Browser Java Applets network Web server Server Java Program Java Applets are embedded in html web pages, downloaded from web servers and run by web browsers. For security reasons, they can communicate only with the machine from which they originated and cannot access local files or databases (although these restrictions can be lifted if the user agrees to trust them!)

6 Networked Java Applications Java Program network Java Program Java Program Java Program Java programs can communicate with each other either directly or via a server program, allowing them to freely exchange information. Some database systems offer direct network access.

7 Networked Java Applets Web server Java Applet Java Applet Java Applet Server Java Program Since Java Applets cannot normally communicate with each other directly, they must do so via a server application program. Similarly, if they need to store information, they can only do so on a server machine.

8 Java Servlets Web Browser Java Servlets Web server Java Servlets extend web server functionality allowing it to dynamically generate web pages using information stored in databases or files. Communications use HTML…

9 Java Web Services Web Browser Java Program Java Web Services Web server Web services extend web server functionality allowing it to dynamically respond to service requests using information from databases, files or even other web services! Clients may be web browsers, but are more likely to be other application programs. Communications use XML/JSON Mobile App

10 Data Formats… NameTelno David1248 Gunes1814 Derya5678 David 1248 Gunes 1814 Derya 5678 David 1248 Gunes 1814 Derya 5678 {"teldir":[{"name":"David", "telno":"1248"}, {"name":"Gunes", "telno":"1814"}, {"name":"Derya", "telno":"5678" ]} name,telno David,1248 Gunes,1814 Derya,5678

11 Mobile Applications Hardware screen orientation (portrait, lanscape) screen size (phone, tablet) screen resolution (DPI) optional sensors (GPS, accelerometer, …) Development environments/languages to each his own? Java for Android, Objective-C for iOs, … cross platform? embedded webbrowser ~ html5, Javascript, CSS + libraries… Java for all? ~ Codename One Operating Systems Android, iOS, Windows, Blackberry, … Changing rapidly

12 Persistent Storage Alternatives Files ~ sequential/random-access, diy/Serialization, … Database~ JDBC, SQL, … Cloud?~ … other?~ local storage on phones, webbrowser, etc. Tables, e.g. TelDir NameTelno David1248 Derya5678 Gunes1814 SQL w3schools select * from TelDir select Name from TelDir select Telno from TelDir where Name = 'Derya ‘ insert into TelDir ( Name, Telno) values ( ‘Ayse’, 9999) update TelDir set TelNo = 0000 where Name = ‘Ayse’ delete from TelDir where TelNo = 5678 + commands to manipulate tables, etc. Database JDBC allows your Java program to connect to any database and talk SQL to it. examples examples… see w3schools…

13 Considerations User Interaction –Text only –Text & graphics Static (html?) Interactive (GUI?) –Mouse/touch/voice/… Single/multi-user –Stand-alone –Network Web-browser (applet) Application Client software distribution & installation –Floppy disks/CD’s/ usb memory sticks/ download? –WebStart –Applets –Server-based Data storage & retrieval –Files –Database (local/network) –Cloud storage


Download ppt "Java System Architectures David Davenport Bilkent University Ankara – Turkey"

Similar presentations


Ads by Google