[brailleblaster] Re: Renaming

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Mon, 07 Jan 2013 21:37:31 +0000

It might be true to try and avoid wrappers in Python as it is a dynamic language and so would need to do all the stuff to check whether there is such a method when making a method call.


However Java being statically typed is much faster and typically one does not really get concerned about how many calls are made, I believe the performance drop (if any) is so small as to not be noticable (one could normally make greater optimisations elsewhere).

Michael Whapples
On 07/01/2013 17:26, Keith Creasy wrote:
I disagree but OK. Do it however youlike.

Any drop in efficiency would be completely inconsequencial. Wrapper classes are used all 
the time and are in fact an integral part of the "adapter" design pattern.


Keith Creasy
Software Developer
American Printing House for the Blind
KCreasy@xxxxxxx
Phone: 502.895.2405
Skype: keith537


-----Original Message-----
From: brailleblaster-bounce@xxxxxxxxxxxxx 
[mailto:brailleblaster-bounce@xxxxxxxxxxxxx] On Behalf Of John J. Boyer
Sent: Monday, January 07, 2013 12:13 PM
To: brailleblaster@xxxxxxxxxxxxx
Subject: [brailleblaster] Re: Renaming

A wrapper class is a new idea for me. I've never seen it before. It seems to me 
simpler to just chose a different new name for the Semantics class, something 
like DocumentBase A wrapper class might also be less efficient.

John

On Mon, Jan 07, 2013 at 01:53:05PM +0000, Keith Creasy wrote:
If I were doing it I'd create a wrapper class called 
org.brailleblaster.document.Document that would be a wrapper for 
java.xom.Document ( or whatever it's called. Our Document class would have one 
member that would be something like:

private java.xom.Document dom = new java.xom.Document();

and another member that would dhandle the Semantics:

private Semantics semantics = new Semantics();

Also members for styles, actions, etc; whatever we need.

This is the class that the views would interact with. So you might also have a 
member like:

private View[] views;

and methods like attachView and detachView.

WordProcessor might just be a parent frame for the document, I think that's 
what it is mostly now.


This is pseudo code so don't take it literally.


Keith Creasy
Software Developer
American Printing House for the Blind
KCreasy@xxxxxxx
Phone: 502.895.2405
Skype: keith537


-----Original Message-----
From: brailleblaster-bounce@xxxxxxxxxxxxx
[mailto:brailleblaster-bounce@xxxxxxxxxxxxx] On Behalf Of John J.
Boyer
Sent: Sunday, January 06, 2013 10:32 PM
To: brailleblaster@xxxxxxxxxxxxx
Subject: [brailleblaster] Renaming

Renaming the documentmodel package to document will cause no difficulty.
However renaming the Semantics class to Document will probably cause confusion, 
in part because XOM has a class with the same name. Perhpas it could be renamed 
Model. Maybe someone has a better idea. It won't be the first time I've had to 
rename things.

Thanks,
John

--
John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities


--
John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities





Other related posts: