1. Luca Arena
  2. PowerBuilder
  3. Monday, 29 April 2019 10:59 AM UTC

Hi all,

I would like to create a Data Access Layer for my PB application; it would need at least 3 (little) objects for each database table. Since my database has about 200 tables, what would you suggest:

  1. create a single pbl with 600 objects;
  2. create 200 pbls, one for each table, with 3 objects each;
  3. create 3 pbls, one for each kind of object, so I'd have 200 objects per PBL;
  4. other better ideas? :D

Thank you much,
Luca

Accepted Answer
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 29 April 2019 13:00 PM UTC
  2. PowerBuilder
  3. # Permalink

There isn't a maximum number of objects. The app I work on has 1,297 DataWindow objects in one library. 

If it were me, I would make three libraries by type.

 

Comment
  1. Luca Arena
  2. Monday, 29 April 2019 15:22 PM UTC
Thank you so much Roland!
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 30 April 2019 22:05 PM UTC
  2. PowerBuilder
  3. # 1

Suggested for lar apps:

app_dddw.pbl              // dropsdown datawindows
app_fnc.pbl                  // functions
app_str.pbl                   // structures
app_reports.pbl             // reports
app_license.pbl             // Keep all of your licensing code in a separate PBL, makes it easy to update licenses
app_.pbl

I like to break the code into functional modules after the basics have been covered (dddws, functions, and so on). All of the code that handles user-capable table  maintenance would be in app_table_maint.pbl, for example.

Keeping your code broekn up into logical groupsing really helps make it easy to maintain and update.

Oh, and use the standard naming conventions as well. That way you can look at an object and know into whioch PBL it belongs.


Olan

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.