Material sobre Java WEB super mão na massa. Vou construindo e alterando uma aplicação durante a apresentação os assuntos cobertos são:
Java Servlet
Java Server Pages - JSP
JavaServer Pages Standard Tag Library - JSTL
Expression Language - EL
Java Database Connectivity - JDBC
Data Access Object - DAO
Model View Controller - MVC
Hibernate
...
Apresento também formas de fugir do sqlinjection
Welcome to presentation on Spring boot which is really great and relatively a new project from Spring.io. Its aim is to simplify creating new spring framework based projects and unify their configurations by applying some conventions. This convention over configuration is already successfully applied in so called modern web based frameworks like Grails, Django, Play framework, Rails etc.
La Java Persistence API (abrégée en JPA), est une interface de programmation Java permettant aux développeurs d'organiser des données relationnelles dans des applications utilisant la plateforme Java.
Exemple d'application qui montre comment utiliser les bonnes pratiques de JEE pour développer un site web de commerce électronique en utilisant les outils :
- Eclipse comme environnement de développement
- Maven comme outil d’intégration
- JUnit comme Framework des tsts unitaire
- Spring IOC pour l'inversion de contrôle
- Spring MVC pour la couche web
- Spring Security pour la sécurité
- JPA, Hibernate
- Web Service SOAP
- Web Service REST
- Service RMI
This talk introduces Spring's REST stack - Spring MVC, Spring HATEOAS, Spring Data REST, Spring Security OAuth and Spring Social - while refining an API to move higher up the Richardson maturity model
Welcome to presentation on Spring boot which is really great and relatively a new project from Spring.io. Its aim is to simplify creating new spring framework based projects and unify their configurations by applying some conventions. This convention over configuration is already successfully applied in so called modern web based frameworks like Grails, Django, Play framework, Rails etc.
La Java Persistence API (abrégée en JPA), est une interface de programmation Java permettant aux développeurs d'organiser des données relationnelles dans des applications utilisant la plateforme Java.
Exemple d'application qui montre comment utiliser les bonnes pratiques de JEE pour développer un site web de commerce électronique en utilisant les outils :
- Eclipse comme environnement de développement
- Maven comme outil d’intégration
- JUnit comme Framework des tsts unitaire
- Spring IOC pour l'inversion de contrôle
- Spring MVC pour la couche web
- Spring Security pour la sécurité
- JPA, Hibernate
- Web Service SOAP
- Web Service REST
- Service RMI
This talk introduces Spring's REST stack - Spring MVC, Spring HATEOAS, Spring Data REST, Spring Security OAuth and Spring Social - while refining an API to move higher up the Richardson maturity model
Getting started with the reactjs, basics of reactjs, introduction of reactjs, core concepts of reactjs and comparison with the other libraries/frameworks
Introduction to React in combination with Redux. Redux helps you to develop applications in a simple way while having features like time-travel available during development.
This is a basic tutorial on Spring core.
Best viewed when animations and transitions are supported, e.g., view in MS Powerpoint. So, please try to view it with animation else the main purpose of this presentation will be defeated.
Découvrez le framework web Spring Boot qui a la cote !
Apprenez comment son système d'auto-configuration fonctionne.
Live coding et exemple de migration vers Spring Boot sont de la partie.
Presentation explain about
Spring Boot vs Spring vs Spring MVC,
Advantages,
Where to start and how does Spring boot work ?,
Dependency Management,
Logging,
Exception Handling,
Database Handling.
in Spring boot.
Presentation provides introduction and detailed explanation of the Java 8 Lambda and Streams. Lambda covers with Method references, default methods and Streams covers with stream operations,types of streams, collectors. Also streams are elaborated with parallel streams and benchmarking comparison of sequential and parallel streams.
Additional slides are covered with Optional, Splitators, certain projects based on lambda and streams
Spring Data is a high level SpringSource project whose purpose is to unify and ease the access to different kinds of persistence stores, both relational database systems and NoSQL data stores.
Getting started with the reactjs, basics of reactjs, introduction of reactjs, core concepts of reactjs and comparison with the other libraries/frameworks
Introduction to React in combination with Redux. Redux helps you to develop applications in a simple way while having features like time-travel available during development.
This is a basic tutorial on Spring core.
Best viewed when animations and transitions are supported, e.g., view in MS Powerpoint. So, please try to view it with animation else the main purpose of this presentation will be defeated.
Découvrez le framework web Spring Boot qui a la cote !
Apprenez comment son système d'auto-configuration fonctionne.
Live coding et exemple de migration vers Spring Boot sont de la partie.
Presentation explain about
Spring Boot vs Spring vs Spring MVC,
Advantages,
Where to start and how does Spring boot work ?,
Dependency Management,
Logging,
Exception Handling,
Database Handling.
in Spring boot.
Presentation provides introduction and detailed explanation of the Java 8 Lambda and Streams. Lambda covers with Method references, default methods and Streams covers with stream operations,types of streams, collectors. Also streams are elaborated with parallel streams and benchmarking comparison of sequential and parallel streams.
Additional slides are covered with Optional, Splitators, certain projects based on lambda and streams
Spring Data is a high level SpringSource project whose purpose is to unify and ease the access to different kinds of persistence stores, both relational database systems and NoSQL data stores.
Minicurso sobre desenvolvimento de aplicações com android. Passo a passo do desenvolvimento de uma App de TODO. Utilizando Android Studio. CRUD + Banco de dados (SQLite)
Apresentação com dicas para quem esta tendo o 1 contato com o mundo Android. Onde estudar e o caminho a percorrer desde o design, passando pelo desenvolvimento ate a distribuição e promoção.
Em Java, usamos a classe Thread do pacote java.lang para criarmos linhas de execução paralelas. A classe Thread recebe como argumento um objeto com o código que desejamos rodar.
O RMI (Remote Method Invocation) é uma interface de programação que permite a execução de chamadas remotas no estilo RPC em aplicações desenvolvidas em Java. É uma das abordagens da plataforma Java para prover as funcionalidades de uma plataforma de objetos distribuídos. Esse sistema de objetos distribuídos faz parte do núcleo básico de Java desde a versão JDK 1.1, com sua API sendo especificada através do pacote java.rmi e seus subpacotes
Java e Cloud Computing
A computação nas nuvens é uma tendência do mercado, aprenda como desenvolver sobre ela utilizando plataforma java. Esta oficina traz uma visão geral sobre conceitos e arquitetura da cloud computing. Diferenças entre plataformas como Amazon Web Services (AWS), Google Application Engine (GAE). Durante a oficina estaremos desenvolvendo uma aplicação java e disponibilizando a mesma na GAE. Alem disso vamos explorar alguns recursos específicos do serviço do Google, como o repositório de dados NoSQL.
Programação do mini-curso
08:00
- Introdução a Computação em nuvem
- Fundamentos em computação em nuvem
- Níveis de serviços em nuvem
- Google App Engine
- Ambiente de execução da App Engine
- Prática 1
9:30 INTERVALO
10:00
- Ambiente de Desenvolvimento da App Engine
- Ambiente de Produção da App Engine
- Colocando uma aplicação em produção
- Prática 2
ALMOÇO
13:30
- NoSQL
- Big Table
- Acesso a dados
- Prática 3
15:30 INTERVALO
16:00
- API e Serviços da AppEngine
- Pratica 4
- Outros Recursos da App Engine e Dicas
14. U
.j
io
r
a
u
s
a
v
a
package br.com.mariojp;
!
versão 3.0
public class Usuario {
private Integer id;
private String login;
private String senha;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getLogin() {
return login;
}
public void setNome(String login) {
this.login = login;
}
public String getSenha() {
return senha;
}
public void setSenha(String senha) {
this.senha = senha;
}
}
15. Autenticador.java
versão 3.0
@WebServlet("/Autenticador")
public class Autenticador extends HttpServlet {
!
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
Usuario user = new Usuario();
String login = request.getParameter("login");
String senha = request.getParameter("senha");
user.setLogin(login);
user.setSenha(senha);
if(autenticar(user)){
request.getSession().setAttribute("user", user);
response.sendRedirect("home.jsp");
}else{
request.setAttribute("erro", "Usuario ou Senha Invalidos!");
RequestDispatcher d= request.getRequestDispatcher("login.jsp");
d.forward(request,response);
}
}
private boolean autenticar(Usuario user) {...}
!
}
17. i
g
lo
p
js
.
n
versão 3.0
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
</head>
<body>
<form method="post" action=“Autenticador">
Login: <input name="login" type="text"> <br>
Senha: <input name="senha" type="password"><br>
<input type="submit">
</form>
<%
String erro = (String) request.getAttribute(“erro”);
if(erro!=null && !erro.trim().equals("")){
out.print(erro);
}
%>
</body>
</html>
18. m
o
h
p
js
.
e
versão 3.0
<!DOCTYPE html>
<%@page import="br.com.mariojp.Usuario"%>
<html>
<head>
<title>HOME</title>
</head>
<body>
<% Usuario user = (Usuario) session.getAttribute("user");%>
Bem vindo, <%=user.getLogin() %>
</body>
</html>
19. Revisão Rapida
• Java Servlet
• Java Server Pages - JSP
• Model View Controller - MVC
43. package br.com.mariojp;
versão 6.0
!
import org.hibernate.Session;
!
public class UsuarioDAO {
!
public boolean autenticar(Usuario user) {
!
String query = "select u from Usuario as u where "
+ "u.login=:login and u.senha=:senha";
Session session = BancoUtil.getFactory().openSession();
session.beginTransaction();
Usuario usuario = (Usuario) session
.createQuery(query)
.setString("login", user.getLogin())
.setString("senha", user.getSenha()).uniqueResult();
session.getTransaction().commit();
session.close();
return usuario != null;
!
}
!
}
UsuarioDAO.java
44. versão 6.0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration >
<session-factory>
<property
name="hibernate.connection.driver_class">org.hsqldb.jdbc.JDBCDriver</property>
<property name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost/
banco</property>
<property name="hibernate.connection.username">SA</property>
<property name="hibernate.connection.password"></property>
<property name="hibernate.connection.pool_size">1</property>
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</
property>
<property name="hibernate.current_session_context_class">thread</property>
<property
name="hibernate.cache.provider_class">org.hibernate.cache.internal.NoCacheProv
ider</property>
<!-- Echo all executed SQL to stdout -->
<property name="hibernate.show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hibernate.hbm2ddl.auto">create</property>
<mapping class="br.com.mariojp.Usuario"/>
</session-factory>
</hibernate-configuration>
hibernate.cfg.xml
45.
46. Esta obra está licenciada sob a licença Creative Commons
Atribuição-CompartilhaIgual 3.0 Não Adaptada. Para ver uma cópia
desta licença, visite http://creativecommons.org/licenses/by-sa/3.0/.
47. Java web
Mario Jorge Pereira
Como me encontrar?
http://www.mariojp.com.br
twitter.com/@mariojp
mariojp@gmail.com