Re: WO vs JSP
Re: WO vs JSP
- Subject: Re: WO vs JSP
- From: Dov Rosenberg <email@hidden>
- Date: Thu, 10 Jun 2004 21:31:01 -0400
Why does it have to be one or the other? We use both JSP and WO and it works
great together!! WO gives you the best data access framework on the market,
JSP gives you access to all platforms and lots of trained developers. You
will really appreciate the power of WO the first time you do nonsense like:
JDBC: Get a password
String result = null;
Connection conn = this.getConnection();
Statement stmt = null;
ResultSet resultset = null;
if (conn != null) {
try {
stmt = conn.createStatement();
String sql = "select password from users where username='" +
userid + "'";
resultset = stmt.executeQuery(sql);
if (resultset != null) {
while (resultset.next()) {
result = resultset.getString("password");
break;
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (resultset != null)
resultset.close();
if (stmt != null)
stmt.close();
if (conn != null)
conn.close();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
Versus WO/EOF
NSArray results = null;
try {
EOKeyValueQualifier q = new
EOKeyValueQualifier("userId",EOQualifier.QualifierOperatorEqual, userID);
EOFetchSpecification fs = new EOFetchSpecification("Users", q,
null);
fs.setIsDeep( false );
results = ec.objectsWithFetchSpecification(fs);
} catch (Throwable t) {
t.printStackTrace();
}
If that is not enough to convince you, try doing form processing using
Struts versus writing a couple lines of code in a DirectAction. If you ar
estill convinced that JSP is the complete answer or are getting paid by the
hour - have a good life behind a computer, I'm way beyond that now. Work
smarter - not harder.
--
Dov Rosenberg
Conviveon Corporation
http://www.conviveon.com
On 6/10/04 6:43 PM, "Arturo Pirez" <email@hidden> wrote:
> On Jun 10, 2004, at 6:12 PM, Lotsa Cabo wrote:
>
>> I'm split between doing strict JSP or WebObjects.
>
> Current webobjects can be hosted within various servlet environments,
> or so the documentation claims. So that's not a reason to choose one
> over the other.
>
> Current webobjects can be written&deployed as JSP tags, so that's not a
> reason to choose.
>
> In order to provide the functionality of WO, you'd need to include
> something like Struts and Cayenne in the comparison.
>
> WO, in my experience, is 3-10X more productive than Struts/JDBC.
>
> Hey! Didn't you ask this question before, when you started evaluating
> WO?
>
> ----
> WO in philadelphia - wanna cheesesteak with that?
> Please visit webobjects.meetup.com.
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.