Stateless Objects


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Stateless Objects

  1. #1
    Tony Liguori Guest

    Stateless Objects


    I'm sorry to say I have not yet read your book. It's very likely that the
    answer to my question may be found there.

    All of the 3-tiered application development that I do uses stateless objects
    running in MTS. The problem is that you can't properly encapsulate the data
    validation or business logic in a stateless object. For instance, you may
    want to execute a Property Let from inside a Text1_Change event, then validate
    the data from within the Property Let inside the business object. With a
    stateful object, this was a useful technique and not a problem.

    Do you recommend creating another set of stateful objects for the purpose
    of validating data and business rules, or, is there a better way?

    Thank you!

    Tony Liguori, MCSD
    Share on Google+

  2. #2
    Deborah Kurata Guest

    Re: Stateless Objects

    One choice is to do a set of stateful objects that run on the client and not
    under MTS.

    Another choice is to have a validate method in the stateless component. The
    downside of this is that the user will not get field by field validation.

    Good luck!
    Deborah

    Tony Liguori wrote in message <38fcd41d$1@news.devx.com>...
    >
    >I'm sorry to say I have not yet read your book. It's very likely that the
    >answer to my question may be found there.
    >
    >All of the 3-tiered application development that I do uses stateless

    objects
    >running in MTS. The problem is that you can't properly encapsulate the

    data
    >validation or business logic in a stateless object. For instance, you may
    >want to execute a Property Let from inside a Text1_Change event, then

    validate
    >the data from within the Property Let inside the business object. With a
    >stateful object, this was a useful technique and not a problem.
    >
    >Do you recommend creating another set of stateful objects for the purpose
    >of validating data and business rules, or, is there a better way?
    >
    >Thank you!
    >
    >Tony Liguori, MCSD



    Share on Google+

  3. #3
    Deborah Kurata Guest

    Re: Stateless Objects

    I think it depends on the application and on the user. For all of our Web
    stuff, we wait to validation until the user hits the submit button. For much
    of our desktop stuff, we do field-by-field validation because of the types
    of apps we have done. We don't put up message boxes on errors, so it does
    not interfere with heads-down data entry. We try to have ours work like
    Word, where it turns errors red so the user can review the errors when the
    typing is complete.

    - Deborah

    >Deborah,
    >
    > Don't you think field by field validation is a needless hindrance to
    >data entry? I do all of my validation when I post. Most data entry folks
    >work 'head-down' anyway, and should not be made to contend with field by
    >field validation, IMO. Also, this eliminates the problem that is the main
    >subject here. What do you think?
    >
    >Regards,
    >D. Patrick Hoerter
    >
    >Deborah Kurata wrote in message <38fdf780$1@news.devx.com>...
    >>One choice is to do a set of stateful objects that run on the client and

    >not
    >>under MTS.
    >>
    >>Another choice is to have a validate method in the stateless component.

    The
    >>downside of this is that the user will not get field by field validation.
    >>
    >>Good luck!
    >>Deborah
    >>
    >>Tony Liguori wrote in message <38fcd41d$1@news.devx.com>...
    >>>
    >>>I'm sorry to say I have not yet read your book. It's very likely that

    the
    >>>answer to my question may be found there.
    >>>
    >>>All of the 3-tiered application development that I do uses stateless

    >>objects
    >>>running in MTS. The problem is that you can't properly encapsulate the

    >>data
    >>>validation or business logic in a stateless object. For instance, you

    may
    >>>want to execute a Property Let from inside a Text1_Change event, then

    >>validate
    >>>the data from within the Property Let inside the business object. With a
    >>>stateful object, this was a useful technique and not a problem.
    >>>
    >>>Do you recommend creating another set of stateful objects for the purpose
    >>>of validating data and business rules, or, is there a better way?
    >>>
    >>>Thank you!
    >>>
    >>>Tony Liguori, MCSD

    >>
    >>

    >



    Share on Google+

  4. #4
    D. Patrick Hoerter Guest

    Re: Stateless Objects

    Deborah,

    Don't you think field by field validation is a needless hindrance to
    data entry? I do all of my validation when I post. Most data entry folks
    work 'head-down' anyway, and should not be made to contend with field by
    field validation, IMO. Also, this eliminates the problem that is the main
    subject here. What do you think?

    Regards,
    D. Patrick Hoerter

    Deborah Kurata wrote in message <38fdf780$1@news.devx.com>...
    >One choice is to do a set of stateful objects that run on the client and

    not
    >under MTS.
    >
    >Another choice is to have a validate method in the stateless component. The
    >downside of this is that the user will not get field by field validation.
    >
    >Good luck!
    >Deborah
    >
    >Tony Liguori wrote in message <38fcd41d$1@news.devx.com>...
    >>
    >>I'm sorry to say I have not yet read your book. It's very likely that the
    >>answer to my question may be found there.
    >>
    >>All of the 3-tiered application development that I do uses stateless

    >objects
    >>running in MTS. The problem is that you can't properly encapsulate the

    >data
    >>validation or business logic in a stateless object. For instance, you may
    >>want to execute a Property Let from inside a Text1_Change event, then

    >validate
    >>the data from within the Property Let inside the business object. With a
    >>stateful object, this was a useful technique and not a problem.
    >>
    >>Do you recommend creating another set of stateful objects for the purpose
    >>of validating data and business rules, or, is there a better way?
    >>
    >>Thank you!
    >>
    >>Tony Liguori, MCSD

    >
    >


    Share on Google+

Similar Threads

  1. Bug with Creation of Objects in SQL *Plus Worksheet
    By Michael Cole in forum Database
    Replies: 2
    Last Post: 04-02-2003, 03:06 PM
  2. Bug with Creation of Objects in SQL *Plus Worksheet
    By Michael Cole in forum oracle.general
    Replies: 0
    Last Post: 02-20-2003, 10:25 PM
  3. Analogy between Beans and Activated Objects
    By Peter Leong in forum .NET
    Replies: 5
    Last Post: 05-21-2002, 08:02 AM
  4. Thin Objects for Better Performance
    By Dave Fleischman in forum Enterprise
    Replies: 3
    Last Post: 08-18-2000, 01:10 PM
  5. Components vs Objects
    By Oliver Lennon in forum Enterprise
    Replies: 3
    Last Post: 04-18-2000, 12:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center