Category Archives: community

The state of Spring so far…

I-heart-spring-AidenI have never been more excited to be a part of the Spring team as I am now. It feels like we are blazing new trails left and right. Seeing the massive turnout this week for Stephane and Brian’s “Spring Boot University”, a 3-hour session at DevoxxFR, left me awestruck. Wish I could have been there.

Everywhere I turn, people are gobbling up Spring Boot. They tell me, this is what they have been looking for. How did this happen? It’s a really neat history.

A little bit of history

The Spring Framework started lean and mean. It was a fantastic way to integrate critically needed tools through its profound power of dependency injection. Some people criticized this as hype, but the community’s massive adoption proved the vitality of this approach. Coding was fun! Demo apps are one thing, but people were using Spring Framework to build large, complex systems. Complex systems need lots of components. Existing APIs like JMS, JDBC, and other things came with the need for lots of plumbing. These APIs were way too low level. And thus was born JmsTemplate, HibernateTemplate, and my personal favorite: JdbcTemplate.

But that was not all. Building web apps with Spring MVC was hot. It made testing app controllers nice and easy. You weren’t obligate to run web-based acceptance tests through complex controls. Instead, you could isolate things. Nonetheless, as the needs of the community grew, so did Spring. To help different parts of Spring grow and evolve and now slow down the core framework. other projects were formed. Spring Security, Spring Data, Spring Integration, Spring Batch, and more. At one point, people expressed their dislike for “spring.jar” containing everything. The Spring team chopped things up into finer grained JARs so you could grab what you needed. Then we had too many JARs. What?!?

As the power and might of Spring grew, so did its learning curve. People were asking which project to use. How to integrate them together. What version of Spring Integration with the version of Spring Framework I’m using? How do I even start using Spring MVC? What steps do I need to carry out?

Spring Boot is born

platform-spring-bootThus was born Spring Boot. Spring Boot brought forth a series of critical concepts.

  • Pre-pick the versions of Spring and other libraries so you don’t have to
  • Auto-configure boilerplate stuff like Spring MVC, Security, Integration, etc.
  • Remove key beans if you define your own
  • Accelerate Spring’s power of externalization of properties to Warp Factor 9!
  • Add on DevOps-ready metrics

A big hurdle was mixing together different libraries. If I have Spring Framework 4.0.1, what version of Spring Integration should I pick? Simple: pick one version of Spring Boot, and both of those dependencies are pre-picked for you. Boot doesn’t stop there. It extends into lots of key 3rd party libraries. This decision was so popular, that Spring IO was created to reach out and harmonize the versioning of 380+ libraries.

A big issue (especially for me, a non-web guy at the time), was standing up Spring MVC. First, you had to put certain bits into web.xml. Then you needed to stand up view resolvers, message converters, controllers, and a whole cadre of other components. You really needed to understand Spring MVC to do it and to do it right. Spring Boot stepped up to the plate and said, “don’t worry, we’ve got you covered”. Add “spring-webmvc” to your project, and Boot will create all that stuff for you. You just create a controller that returns view names, and you’re up and running.

danielskullNo form of automation can ever cover every circumstance. Sooner or later, developers need to break out of the framework’s default position. And this is where LOTS of tools fail on a massive scale. There are two common outcomes: 1) Don’t permit such customization and hamstring future developers or 2) Add so many extension points that the simple use case vanishes. Spring Boot introduces option 3) Drop bits of auto-configured stuff when you create your own. This is known as backing off, and has moved the bar forward on app and framework development really far. New applications and new frameworks will surely adopt this approach to expansion because it just makes sense. If you build a framework and don’t shoot for this, someone starting after you might catch up and pass you because they will.

Something I’ve needed for years before I wrote Java for my day job was externalization of application properties. I dealt with development, test, and production environments. Rebuilding apps for each target was wasteful. So I hand wrote code for that. Spring Framework has always had powerful support for properties files, but Spring Boot took that feature and accelerated the options. Having APP_ENV and -Dapp.env both map to @Value(“${app.env}”) String appEnv or class ApplicationProperties { public void setAppEnv(String env)… } is sheer genius can cannot be understated. People talk about 12-factor apps and high tech wwizbang manifestos, but this concept is simple to grok and applicable just about everywhere. You could be running a close network solution (which I did at my old job) with no cloud involvement and find this technique the Right Thing To Do.

DevOps-ready controls and metrics is something area always begging for. System administrators, program managers, business analysts, and others are always asking for this extra metadata about our apps. Being able to spit out a first cut of this by simply adding one dependency to an application is phenomenal. Then being able to craft your own metrics and controls with little effort ramps your app up to production ready and Management Friendly by providing them the warm fuzzy metrics for clients without breaking the bank of technical debt.

Where are things now?

With Spring Boot spreading across the Java ecosystem over the past two years, it really is exciting to see how much fun people are having building apps. They focus on the end game, not setting up infrastructure. Hearing chatter like “Using Spring Boot is like pair programming with the Spring team” (@starbuxman) and “Spring Boot is just what we need” is cool. I get excited to go the Nashville JUG and talk about some piece of Spring, not just because it “looks good”, but because I can sincerely point out how using it is simply fun! Isn’t that what real software is supposed to be? Functional, carries business value, and at the same time, fun to build and release? It almost feels like Spring Boot introduces yet another rennaisance to application development.

3021OS_mockupcover_normalI have been quite pleased that my previous book, Python Testing Cookbook has earned double the advance over the past three years (and keeps making me money!) But I jumped out of my chair when the first statement for Learning Spring Boot came in last month and showed that over 400 people had bought a copy. My excitement to write about Spring Boot was paralleled by my instinct that people would want to learn about Boot’s secrets.

There is a lot of action happening in the Spring team as we continue to blaze trails we couldn’t foresee five years ago. Many of our key decisions in the past have put us on a strong  footing to continue pushing the envelope for the future in both application power as well as ease of development. The community experience of putting out new features, getting feedback, and generally building something better each and everyday that helps thousands of people solve problems is both inspiring and humbling. There’s no other place I’d rather be working.

Happy coding!

How open source has commoditized computers

mac-snow-whiteAs I type this blog entry, from my wife’s newly purchased MacBook AIr, I marvel at the power of open source. Thanks to open source, we are no longer bound to a particular vendor, operation system, or anything else.

My wife’s old netbook was the last machine in this household that ran Windows. Back when we got married and lived in a smaller house, the desktop computer in the living room ran Ubuntu LInux. It took my wife little effort to learn how to drive that machine, considering she primarily used computers to browse the internet and a little bit of picture management when making Shutterfly books.

I introduced her to OpenOffice (later migrating to LibreOffice) for writing. I then threw in Dropbox and gave her her own folder to keep her own written works. With all these in place, it didn’t even take a whole day before she was up and running, editing her manuscript on the new Mac.

By moving to a handful of open source projects, the need for a particular vendor evaporated. Now we can pick a machine based on more important things like: quality, performance, and tools. I got her a maxed out 13″ MacBook Air (8GB memory , 512GB SSD disk).

Suffice it to say, she is definitely happy. You can even see the decal she just ordered up above! I have gone in and done a couple extra steps, like installing Crashplan to back things up. I am also installing Homebrew in case I need this machine as a backup development workstation. I also flipped on remote login support so I can ssh into this lightweight laptop as needed. It truly is a thing of beauty. Ahh! Goodbye Windows!

The value of software communities is greater than ever

ch2_fodtAs I continue working on my new book, Learning Spring Boot, I have really noticed the value of communities today compared to when I became a professional software developer back in 1997.

Back then, there were news groups and mailing lists, but not the same indexing of EVERYTHING, no Google Groups (which just made searching/working with news groups MUCH easier), no panacea of discussion forums, and no proliferation of blog sites. These things existed, but you wouldn’t find so many, and so dedicated (like trying to write a query for your trade novel, one of my favorites). And open source hadn’t taken root like it has now. Your prospects of finding an open source project with a thriving community to serve your needs were MUCH less likely.

So how exactly did we survive without such a rich community? Sometimes I’m mystified. Back then, I would comb the book store for help. It also meant I had to hunker down and really go through code myself to figure stuff out. What’s that you say? You think that I’m whining about having to actually WORK back then? I worked then, and I work now. It’s just different.

Today, perhaps there are more people willing to help you get over a hump. Back then, getting help meant walking across my cubicle hallway and asking the right team guru questions. Over time, I would pick up my own set of skills and quirks. And others recognized that. Eventually others would come to me asking for assistance.

Back then, I knew someone that NEVER deleted emails. I didn’t comprehend such a concept. Today, I’m a tried-and-true believer in keeping everything. Knowledge is power, and having my entire history of communication available has been useful. In fact, when I finally moved my personal email off the telco provider I’d used for years, I searched for someone that could handle migrating all that email to my new account.

Today, it seems impossible to develop anything in a vacuum. I tap twitter, discussion forums, and other places. The latest incredibly powerful social tool for interacting, getting feedback, and making substantive progress if GitHub! Git is a powerful tool for version management, but you can’t realize its true value until you work on a community project with forks, issues to discuss things, and ultimately pull requests.

I launched my book writing endeavor by blogging and tweeting what I was up to. On my previous book, I got enough attention that I was able to shift off a tool that had fallen into disuse and pick something better. I even got quotes from project leads into my book.

This time, I attracted the attention of both Dan Allen, the project lead for Asciidoctor, as well as an editor from Packt Publishing. I am building a new Asciidoctor backend for Packt, and this might be the track that makes it mainstream. Dan quickly helped me get going on something that I couldn’t make heads or tails of when I read it by myself. If Packt bites at somehow making this backend an officially accepted medium, the lives of MANY future authors may be made simpler while also improving the content of future titles. (That applies to my own future writings!)

To paraphrase Hugh Williams, Pivotal’s new SVP, skills are fleeting. The knowledge you are using today will probably be totally replaced ten years from now. But what’s critical is judgment, ability to learn, and willingness to interact with others. And nothing serves that better than a strong community.