># of lines of code is, at best, a specious argument. A seasoned developer who has previously solved other problems may wind up leveraging previously-written code - the resulting # of lines might be longer...so what? That doesn't mean it's "less easy"
OK, then let us describe it in terms of what needs to be done and how it gets done. To apply a factory pattern, so that it can be used for
loObj=oFactory.create("mytoken")
there needs to be a factory.dbf (or other table), and the code in the factory class needs to
- get the table (make sure it is open etc),
- find the record with "mytoken" in the name field
- .newobject(classfield, classlibfield) with possible complication if parameters are to be passed to object's init
- return the object, or return .null. if anything is screwed up.
Now how do you do that in a static language?