I previously mentioned that I intended not to use any Java ORM frameworks. 나는 이전에 언급하는 방법을 사용하지 않는 나는 어떤 자바 orm 프레임 워크 의도합니다. ORM frameworks I have seen so far have a steep learning curve and tend to shoe horn your architecture into their model. orm 프레임 워크 지금까지 본 적이있어 가파른 학습 곡선과 경향이 신발은 귀하의 아키텍처에 경적의 모델을합니다. So I started fresh without any ORM frameworks like Hibernate or Spring (which I have heard is better). 그래서 난 최대 절전 모드로 시작하거나 같은 프레임 워크 orm없이 신선한 봄 (어느 나는 들었는 더 나은).

I am happy coding my queries in SQL and don’t need to use any ORM specific language like Hibernate OQL. 난 행복하다 코딩 내 쿼리를 특정 언어를 사용할 필요가없습니다처럼 최대 절전 모드로 어떤 orm oql합니다. SQL is best for what it does. 위해 최선을 구조화 질의어는 무엇을하는지에합니다. Why re-invent the wheel? 왜 다시 - 발명의 수레 바퀴가? Also I like the fine-grained control over my database as I am processing very large amount of data. 또한 나는 내 데이터베이스로의 미세하게 제어할 - 나뭇결 나는 아주 많은 양의 데이터를 처리합니다. My experience will be primarily relevant to sql happy java developers. 내 경험이된다 sql 행복과 관련된 주요 자바 개발자합니다.

In the process (of working without any ORM framework) I realized I just needed two simple facilities over plain old JDBC. 그 과정에서 (orm없이 노동기구) 2 개의 간단한 시설 깨달 이상 그냥 평범하고 오래된 jdbc이 필요합니다.

1. I needed a way to put all the SQL queries and DDL’s in a separate file. 나는 모든 sql 쿼리를 두게하는 방법이 필요하고 별도의 파일에의 ddl합니다. This allows me or a DBA to later analyze the query with a fine tooth comb and optimize if necessary. 이렇게하면 나중에 날 또는 dba에 검색어를 분석하여 필요한 경우 벌금 치아 빗 및 최적화합니다. It also allows me to easily change them without changing the code. 또한있게 해주는이 코드를 변경하지 않고 쉽게 변경할 수있습니다. Most of all cleanliness of the solution is appealing. 대부분의 해결 방법은 청결 상태의 모든 매력합니다. At this point I am sure you are thinking of iBatis. 이 시점에서 ibatis 나는 생각하고 있는지 확인하십시오. I tried iBatis. ibatis 보았습니다. Initially I liked it and thought I had my solution. 처음에 난 마음에 들어하고 내 솔루션다고 생각했다. However as I went down the lane I realized it too gave me features that I didn’t need. 그러나 차선으로 내려 갔었이 너무 준 깨달 나는 필요가 없었을하는 기능을합니다. Even this was more complicated than I needed. 이것은 생각보다 더 복잡도 필요로합니다. All I needed was a HashMap saved to a file in XML format. hashmap의 모든 필요는 형식으로 파일을 저장해야합니다. And my database class should support query execution by name (think key-value). 그리고 내 데이터베이스 쿼리를 실행하는 클래스를 지원해야 이름 (생각 키 - 값).

2. 두합니다. Secondly I needed connection pooling to prevent opening and closing too many connections and also running out of connections. 둘째로 필요로 연결 풀링을 방지 나는이 너무 많습니다 연결을 열고 닫는 또한 밖의 연결을 실행합니다. I found a nice solution in Proxool. proxool 좋은 솔루션을 찾았습니다. Additionally it supports having multiple connection profiles in a simple text file and optionally logging queries. 또한 여러 개의 연결을 지원하는 데 단순한 텍스트 파일을 선택적으로 로깅을 프로필에 검색어를합니다.

3. 3합니다. I needed to integrate these two capabilities in a simple database class along with utility methods like cleanly closing connection and optionally logging the query data. 이러한 두 기능을 통합하는데 필요한 클래스와 유틸리티를 방법을 간단한 데이터베이스를 정상적으로 종료 연결과 같은 쿼리를 데이터 로깅을 선택합니다.

That’s all there is in my super simple framework, if you can even call it that. 그게 전부가 내 슈퍼에서 간단한 프레임 워크, 그걸 그렇게 부를 수있는 경우도있습니다. And, believe it or not, I am way more productive using it than I have been in a long time and I feel fully in control. 그리고, 믿거나 말거나지만, 저는 생각보다 훨씬 더 생산적 안에 있었을 사용하고 오랜 시간 그리고 기분이 완전하게 통제할 수있습니다. No more burden of shoe horning my ideas to fit FooBah framework and its ideologies for me. 내 아이디어를 신발에 부담을 더 이상 horning 프레임 워크와 그 이념에 맞게 나를 위해 foobah합니다.

Update: There has been extensive discussion on this post at the 업데이트 :있다에서이 게시물에 대한 광범위한 토론 ServerSide serverside . 합니다.