This week's giveaway is in the Beginning Java forum.
We're giving away four copies of Bad Programming Practices 101 (e-book) and have Karl Beecher on-line!
See this thread for details.
Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!

Karthik Guru

Ranch Hand
+ Follow
since Mar 06, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Karthik Guru

I have been looking at jQuery for a week now and I like the way you can get lot of things done with a few lines / words!
The plugin mechanism is nice. But I have a concern. I find that the event handlers and callbacks are coded in-place like so -

$('.somediv').hello()
.bind("event1",function(){
//do something
}.bind("event2",function(){
//do something
});

OR

$('somediv').ajax(
onComplete:function(){

},
onError: someFunction
)

function someFunction(){

}


I would imagine in a larger application, this could lead to lot of procedural functions in the JS file. I was wondering how easy would it to be move these callbacks to may be a Javascript class or something and bind the event handlers to instance methods without a lot of work - I know that I can create a closure / something and delegate the call to the an object instance method.

What has been your experience working jQuery in this respect - developing apps with significant amount of JS/client code. How did you manage to keep related code together in jQuery. Did it make it harder to maintain?

I need some design patterns/ tips on developing large JS applications using jQuery.

We know what Struts / Spring MVC does to Java web applications - it tries to formalize a certain design pattern for developing 'server-side' java web applications. Has there been an attempt to roll out a similar framework on top of jQuery ? -
I mean a client side design pattern that will lead to maintainable code with jQuery / prescribed way of developing large JS heavy apps with jQuery.


thanks
Karthik






I believe Seam plans to offer first class support for Apache Wicket and GWT as a view technology. Is there something inherent in Seam that makes it suitable only for component based frameworks and not for say traditional request/response like Struts, Spring MVC et all.
If you want to build a redistributable ear, I think you should look at maven assembly plugin.
10 years ago
Authors,

Can you please take a look at this and offer your comments?
I know that majority of what is written there is based on Struts1.

If I were to pick a Model2 framework , I think I would pick stripes - just seems clean , simple and cool. But I would like to know how Stripes compares with Struts2 though.

Well, it's a different matter altogether that Apache Wicket remains my personal favorite.

thanks!
Karthik
10 years ago

Working though the example in Chapter 7 of "Enjoying web development with Tapestry" yields no such error.


Probably because you are missing the page specification file (.page) where you specify the type of the component. But you could as well do

<component id="eachEntry@For" value="For">



Tapestry is confusing how it "connects" the html to the Java file especially with all the abstract definitions and the things going on behind the scenes. A bit opaque.



Give Apache Wicket a try - you might be pleasantly surprised. It borrows couple of good ideas from Tapestry while adding its own and offers a nice programming model. So you will be fine + none of the tapestry magic that leaves you confused exists !
I have a simple Hibernate Interceptor where I override the methods

onFlushDirty and
onSave

In this method i set the last modified date / last modified by / created date/created by on the POJOs. I see that Hibernate does call this interceptor when i do HibernateTemplate.save / HibernateTemplate.update.

The POJO's 'lastmodifieddate' and the 'lastmodifiedby' fields do get updated in the interceptor and i return 'true' from onFlushDirty and onSave methods.

But when hibernate subsequently flushes the SQL to the DB, these fields turn out to be null( The update SQL trace shows null as the value for the 'lastmodifieddate' and the 'lastmodifiedby' fields)

I also observed that the object being supplied to the interceptor is same as the one supplied to HibernateTemplate.save / update.

Any idea what might be going wrong here?
Providing a ThreadLocal example would be trivial. But I believe, you would want to read this
article first.
You need to attach the logged-in User object to a ThreadLocal in the web tier. You can then access the User object in the interceptor on the Spring Business tier layer.
Download the jBPM starters kit . Actually just follow this
Ok Saurabh, so you want to programmatically change the user locale based on the user-selection. Unfortunately, I have very limited Tapestry knoweldge ( I moved on to something else ).
Try directing this question at tapestry user list. I'm sure you should get a real quick response. Yes the property files need to be named as per convention.
If yuo have something like this -

Name : <input type="textfield" ../>

Try changing it to -

<span key="name"> : <input type="textfield" ../>

where 'name' is the key in the properties file that you created.
and yeah to answer your other question - Tapestry will pick up the locale specific property file depending upon the user locale configured through the browser.
[ September 25, 2006: Message edited by: Karthik Guru ]

Originally posted by Manish Hatwalne:


You bet!!! )
Funny & ayt times annoying to see prejudices & conclusions/statements coming from them despite repeated education on Inida, its culture and all that.

- Manish



Oh yeah! That reminds me of 'discovery channel' doing a feature on Kerala proclaiming, "Elephants are very important to the Indian people".
11 years ago
Ok this is my understanding and I might be wrong.
Other than the issue of wiring the Aspect itself (runtime , compile time etc),
isn't the pointcut definition that is crucial for any AOP implementation?
So when you say 1000% , does it mean that you are looking for a AOP framework that offer most flexiblity when it comes to pointcut expressions?

I know this doesn't answer your question but atleast it can have some discussion going.
If you need a decent level of separation of roles between your HTML designers and Java developers, then Tapestry,Facelets and Wicket are probably your best bet. I don't know how easy it is to write custom components or extend the existing ones in Tapestry and Facelets. In Wicket, ofcourse its super easy. Just plain vanilla HTML backed by a subclass of Wicket's Border or Panel class as the case may be. So you can give Wicket a try right away or wait for a month may be and check thisout
Most java developers love to keep things in Java. Personally, I feel that Wicket is more likey to keep your designers and Java guys happy. Wicket integrates well with Spring and Hibernate and ofcourse you can get to Hibernate through Spring which i believe is a widely follows practice. So you have that side covered too.

Originally posted by shan hosur:
I think we need to add webmethods in to our forum,since there is no resource for this Topic.



Sometimes its nice to have your employer name mentioned
That's besides the point : wM Users forum is what you are looking for then.
12 years ago