notes/.config/newsboat/reddit_rss/DesignPatterns.rss
2023-01-28 05:22:19 -08:00

1 line
No EOL
37 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"><category term="DesignPatterns" label="r/DesignPatterns"/><updated>2023-01-28T13:00:46+00:00</updated><icon>https://www.redditstatic.com/icon.png/</icon><id>/r/DesignPatterns.rss</id><link rel="self" href="https://www.reddit.com/r/DesignPatterns.rss" type="application/atom+xml" /><link rel="alternate" href="https://www.reddit.com/r/DesignPatterns" type="text/html" /><subtitle>A place to learn about Design Patterns. Feel free to ELI6.</subtitle><title>Object Oriented Programming Design Patterns</title><entry><author><name>/u/Donald___Draper</name><uri>https://www.reddit.com/user/Donald___Draper</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I have made a basic swing application to become familiar with mvc and observer design pattern. But to get experience with some others such Decorator, Visitor, State, Strategy and so on, I need ideas. Plase help me with that.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Donald___Draper&quot;&gt; /u/Donald___Draper &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/hjddqn/can_you_please_give_me_example_projects_to_use/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/hjddqn/can_you_please_give_me_example_projects_to_use/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_hjddqn</id><link href="https://www.reddit.com/r/DesignPatterns/comments/hjddqn/can_you_please_give_me_example_projects_to_use/" /><updated>2020-07-01T16:16:39+00:00</updated><published>2020-07-01T16:16:39+00:00</published><title>Can you please give me example projects to use several design patterns combined to get experience?</title></entry><entry><author><name>/u/Cypher032</name><uri>https://www.reddit.com/user/Cypher032</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;The Canadian Government needs to set certain attributes for the Canadian provinces based on characteristics of each province and federal policies. For instance, health care and education budgets allocated to the provinces use formulas that take into account regional differences. There are many other operations whose components depend on provincial data. New operations are introduced every year and some operations may be removed.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Cypher032&quot;&gt; /u/Cypher032 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/hfiymw/can_someone_tell_me_which_design_pattern_would_be/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/hfiymw/can_someone_tell_me_which_design_pattern_would_be/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_hfiymw</id><link href="https://www.reddit.com/r/DesignPatterns/comments/hfiymw/can_someone_tell_me_which_design_pattern_would_be/" /><updated>2020-06-25T09:10:55+00:00</updated><published>2020-06-25T09:10:55+00:00</published><title>Can someone tell me which design pattern would be applicable in the following scenario?</title></entry><entry><author><name>/u/infiniteTaker</name><uri>https://www.reddit.com/user/infiniteTaker</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/infiniteTaker&quot;&gt; /u/infiniteTaker &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://medium.com/@anirban99/hexagonal-architecture-in-java-9031d3570d15&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/gpmidz/hexagonal_architecture_in_java/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_gpmidz</id><link href="https://www.reddit.com/r/DesignPatterns/comments/gpmidz/hexagonal_architecture_in_java/" /><updated>2020-05-24T09:01:40+00:00</updated><published>2020-05-24T09:01:40+00:00</published><title>Hexagonal Architecture in Java</title></entry><entry><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Can someone share some content around design patterns for ITSM system implementation?&lt;/p&gt; &lt;p&gt;Any help/link/post in this topic would be appreciated.&lt;/p&gt; &lt;p&gt;Thank you,&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/glsrxn/design_pattern_for_itsm_systems/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/glsrxn/design_pattern_for_itsm_systems/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_glsrxn</id><link href="https://www.reddit.com/r/DesignPatterns/comments/glsrxn/design_pattern_for_itsm_systems/" /><updated>2020-05-18T02:26:16+00:00</updated><published>2020-05-18T02:26:16+00:00</published><title>Design Pattern for ITSM systems?</title></entry><entry><author><name>/u/jsamwrites</name><uri>https://www.reddit.com/user/jsamwrites</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/jsamwrites&quot;&gt; /u/jsamwrites &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://thenextweb.com/syndication/2020/05/14/a-comprehensive-guide-to-javascript-design-patterns/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/gjrhm8/a_comprehensive_guide_to_javascript_design/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_gjrhm8</id><link href="https://www.reddit.com/r/DesignPatterns/comments/gjrhm8/a_comprehensive_guide_to_javascript_design/" /><updated>2020-05-14T18:02:02+00:00</updated><published>2020-05-14T18:02:02+00:00</published><title>A comprehensive guide to JavaScript design patterns</title></entry><entry><author><name>/u/Volosoft</name><uri>https://www.reddit.com/user/Volosoft</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Volosoft&quot;&gt; /u/Volosoft &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://volosoft.com/blog/Prefer-Singleton-Pattern-over-Static-Class&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/ghn801/article_why_you_should_prefer_singleton_pattern/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_ghn801</id><link href="https://www.reddit.com/r/DesignPatterns/comments/ghn801/article_why_you_should_prefer_singleton_pattern/" /><updated>2020-05-11T13:08:47+00:00</updated><published>2020-05-11T13:08:47+00:00</published><title>Article: Why You Should Prefer Singleton Pattern over a Static Class</title></entry><entry><author><name>/u/kwatrasanchit</name><uri>https://www.reddit.com/user/kwatrasanchit</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Hi programmers, &lt;/p&gt; &lt;p&gt;While working on a project i am building an orchestrator which orchestrates the request b/w different modules and get the response back from them. While looking at the choice of design patterns i am stuck on deciding whether to choose Template pattern vs chain of responsibility design pattern. &lt;/p&gt; &lt;p&gt;Template pattern is more simple and goes with our current use case, but chain of responsibility is more flexible. Any ideas on how to take a better design when thinking about different design patterns?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/kwatrasanchit&quot;&gt; /u/kwatrasanchit &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/gcwhrp/template_vs_chain_of_responsibility_design_pattern/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/gcwhrp/template_vs_chain_of_responsibility_design_pattern/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_gcwhrp</id><link href="https://www.reddit.com/r/DesignPatterns/comments/gcwhrp/template_vs_chain_of_responsibility_design_pattern/" /><updated>2020-05-03T19:23:32+00:00</updated><published>2020-05-03T19:23:32+00:00</published><title>Template v/s Chain of responsibility Design Pattern</title></entry><entry><author><name>/u/HafizWaleedHussain3</name><uri>https://www.reddit.com/user/HafizWaleedHussain3</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/HafizWaleedHussain3&quot;&gt; /u/HafizWaleedHussain3 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.uwanttolearn.com/design-patterns/decorator-structural-arrogant-design-pattern/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fzvfp0/decorator_design_pattern_a_powerful_but_neglected/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_fzvfp0</id><link href="https://www.reddit.com/r/DesignPatterns/comments/fzvfp0/decorator_design_pattern_a_powerful_but_neglected/" /><updated>2020-04-12T11:54:25+00:00</updated><published>2020-04-12T11:54:25+00:00</published><title>Decorator Design Pattern. A powerful but neglected structural design pattern. A practical and straightforward definition. Decorator Design Pattern is an inheritance + composition in the same class. More you can read in the posts. Thanks :)</title></entry><entry><author><name>/u/UntouchedDruid4</name><uri>https://www.reddit.com/user/UntouchedDruid4</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;The languages Im familar with are PHP and Python. Im not sure what to build as far a personal projects that is complex enough to utilize design patterns. The only thing I can think of is building a WYSIWYG user interface but I hate javascript with a passion.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/UntouchedDruid4&quot;&gt; /u/UntouchedDruid4 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fvlrsc/project_ideas_for_practicing_design_patterns/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fvlrsc/project_ideas_for_practicing_design_patterns/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_fvlrsc</id><link href="https://www.reddit.com/r/DesignPatterns/comments/fvlrsc/project_ideas_for_practicing_design_patterns/" /><updated>2020-04-05T21:28:08+00:00</updated><published>2020-04-05T21:28:08+00:00</published><title>Project ideas for practicing design patterns</title></entry><entry><author><name>/u/HafizWaleedHussain3</name><uri>https://www.reddit.com/user/HafizWaleedHussain3</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/HafizWaleedHussain3&quot;&gt; /u/HafizWaleedHussain3 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.uwanttolearn.com/design-patterns/adapter-structural-arrogant-design-pattern/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fvd8u5/if_you_want_to_be_a_magician_in_coding_try_to/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_fvd8u5</id><link href="https://www.reddit.com/r/DesignPatterns/comments/fvd8u5/if_you_want_to_be_a_magician_in_coding_try_to/" /><updated>2020-04-05T12:45:55+00:00</updated><published>2020-04-05T12:45:55+00:00</published><title>If you want to be a magician in coding, try to grab the concept of Structural Design Patterns, in this post, we will discuss the Adapter Design Pattern which is one of the Structural Design Pattern.</title></entry><entry><author><name>/u/HafizWaleedHussain3</name><uri>https://www.reddit.com/user/HafizWaleedHussain3</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/HafizWaleedHussain3&quot;&gt; /u/HafizWaleedHussain3 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.uwanttolearn.com/design-patterns/builder-creational-arrogant-design-pattern/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/ft2r73/arrogant_builder_design_pattern_creational/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_ft2r73</id><link href="https://www.reddit.com/r/DesignPatterns/comments/ft2r73/arrogant_builder_design_pattern_creational/" /><updated>2020-04-01T16:14:40+00:00</updated><published>2020-04-01T16:14:40+00:00</published><title>Arrogant Builder Design Pattern -&gt; Creational Pattern. 1. Mandatory VS Optional 2. Overloaded Constructor + Constructor Chaining 3. Any requirement in which we will select individual items and later we will check out those items in the form of an Order.</title></entry><entry><author><name>/u/HafizWaleedHussain3</name><uri>https://www.reddit.com/user/HafizWaleedHussain3</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/HafizWaleedHussain3&quot;&gt; /u/HafizWaleedHussain3 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.uwanttolearn.com/design-patterns/factory-creational-arrogant-design-pattern/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fs2uok/arrogant_factory_desing_pattern_creational/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_fs2uok</id><link href="https://www.reddit.com/r/DesignPatterns/comments/fs2uok/arrogant_factory_desing_pattern_creational/" /><updated>2020-03-31T00:33:36+00:00</updated><published>2020-03-31T00:33:36+00:00</published><title>Arrogant Factory Desing Pattern -&gt; Creational Pattern. What is the use-case of the Factory Design Pattern? 1. When we can see Inheritance/Polymorphism in our code. (50%) 2. Inherit class creation depends on some logic or enums. (50%)</title></entry><entry><author><name>/u/HafizWaleedHussain3</name><uri>https://www.reddit.com/user/HafizWaleedHussain3</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/HafizWaleedHussain3&quot;&gt; /u/HafizWaleedHussain3 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.uwanttolearn.com/design-patterns/arrogant-design-patterns/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fr3gxl/arrogant_design_patterns/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_fr3gxl</id><link href="https://www.reddit.com/r/DesignPatterns/comments/fr3gxl/arrogant_design_patterns/" /><updated>2020-03-29T09:49:47+00:00</updated><published>2020-03-29T09:49:47+00:00</published><title>Arrogant Design Patterns</title></entry><entry><author><name>/u/Michalf94</name><uri>https://www.reddit.com/user/Michalf94</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Michalf94&quot;&gt; /u/Michalf94 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.devdiaries.net/blog/Java-Strategy-Design-Pattern-By-Examples/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fj4v7y/strategy_design_pattern_with_examples_in_java/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_fj4v7y</id><link href="https://www.reddit.com/r/DesignPatterns/comments/fj4v7y/strategy_design_pattern_with_examples_in_java/" /><updated>2020-03-15T17:25:34+00:00</updated><published>2020-03-15T17:25:34+00:00</published><title>Strategy Design Pattern with examples in Java. Kill the virus with Strategy Pattern!</title></entry><entry><author><name>/u/rennnat</name><uri>https://www.reddit.com/user/rennnat</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I&amp;#39;m an OOP guy who loves C++ and has been involved with Flutter/Dart (Object Oriented &amp;amp; Strongly-Typed). There&amp;#39;s a lot of entry point devs in those communities who don&amp;#39;t understand the brilliance of design patterns and have problems that are solved by such patterns.&lt;/p&gt; &lt;p&gt;I&amp;#39;m making a series of videos for these communities about design patterns and using real-world examples to teach them.&lt;/p&gt; &lt;p&gt;HOWEVER, I&amp;#39;d really appreciate any small bit of feedback or additions from your experiences. Thank you sooo much to anyone willing to help me out.&lt;/p&gt; &lt;p&gt;Here&amp;#39;s how you can help:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;What are your most used design patterns?&lt;/p&gt; &lt;p&gt;What is one of the most influential lessons you&amp;#39;ve learned about design patterns?&lt;/p&gt; &lt;/blockquote&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/rennnat&quot;&gt; /u/rennnat &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fewhln/im_instilling_a_passion_for_design_patterns_in/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fewhln/im_instilling_a_passion_for_design_patterns_in/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_fewhln</id><link href="https://www.reddit.com/r/DesignPatterns/comments/fewhln/im_instilling_a_passion_for_design_patterns_in/" /><updated>2020-03-07T15:22:07+00:00</updated><published>2020-03-07T15:22:07+00:00</published><title>I'm instilling a passion for design patterns in people and could use some help.</title></entry><entry><author><name>/u/devsidev</name><uri>https://www.reddit.com/user/devsidev</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;So I&amp;#39;ve always had trouble trying to keep implementations generic. I find that every solution needs some sort of bespoke function . For example, I recently implemented a SendGrid as a way of handling emails for drip campaigns. I wrote a SendGrid class that inherited from a DripInterface.&lt;/p&gt; &lt;p&gt;However, what if SendGrid doesn&amp;#39;t work out, and we want to switch to Mailgun for the drip campaigns? Well for the most part, we&amp;#39;ll write a concrete MailGun implementation and we won&amp;#39;t need to change anywhere other than where the dependency injection is handled.&lt;/p&gt; &lt;p&gt;There are a lot of functions that cross over perfectly, I can handle contact lists, (GET/PUT/DELETE), categories, sub categories etc, and I can create interface entries for these all. But &lt;strong&gt;how do you handle it when there&amp;#39;s something specific to the Concrete class that I need to use&lt;/strong&gt;, that doesn&amp;#39;t work in the same way as any future concrete classes?&lt;/p&gt; &lt;p&gt;At this point I always end up writing code that kinda suits SendGrid, and when we have to switch out to Mailgun I&amp;#39;ll have to find every file that injects the DripInterface, and swap out the method calls or add a few more to specifically handle this different class.&lt;/p&gt; &lt;p&gt;What&amp;#39;s a clean solution to this? Thanks!&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/devsidev&quot;&gt; /u/devsidev &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fe2txe/creating_an_interface_for_dependency_injection/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fe2txe/creating_an_interface_for_dependency_injection/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_fe2txe</id><link href="https://www.reddit.com/r/DesignPatterns/comments/fe2txe/creating_an_interface_for_dependency_injection/" /><updated>2020-03-05T21:53:04+00:00</updated><published>2020-03-05T21:53:04+00:00</published><title>Creating an interface for Dependency Injection</title></entry><entry><author><name>/u/Hatefiend</name><uri>https://www.reddit.com/user/Hatefiend</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I feel like I&amp;#39;m either not fully underestanding MVC or realizing its shortcomings as a design pattern. The controller feels like it violates the rules of encapsulation. It has complete access to the entire front end GUI including access to frames, buttons, textfields, etc. That is not good. Buttons, textfields, frames, stages, images, etc are all part of the view and ONLY the view should modify said variables. Also it&amp;#39;s very likely that inside the view, you can create objects of the model. That just doesn&amp;#39;t make sense. Classes declared in the model should NOT exist in the view. They are completely seperate, which should mean that the identifiers for classes in the model should be unknown when I attempt to reference them in the view. This is &lt;em&gt;somewhat&lt;/em&gt; possible with packages in a language like Java but overall I never see people do this.&lt;/p&gt; &lt;p&gt;Same problems with the model. I might have a model of a &lt;code&gt;Racecar&lt;/code&gt;. My controller might have a section for &lt;code&gt;start car&lt;/code&gt; which in turn calls &lt;code&gt;rc.ignition()&lt;/code&gt;. But there&amp;#39;s &lt;strong&gt;nothing&lt;/strong&gt; that stops me from doing &lt;code&gt;rc.setWheels(0)&lt;/code&gt;. Because my controller has access to the entire backend since its an instance variable, it has complete control over everything it can do. That doesn&amp;#39;t make sense.&lt;/p&gt; &lt;p&gt;I&amp;#39;ve taken two Object Oriented Design classes and in the advanced one, the teacher told me &amp;quot;Yes, this is true, but that is &lt;strong&gt;your design&lt;/strong&gt;. It is okay for things to be this way, as long as its part of your intended design&amp;quot;. I&amp;#39;ve really never liked that answer because it feels like it doesn&amp;#39;t address the violation of the rules of MVC (model and view being completely seperate in every way).&lt;/p&gt; &lt;p&gt;I had an idea on how to solve this, but wasn&amp;#39;t sure exactly if it was a good idea.&lt;/p&gt; &lt;h1&gt;Model&lt;/h1&gt; &lt;pre&gt;&lt;code&gt;class Racecar public int currentSpeed; public int wheels; public void speedUp() { ... } public void dismantleCar() { ... } &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;.&lt;/p&gt; &lt;pre&gt;&lt;code&gt;// read-only version of the speed indicator interface RacecarSpeedIndicator public int getCurrentSpeed(); &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;.&lt;/p&gt; &lt;pre&gt;&lt;code&gt;// next level of the hierarchy // gives way more permissions than the above one interface RacecarAccelerator extends RacecarSpeedIndicator public void speedUp(); &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Then I have &lt;code&gt;Racecar&lt;/code&gt; &lt;code&gt;extend&lt;/code&gt; &lt;code&gt;RacecarSpeedIndicator&lt;/code&gt; and &lt;code&gt;RacecarAccelerator&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;When my front end needs to accelerate the car, it would look like this:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;class Controller1 RacecarAccelerator rc; public Controller1(RacecarAccelerator rc) this.rc = rc; // here, Controller1 CAN ONLY speed up the car // and read the current speed. It cannot // possibly cause any harm to the race car &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;It&amp;#39;s kind of like having access cards at a building. With a RED access card, you can access a certain number of areas. With a BLUE access card, you can access all RED zones and all BLUE zones, etc. You only give a section of code the BARE MINIMUM it needs to perform its funciton. But is this idea convoluted? Does it exist as a pattern? How does it contrast with MVC?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Hatefiend&quot;&gt; /u/Hatefiend &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fdsfz8/im_not_satisfied_with_mvc_feels_like_it_breaks/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/fdsfz8/im_not_satisfied_with_mvc_feels_like_it_breaks/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_fdsfz8</id><link href="https://www.reddit.com/r/DesignPatterns/comments/fdsfz8/im_not_satisfied_with_mvc_feels_like_it_breaks/" /><updated>2020-03-05T08:44:40+00:00</updated><published>2020-03-05T08:44:40+00:00</published><title>I'm not satisfied with MVC -- Feels like it breaks encapsulation</title></entry><entry><author><name>/u/Rosechan1</name><uri>https://www.reddit.com/user/Rosechan1</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Learning dependency injection and wondering if this code implements it. My understanding is Actions dependency on Person is injected into its constructor.&lt;/p&gt; &lt;pre&gt;&lt;code&gt;class Person { } class Action { private person; __construct(Person person) { $this-&amp;gt;person = person; } } Person jake = new Person(); Action jump = new Action(Person jake); &lt;/code&gt;&lt;/pre&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Rosechan1&quot;&gt; /u/Rosechan1 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/f78xa4/is_this_dependency_injection/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/f78xa4/is_this_dependency_injection/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_f78xa4</id><link href="https://www.reddit.com/r/DesignPatterns/comments/f78xa4/is_this_dependency_injection/" /><updated>2020-02-21T09:52:19+00:00</updated><published>2020-02-21T09:52:19+00:00</published><title>Is this dependency injection?</title></entry><entry><author><name>/u/oribentov</name><uri>https://www.reddit.com/user/oribentov</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Hey all,&lt;/p&gt; &lt;p&gt;I&amp;#39;m implementing a game in which a player has a boat and he needs to move with his boat and collect some stuff. he has score and life as well.&lt;/p&gt; &lt;p&gt;I designed the system as the MVC pattern and right now I have a boatModel object which holds the data about the boat, BoatController which responsible to handle movements.&lt;/p&gt; &lt;p&gt;I considered making a PlayerModel object which holds the data about the player, including life, score, and the BoatController. that&amp;#39;s because conceptually the player has his own &amp;quot;boat driver&amp;quot;&lt;/p&gt; &lt;p&gt;Is it make any sense that&amp;#39;s a model object &amp;quot;has-a&amp;quot; controller (according to the MVC pattern)?&lt;/p&gt; &lt;p&gt;If not, how it&amp;#39;ll be better to design it?&lt;/p&gt; &lt;p&gt;&amp;#x200B;&lt;/p&gt; &lt;p&gt;Thanks.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/oribentov&quot;&gt; /u/oribentov &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/f08m28/should_a_data_model_hold_a_controller_mvc/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/f08m28/should_a_data_model_hold_a_controller_mvc/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_f08m28</id><link href="https://www.reddit.com/r/DesignPatterns/comments/f08m28/should_a_data_model_hold_a_controller_mvc/" /><updated>2020-02-07T10:20:21+00:00</updated><published>2020-02-07T10:20:21+00:00</published><title>should a data model hold a controller? (MVC)</title></entry><entry><author><name>/u/Khalid_______</name><uri>https://www.reddit.com/user/Khalid_______</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Hi, i have to design an asp.net web system for a company for managing employees , their salary , holidays , loans , advances, their children schoolarship accomodations , passports renewal fees, every thing the company take care of the emploee needs to be systemize, ppl what your advice for me to achieve this system , what samples may be availabe online such as erp&amp;#39;s or hr system and what design pattern should i use, im good at programming but havenot had such case before , i only used to develop small websites or apis or mobile apps cross platform on zamarin, and this system will be distributed on more than one branch, so i have to use distributed database hierarechy , already wer using replication on sql server, thanks for reading&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Khalid_______&quot;&gt; /u/Khalid_______ &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/esrwb4/web_system_infering/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/esrwb4/web_system_infering/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_esrwb4</id><link href="https://www.reddit.com/r/DesignPatterns/comments/esrwb4/web_system_infering/" /><updated>2020-01-23T11:37:51+00:00</updated><published>2020-01-23T11:37:51+00:00</published><title>Web System Infering</title></entry><entry><author><name>/u/kekomanci22</name><uri>https://www.reddit.com/user/kekomanci22</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Hello, &lt;/p&gt; &lt;p&gt;There are probably dozens of possibilities, however, how would you deal with this ?&lt;/p&gt; &lt;p&gt;&amp;#x200B;&lt;/p&gt; &lt;p&gt;A few cameras are installed on a highway to catch trucks which carry hazardous or explosive materials, and record the data(brand- plate ect). The cameras and the archived data can be viewed by multiple departments of the police. What kind of design patterns can be used and how can you design a system architecture?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/kekomanci22&quot;&gt; /u/kekomanci22 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/er2tyj/which_patterns_would_you_use_and_what_kind_of/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/er2tyj/which_patterns_would_you_use_and_what_kind_of/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_er2tyj</id><link href="https://www.reddit.com/r/DesignPatterns/comments/er2tyj/which_patterns_would_you_use_and_what_kind_of/" /><updated>2020-01-19T21:42:59+00:00</updated><published>2020-01-19T21:42:59+00:00</published><title>Which patterns would you use and what kind of system would you design</title></entry><entry><author><name>/u/raghavankl</name><uri>https://www.reddit.com/user/raghavankl</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;&lt;a href=&quot;https://medium.com/craftsmanship/future-proof-design-with-strategy-factories-bfe16daaabb8&quot;&gt;https://medium.com/craftsmanship/future-proof-design-with-strategy-factories-bfe16daaabb8&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/raghavankl&quot;&gt; /u/raghavankl &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/eoo9ye/future_proof_design_with_strategy_factories/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/eoo9ye/future_proof_design_with_strategy_factories/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_eoo9ye</id><link href="https://www.reddit.com/r/DesignPatterns/comments/eoo9ye/future_proof_design_with_strategy_factories/" /><updated>2020-01-14T17:22:15+00:00</updated><published>2020-01-14T17:22:15+00:00</published><title>Future Proof Design with Strategy Factories</title></entry><entry><author><name>/u/Avi_19</name><uri>https://www.reddit.com/user/Avi_19</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Dear Reddit,&lt;/p&gt; &lt;p&gt;I made a very small example for my API calls using command-design-pattern. Basically, i want to add tokens, logging information when an API call is placed in my project. This code is just a starter point for it. Please review and feedbacks are well appreciated.&lt;br/&gt; &lt;a href=&quot;https://github.com/techy19/design-patterns/tree/new-branch/src/command_patterns&quot;&gt;https://github.com/techy19/design-patterns/tree/new-branch/src/command_patterns&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Avi_19&quot;&gt; /u/Avi_19 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/ejyg47/command_pattern_example/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/ejyg47/command_pattern_example/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_ejyg47</id><link href="https://www.reddit.com/r/DesignPatterns/comments/ejyg47/command_pattern_example/" /><updated>2020-01-04T16:10:36+00:00</updated><published>2020-01-04T16:10:36+00:00</published><title>Command pattern example</title></entry><entry><author><name>/u/zeke13210</name><uri>https://www.reddit.com/user/zeke13210</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Is there such a thing as design pattern for working with building components out of react.js framework?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/zeke13210&quot;&gt; /u/zeke13210 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/ed3h7t/react_design_pattern_resources/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/ed3h7t/react_design_pattern_resources/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_ed3h7t</id><link href="https://www.reddit.com/r/DesignPatterns/comments/ed3h7t/react_design_pattern_resources/" /><updated>2019-12-20T02:13:15+00:00</updated><published>2019-12-20T02:13:15+00:00</published><title>React design pattern resources!</title></entry><entry><author><name>/u/i_mahe</name><uri>https://www.reddit.com/user/i_mahe</uri></author><category term="DesignPatterns" label="r/DesignPatterns"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;The object has 4 states such as Active, Completed, Terminated and Cancelled. But most of the operations are happening in Active state. And from Active state it can directly go to any other state.&lt;/p&gt; &lt;p&gt;I can easily anticipated some more states coming.&lt;/p&gt; &lt;p&gt;Is it right to implement state design pattern with one abstract class?&lt;/p&gt; &lt;p&gt;The operations on active state is 10 and other states is 2.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/i_mahe&quot;&gt; /u/i_mahe &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/e6casw/state_design_pattern_clarification_on_usecase/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/DesignPatterns/comments/e6casw/state_design_pattern_clarification_on_usecase/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_e6casw</id><link href="https://www.reddit.com/r/DesignPatterns/comments/e6casw/state_design_pattern_clarification_on_usecase/" /><updated>2019-12-05T05:00:37+00:00</updated><published>2019-12-05T05:00:37+00:00</published><title>State design pattern clarification on usecase</title></entry></feed>