![]() But its strength in implementing the backstage data processing logic is based on SQL’s set-oriented processing approach, which means the effect comes from fast and convenient development process, instead of an alternative application structure.įor computing scenarios wherein the computing ability of the stored procedure is unavailable, such as those involving the multi-database source and non-database source, a data access layer independent of the database is needed.Ĭan the stored procedure really keep user interface and business logic separate? In other words, the stored procedure is effective in an effort to separate the user interface and the business logic. The SQL-based stored procedure, however, has good support for structured data processing, making it easier to write complicated logic compared with high-level languages, though it is difficult to write and debug. Even a sum operation in Java needs many lines of code, let alone the filtering and grouping operations. The data processing logic often involves the batch processing of structured data, which a non-database-specific programming language can barely handle. The reason lies in the degree of development difficulty. So what’s the reason behind the rare use of the data access layer? What’s the difference between the two ways? In fact some applications do use such a way, though it’s not common. We can create a data access layer for data input and output to implement the goal. Encapsulating all data processing logics into stored procedures helps standardize data input/output interface, making it convenient to manage data access privileges.īut by further thinking we may know that stored procedures are not the only way to keep the user interface and the business logic separated. The stored procedure is executed in the database in backstage, feeding data to the frontend system without having to take care of the format and any change of the interface. Those in favor of the stored procedure believe that the technique is a way to keep user interface and business logic separate. It’s cost-effective if the data processing code and the user interface code are independently developed while the maintenance and redevelopment of the user interface and the change of data processing logic can be done simultaneously. Different from the backstage data processing logic, the user interface runs in a variety of application environments, including PC, mobile phone and so on, and is volatile thanks to frequent changes. ![]() Today, it is a basic principle to separate user interface from business logic for application development. ![]() The stored procedure keeps user interface and business logic separate! By analyzing its two recognized merits, we try to locate the potential risks it poses and its application scenarios. The stored procedure is as widely used in database computing as the controversy around the technique is long-standing.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |