If non. NET related technology is not suitable for publication on the home page of the garden, please let me take down the topic!
I have been engaged in asp/.net development for more than two years, and there have been many WinForm or Windows console programs, which are only manifestations, related technology ado.net, multithreading,. NET remoting, and more or less applied or researched. Just started to work because of life, interest, now developed into a philosophy of life: trying to find the meaning of existence in creation. Is it really like "Xu more than three" said: Good work is to do meaningful things, do meaningful things is good to live?
Gossip is less of a drag. Recently had the opportunity to contact Java, earlier I was bewitched by. NET, always treat her as a heterogeneous, the impression of this language tool writing cumbersome, messy configuration, so that people do not care about the business logic, so, in addition to its own many problems of fear, there is a strange disdain. A few months ago "encounter" veteran star C + +, Fang know how to solve the world, remorse with tinted glasses to see open source.
Java is also a very simple language tool (I do not know whether to think of her as a language, or a tool, reader of the beholder). Remember when the application of JSP in the University of a "hospital management system", then build a small web site, linked to the database to do a little operation, are all maddening, now it seems, nothing more than our arrogant, thought that with vs2003 drag a thing click "Next" will look very cool. The nature, language and development tools of ease of use, Java but. NET, but from the function and cost, the latter is still very advantageous, popular so many years of Java EE, or have a considerable high-end market.
I once wrote an essay about "How to simplify access to a database" in a. NET environment (http://www.cnblogs.com/howard-queen/archive/2009/07/14/1523500.html), and today I was amazed The original Java can also be fully implemented. Typically, Java operates on data through three classes of Connection (IDbConnection), Statement (IDbCommand), ResultSet (IDataReader), I have long summed up the data manipulation interface to implement a simplified Java version without parameters (please also note that Java and C # different naming conventions):
package queen.data;
/*
* 统一数据访问接口
*
* @author Howard Queen
* @version 1.0.1, 2010/10/12
* */
public interface IExecutor {
String getConnectionString();
void setConnectionString(String value) throws Exception;
int getTimeout();
void setTimeout(int value);
/*
* 执行语句获取数据集
* */
QueryResult executeQuery(String statement) throws Exception;
/*
* 执行语句获取单个数据
* */
Object executeScale(String statement) throws Exception;
/*
* 执行语句获取影响的行数或其他。
* */
int executeNonQuery(String statement) throws Exception;
}