Super Simple Java ORM Framework For SQL Happy Developers 슈퍼 간단한 자바 orm sql 행복한 개발자를위한 프레임 워크
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 . 합니다.
Filed under 밑에 Headline News 헤드 라인 뉴스 , How To 하는 방법을 , Java Software 자바 소프트웨어 , Tech Note 기술 참고 사항 , Technology 기술 | |
| |
RSS 2.0 rss 2.0 | |
Trackback 트랙백 this Article | 이 문서 |
Email this Article 전자 우편이 문서
You may also like to read 같은를 읽을 수있습니다 |





August 19th, 2006 at 9:33 am 8 월 19 일 오전 9시 33분
[...] I wrote about how I use a simple Java framework instead of ORM like Hibernate or Spring for effectively solving my data handling requirements. [...] 나는 간단한 자바 프레임 워크를 사용하는 방법에 대해 쓴 orm 대신에 최대 절전 모드 또는 1 학기처럼 내 데이터가 처리 요구 사항을 효과적으로 해결합니다. It has made me tremendously productive. 그것이 날 매우 생산적인합니다. It sparked a major debate in ServerSide. serverside에서 주요 논쟁이 촉발합니다. So I decided to provide more details about my ORM-replacement framework. 그래서 난 내하기로 결정에 대한 자세한 내용 orm - 대체 프레임 워크를 제공합니다. My needs are simple and are likely to match with any SQL happy Java developers. 내 욕구가 단순하고있는 것 같다 어떤 sql 행복 자바 개발자와 일치하도록합니다. [...]
August 29th, 2006 at 1:01 pm 2006 년 8 월 29 오후 1시 1분
Would you mind posting or emailing me the class you mentioned in number 3? 나 이메일을 보내 주시겠습니까 게시 또는 숫자의 클래스를 언급되어 3?
Thanks, 감사합니다,
Jason 제이슨
August 29th, 2006 at 11:37 pm 2006 년 8 월 29 오후 11시 37분
Simple needs means simple framework. 단순이 필요 간단한 프레임 워크 의미합니다. I am releasing an invoice application base on a db framework I build from scratch. 나는 자료를 방출 인보이스를 응용 프로그램을 처음부터 dB 프레임 워크를 만들어요. It allows me to define a model with objects of the DB, to share data, lock records, make paged queries in a client/server way. 그것있게 해주는 객체를 정의하는 모델과 데이터베이스, 데이터를 공유, 잠금 레코드를 만들어 검색어에 호출하는 클라이언트 / 서버 방식합니다. You don’t mind if you are working with the client or the server side: tha api is THE SAME. 생각하지 않았 으면들과 함께 일하는 경우에는 클라이언트 또는 서버 쪽 : tha API를은 동일합니다. And you can still use any SQL, low level, query. 그리고 어떤 sql을 계속 사용할 수있습니다, 낮은 수준 ','검색어합니다. Maybe in the future I could add an object/orm layer, but it is not badly needed now. 미래에 어쩌면 나는 개체를 추가할 수있습니다 / orm 층,하지만 지금은 몹시 필요합니다. It is true that your framework is enough for your requirements, but I think it is not for more complex targets. 귀하의 프레임 워크는 것은 사실이다 사용자의 요구 사항을 충분히, 그러나 나는 생각한다 목표는보다 복잡한을합니다.
August 30th, 2006 at 12:39 am 2006년 8월 30일에서 오전 12시 39분
Sure. sure. I have received lots of email asking for the framework, if you can even call it that. 나는 제비의 이메일이 접수되었습니다 요구하는 내용의 프레임 워크, 할 수 있으면 전화도 그렇게합니다.
I will post it as soon as I get some spare cycles. 게시할 예정입니다 마자 나는 좀 여분의 순환합니다. It would be nice to have it better commented which I need to do. 그것이 좋겠 네요 주석이 갖고있는 더 나은 일을해야 할 거 같아요.
The earliest I can think of is next week or week after that. 제가 생각할 수있는 최초의 주간이 다음 주 또는 그 이후합니다.
September 20th, 2006 at 12:07 pm 2006년 9월 20일에서 오후 12시 7분
I agree 100% with you. 당신과 100 % 동의합니다. I have been fighting a battle with so-called-architects of our company who wish to use ORM without even doing a real-world proof of concept. 나는이 싸움 - 전화 - 건축의 전투가 이렇게 저희 회사를 사용하고자하는 진정한 - 세계조차하지 않고 orm에 관한 개념을 입증합니다.
I wrote a super simple framework myself and am really happy to see how I was able to write apps faster. 슈퍼 간단한 프레임 워크를 썼습니다 자신과 정말 행복 애플 리케이션을 작성 방식을 볼 수있었습니다 빠른합니다. And this was after I started app with Hibernate and got stuck because of not able to write (rather convert) a complex SQL to HQL and none of the experts here could do it either. 그리고 이것은 최대 절전 모드로 응용 프로그램을 시작하고 나서 수없는 때문에 잡혀 쓰기 (오히려 변환)의 광고는 절차가 복잡 sql을 hql 전문가들은 여기에 아무도 없었어요 중 하나가 할 수있다면합니다. I am no expert, but I know if it ain’t helping me get my job done, it ain’t right. 나는 전문가도 아니지만 난 너를 잘 알고하지 않은 경우 내 일을 마칠 수 있도록 도와주고, 그것이 안 좋아합니다.
October 26th, 2006 at 2:55 pm 2006년 10월 26일에서 오후 2시 55분
Hi, have you published the code yet? 안녕하세요, 당신의 코드를 공개 했나요? I cant find a reference anywhere. 나는 어디에 대한 참조 찾을 수 없다.