Páginas

viernes, 30 de mayo de 2014

Resumen "Mocks will be assimilated"

Hola juggers !!!

El pasado 25 de Abril tuvimos el placer de escuchar a Alex Soto hablar sobre el uso de Mocks y de otras alternativas útiles para el testing así como stubs y fakes.

Inicialmente nos introdujo una muestra de las opciones disponibles sobre mocking : mockito, jmock, easymock... para romper el hielo.

Uno de los aspectos del uso de mocking es que facilita mucho los tests pero hace que el código desarrollado para mockear los diversos elementos no sea reutilizable en el entorno de producción y además implica que habrá que destinar un tiempo ( grande en algunas ocasiones ) al desarrollo de los mocks.

Otra opción sería usar plataformas como Arquillian, que nos facilitan la encapsulación del entorno de test y que nos permitirá probar nuestros elementos sin tener que crear mocks o fakes de ellos.

Arquillian es una plataforma de testing en la que podemos crear tests fácilmente y sin la necesidad de mockear aspectos de la aplicación .



  • Real tests increase certainty
  • Real tests build confidence
  • Real tests increase robustness
  • Mock is an option, not a rule
  • Don’t let mocks ruin yourquality
  • Long Live and Prosper to tests
Con Arquillian creamos nuestros entornos de test con nuestros elementos reales, sin mockear y inicializamos los diferentes elementos ( persistencia, CDI, etc ) y probamos con la seguridad que nuestro código probado irá directamente a producción puesto que no habremos invertido tiempo mockeando los elementos.

Manage Lifecycle of Container
Create/Deploy MicroDeployments
Enriching Test Classes
Run Tests inside/against Container
IDE Friendly



Slides de la presentación : http://lordofthejars.github.io/bjugbank-decks/slides.html

Video



martes, 13 de mayo de 2014

Building Reactive Applications with Akka - May 22th

Hola!

Ya tenemos aquí un nuevo evento, esta vez en colaboración con el grupo Scala Developers Barcelona. Conjuntamente tenemos el placer de presentar el evento "Building Reactive Applications with Akka" a cargo de Jonas Bonér, cofundador y CTO de Typesafe.




Las demandas y expectativas de las aplicaciones han cambiado drásticamente en los últimos años. Las aplicaciones actuales están desplegadas en una amplia gama de infraestructuras; desde dispositivos móviles hasta miles de nodos que se ejecutan en la nube, todo ello controlado por procesadores de múltiples núcleos. Los usuarios esperan que las aplicaciones reaccionen en milisegundos y que nunca fallen. Además, las aplicaciones modernas trabajan en entornos en que colaboran con una gran variedad de servicios de terceros.

En esta charla Jonas Boner presentará Akka detallando cómo puede ayudar a aportar en los cuatro principales características de las aplicaciones reactivas: Event - Driven, Scalability, Resilience y Responsive. Empezaremos con lo básico de Akka, continuando hacia algunos de sus módulos más avanzados como Akka Cluster y Akka Persistence, todos impulsados ​​a través de código con Scala y ejemplos prácticos.

El evento tendrá lugar el próximo 22 de Mayo a partir de las 18:15-18:30h, en la FIB (UPC Campus Nord, edificio B6, Barcelona). En esta ocasión y como se trata de un evento conjunto, os emplazamos a reservar tu plaza en Eventbrite.

No falteis, os esperamos!!

sábado, 10 de mayo de 2014

Java 8 Lambdas and Devices with Stephen Chin (recap)

Hi devs!

The last 14th of april we organized Stephen Chin's talk on Java 8 lambdas and devices, a terrific evening at the Official College of Technical Engineer in Computer Science in Catalonia (COETIC). We had a blast with robots, raspberry-made tablets, and a cute gal RPG character leading a herd of sheeps with the power of Lambdas!


To show us how to use Lambdas, Stephen led us through an incremental series of steps enhancing the funcionality of Mary, the JavaFX sheep herd leader RPG lady of the evening:


Lambdas were used to provide a chain of transformations on the behaviour of Mary and it's herd of sheeps. Treated as a collection of animals, lambdas provided us with the ability to apply filtering, selecting the animals we wanted to affect using reduction algorithms, like this one:
Predicate<SpriteView> pure = a -> a.getColor() == null;mealsServed.set(mealsServed.get() + s.getAnimals().filtered(pure).size());s.getAnimals().removeIf(pure);

Lambdas also served to provide collections of different types to transform our sheeps into chickens with mapping and collector!

  
Like so:
s.getAnimals().setAll( s.getAnimals()
    .stream()
    .map(SpriteView::getFollowing())
     .map(Chicken::new)
     .collect(Collectors.toList())
 );

All in all, a very informative and practical talk on using lambdas. But that wasn't all there was to it, since we got to see a demo of Duke, the java mindstorm robot, with whom we interacted:

It's all fun and laughs until the lasers come out
Duke was remote-controlled by a java-enhanced Rasperry Pi motherboard.

There was so much more that we did; I encourage you to see the whole thing on our youtube channel or in the Nighthacking website!

We're looking forward to see you on the next event!

miércoles, 7 de mayo de 2014

Going real-time with WebSockets and Spring (12/5)

Hi JUGgers!

Volvemos a la carga, para anunciaros que ya tenemos nuestro próximo evento, este próximo lunes 12, esta vez centrado en el desarrollo de aplicaciones web en real-time con Spring con el uso de WebSockets y de la mano de Sergi Almar.

A alguien en la sala le suena Spring, ¿no? ;-) Pues entre las mejoras y novedades que se incluyen en Spring 4, uno de los cambios significativos es el soporte para WebSockets. En esta sesión veremos cómo desarrollar aplicaciones en tiempo real usando WebSockets para una comunicación bidireccional. Gracias a SockJS, Spring permite el intercambio de mensajes en contenedores anteriores a Servlet 3.1 y entre navegadores que no soportan WebSockets (como IE anterior a la versión 10). 



De la misma forma conoceremos qué ventajas ofrece el uso de WebSockets para la comunicación, y qué tienen de similar al uso de un socket directamente (ej: no tenemos un protocolo como HTTP donde podemos usar headers, parámetros...) y porqué tienen un mecanismo para negociar un subprotocolo. Analizaremos las ventajas del uso de Spring y sus novedades, como el soporte de STOMP, cosa que permite implementar mensajería basada en WebSockets y veremos cómo este mismo framework proporciona un broker simple en memoria pero que a la vez también soporta la integración de un broker standalone como RabbitMQ o ActiveMQ.


En colaboración con javaHispano os ofrecemos esta charla, el próximo lunes 12 de Mayo a partir de las 19h en La Fontana impartido por Sergi Almar, SpringSource Certified Instructor. 

Os esperamos!

martes, 22 de abril de 2014

Resistance is Futile, Mocks Will Be Assimilated [Workshop] (25/04)

Hi community!

How were the holidays? We hope you have a nice time and enjoy it.

So, here we are, ready for our next event, this friday 25th and this time we will be focused in testing and mock objects and playing with some great tools about these topics driven by Alex Soto.

Let's think a little about testing. Everybody is mocking in unit test. To test what? Your code will be run within a Java EE container. Let's start writing fast real tests.


Are you confident enough to push your application to production without fear? Will it run correctly with all components? Keep the fail whale at bay? Confidence comes from writing real tests.
In this workshop we are going to see how some tools like Arquillian, Byteman, NoSQLUnit or Moco and other programs, may help us writing real tests in situations where you typically would use mocks.










Come to this workshop and learn how to write faster and more effectively tests!

Here is the script of the event:

- Some Theory
  • What are and what happens with mocks?
  • Are there alternatives?
  • Mocks, stubs and fakes
  • Explanation of typical scenarios where mocks are used: Business Layer, Data Layer, External Services Layer, UI Layer
- Engage!!!
  • Writing real tests in Business Layer with Arquillian
  • Writing real tests for External Services Layer.
  • Writing real tests for Ajax-Enabled UI applications under different browsers (including Mobile ones)
  • The Cloud
- Conclusions

These are the requirements for this workshop:
As we have mentioned, this workshop will be driven by Alex Soto. Alex is a software engineer specialized in enterprise technologies, test automation and continuous delivery based on the Java platform. He has over a decade of experience in the Java world, yet continually renews his skill set by learning new aptitudes and technologies every day. Moreover he is involved in the open source world in projects like NoSQLUnit, Asciidoctor or Arquillian. He is an international speaker, presenting his talks at software conferences like Devoxx, LinuxTag, Codemotion, Guatemala JavaDays, JavaLand or GeeCon.

That's all guys, just remember to reserve your seat at MeetUp and come this friday 25th at 7pm at our usual place, La Fontana. Ah! Do not worry about the language, this workshop won't be in english ;-)

See you this friday!

lunes, 21 de abril de 2014

Introducción a Liferay - Resumen

Hola juggers !!!!

El pasado 27 de Marzo tuvimos la ocasión de conocer Liferay desde un punto de vista más developer de la mano de José Guitart.

Nos mostró la arquitectura de componentes que usa Liferay : Sites, Páginas, Portlets, Hooks, Plugins.... y pudimos ver de primera mano la creación in-situ de un portlet usando Eclipse como editor.

También nos habló de la fantástica integración con otras herramientas, que es uno de los grandes potenciales de Liferay :


Finalmente nos mostró unas conclusiones muy interesantes de cuándo usar Liferay y cuando no, algo que no siempre es fácil de encontrar cuando pensamos en usar una herramienta.

Ante todo agradecer la dedicación y esfuerzo de José, otra vez y ya van varias :) , que contribuye fantásticamente a la difusión de las tecnologías para la comunidad. 

Aquí os dejamos tanto los slides de la presentación como el video.

Enjoy it !!!!!

Presentacion : http://goo.gl/MKhSaI

Video

sábado, 19 de abril de 2014

Introduction to Apache Cassandra - Summary

Hi devs!

As we announced on the last entry, on April 1st, we attended a terrific Cassandra talk with Colin Clark as the speaker, on which he explained the use of Cassandra they made at Datastax for a distributed concurrent and high availability Stock Exchange monitoring and management application (a very simplified view of what the application actually did, of course).

At first, we were given an overview of the project, what it entailed, what were the client's needs and the protocols used for information exchange. With that information, we were shown how the system was built around those foundations. Colin described the different layers of their system, the ever functioning monitoring and processing layer that aggregated all real time data coming from the stock exchange sources so as to empower business analysts to take sound strategic decisions.



This information processing system couldn't have been made without Cassandra, the key technology, since this NOSQL database is designed from the ground up to be scalable, thanks to it's distributed node architecture. As was debated later on the questions round, the alternatives weren't up to the needs of the application, in performance, availability and cost (both in time to implement and on licenses to pay).





Colin Clark also gave us some pointers on best (and worst) practices to migrate a relational database backed application to a nosql like Cassandra.

All in all, a very good talk, and one that will open further collaborations with Datastax. Stay tuned for more info on that the next months, big things are yet to come this year!






Talk's video: