La presentazione tenuta da Davide Del Vecchio e Nino Guarnacci in occasione del Codemotion a Roma del 5 marzo 2011 - http://www.codemotion.it/
Nato sotto gli auspici della GPL v.2 l'Open Jdk è il laboratorio per il futuro di Java : perchè dovreste usarlo, come attivare le caratteristiche più innovative e quali sono gli aspetti più interessanti non solo per la parte sound...
Il testing delle applicazioni MVC Zend Framework è spesso visto come una sorta di stregoneria, ma tutto sommato non lo è. In questo seminario web vedremo cosa e come testare, i pattern più comuni per il testing e le possibili difficoltà che si possono incontrare. Verranno trattati inoltre alcuni elementi di base su PHPUnit in modo da fornire concetti fondamentali per l’operatività anche a chi non è esperto di testing.
La presentazione tenuta da Davide Del Vecchio e Nino Guarnacci in occasione del Codemotion a Roma del 5 marzo 2011 - http://www.codemotion.it/
Nato sotto gli auspici della GPL v.2 l'Open Jdk è il laboratorio per il futuro di Java : perchè dovreste usarlo, come attivare le caratteristiche più innovative e quali sono gli aspetti più interessanti non solo per la parte sound...
Il testing delle applicazioni MVC Zend Framework è spesso visto come una sorta di stregoneria, ma tutto sommato non lo è. In questo seminario web vedremo cosa e come testare, i pattern più comuni per il testing e le possibili difficoltà che si possono incontrare. Verranno trattati inoltre alcuni elementi di base su PHPUnit in modo da fornire concetti fondamentali per l’operatività anche a chi non è esperto di testing.
The document provides an overview of best practices for configuring and using Spring frameworks. It discusses techniques for streamlining Spring configuration through annotations and external properties files. It also covers topics like caching with AOP, transactions, Spring MVC, and Spring Security. The presentation is aimed at sharing tips for improving code organization, performance, and security when building applications with Spring.
This is an old presentation I've given for a Lunch&Learn in my previous job. In this presentation I'm trying to explain the concept of Inversion of Control, It's advantages and how Test Driven Development forces you to embrace this approach. When the dependencies becomes many the need for a framework arise, those frameworks are usually called IoC. Than quickly I intruduce the difference in Dynamic Languages as Ruby.
50 minuti per svelare la tigre, il cavallo e sapere che esiste il delfino.
La nuova versione di Java implementa caratteristiche che da tempo erano attese
nello standard del linguaggio: Metadata, Generic Types, AutoBoxing e
Unboxing dei tipi primitivi, Static import, gestione dinamica dei Loop e delle
Enumeration.
Per Java 6: gestione di SystemTray e motori di scripting.
Vediamo di cosa si tratta e di come poter utilizzare queste nuove feature all'interno dei nostri programmi
by Davide Cerbo e Stefano Linguerri.
Javascript viene sempre consiederato un linguaggio di serie B in cui è impossibile seguire le buone regole della programmazione ad oggetti. Ma non è così! In questa presentazione scopriremo come questo sia un linguaggio in continua evoluzione e come sia possibile sviluppare seguendo i paradigmi della programmazione ad oggetti. Scopriremo tool e librerie che ci permetteranno di sviluppare creando batterie di test, oggetti mock e inserire istruzioni di log nel nostro codice. Durante questa presentazione illustreremo anche la libreria Prototype che ci sarà di supporto durante gli esempi.
The document provides an overview of best practices for configuring and using Spring frameworks. It discusses techniques for streamlining Spring configuration through annotations and external properties files. It also covers topics like caching with AOP, transactions, Spring MVC, and Spring Security. The presentation is aimed at sharing tips for improving code organization, performance, and security when building applications with Spring.
This is an old presentation I've given for a Lunch&Learn in my previous job. In this presentation I'm trying to explain the concept of Inversion of Control, It's advantages and how Test Driven Development forces you to embrace this approach. When the dependencies becomes many the need for a framework arise, those frameworks are usually called IoC. Than quickly I intruduce the difference in Dynamic Languages as Ruby.
50 minuti per svelare la tigre, il cavallo e sapere che esiste il delfino.
La nuova versione di Java implementa caratteristiche che da tempo erano attese
nello standard del linguaggio: Metadata, Generic Types, AutoBoxing e
Unboxing dei tipi primitivi, Static import, gestione dinamica dei Loop e delle
Enumeration.
Per Java 6: gestione di SystemTray e motori di scripting.
Vediamo di cosa si tratta e di come poter utilizzare queste nuove feature all'interno dei nostri programmi
by Davide Cerbo e Stefano Linguerri.
Javascript viene sempre consiederato un linguaggio di serie B in cui è impossibile seguire le buone regole della programmazione ad oggetti. Ma non è così! In questa presentazione scopriremo come questo sia un linguaggio in continua evoluzione e come sia possibile sviluppare seguendo i paradigmi della programmazione ad oggetti. Scopriremo tool e librerie che ci permetteranno di sviluppare creando batterie di test, oggetti mock e inserire istruzioni di log nel nostro codice. Durante questa presentazione illustreremo anche la libreria Prototype che ci sarà di supporto durante gli esempi.
Polyglot Persistance con PostgreSQL, CouchDB, MongoDB, Redis e OrientDBSteve Maraspin
Pirma parte del seminario su NoSQL al DiTeDi di Udine del 15/12/2012. Affrontato il caso di studio di un'architettura enterprise, basata su datastore relazionali (PostgreSQL) e non (CouchDB, MongoDB, Redis e OrientDB).
Javascript avanzato: sfruttare al massimo il webRoberto Messora
Javascript è uno dei linguaggi più sottovalutati e più incompresi dell'intero panorama dei linguaggi di programmazione, eppure è anche uno dei più utilizzati.
Da una parte le molteplici e differenti declinazioni degli strumenti di navigazione web, dall'altra l'infelice scelta storica di usare il termine "script", hanno contribuito alla creazione del mito di un linguaggio poco rigoroso, al servizio di ogni sorta di trucco o pezza di codice.
La verità invece racconta di un linguaggio dinamico ad oggetti a tutti gli effetti, con caratteristiche molto interessanti, seppur con qualche difetto, ma soprattutto un linguaggio che, sull'onda di HTML5, rivestirà se possibile ancora più importanza nell'immediato futuro.
In questa sessione verranno presentati aspetti poco conosciuti, ma molto importanti, di Javascript (scoping, hoisting, closures, ecc.), verranno presentati alcuni design patterns che permettono di strutturare in maniera intelligente le nostre librerie applicative in funzione della manutenibilità e delle performance, senza tralasciare, ove possibile, uno sguardo ad alcuni framework come jQuery o KnockoutJS.
The document discusses turning Maven into a high scalable, resource efficient, cloud ready microservice for compiling business rules and processes. It describes requirements for an incremental compiler that respects the user's POM, has low latency and memory footprint, supports multiple users and threads, can execute builds locally or remotely, and returns rich data beyond just success/failure. The proposed solution is a Maven as a Service API that implements an enhanced compiler with asynchronous request-response behavior, enabling features like per-request Maven repositories, incremental compilation, and returning compiled rule and process metadata beyond just the build result.
When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...Massimiliano Dessì
Turning Maven into a High Scalable, Resource Efficient, Cloud Ready Microservice
Embracing Microservice Architecture in a new project is something that most of developers want!
But how about the old and gold projects that are not designed and planned for it?
What about refactoring a real legacy piece of software that is stable and used by almost all Java developers out there?
Come to this talk to see how we transformed Maven builds in a Cloud Ready Microservice.
Some covered topics are:
-Live objects extracted from Maven Mojos and shared between different classloaders
-Cloud Native features, Configuration and in memory plugins
-Turn any Maven build into incremental ones
-Concurrent use of the same Maven compiler
-Turn into reusable Maven internal objects to decrease memory footprint and increase speed
-How fits in Drools and jBPM ecosystem
-Trade offs
The document discusses hacking Maven to make it more powerful. It describes embedding Maven to use it programmatically and adding decorators to add behaviors before and after compilation, such as syncing with a Git repository. A key challenge is accessing objects from Maven's internal classloaders. The solution is to use a "Charon" object to move live objects from Maven's classloaders to an external classloader, allowing these objects to be used. This makes Maven more flexible, extensible, and able to return live object models rather than just files.
The document discusses different platforms for deploying microservices using containers including Docker, Kubernetes, AWS ECS, AWS Elastic Beanstalk, OpenShift, and Fabric8. Docker allows deploying containers but does not provide orchestration capabilities. Kubernetes provides orchestration of containers across clusters and can be deployed on-premises or on cloud providers. AWS ECS and Elastic Beanstalk integrate Docker containers with AWS but lack portability. OpenShift is a distribution of Kubernetes that can be used to deploy and manage containerized applications. Fabric8 builds upon Docker and Kubernetes to provide a full Platform as a Service with DevOps capabilities.
This document provides an overview of Docker containers. It defines containers as lightweight sandboxed processes that share the same kernel as the host operating system. The key benefits of containers are that they have lower overhead than virtual machines and allow for the easy sharing and distribution of applications. The document discusses Docker images, containers, the client-server architecture, and basic Docker commands. It also covers use cases, the layered filesystem model, and security considerations when using containers.
Massimiliano Dessi discusses Docker, an open-source containerization platform. Docker allows applications to be easily deployed into containers by automating the deployment process. Containers offer greater density and efficiency than virtual machines by running at the kernel level without an extra layer of abstraction. Docker uses containers, images, and a client-server architecture to package and run applications securely isolated on the host operating system with their own filesystem, CPU, memory, and other resources.
This document discusses OpenShift, a platform as a service (PaaS) that allows users to deploy and scale applications in a cloud hosting environment. It provides an overview of OpenShift's architecture, including gears (container servers), cartridges (application components), and tools for managing applications. The presentation aims to introduce OpenShift's core concepts and demo its capabilities for hosting and scaling applications.
This document discusses reactive applications and the tools used to build them. Reactive applications are event-driven, scalable, resilient, and responsive. They react quickly to events, failures, loads, and through user interfaces. Key tools for building reactive applications include actors, agents, futures, and functional reactive programming. Actors communicate asynchronously through message passing. Agents are reactive memory cells that update asynchronously. Futures allow non-blocking composition. Functional reactive programming uses streams to model events over time.
This document provides an overview of Scalatra, a Scala web microframework, and compares it to Spring MVC. It discusses how Scalatra and Spring MVC handle REST, routing, templates, security, exceptions, and more. The speaker has over 13 years of experience in programming and manages several user groups.
This document provides an overview of Scala web frameworks Play, Scalatra, and Spray. It begins with introducing the speakers, Massimiliano Dessì and Alberto Quario. The agenda then outlines topics to be covered including REST, JSON, routing, templates, actors, sessions, deployment, hot reloading, and testing. The bulk of the document dives into specifics of each framework, focusing particularly on Scalatra with descriptions of how to implement REST, routing, filters, handlers, requests/responses, binding, Gzip, flash messages, JSON, templates including SSP, Jade, Mustache and Scaml, and using actors. It also briefly discusses authentication and security in Scalatra.
The document discusses the benefits of functional programming for concurrency. It notes that mutable state and parallel processing can lead to non-determinism, race conditions, starvation, deadlocks, and livelocks. Two examples of failures caused by data races are described: a radiation therapy machine that killed patients and a software bug that contributed to a major blackout. The document compares different models for concurrency, including shared mutable state with threads/locks, isolated mutable state with actors, and purely immutable functions. It advocates for referential transparency and immutable data to simplify reasoning about concurrency. Functional programming aims to separate computational logic from side effects through a modular, functional core with thin layers to handle effects.
This document provides an overview of a presentation titled "Three languages in thirty minutes or so...". It introduces the three presenters and their backgrounds. It explains that learning multiple languages provides different problem solving approaches and tools. The presentation will cover variables, data structures, objects, functions, flow control, and concurrency in Javascript, Clojure, and Scala in 30 minutes.
The document discusses Massimiliano Dessì's background and experience as a software architect, developer, and founder/chairman of various user groups. It then provides an overview of MongoDB including its main features such as being document-oriented, easy scalability, high performance, high availability, and rich query language. Examples of MongoDB production deployments are also listed. The rest of the document dives deeper into specific MongoDB concepts, data structures, operations, and query capabilities.
MongoDB is a document-oriented database that stores data in JSON-like documents. It features high performance, high availability, easy scalability, and a rich query language. Data is stored in flexible, schema-less documents which reduces the need for joins. MongoDB uses replication and automatic sharding for high availability and easy scalability.
RESTEasy is a framework for building RESTful web services in Java. It allows developers to write JAX-RS annotated Java classes to define resources and their representations. Resources are addressable via URIs and support standard HTTP methods like GET, PUT, POST, and DELETE. Resources return representations in formats like JSON, XML, and HTML. Communication is stateless and driven by hypermedia links between resources. RESTEasy supports features like interceptors, asynchronous jobs, caching, GZIP compression, and integration with Spring and other frameworks.
This document outlines a presentation on Spring ROO given by Massimiliano Dessì. The agenda includes a 5 minute demo for unbelievers, discussing Roo internals, Maven support, add-on anatomy, Roo domain driven design, AspectJ intertype declarations, and the SpringSurf add-on. The presentation covers how Roo uses an interactive shell and process manager, supports Maven, how add-ons are structured with commands and operations, uses domain driven design principles with entity and web layers, aspects through intertype declarations, and demonstrates the SpringSurf add-on.
2. Quando aiutano i JDO ?
Permettono la persistenza “ad oggetti”,“mascherando”
il gap esistente tra un database relazionale e il
linguaggio ad oggetti usato nelle applicazioni java.
Adatti quando il dominio degli oggetti prevede un
flusso load/edit/store
Adatti quando esiste un sufficiente mappaggio
“naturale” tra il dominio degli oggetti e le tabelle
Quando gli oggetti possono essere acquisiti in grande
numero, ma aggiornati o cancellati individualmente
3. Con JDO si intende uno standard per la persistenza
di oggetti java, utilizzabile su tutti gli ambienti java
(da J2ME a J2EE ).
I JDO non fanno parte della J2EE ma sono
integrabili con essa, si occupano soltanto del
concetto di persistenza.
Oggetti locali.
Persistenza ricca di funzionalità.
4. Sviluppo semplificato, contenuto informativo dei
descrittori di persistenza (metadati) ridotto.
Trasparenza assoluta dello strato di persistenza.
Possibilità di utilizzo con tutte le piattaforme JAVA,
dalla semplice JVM ai container J2EE (le specifiche
parlano di ambienti managed e non).
5. Quando si parla di trasparenza dello strato di
persistenza dei JDO, l’obiettivo è quello di permettere
al programmatore di concentrarsi sulla logica di
business, senza dover manualmente aggiungere
nessuna istruzione di persistenza nelle classi che
modellano i business object. Questo codice può essere
aggiunto alla classe con differenti modalità, che
troviamo nelle specifiche e che possiamo riassumere
con: prima della compilazione, dopo la compilazione,
direttamente nel codice (in questo caso senza la
trasparenza).
6. Finora quasi tutti i produttori utilizzano la seconda
soluzione, con un tool chiamato enhancer, che modifica
(anzi, sostituisce) la classe originaria con una capace di
persistere (eccetto Xorm).
7. L’enhancer, ed il codice aggiunto alla classe sono
diversi per ciascuna implementazione, ma tutti
compatibili, dato che un requisito fissato dalle
specifiche è la compatibilità binaria tra le classi
“enhanced” dalle diverse implementazioni JDO.
Il programmatore si occupa di scrivere il codice di
persistenza, per i JDO le specifiche propongono
un enhancer.
12. Interfaccia generata da Xorm
public interface Dvd {
String getTitolo();
void setTitolo(String val);
int getPrezzo();
void setPrezzo(int prezzo);
}
13. Value Object
public class DvdVO implements Dvd, Serializable {
public DvdVO() {}
public void setTitolo(String titolo) {
_titolo = titolo;
}
public String getTitolo() {
return _titolo;
}
public void setPrezzo(int prezzo) {
_prezzo = prezzo;
}
public int getPrezzo() {
return _prezzo;
}
14. package org.casamia.catalogo.jdo;
import org.casamia.catalogo.jdo.db.*;
import java.io.*;
import java.util.*;
import javax.jdo.*;
import org.xorm.*;
public class CatalogoJdo {
public CatalogoJdo() { }
public static void main(String[] args) {
CatalogoJdo catalogo = new CatalogoJdo();
Collection lista = catalogo.getLista(quot;Dvdquot;, quot;titoloquot;);
Iterator iter = lista.iterator();
while (iter.hasNext()) {
Dvd item = (Dvd) iter.next();
System.out.println(quot;prezzo dvd quot; + item.getPrezzo());
System.out.println(quot;titolo dvd quot; + item.getTitolo());
}
}
16. JDOQL
Java programming language syntax
JDOQL is data-store independent
JDO removes SQL dependencies for querying
persistent data
Efficient architecture (no instantiation)
Query instances created by PersistenceManager
Application must provide
• Candidate collection (extent, previous query)
• Class of result
• Variable declaration, parameter declarations,
filter expression, import declarations, ordering
declarations
20. Feature Serialization JDBC JDO
Data Model Java Relational table Java
model
Support of Java Yes No Yes
Classes
Access granularity Object Graph Table cell Object / Fetch
Support of inheritance Yes No Group
Yes
and polymorphism
Support of references Yes No Yes
and collections
Automatic No No Yes
management of cache
Transactions No Yes Yes
Concurrency No Yes Yes
Query Language None SQL, each vendor JDOQL, standard
has a different language, Java-like
dialect (not syntax
portable).
Object model No No Yes
supported in queries
21. Entity Beans JDO
Component-oriented JDO is object-oriented
Inheritance Inheritance
Polymorphism Polymorphism
Encapsulation Encapsulation
Couples persistence
to tx and security
Easy to test, develop
and deploy
Slow and heavyweight
No fine-grained object
Highly flexible
models Java-centric
EJB QL requires
deploy-time definition
of queries.
23. JDO/R 2.0
Fine 2003 JDO 2.0 Expert Group nuovi membri:
Rod Johnson (Spring)
Gavin King (Hibernate)
Hibernate implementerà le specifiche JDO/R 2.0 in
alternativa a quelle già presenti.