java

Recursos de programación de java
Last weekend I did the UglyTrivia legacy code refactoring kata in Java.Before starting to refactor, I added a characterization test to describe (characterize) the actual behavior of the original code. Since the only "visible effects" of the code were the lines it was writing to the standard output, I had to use that output to create the characterization test.This is the code of the characterization test:Although in this final version, the expected output reflects the fixing of two bugs in the or...
Greach 2014, The Groovy Spanish Conf 28/March, Madrid, Spain http://greach.es Follow us on twitter http://twitter.com/greach_es Slides & source code in http://greach.es/speakers/marco-vermeulen-building-micro-services-using-spring-boot-and-friends/ Spring Boot is the new addition to the Spring family. It takes an opinionated view of building Spring applications, adopting convention over configuration as default. Add Groovy to the mix, and you have a web stack that will give you wings! In this talk we will: - Discuss the Micro Service Architecture. - Discuss the nuts and bolts required to build a Spring Boot Micro Service. - Test and write components with Groovy and Spock. - Run it on an embedded Jetty or Tomcat server. - Use Spring Data to interact with Postgres or MongoDB databases. - Use Cucumber with Geb for functional. - How to use Gradle to build. - Set up a Continuous Delivery pipeline in the cloud. - Automatically deploy the application to a PaaS platform. - Use Swagger spring-mvc UI to dynamically document the API. By the end of this session, participants should know enough to build their own applications and deploy them to the cloud with ease! Marco Vermeulen Private Contractor Marco Vermeulen is a South African Software Developer who works and lives in London. He spent the past 10 years working with Enterprise Java, having experienced both the benefits and frustrations of the technology. He has survived EJB 2.1, did time with Struts and enjoyed using frameworks like Spring and Hibernate. Having worked with Groovy for the past 5 years, he has engineered solutions for Shazam, MailOnline and Burberry. He currently works as an Equal Experts associate, and spends his spare time working on his pet project, GVM.
Greach 2014, The Groovy Spanish Conf 28/March, Madrid, Spain http://greach.es Follow us on twitter http://twitter.com/greach_es Slides in http://greach.es/speakers/cedric-champeau-making-java-apis-groovy One of the major advantages of Groovy is that you can leverage existing Java APIs very easily: you can use them in Groovy just like you would in Java. However, Groovy is a perfect fit for DSLs and it's possible to make those APIs rock: why would you be obliged to use them in a Java fashion if we can build Groovy APIs for them? In this session, we will take an existing Java API and try to make it Groovy step by step, introducing you to various DSL building techniques in Groovy. After this talk, you should be able to build your own Groovy wrappers around existing Java APIs and offer them to the community! Cédric Champeau Core Groovy committer Cédric Champeau is a core Groovy committer. He joined SpringSource, a division of VMware, in order to help developing the language. Prior to that, he spent several years at Lingway, a software editor, where he used Groovy in multiple industrial contexts including DSLs for natural language processing, scripting or even workflows. He his currently working on the implementation of static type checking and static compilation for Groovy 2.0.
Greach 2014, The Groovy Spanish Conf 28/March, Madrid, Spain http://greach.es Follow us on twitter http://twitter.com/greach_es Slides & source code: http://greach.es/speakers/marco-vermeulen-bdd-using-cucumber-jvm-and-groovy/ Behaviour Driven Development (BDD) is the next step to writing applications that hit the mark! What makes this technique different is that it engages Stakeholders from start to finish of a project. This is done by writing Specifications by Example in collaboration with all Stakeholders. This presentation will use Cucumber combined with the power of Groovy to demonstrate how you can apply BDD to your next project. We will look at using Cucumber in context of both Groovy and Grails applications. We will demonstrate how to use Cucumber's Gherkin syntax to write clear Scenarios, then progress to writing Step Definitions in Groovy, then using Geb to interact with a browser. We will implement the new feature in our Grails application using Spock to test drive our finer grained components. Lastly, we will demonstrate our Cucumber Feature running end-to-end. The purpose of this presentation is to encourage others in the Groovy community to embrace BDD, and to write relevant useful applications Marco Vermeulen Private Contractor Marco Vermeulen is a South African Software Developer who works and lives in London. He spent the past 11 years working with Enterprise Java, having experienced both the benefits and frustrations of the technology. He has survived EJB 2.1, did time with Struts and enjoyed using frameworks like Spring and Hibernate. Having worked with Groovy for the past 5 years and using Grails for the past 2, he has engineered solutions for Shazam, MailOnline and Burberry. He is also the author of GVM, the Groovy enVironment Manager.
I've just solved the UglyTrivia legacy code refactoring kata in Java which was the kata we did in the last Barcelona Software Craftsmanship event.This is the initial version of the Game class: And this is the code after my refactoring:Update:And this is the code after I revisited it again (Feb. 27th 2016): Check my solution in GitHub with commits after each refactoring step. - por Garajeando
Greach 2014, The Groovy Spanish Conf 28/March, Madrid, Spain http://greach.es Follow us on twitter http://twitter.com/greach_es Slides in: http://greach.es/speakers/alvaro-sanchez-mariscal-devqa-make-your-testers-happier-with-groovy-spock-and-geb/ Writing functional tests using Geb in a Grails application is fine for a development team. But when you have QA automation engineers, giving them access to the Grails app might not be the best solution (specially when they belong to a different team). So the same way DevOps allow developers and sysadmins collaborate together, let's talk about DevQA, and make them happy using a framework stack powered by Groovy. Besides above considerations, in this talk I will show a live example on how to setup an independent project for functional tests using Gradle, Groovy, Spock and Geb. Álvaro Sánchez-Mariscal Web Architect at Odobo. Owner at Salenda/Escuela de Groovy Álvaro is a passionate software developer and agile enthusiast with over 13 years of experience. He started his career in 2001 coding in Perl and Java, but then quickly focused on Java EE, working for companies like IBM BCS, BEA Systems or Sun Microsystems. He created his own company in 2005, Salenda, and since 2007 he specialized on Groovy/Grails, introducing them in Spain by founding Escuela de Groovy, the very first Grails company in Spain. Now he works as a Web Architect in Odobo, a Gibraltar-based startup with the new HTML5 games developer program for game developers to produce, distribute and monetize their games for the online regulated gaming industry.
Greach 2014, The Groovy Spanish Conf 28/March, Madrid, Spain http://greach.es Follow us on twitter http://twitter.com/greach_es James Page will tell the story of how he and Sabrina Mach built Webnographer on the back of a Grails Application. The application is a UX Testing suite that has been used by the likes of British Telecom, Electrolux, Vodafone, and numerous over companies. Webnographer had early success and without the performance of Groovy and Grails would not be where they are today. The application went very quickly to a situation where the application was being used by several million users a month on minimal hardware. James' presentation will go into how the simplicity of Groovy and Grails has allowed them to expand without needing outside investment. He will give details of their development work flows, and also how they deploy. A key advantage of Groovy is that it is based on Java and that it is easy to learn. James will detail how he on boarded developers to the Groovy Environment. The talk will help anybody, who needs a case study to justify using Groovy and Grails. James Page Webnographer James Page is the co-founder of Webnographer, the remote usability company. James started off as a programmer, but soon realised that, to see what he has created was becoming a reality, he would have to be entrepreneur as well. James has been involved in a number of start ups, including Eidos (who went on to launch Tomb Raider), and Deckchair.com with Bob Geldof. He is passionate about making software less frustrating and easier to use.
Greach 2014, The Groovy Spanish Conf 28/March, Madrid, Spain http://greach.es Follow us on twitter http://twitter.com/greach_es Slides in: http://greach.es/speakers/alvaro-sanchez-mariscal-creating-restful-apis-with-grails-and-spring-security/ CREATING RESTFUL API'S WITH GRAILS AND SPRING SECURITY In this talk I will cover how to create a REST API using Grails 2.3 to support single-page applications, exploring all the possible alternatives. I will also explain how to integrate Spring Security using the spring-security-rest plugin I recently created, to implement a stateless, token-based, RESTful authentication. Web Architect at Odobo. Owner at Salenda/Escuela de Groovy ÁLVARO SÁNCHEZ-MARISCAL Álvaro Sánchez-Mariscal Álvaro is a passionate software developer and agile enthusiast with over 13 years of experience. He started his career in 2001 coding in Perl and Java, but then quickly focused on Java EE, working for companies like IBM BCS, BEA Systems or Sun Microsystems. He created his own company in 2005, Salenda, and since 2007 he specialized on Groovy/Grails, introducing them in Spain by founding Escuela de Groovy, the very first Grails company in Spain. Now he works as a Web Architect in Odobo, a Gibraltar-based startup with the new HTML5 games developer program for game developers to produce, distribute and monetize their games for the online regulated gaming industry.
Greach 2014, The Groovy Spanish Conf 28/March, Madrid, Spain http://greach.es Follow us on twitter http://twitter.com/greach_es Slides in: http://greach.es/speakers/alonso-torres-understanding-gorm/ UNDERSTANDING GORM GORM is one of the keys for the success of Grails, but for a Grails beginner some concepts may be a bit confusing. Even for a long time developer there can be some missconceptions due to the abstractions layers of the framework. In this talk I'll try to cover some of the basics of GORM, Hibernate and how to interact with transactions and sessions. I'll show some of the problems that I had starting with the Grails framework and how I think they are best solved. Some other topics that I'll go over are the interaction with GPars, transactionality inside tests and the differences between "session" and "transaction". Alonso Torres Software Engineer at Kaleidos Software engineer and pragmatic programmer, Alonso has been developing software for the Java ecosystem for over 8 years and nowadays is a full-time Groovy & Grails developer at Kaleidos, where he has been involved in the development of some Grails plugins such as Grails Postgresql Extensions and Grails time-travel.