Title: Misleading example [Factory Pattern] · Issue #52 · zoltantothcom/Design-Patterns-JavaScript · GitHub
Open Graph Title: Misleading example [Factory Pattern] · Issue #52 · zoltantothcom/Design-Patterns-JavaScript
X Title: Misleading example [Factory Pattern] · Issue #52 · zoltantothcom/Design-Patterns-JavaScript
Description: The example of factory pattern is misleading. Although the definition says, Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses. ...
Open Graph Description: The example of factory pattern is misleading. Although the definition says, Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a c...
X Description: The example of factory pattern is misleading. Although the definition says, Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a c...
Opengraph URL: https://github.com/zoltantothcom/Design-Patterns-JavaScript/issues/52
X: @github
Domain: Github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Misleading example [Factory Pattern]","articleBody":"The example of [factory pattern](http://designpatternsgame.com/patterns/factory) is misleading. Although the definition says, \r\n\r\n\u003e Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.\r\n\r\nBut the example doesn't use any subclasses at all. Whereas, [Addy Osmani's example](https://addyosmani.com/resources/essentialjsdesignpatterns/book/#factorypatternjavascript) explains it pretty well.","author":{"url":"https://github.com/kshirish","@type":"Person","name":"kshirish"},"datePublished":"2019-04-29T06:58:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/52/Design-Patterns-JavaScript/issues/52"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e82db60a-77e8-5536-ed51-7f91f0eaee3b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D94:10EC7:43B445:5CDC13:6A626E68 |
| html-safe-nonce | 82b1cab2e38c24e141433e6ca36f242fabdaeee853c15ffc0e277d1f08104cd6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDk0OjEwRUM3OjQzQjQ0NTo1Q0RDMTM6NkE2MjZFNjgiLCJ2aXNpdG9yX2lkIjoiNDAyNjQ0NzM1NTQ4MzE1NjA3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a2f62c56d8d6afd8b08f2bf87bc9f89b45cbf30e983ac47caffba64452cf148a |
| hovercard-subject-tag | issue:438173461 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/zoltantothcom/Design-Patterns-JavaScript/52/issue_layout |
| twitter:image | https://opengraph.githubassets.com/945556bcdbd96433c695b2603be5750c0d36ef3e444417229ca4745344856b90/zoltantothcom/Design-Patterns-JavaScript/issues/52 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/945556bcdbd96433c695b2603be5750c0d36ef3e444417229ca4745344856b90/zoltantothcom/Design-Patterns-JavaScript/issues/52 |
| og:image:alt | The example of factory pattern is misleading. Although the definition says, Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kshirish |
| hostname | github.com |
| expected-hostname | github.com |
| None | 19769ef9d383a84eeab48bb9b309078c20f4532b73eae2f9713b18406513e0ad |
| turbo-cache-control | no-preview |
| go-import | github.com/zoltantothcom/Design-Patterns-JavaScript git https://github.com/zoltantothcom/Design-Patterns-JavaScript.git |
| octolytics-dimension-user_id | 248356 |
| octolytics-dimension-user_login | zoltantothcom |
| octolytics-dimension-repository_id | 166296001 |
| octolytics-dimension-repository_nwo | zoltantothcom/Design-Patterns-JavaScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 166296001 |
| octolytics-dimension-repository_network_root_nwo | zoltantothcom/Design-Patterns-JavaScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 76dc6b11f13eaeec1329217c9f16c262ade27a1e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width