I am working on a Web Application, to be designed in Java using Play Framework. This application will have high traffic so performance will be a major concern. The performance cause is thus preventing me from using an Object Relational Model (ORM). On searching I found that ORM can be replaced architecturally using a Data Access Layer (DAL) also using database access via "raw" JDBC. However, since I am a novice, I don't understand what "raw" JDBC is. Is this similar to the one in this tutorial. Moreover, how can we implement a modular and manageable DAL using this pattern?
-
I would avoid that and go with a proven ORM as they will already have solved issues of performance that you would have to solve. Raw JDBC probably means that you write your own using JDBC.onesixtyfourth– onesixtyfourth2014-03-17 15:22:33 +00:00Commented Mar 17, 2014 at 15:22
-
Yes, that's plain JDBC in Vogella's tutorial and you should evaluate a framework that helps you use plain JDBC while having the expected performance. @onesixtyfourth I used plain JDBC in a project since performance was a key term and we ended creating our own naive framework for the DAL.Luiggi Mendoza– Luiggi Mendoza2014-03-17 15:23:53 +00:00Commented Mar 17, 2014 at 15:23
-
My suggestion is to stick with any ORM. Code maintenance with raw JDBC is a nightmare for such a huge application. performance tuning always be there with any framework.Suresh Atta– Suresh Atta2014-03-17 15:27:47 +00:00Commented Mar 17, 2014 at 15:27
1 Answer
Your best bet would be to initially implement your program as quickly as possible ( lightweight Object Relational Modal may be a good choice). Your aim is speed of creation (but make sure you "hide" elements of your program so the use of an ORM or direct JDBC is not "known" by much of your program.
Once you have your program running, measure where your performance blockers are ... you may be surprised an what you find. Reducing the time to get "running" pays great dividends on focusing your improvement efforts on actual issues rather than "expected ones".