tag:blogger.com,1999:blog-8712770457197348465.post8701366102656006422..comments2024-03-17T23:01:26.872-07:00Comments on Javarevisited: Difference between State and Strategy Design Pattern in Javajavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-8712770457197348465.post-40621272428166775232016-09-30T02:10:29.301-07:002016-09-30T02:10:29.301-07:00very nice and detailed explanation.Appreciate it. ...very nice and detailed explanation.Appreciate it. <br />Anonymoushttps://www.blogger.com/profile/01550371631380004311noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-84955333581091496972014-07-03T02:17:04.731-07:002014-07-03T02:17:04.731-07:00Patterns are a map, a guideline.
Code is the terra...Patterns are a map, a guideline.<br />Code is the terrain, sometimes it's rocky.<br />It's nice to have a map.<br />Don't always trust the map, trust the terrain instead.<br />-Miguel Ping<br />http://blog.codinghorror.com/rethinking-design-patterns/<br /><br />Design Patterns are identified and applied via <br />1). Code Refactoring<br />2). Code Optimization <br /><br />without Caesar Rodmanhttps://www.blogger.com/profile/14326395276126876290noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-78729533268549257012014-06-09T08:57:52.409-07:002014-06-09T08:57:52.409-07:00In my opinion real difference between state and st...In my opinion real difference between state and strategy pattern is stateful vs stateless. State pattern is always stateful but Strategy will not. In fact, Strategy pattern is nothing but a clever way of achieving functional programming in Java, even before Java 8. You can pass behaviours to methods encapsulated in strategy object, a smart way of method injection. State is rather more useful and Jojonoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-24054586128997492372014-05-03T06:58:38.199-07:002014-05-03T06:58:38.199-07:00Could you post the code too?Could you post the code too?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-68458464320858961582014-04-26T01:16:11.082-07:002014-04-26T01:16:11.082-07:00Strategy and Command difference description will b...Strategy and Command difference description will be even more interesting! Write more!Anonymousnoreply@blogger.com