It's not too often that we have the opportunity to unveil the next paradigm in software development: Vector Oriented Programming (or, VOP). In addition to sounding cooler than OOP, VOP offers all the benefits of OOP and a healthy heap of flexibility. Take, for example, this method uncovered in an order entry system used within a mid-western shipping company ...

 * Returns an Order vector or a vector of Order vectors, based on one 
 * or more parameter values. If there was an error retreiving the
 * Order, then a standard Error vector is returned. (see docs)
 * @param  getOrSet        indicates what action to take. can be:
 *                         "get", "set", "close", "find"
 * @param  orderNumber     number of the order
 * @param  orderId         id of the order
 * @param  customerNumber  number of the customer
 * @return                 vector of 18 elements or a vector of vectors
 *                         or an error vector
  public Vector getSetOrder(String getOrSet, String orderNumber, 
                            String orderId, String customerNumber)

All it takes is a quick trip to the documentation to see what the vectors will contain ...

Order Vector
  • Order_Number
  • Order_Id
  • Customer_Number
  • Order_Date
  • Order_Status
  • [Ship_Date] (exists only if Status is "shipped")
  • PO_Number
  • [Shipping_Code] (exists only if Status is "shipped")
  • ...
  • LastSaved_Username --or-- LastSaved_Date (past 11/12/02, it is Date)
  • [LastSaved_Username] (exists only past 11/12/02)
  • ...

And sure, you may need to constantly pepper your code with things like, "poNumber = ((orderVector[4]=="shipped")?orderVector[6 ]:orderVector[5 ])", but you see, that's the beauty of it. Pepper makes everything taste better.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!