First, there was "new". But then some humans wanted to construct objects in many different ways, speak fluently to populate them and sometimes even to reuse a similar instance over and over again. In the meantime others offered to give us the objects we need, but then refused to tell us the exact nature of the object they gave us. The vast majority of people though humbly realized that a single instance was enough for them, and built cities and frameworks to help them manage large amounts of interconnected objects. Then frameworks turned to magic and proxies were given to citizens with the promise to simplify their lives by offering more lifecycles. Realizing they were pushed away from the path of "True OOP", some chose to step away, but then had to pay the toll to The System. This is the story of instantiation. 😊
In the text above, can you find the design patterns from the agenda below? Hint: we first talked about creational patterns used in tests, then in frameworks, and then in typical business-logic web apps/services. Analogies like that will spice up the explanations throughout the training, to make you remember these design patterns for good.
This training covers the best Design Patterns used today to instantiate objects. The content draws its roots the Creational Patterns in the classic GoF book, selects those patterns that are still in wide use today, and puts them in the context of modern frameworks, plus adds several new patterns that crystallized over the past 25+ years. The content was brainstormed with hundreds of developers in more than 30 companies, in languages like Java, PHP, and C#, so there will be references to other languages as often as possible. For the past 4 years, Victor has been lecturing a simplified version of these topics to 2nd year Computer Science students as part of the OOP course at Politehnica University.
This is the recording of a 3½ hours live webinar that took place in November 2020.
- Singleton Pattern, and other major lifecycles supported by Dependency Injection frameworks: prototype, request
- Factory Methods for Immutable Objects
- Static Factory Method Pattern - typical use-cases
- The "Factory" Pattern, and why it's (usually) a code smell
- Abstract Factory Pattern
- Fluent Builder idiom: 5 flavors, advanced tweaks and (better) alternatives
- Prototype and Object Mother Pattern for reusing test data
- Null Object Pattern and variants
What to expect?
During this trainings we solve a series of exercises together (80% of the time) in Java introducing each pattern smoothly, discussing the purpose, pros and cons of each in detail. For the singleton pattern we'll use the Spring framework as an example container (<20% total time), but all the ideas are directly applicable in any other Java framework: JavaEE, Quarkus and Micronaut.
After following this workshop, you'll take away at least a dozen of key practical techniques that you can immediately apply to your day-to-day work. Expect an intense experience, as usual!
But perhaps the best part of all is that you can ask any question you want to a Java Champion and former Lead Architect at IBM. There will be no unanswered questions™️😀
Any developer with some prior experience in an OOP language (Java, PHP, C#). The content covers design techniques for business-logic-intensive apps as well as for framework development.
To be able to run the code locally, your machine should have a Java 8+ SDK installed, a decent IDE, and access to GitHub and Maven Central.
After purchase, besides video recording and slides, you will be able to download the final code zipped together with the git history, allowing you to browse through the commits at your own pace.
If you want to get the best value out of this workshop, you could (re)read in advance about the patterns we will cover: Singleton, Static Factory Method, Abstract Factory, Fluent Builder, Null Object. In case it's your first contact with these patterns, I strongly recommend you the "Head First - Design Patterns" book.
Looking forward working with you!
P.S.: The content is distilled from my 2-days (16-hours) Design Patterns training. If you are interested in a private dedicated session for your company, please find here my entire curricula and contact details.
Trainer: Victor Rentea
Victor Rentea is a Java Champion and Associate Professor at UPB writing code for over two decades in many languages.
Since 2012 he is coaching and teaching others on day-to-day coding topics, having developed by now an extensive curricula that cover most of the software best practices and typical Java-stack development. Today, over 40 companies bring him in for consultancy or training sessions. Thousands of developers and students have attended his classes by now and left him many recommendations on LinkedIn, Facebook, and on victorrentea.ro.
Victor is best known for the enthusiasm and depth of his talks, which you can also enjoy during his courses and webinars. To share his passion for Clean Code and Unit Testing, he founded the Bucharest Software Craftsmanship Community, one of the largest developer communities today in Romania.
Frequently Asked Questions
Can I get an invoice for my company (VAT-free)?
To add the VAT code of your company to the checkout page and remove the VAT taxes, follow these simple steps.
Can I ask questions after I watch the recording?
PLEASE DO! Email me your questions, no matter how silly or complex you may think they are. I'd be glad to help, so don't hesitate to contact me.
How long do I have access to the course?
How does lifetime access sound? After enrolling, you have unlimited access to this course for as long as you like - across any and all devices you own.
What if I am unhappy with the course?
We would never want you to be unhappy! If you are unsatisfied with your purchase, contact us in the first 30 days and we will give you a full refund.
Can I have this training for more of my colleagues?
There are two ways I can help you:
- For 5+ developers, contact me for a discount and a company invoice
- For 10+ developers or for a longer in-depth session, contact me for a dedicated webinar for your company.