Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
JSP - A mailing list about Java Server Pages specification and reference
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Separating SQL from code

Separating SQL from code

2004-04-07       - By Huy Nguyen

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  

You can use the mapping pattern i.e. mappingSQL.xml (which is configurable) and
then use Factory class/es to do the mappingSQL.xml lookup to generate a
mappingSQL object which would hold sql value.

Cheers!
Huy

Jean-Christian Imbeault <jean-christian.imbeault@(protected)> wrote:
Hi, I'm somewhat new to patterns and J2EE but I was wondering if someone
could help with a question I have.

I'm wondering if there are any patterns of practices that document ways to
extract SQL from code or that discuss if this is a good thing or not?

I have read the J2EE Patterns book and done a bit of research (especially on
DAO) but can find anything that talks about a total separation of SQL from
code. I am wondering is removing SQL from code (and possibly placing it in a
properties file or such) might be a good way of putting all the SQL in one
place to make changes (maintenance) easier.

The best I could find was this article which documents one approach but not
the pros or cons:

http://www.javapractices.com/Topic105.cjp

Thanks!

Jean-Christian Imbeault

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)


huy.nguyen

(t)+612 9271 3241 (e) d_huy_nguyen@(protected)


-- ---- ---- ---- ---- ---- -----
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway - Enter today

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
<DIV>You can use the mapping pattern i.e. mappingSQL.xml (which is configurable
) and then use&nbsp;Factory&nbsp;class/es&nbsp;to do the mappingSQL.xml lookup
&nbsp;to generate a mappingSQL object which would hold sql value.</DIV>
<DIV><BR>Cheers!</DIV>
<DIV>Huy</DIV>
<DIV><BR><B><I>Jean-Christian Imbeault &lt;jean-christian.imbeault@(protected)
.COM&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER
-LEFT: #1010ff 2px solid">Hi, I'm somewhat new to patterns and J2EE but I was
wondering if someone<BR>could help with a question I have.<BR><BR>I'm wondering
if there are any patterns of practices that document ways to<BR>extract SQL
from code or that discuss if this is a good thing or not?<BR><BR>I have read
the J2EE Patterns book and done a bit of research (especially on<BR>DAO) but
can find anything that talks about a total separation of SQL from<BR>code. I am
wondering is removing SQL from code (and possibly placing it in a<BR>properties
file or such) might be a good way of putting all the SQL in one<BR>place to
make changes (maintenance) easier.<BR><BR>The best I could find was this
article which documents one approach but not<BR>the pros or cons:<BR><BR>http:/
/www.javapractices.com/Topic105.cjp<BR><BR>Thanks!<BR><BR>Jean-Christian
Imbeault<BR><BR>==============================================================
======<BR>Companion Site: http://www.corej2eepatterns.com<BR>J2EE BluePrints:
http://java.sun.com/blueprints/corej2eepatterns<BR>List Archive: http:/
/archives.java.sun.com/archives/j2eepatterns-interest.html<BR>Unsubscribing:
email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)</BLOCKQUOTE><BR>
<BR><P><FONT face=Verdana color=gray>huy.nguyen</FONT></P>
<P><FONT size=1><FONT face=Verdana color=darkred>(t)<FONT color=#000000>+612
9271 3241</FONT> </FONT></FONT><FONT size=1><FONT face=Verdana color=darkred>(e
) </FONT></FONT><A href="mailto:d_huy_nguyen@(protected)"><FONT face=Verdana color
=blue size=1>d_huy_nguyen@(protected)</FONT></A></P><p><hr size=1><font face=arial
size=-1>Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/evt=23609/*http://promotions.yahoo.com/design
_giveaway/static/index2.html">Yahoo! Small Business $15K Web Design Giveaway</a>
- Enter today
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.