Oops, looks like I jumped the gun on the ErrorHandler comments...didn't scroll down far enough to see that this was a locally defined class.
Rick On Sat, Jun 2, 2012 at 8:28 AM, Rick McGuire <[email protected]> wrote: > Mark, > > Found some time to start looking at ooSQLLite implementation. I'm > guessing you don't have a draft of the APIs yet, which is really what > I was interested in looking at right now. However, I found the > samples pretty useful for getting a flavor of what you have. > > There's one thing I picked up as a potential concern looking at the > samples, and that's the ErrorHandler class. This seems like a pretty > generic name with a lot of potential for name collisions. It might be > better prefixed with ooSQL, although there might be other approaches > you might want to consider: > > 1) implement the error handler methods as part of a main package > class. In other words, rather than call ErrorHandler~stmtError, you'd > call ooSQLite~stmtError. Since these methods clearly indicate the > operation being performed, having a separate .ErrorHandler class > doesn't make this any clearer. > > 2) Since you have different types of errors, consider adding error > methods to the objects involved in the errors. For example, rather > than coding > > .ErrorHandler~stmtError(stmt, db, 'INIT', 'contacts') > > code > > stmt~error('INIT', 'contacts) > > This assumes the DB is obtainable from the stmt object (which is > probably a good thing since it was created from the DB). > > In a similar fashion, rather than directly instantiate the statement using > > stmt = .ooSQLiteStmt~new(db, sql) > > it would be better from an oo design standpoint to ask the DB object > for a statement: > > stmt = db~stmt(sql) > > you might want to create an SQLStmt class that defines the methods of > the Stmt class, and then the DB object would return an instance of the > ooSQLiteStmt class that implements the methods. This allows the DB > object to have a bit of flexibility for determining what class to use > for a particular statement. > > Rick ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel
