Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessor methods in safe business objects
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00924955
Message ID:
00925889
Vues:
17
David,

>1. What should happen in getName when the getData method hasn't been called yet? Does mmBusinessObject.GetCurrentDataSet() throw an exception or return an empty DataSet?

>2. What if a value for primaryKey is passed to getName that isn't in the DataSet? Is the decision to return string.Empty or "primaryKey not found" or throw a custom exception a stylistic one?

Without knowing the context in which the object is used, I would tend to retrieve the requested data if it's not already in the business object's DataSet. So, this would require the following:

  1. If the current DataSet is null retrieve the requested data from the back end

  2. If the current DataSet is not null, search for the data in the DataSet. If the data is not found in the current DataSet, retrieve the requested data from the back end

>3. Does MM come with a list of all the classes, their properties and methods, and the exceptions they throw? I thought that I had a reference, but I can't find it.

The MM .NET Developer's Guide contains a list of all classes, properties and methods under the topic "MM .NET Classes". We don't have a list of all exceptions thrown by MM .NET...we throw very few exceptions except in our builders.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform