The Wayback Machine - https://web.archive.org/web/20180525053838/http://apache.sys-con.com/node/2184026

Welcome!

Apache Authors: Elizabeth White, Pat Romanski, Liz McMillan, Christopher Harrold, Janakiram MSV

Related Topics: Adobe Flex, Java IoT, Apache

Adobe Flex: Blog Feed Post

Design Patterns Were Not Born Equal

Lots to discuss and share your opinion in online forums

Design patterns were not born equal. Some of them are boring, while others are special. Do you remember your feelings after learning what the Data Transfer Object is? Don’t remember? Of course – cause you didn’t have any special feelings about it other than “It’s easy”.

What do you say about Singleton? Yeah, this is kinda interesting pattern which gave you something to talk about. Do we really need it? Can’t we just achieve the same effect with static variables? Does it make your entire application tightly coupled? Lots to discuss and share your opinion in online forums.

How about Visitor? You must have remembered those feelings when you ran into it first time. The day when you understood how the Visitor pattern works was crucial in your career – that was the moment when you realized that you were not junior software developer anymore. From that very moment you can consider yourself a mid-level person. Till when? Till you’ll be able to explain the Visitor pattern to at least three juniors. Continuos Explanation (c) might reveal though that Visitor is not exactly what you originally thought it was, but now you really get it!

But there is one pattern that has a very strange effect on people. It’s called Dependency Injection. Decoupling in action! A Customer class doesn’t need to reach out for its Orders! How cool is that! First, it gets you high just like smoking banana peels. Then it makes you a little depressed when you realize that there is always a price to pay – instead of having two simple classes Customer and Order you need to have an Inversion of Control container and should neverforget to properly annotate the injector and injectee. In the server-side Java, containers are not too bad, really. We are used to them and feel pretty comfy inside.

But then, a senior Java developer starts learning other domain-specific programming languages like ActionScript or JavaScript just to realize that these poor people don’t have any IoC containers yet! Can you believe that? This is when the Java developer gets craving to make the lives of those (not as fortunate) ActionScript or JavaScript developers easier. In other words, such DI addict wants to share the needle with the rest of the world and inject, inject, inject… This results in proliferation of the “lightweight” DI frameworks/IoC containers among UI developers, which they should be using on top of whatever framework you currently use. This will overcomplicate the application design, but will allow you to inject Orders into Customers rather than using this so-nineties-getOrders().

Oh well, why did I pour all this on you? I don’t know. But please don’t try to tell this to people who enjoy living in thes IoC worlds or else they’ll become aggressive again and will make you feel stupid for not realizing that one can’t do a proper unit testing without the DI. Do we need unit testing? OK, OK….I won’t even go there.

More Stories By Yakov Fain

Yakov Fain is a Java Champion and a co-founder of the IT consultancy Farata Systems and the product company SuranceBay. He wrote a thousand blogs (http://yakovfain.com) and several books about software development. Yakov authored and co-authored such books as "Angular 2 Development with TypeScript", "Java 24-Hour Trainer", and "Enterprise Web Development". His Twitter tag is @yfain

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


IoT & Smart Cities Stories
Cloud computing delivers on-demand resources that provide businesses with flexibility and cost-savings. The challenge in moving workloads to the cloud has been the cost and complexity of ensuring the initial and ongoing security and regulatory (PCI, HIPAA, FFIEC) compliance across private and public clouds. Manual security compliance is slow, prone to human error, and represents over 50% of the cost of managing cloud applications. Determining how to automate cloud security compliance is critical...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
"MobiDev is a Ukraine-based software development company. We do mobile development, and we're specialists in that. But we do full stack software development for entrepreneurs, for emerging companies, and for enterprise ventures," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Recently, REAN Cloud built a digital concierge for a North Carolina hospital that had observed that most patient call button questions were repetitive. In addition, the paper-based process used to measure patient health metrics was laborious, not in real-time and sometimes error-prone. In their session at 21st Cloud Expo, Sean Finnerty, Executive Director, Practice Lead, Health Care & Life Science at REAN Cloud, and Dr. S.P.T. Krishnan, Principal Architect at REAN Cloud, discussed how they built...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...
Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
Machine learning has taken residence at our cities' cores and now we can finally have "smart cities." Cities are a collection of buildings made to provide the structure and safety necessary for people to function, create and survive. Buildings are a pool of ever-changing performance data from large automated systems such as heating and cooling to the people that live and work within them. Through machine learning, buildings can optimize performance, reduce costs, and improve occupant comfort by ...
JETRO showcased Japan Digital Transformation Pavilion at SYS-CON's 21st International Cloud Expo® at the Santa Clara Convention Center in Santa Clara, CA. The Japan External Trade Organization (JETRO) is a non-profit organization that provides business support services to companies expanding to Japan. With the support of JETRO's dedicated staff, clients can incorporate their business; receive visa, immigration, and HR support; find dedicated office space; identify local government subsidies; get...
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...