0 Replies Latest reply on May 7, 2014 2:25 PM by Gulam Samdani

    In N-Tier Architecture app , which place OF  the  Bussiness Validation ?

    Gulam Samdani Expert

      When writing high transaction data centric  applications, what are the best practices for implementing data validation / business validation ?

      structure is :


      Controller (JSF) + Manager (EJB)  + DAO(EJB) + model (JPA)/Bean validation


      My idea is :


      anything that i can catch at the user interface should be done at that level.


      But what about the middle-tier(Manager layer)?

      Do I re-validate the same data that i validated at the UI?  Do I pre-validate the data prior to any database transactions?

        On one hand, redundant validation would ensure that each layer is robust in its own right).

      On the other hand, it leads to added code, maintenance, and processing overhead.