...using a generics-based approach outlined here:
https://weblogs.java.net/node/642849
I have feeling this could also be applied to the problem of fluent interface issues having to do with forcing the caller to append properties in the order of super class to sub class -- that was addressed in this article. It also appears to solve in an elegant way the code smells associated with doing unchecked casts like return (T) this; or returning raw types. The trick to solve these issues appears to be the use of "self-referential" type parameters.
Tuesday, March 10, 2015
Wednesday, October 29, 2014
Logic-based Knowledge Different from Factual, Procedural
http://msdn.microsoft.com/en-us/library/aa480020.aspx
Facts (e.g. data in a database retrieved via CRUD) and procedures are good fit for computers and typical programming languages. But there's a "semantic gap" when it comes to knowledge which is better coded using rules engines.
So much for business logic being intrinsic to OOP domain objects?
Facts (e.g. data in a database retrieved via CRUD) and procedures are good fit for computers and typical programming languages. But there's a "semantic gap" when it comes to knowledge which is better coded using rules engines.
So much for business logic being intrinsic to OOP domain objects?
Saturday, September 20, 2014
On using reflection to decouple modules
https://www.simple-talk.com/dotnet/.net-framework/designing-c-software-with-interfaces/
Provides a good argument for the use of reflection to enforce separation within the software architecture.
Provides a good argument for the use of reflection to enforce separation within the software architecture.
Wednesday, May 14, 2014
Programming Language Categorizations
In "Static vs. dynamic typing of programming languages" author compares languages in three spaces:
Statically typed vs Dynamically typed (e.g. Java vs Python)
Strongly types vs Weakly typed (e.g. Python vs Perl)
Manifestly typed vs Implicitely typed (Java vs Python?)
Statically typed vs Dynamically typed (e.g. Java vs Python)
Strongly types vs Weakly typed (e.g. Python vs Perl)
Manifestly typed vs Implicitely typed (Java vs Python?)
Wednesday, March 12, 2014
JavaWorld on "The ultimate superclass"
http://www.javaworld.com/article/2105982/core-java/java-qanda-the-ultimate-superclass-part-1.html#tk.rss_all
talks about shallow vs deep cloning, covariant return types, etc.
talks about shallow vs deep cloning, covariant return types, etc.
Sunday, November 3, 2013
Helper Class Anti-pattern
Read http://blogs.msdn.com/b/nickmalik/archive/2005/09/06/461404.aspx
E.g. rather than create a helper class to be used for url-encoding, create, inject, and use a URL object:
"Encoding a URL is part of a URL object"
E.g. rather than create a helper class to be used for url-encoding, create, inject, and use a URL object:
"Encoding a URL is part of a URL object"
Monday, September 16, 2013
Subscribe to:
Posts (Atom)