web fundamental

34
www.devoxx.com

Upload: mufix-community

Post on 01-Nov-2014

2.917 views

Category:

Education


0 download

DESCRIPTION

 

TRANSCRIPT

Page 2: Web Fundamental

www.devoxx.com

Web Fundamental

Basem Elsherbeny

Page 3: Web Fundamental

www.devoxx.com

After this presentation

Page 4: Web Fundamental

www.devoxx.com4

Agenda

• Internet

• HTTP,DNS

• HTML

• Client/Server

• Server and Client side coding

• Servlet

• JSP

• JSF,Struts

Page 5: Web Fundamental

www.devoxx.com5

Each pattern describes a problem which occurs

over and over again in our environment,

and then describes the core of the solution to that

problem,

in such a way that you can use this solution

a million times over

Page 8: Web Fundamental

www.devoxx.com

DNS

• it translates domain names meaningful to humans into the

numerical (binary) identifiers associated with networking

equipment for the purpose of locating and addressing these

devices worldwide. .

• For example, www.example.com translates

to208.77.188.166.

8

Page 9: Web Fundamental

www.devoxx.com

server

• a server is any combination

of hardware or software designed to

provide services to clients. When

used alone, the term typically refers

to a computer which may be running

a server operating system, but is

commonly used to refer to any

software or dedicated

hardware capable of providing

services.

Page 10: Web Fundamental

www.devoxx.com

Server/Client Side

• Server-side refers to operations that are performed by

the server in a client-server relationship in computer

networking

• Client-side refers to operations that are performed by

the client in a client-server relationship in a computer

network.

Page 11: Web Fundamental

www.devoxx.com

Server/Client Side

● Server-side coding

● PHP

● ASP

● CGI and/or Perl

● J2EE

● Python, e.g. Django

● Ruby, e.g. Ruby on Rails

●Client-side coding

●CSS

●HTML & DHTML

●XHTML

●Javascript

●Flash

●SilverLight

Page 12: Web Fundamental

www.devoxx.com

HTML

• HTML stands for Hyper Text Markup Language

• HTML is not a programming language, it is a markup

language

• A markup language is a set of markup tags

• HTML uses markup tags to describe web pages

• .

Page 13: Web Fundamental

www.devoxx.com

Note

• HTML is Not Programming Language.

• HTML is a view Language.

Page 15: Web Fundamental

www.devoxx.com

HTML

• Static Not Dynamic

Page 16: Web Fundamental

www.devoxx.com

Servlet

• A Servlet is a Java class which conforms to the Java

Servlet API, a protocol by which a Java class may respond

to http requests. Thus, a software developer may use a

servlet to add dynamic content to a Web server using the

Java platform.

Page 17: Web Fundamental

www.devoxx.com

Life Cycle of Servlet

Page 23: Web Fundamental

www.devoxx.com

• public class NewServlet extends HttpServlet {

• protected void doPost(HttpServletRequest request,

HttpServletResponse response) throws ServletException,

IOException {

• out.println("<html>"); out.println("<head>");

out.println("<title>Servlet NewServlet</title>");

• out.println("</head>"); out.println("<body>");

• out.println("<h1>Servlet NewServlet at " +

request.getContextPath () + "</h1>"); out.println("</body>");

• out.println("</html>");}

Page 24: Web Fundamental

www.devoxx.com

JSP

• JSP simplifies the development process, allowing

programmers to input Java code directly into the HTML

file or JSP file. JSP is a multi-platform, independent and

portable language that complies with the Java feature of

‘write once, run anywhere.

Page 26: Web Fundamental

www.devoxx.com

Life Cycle of JSP

Page 27: Web Fundamental

www.devoxx.com

url

Page 28: Web Fundamental

www.devoxx.com

JSP Demo

Page 29: Web Fundamental

www.devoxx.com

output

Page 30: Web Fundamental

www.devoxx.com

Demo 1

Page 31: Web Fundamental

www.devoxx.com

Demo

Page 32: Web Fundamental

www.devoxx.com

Demo

• int x = 2,z = 2;

• System.out.println(x+z+"");

• System.out.println(""+x+z);

• System.out.println(x+""+z);

Page 33: Web Fundamental

www.devoxx.com

You must Know• Web application:

• JSF

• Struts

• Hibernate

• EJB 3.0

• Mobile application:

• j2ME:

• Symbian

Page 34: Web Fundamental

www.devoxx.com

Questions