Created January 1, 2012
Last updated January 1, 2012
[ Japanese | English ]

Design with reference to the Java API reference etc.

  In this page , for a person who can design in object-oriented , I will explain the necessities for better design. If you do not understand the object-oriented , please read from top to "About object-oriented".

  For better design , we must learn daily , I think that we often have no idea for learning content. So I introduced "GRASP Pattern" and "Design Pattern and Anti Pattern" 1.
In this pase, I will explain a merit to refer the Java API reference etc. 1.

1: If you want to master the Excel VBA, to only learn the Excel VBA is wasted effort. We must learn other programming language and the software engineering 2 and so on.
2: To learn the software engineering , I think that we should take the Japan Information-Technology Engineers Examination (Fundamental Information Technology Engineer Examination(FE) and Applied Information Technology Engineer Examination(AP)).

1. About Java API
2. Merit to refer the Java API reference etc.
3. Example
4. Reference

1. About Java API

  There is a Java API reference in a home page of Oracle.
is Java 1.4 API document.

  In the page , classes and methods of Java is written.
Back to Top

2. Merit to refer the Java API reference etc.

  A merit to refer the Java API reference etc. is followings.
  1. VBA have fewer class library than Java (but better than C language...).
      Therefore , there is a case we must make classes.
      Then , class name , method name , specification of exception ( throw or return value ? ) and so on should be referred to become understandable.
      Note. Even if we how much learn the Design pattern and Anti pattern , we can not master this.

  2. Reducing specification bugs.
      I think that Java API is designed by many person. And because time passed since it was created , it is maturer and fewer bug than class which you designed.

  3. When you write a specification of classes and methods , I think that it would be helpful to write what , how and how order.
      I think that the specification becomes more understandable.
      Note. Even if we how much learn the Design pattern and Anti pattern , we can not master this.

  But , please pay attention the followings when you refer.
  1. There is a case that there are bugs which you want to refer , the translation of specification is wrong and so on.
      There is a case that sometimes such...
      I think that you should not refer such parts.

  2. There is a case that names and design principles are differ by libraries which you want to refer.
      For example , in Excel library , for example , Workbooks class exists for Workbook class, a collection class exists for a class. But in Java API , it is not so.
      You should unify.

  3. In Excel VBA , object-oriented design is difficult (Not support inheritance and so on). Therefore , it can be not always referred.
Back to Top

3. Example

  What would be helpful to any specific part? Here , other programming language besides VBA (eg, C/C++) is also considered.
  1. Class name and method name of collection
      For example , in C language , Vector and HashMap does not exist. Therefore , there is a case that you must make those.
      Then , you should refer Java API (Understandability of usability in ISO/IEC 9126 is better).
      But , in VBA , the Collection class and Redim exist...

  2. Internationalization
      First of all, Trail: Internationalization (The Java Tutorials) is helpful.
      Actually used class is java.util.ResourceBandle class and so on.

  3. Exception
      In Java , Exception types are Exception , RuntimeException and Error. And an Exception object can have a cause. And an Exception object has stack information.
      This means that when a failure is occurred , these information is needed (In C/C++ , VBA , there is a information that getting also is difficult).
      But this idea is very helpful.
    Note. In C/C++ , VBA it is defficult. But , please give up. For example , when an error is occurred , logging (In C/C++ , using __FILE__ and __LINE__ macro , source file name and line can be written. And in calling function , logs is written , you can read trace from log file.) must be done.

  4. Configuration file
      In C/C++ , this class does not exist. In VBA , VBA.Interaction.GetString exist , but it does not read a file ( read a registry...).
      In Java API , there are java.util.Properties , java.util.prefs.Preferences class and so on.
      And not only class name and method name but also file specification is helpful.

Back to Top

4. Reference

  The following tables are pages that I referred to create this page.


Linked Website Name


Linked date

1 Overview (Java 2 Platform SE v1.4.2) Java API document (Ver 1.4.2) January 1, 2012
2 Doxygen Doxygen is a documentation system for C++, C, Java, and so on.
Please read "Special Commands". Why those( for example @retval) are defined?
January 1, 2012

Prev Up Next  Top
Back to Top

I doesn't assume the responsibility of any damage that occurs because of the use of this page.

Microsoft ,Windows ,Visual Basic and Excel are registered trademarks of Microsoft Corporation in the United States and other countries.
Visual Basic® for Applications may represent a VBA.
Mac ,Mac OS ,Mac OS X ,AppleScript are trademarks of Apple Inc., registerd in the U.S. and other countries.
Java, JavaSoft, JavaScript, HotJava, JDK, and all Java-based trademarks or logos are trademarks or registered trademarks of Oracle Corporation.
Other brands and their products are trademarks or registered trademarks of their respective holders and should be noted as such.

The author of this page and these companies do not have any relationship.