Subscribe: Comments for Paul M. Jones
Added By: Feedage Forager Feedage Grade A rated
Language: English
avoid dependency  avoid  comment avoid  comment  dependency injection  dependency  domain  entity  injection  quality  software  steps 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Comments for Paul M. Jones

Comments for Paul M. Jones

There are no solutions, only tradeoffs.

Last Build Date: Thu, 14 Dec 2017 01:34:48 +0000


Comment on Memory Leaks With Objects in PHP 5 by What's better at freeing memory with PHP: unset() or $var = null - QuestionFocus

Thu, 14 Dec 2017 01:34:48 +0000

[…] that until php5.3, if you have two objects in circular reference, such as in a parent-child relationship, calling unset() on the parent object will not free the […]

Comment on Avoid Dependency Injection by pmjones

Tue, 05 Dec 2017 21:29:11 +0000

> It may be simple UI/UX requiring like multi-steps registration form. Today they want 3 steps, tomorrow – 5 steps. Maybe; though at that point, you're talking about something more like an Application Controller (POEAA) rather than Entity validation -- in which case, the validation might better be invoked as part of a Application Service or Domain Service, rather than embedded in the Entity.

Comment on Avoid Dependency Injection by VolCh

Tue, 05 Dec 2017 20:29:02 +0000

Not always. It may be simple UI/UX requiring like multi-steps registration form. Today they want 3 steps, tomorrow - 5 steps. It is not domain logic, but different validation rules.

Comment on Avoid Dependency Injection by pmjones

Tue, 05 Dec 2017 15:27:34 +0000

/me nods On the other hand, if you need different validations in different use cases, perhaps that indicates that there should be an additional Bounded Context; or indeed, a different Entity for that use case?

Comment on Avoid Dependency Injection by VolCh

Tue, 05 Dec 2017 15:20:56 +0000

I think that fully-constructed validation object should be injected via double dispatching exactly in the entity's validate() method. We may need different ways of validation in different use cases and(or) at different moments of entity's life-cycle.

Comment on Avoid Dependency Injection by Daniel

Tue, 05 Dec 2017 14:01:06 +0000

That's one of the biggest questions I found when I started with DDD. Many developers validate entity data in the entity class itself, which supposes a violation of the Single Responsibility Principle. In the other hand, creating the validator class inside the entity violates the Dependency Inversion Principle. After a long time thinking in how could I preserve the SRP without creating any class inside the entity, I found an approximation: a class that validates the data and stores it. That class would become the new entity constructor argument. There's a lot of issues that this workaround causes, but all of them can be solved easily with the Factory Pattern.

Comment on “Before” (not “Beyond”) Design Patterns by GDmac

Wed, 29 Nov 2017 06:47:29 +0000

To go on with the molecules analogy. Programming is building of the conduits, the vessels and connectors to mix and match molecules to brew a cocktail. So in that sense, a programmer needs to understand the volatility of the components and make sure to prepare the cocktail accordingly. The mastery is the chef who prepares the dish that is delightful to the eye as well as to the taste. It helps if he does not put everything to the blender ending in every dish being soup. :-) Well it seems in the end it is about cooking and kitchen-prep and serving the dish

Comment on Memory Leaks With Objects in PHP 5 by 用PHP释放内存更好些:unset()或$ var = null | CODE问答

Tue, 28 Nov 2017 15:35:36 +0000

[…] (自2013年起,unset man page不再包含该部分) 请注意,在php5.3之前,如果有two objects in circular reference(如父子关系),则调用父对象的unset()将不会释放用于子对象中父引用的内存。 (当父对象被垃圾收集时,内存也不会被释放。)(bug 33595 问题“difference between unset and = null”详细说明了一些差异:  unset($a)也会从符号表中删除$a;例如: class=”lang-php prettyprint-override”> […]

Comment on Command Bus and Action-Domain-Responder by Marco

Thu, 12 Oct 2017 09:59:49 +0000

Hi! In terms of ADR it might be part of the 'Domain', but i rather think this is misleading. In regards to hexagonal architecture you should rather introduce a separation between 'Application' and 'Domain' layers. This way it will be clear that it belongs into 'Application' and not 'Domain', for the latter should absolutely not know anything about implementation details! Best

Comment on Quality: Program vs Product by Blaine Osepchuk

Wed, 27 Sep 2017 22:07:21 +0000

I heard this idea somewhere that technical debt is a *deliberate* decision to do something in a sub-optimal way to meet a short-term goal (often a deadline). For example, a team might choose not to implement a full performance monitoring and reporting sub-system for a website before they launch. The giant mess some teams make because they're in a hurry or don't know any better is not technical debt--that's shipping s#^t. And that violates Uncle's Bob's first rule of software professionalism ( As programmers we're supposed to be the experts. And I believe it's our job to effectively communicate the trade-offs of various options and guide our customers/employers to the best solutions possible with the resources available. I don't think anybody wants crappy software. But I suspect many programmers do a lousy job of communicating the trade-offs of cutting particular corners or negotiating alternate courses of action to meet budget or time constraints that won't cripple the project down the road (or they just give up after a while). The cost-quality curve for software is a giant U. It costs lots of money to make crappy software (if you can finish it at all) and it also costs lots of money to make flawless software (think avionics) And the lowest cost software is probably farther to the right on the curve (higher quality) than most projects. So it would actually be cheaper to produce software of higher quality--all things being equal. That's how I sold the idea of quality improvement at my job. I kept pointing out all the messes that were slowing us down and selling my employer on not making it worse. I explained that we plan to operate this software for the foreseeable future so we should take care of it (I also got everybody to read your book: Modernizing Legacy Applications in PHP). It wasn't an easy sell and we are still struggling to balance the time we spend adding features with the time we spend doing clean-ups, but we are moving forward and nobody is talking about a big rewrite anymore. So, yes, it's up to us to understand the consequences of the program quality in terms of the product quality AND communicate that effectively to decision makers.