Java, JSP, Servlet, JDBC - Back To The Basics Part 2爪哇的JSP , Servlet的, JDBC的-回到最基本的第2部分
I informed in my previous post that我告诉我在以前的帖子 I have decided to shun all java frameworks我已决定顺所有的Java框架 for my current project and develop with basic Java / J2SE components instead.我目前的项目和发展与基本的Java / J2SE的组成部分。 Here is a synopsis of my journey as it is unfolding.这里是一个故事大纲,我的旅程,因为这是开展。
Today I was working with JDBC, doing the simple job of fetching certain data from the web and dumping them in the database.今天,我的工作是使用JDBC ,做简单的工作,获取一定的数据从Web和倾倒,他们在数据库中。 I have to tell you that Hibernate or at least iBatis sounded very alluring.我要告诉你,休眠,或至少的iBATIS吹响了非常诱人。 But I have decided - no framework.但我已决定-没有框架。 So I wrote some simple code to fetch data from the web, parsed it and dumped in using plain old JDBC (JDBC 1.0).所以我写了一些简单的程式码,撷取数据从网站上,剖析它,并弃置在使用简单易懂的老的JDBC ( JDBC的1.0 ) 。 I was thinking of using connection pooling from JDBC 2.0, but frankly for my fetch and dump operation, it appeared to be overkill.我想,使用连接池从JDBC的2.0 ,但坦白说我的市值和转储的运作,它似乎是矫枉过正。
I got lot of work done today.我得到了很多的工作。 The only dragging force was the constant temptation to use some framework or other.唯一的拖力是不断的诱惑,利用一些框架或其他。 I resisted. i抵制。 It was refreshing.这是令人耳目一新。 Hopefully from the next post I will start posting few bits and pieces of code, but frankly I have not using anything spectacular today - just plain old JDBC.希望从明年后,我会开始张贴一些零碎的代码,但坦白说,我没有使用任何壮观的今天-刚刚平原岁的J DBC。 Only thing worth noting was that I used a Proxy to allow me to login the database statements.唯一值得注意的是,我用了一个代理,让我登录的数据库报表。 I am using HSQLDB for this project.我使用的, HSQLDBhsqldb为这一项目。 It can currently handle 8GB of data which is good enough for my needs.它目前可以处理8 GB的数据,这是不够好,为我的需要。
Filed under提起下 Database数据库 , , Headline News头条新闻 , , Java Software Java软件 , , Open Source Software开放源码软件 , , RDBMS RDBMS的 , , Web网页 | |
| |
RSS 2.0 2.0 | |
Email this Article电子邮件此文章
You may also like to read您也可以想读 |




January 11th, 2006 at 7:30 am 2006年1月11日在上午07时30分
Just pay attention to some web components like只是要注意一些Web组件一样,
Coldtags suite: coldtags套房:
our (of course我们的(当然
http://www.servletsuite.com/jsp.htm
March 1st, 2006 at 10:24 am 2006年3月1日在上午10时24分
Not using a pre-made framework simply means that you are creating your own ad-hoc framework as you write your application.不使用前所作的框架,只是意味着你是创建自己的特设框架,作为你写您的申请。 Either that, or you are coding the same idiom over and over.要么,或你是编码相同的成语超过以上。 For example, sticking with the JDBC-only approach is fine when you’re accessing only one database table, but as soon as you have to access a second table, you’re writing essentially the same code again.举例来说,坚持与JDBC的唯一办法是罚款时,您在访问只有一个数据库表,但一旦你要进入第二个表,您以书面形式基本上是相同的程式码。 Refactor out the common code into a reusable class, you say? refactor出来的共同守则成为一个可重复使用的一流的,你说呢? Then you’re on your way to inventing your own framework.然后您对您的方法,发明了自己的框架。