As a Developer Evangelist at Stormpath, I’m tasked with developing our integrations, as well as showing developers how to use them. I do this through blog posts and speaking at conferences/meetups. It’s been a great ride so far and I’ve really enjoyed creating our JHipster integration and our initial Angular 2 support. I’ve been speaking at conferences since 2004, so it’s pretty cool that it’s now part of my job.
Last week, I had the pleasure of speaking at The Rich Web Experience 2016. I was very grateful to spend the week in sunny Clearwater, Florida. Especially since it dipped below freezing in my home city of Denver, Colorado. The conference was held at the Opal Sands Resort, which just opened in February 2016.
✅ Getting paid to write code, blogs, and speak at exotic conferences like #richweb2016.
— Matt Raible (@mraible) December 7, 2016
I had two talks at the conference, the first on Testing Angular 2 Applications. After talking about the importance of automated tests, I dove into Angular CLI, TypeScript, Karma, Protractor, and Jasmine.
In the demo, I showed how you can add the “x” prefix to
it blocks to disable tests — similar to how you can use
@Ignore when testing Java with JUnit. You can also prefix these blocks with “f” if you want to run a single test. The demo covered unit testing with mocks, end-to-end testing with Protractor, and continuous integration with Travis CI and Jenkins. I also showed how to do continuous deployment to Heroku with both of these platforms.
Near the end, I mentioned how we used the generator-angular-library to help create our Angular 2 SDK. This Yeoman plugin is nice in that it provides you with good testing support out-of-the-box and encourages you to increase your test coverage because it displays it when you run
npm test. You can see our current test coverage in the summary below.
=============================== Coverage summary ===============================
Statements : 75.18% ( 312/415 )
Branches : 30% ( 12/40 )
Functions : 54.31% ( 63/116 )
Lines : 74.8% ( 282/377 )
You can find the slides I used on SlideShare or view them below.
All of the code I showed in my demo is contained in an ng2-demo repository on GitHub. This repo also contains a tutorial in its
README.adoc that shows how how to perform all the steps.
The second talk I gave was about using microservices, their history, and how to develop them with Spring Boot and JHipster. I talked about the history of microservices, as well as the experience at Stormpath migrating to them. It was fun to tell the story about how we migrated our backend to Spring Boot in 3 weeks.
The demos were as follows:
- Spring Boot with JPA, H2 and a REST API. Integrated Stormpath and deployed to Cloud Foundry. Instructions to reproduce this demo are on GitHub.
- Create a simple blog application with JHipster and deployed to Heroku. You can read the instructions or check out the JHipster Blog Demo I recorded earlier this year.
- Create microservices with JHipster, converting the blog app to a gateway, generating a “store” microservice, and running it all with Docker and Kubernetes. Instructions to reproduce this demo are on GitHub.
I exported a PDF of this presentation and published it on SlideShare. You can also view it below.
I used Asciidoctor and published all my demos for this talk on GitHub so others can fork it and make it better! I also plan to use it as a basis for the next section of the JHipster Mini-Book on InfoQ. The 2nd edition of the book was just published last week, so make sure to download a free copy while it’s still fresh.
If you have any questions about the talks mentioned here, please leave a comment, hit me up at @mraible on Twitter, or enter an issue in their respective GitHub repositories.