DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Curious about the future of data-driven systems? Join our Data Engineering roundtable and learn how to build scalable data platforms.

Data Engineering: The industry has come a long way from organizing unstructured data to adopting today's modern data pipelines. See how.

Threat Detection: Learn core practices for managing security risks and vulnerabilities in your organization — don't regret those threats!

Managing API integrations: Assess your use case and needs — plus learn patterns for the design, build, and maintenance of your integrations.

Avatar

Ioan Tinca

Software Engineer

Bucuresti, RO

Joined Apr 2017

https://itincablog.wordpress.com/

Stats

Reputation: 554
Pageviews: 351.6K
Articles: 10
Comments: 7
  • Articles
  • Comments

Articles

article thumbnail
Redis Is Not Just a Cache
In this article, take a look at Redis as a cache, relational database advantages, and more.
October 20, 2020
· 14,206 Views · 5 Likes
article thumbnail
Microservices, Event-Driven Architecture and Kafka
In this article, we discuss some basics behind microservices and event-driven architecture and explain how Kafka fits in to both.
Updated June 16, 2020
· 40,147 Views · 12 Likes
article thumbnail
AI and Graph Search
Let's explore artificial intelligence, old school algorithms, breadth-first search, and more.
September 16, 2019
· 11,133 Views · 6 Likes
article thumbnail
From Dijkstra to A Star (A*), Part 2: The A Star (A*) Algorithm
In Part 1 we covered the Dijkstra Algorithm. Today, we cover the A* Algorithm, and explore why it can prove more efficient.
February 12, 2019
· 14,478 Views · 10 Likes
article thumbnail
From Dijkstra to A Star (A*), Part 1: The Dijkstra Algorithm
Lean how to find the shortest path between two nodes in a big data set by using the Dijkstra Algorithm. In Part 2, we'll cover A Star (A*) algorithms.
February 8, 2019
· 24,189 Views · 11 Likes
article thumbnail
The Evolution of the Producer-Consumer Problem in Java
Want to learn more about the evolution of the producer-consumer problem in Java? Check out this post where we look at previous and new ways to handle this problem.
October 9, 2018
· 117,498 Views · 28 Likes
article thumbnail
The Open/Closed Principle and Strategy Pattern
This refresher of SOLID principles focus on the 'O,' the Open/Closed Principle, and examines how the strategy pattern synergizes with it.
April 2, 2018
· 62,539 Views · 20 Likes
article thumbnail
About Immutability in OOP
This lesson on immutability in OOP considers the benefits and drawbacks of using immutable objects and tips for using them depending on your use case.
March 5, 2018
· 20,118 Views · 20 Likes
article thumbnail
About Dependency Injection
Still wrapping your head around DI? Let's explore the philosophy and functionality behind it, then see how Guice, or any other such framework, can help.
December 29, 2017
· 26,206 Views · 16 Likes
article thumbnail
The Beautiful Law of Demeter
The Law of Demeter can help you apply the more abstract rules of Object Oriented Programming to ensure a scalable and maintainable application.
November 6, 2017
· 14,862 Views · 24 Likes

Comments

KISS Clean Architecture With Domain-Driven Design

Oct 21, 2019 · John Allen

Hmm. You said "dependencies may only flow downward" but the AddItemUseCase makes some calls to three different gateways, which are upward dependencies in this case, am I right?

A class from the use case layer have knowledge of something from an upper layer. Isn't this a situation that you said that should be avoided?

The Evolution of the Producer-Consumer Problem in Java

Oct 10, 2018 · Ioan Tinca


Well, the threads are actually communicating with each other in the case of a producer consumer problem, or, more generally speaking, when they use a common memory. Even, if the blocking queue is where the notify() gets called, the one that “notifies” is one of the threads. For example, if the queue is empty, when the producer thread calls blockingQueue.put(), the thread will actually “go in that method”, stores an element and after that it will notify the other sleeping threads. That’s the producer thread who notifies, even if that happens at the queue level. The calling thread will represent the execution environment. That’s the standard approach. So, if the question is that if they should talk directly with each other, the answer will be yes. That’s actually happen.

If you choose to call the notify() at the task level or at the queue level, this depends on what you want to achieve, but at some point the threads will “talk”.

Now, there are other paradigms to deal with that. For example, if you look at the actor model this works differently. The threads will not “talk” using wait/notify, but insteads they will asynchronous communicate using messages. But that’s another story :).


The Evolution of the Producer-Consumer Problem in Java

Oct 10, 2018 · Ioan Tinca

Hi Phil. I am not sure that I understand your question correctly. If you use the blocking queue, that's what will happen. The queue will comunicate with the producer and the consumer, and they will not talk direclty with each other.

About Immutability in OOP

Mar 07, 2018 · Ioan Tinca

That is why this is not a silver bullet :)

About Immutability in OOP

Mar 06, 2018 · Ioan Tinca

Thanks Denis! I am glad you liked it.

About Dependency Injection

Dec 30, 2017 · Ioan Tinca

Hi, Yes you are right that I talked about Dependency Inversion but the Dependency Injection pattern is an application/ implementation of the Dependency Inversion principle. Dependency Inversion says that:

A. High level modules should not depend upon low level modules. Both should depend upon abstractions.
B. Abstractions should not depend upon details. Details should depend upon abstractions.

But the passing of a dependency or collaborator to another class, often via constructors or setters is dependency injection which is the main point in this article.


The Beautiful Law of Demeter

Nov 08, 2017 · Ioan Tinca

Thank you for your feedback. Yes, you're example describes better how the law should be applied and, yes, in my example the Employee and Adress objects are tightly coupled. But, in this example, Employee encapsulates the Address and you are allowed to have methods to interogate the encapsulated objects. And if the Address object is refereed just in the Employee object, this does not break the rules of coupling. Maybe this is not the best design for this situation, but what I want to show with this example was what method calls the Law of Demeter forbids. The Law is not just about behavior. It is not saying that you should not interogate the state. It is about communication between objects and about what methods you are allowed to call.

User has been successfully modified

Failed to modify user

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: