Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web applications using Java and NetBeans

Similar presentations


Presentation on theme: "Web applications using Java and NetBeans"— Presentation transcript:

1 Web applications using Java and NetBeans
A very brief introduction with references to ASP.NET and Visual Studio Web applications using Java and NetBeans

2 Web applications using Java and NetBeans
NetBeans IDE NetBeans is an IDE Integrated Development Environment NetBeans supports development in a number of programming languages Java, C/C++, PHP, Ruby, etc. NetBeans is a Java application NetBeans runs under a number of operation systems Windows, Linux, Mac OS, etc. Web applications using Java and NetBeans

3 Web applications using Java and NetBeans
Apache Tomcat Apache Tomcat is a web server Open Source Runs Java Servlets and JSP, etc. Normally uses port 8080 if run from NetBeans Included with NetBeans (some editions) Can be downloaded separately Web applications using Java and NetBeans

4 Web applications using Java and NetBeans
GlassFish GlassFish is a Java application server Open Source + commercial (Oracle GlassFish) Runs Java Servlets, JSP and a lot more Implements the full J2EE Included with NetBeans (some editions) Web applications using Java and NetBeans

5 Web applications using Java and NetBeans
Java vs. C# The Java Programming Language and C# are quite similar in syntax and semantics Both are object-oriented Both belong to the curly-brace family of programming languages Java is older than C# Java has fewer keywords than C# Web applications using Java and NetBeans

6 Web applications using Java and NetBeans
Java Servlets and JSP Java offers two ways to make web applications Java Servlets Java code with HTML inside JSP (JavaServer Pages) HTML with Java code inside Servlets and JSP are often/best used in combination Servlets and JSP are part of Java Enterprise Edition Features to be run by a web or application server Web applications using Java and NetBeans

7 Post back to other pages
With ASP.NET the normal post back is to the same page With Java you specify the page to post to <form action="welcome.jsp> Web applications using Java and NetBeans

8 HTTP POST vs. GET methods
The HTTP protocol offers two way to send data from a form to the server POST Data is carried in the body of the request <form action="welcome.jsp" method="POST“ > GET Data is carried in the request URL Default in Java Good for debugging Easy to see data Web applications using Java and NetBeans

9 Model-View-Controller (MVC) in general
Picture from Web applications using Java and NetBeans

10 Model-View-Controller in Java web-applications
Java Bean View JSP Controller Servlet Picture from Web applications using Java and NetBeans

11 Model-view-controller in ASP.NET web-applications
ASP.NET MVC is similar to MVC Java web-applications ASP.NET MVC is quite different from ASP.NET Web Forms Web applications using Java and NetBeans

12 No ViewState in JSP/Servlets
ASP.NET has ViewState With JSP/Servlets there is nothing like ViewState Web applications using Java and NetBeans

13 Deploying a Java web application
When you build a web application you get a WAR file Web Archive Essentially a ZIP file Holds all necessary parts of the web application Can be copied to the production web server Tomcat: the folder webapps/ Tomcat: bin/startup.bat, bin/shutdown.bat Tomcat normally runs on port 8080 Web applications using Java and NetBeans

14 Web applications using Java and NetBeans
Java web frameworks Apache Struts MVC framework JSF (JavaServer Faces) Another MVC framework Facelets View generation framework Alternative to JSP Hibernate An ORM (Object/Relational Mapping) Connects an object oriented programming language (Java or .NET) with a relational DBMS If you want to compare ASP.NET + Visual Studio to Java web applications + NetBeans please take the frameworks into consideration Web applications using Java and NetBeans

15 Web applications using Java and NetBeans
Further readings, etc. Marty Hall Core Servlets and JavaServer Pages Volume 1 + 2, Prentice Hall 2008 Older edition (2002) called More Servlets and JavaServer Pages available on NetBeans.org Java EE & Java Web Learning Trail Specially Introduction to Developing Web Applications YouTube Java Servlet Definition (video 3:44) The Java EE 6 Tutorial Chapter 10 Java Servlet Technology Apache Tomcat download and documentation Web applications using Java and NetBeans


Download ppt "Web applications using Java and NetBeans"

Similar presentations


Ads by Google