PDA

View Full Version : Ext JS to EJB Integration



vanuatoo
20 Sep 2013, 10:53 PM
Hello,

I'm a newbie to Ext JS.
I want to use Ext JS as a front and do business logic on Java EE side.
What framework/pattern would you suggest for that?
I would be happy to avoid lots of boilerplate code.

Gary Schlosberg
25 Sep 2013, 8:02 PM
I don't personally know much about Java but have you seen this?
http://www.sencha.com/products/gxt/

vanuatoo
25 Sep 2013, 10:00 PM
I know this product but it's not what I want.

ettavolt
27 Sep 2013, 12:20 PM
If you want every action to be processed by server you should not use MVC-loaded client-side frameworks like ExtJS is.
True ExtJS way is to use service mostly for persistence/synchronizing with other users and third-party integration.

vanuatoo
28 Sep 2013, 8:00 AM
I want to use ExtJS MVC but for the persistence and business logic use EJB.
Most probably I need to know how to call up Session Beans.

mehdiraza
29 Sep 2013, 11:22 AM
I think there is a misunderstanding, ExtJS is no replacement of EJB or any server side persistence model.

I am also using ExtJS for a web application where my backend is java/spring/mvc with JPA used for persistence. I am using ExtJS MVC for UI layout controller, views, and store/model. It helps you to build UI quickly with prebuilt widget controls and a nice event model. But at the end it will send a AJAX call and let server handle the request the way it wants whether using EJB or anything else.

Hope it helps.

vanuatoo
29 Sep 2013, 11:23 AM
This is exactly what I want.
My question is which technology to use to call EJB?
I don't want to use Web Services.

mehdiraza
29 Sep 2013, 11:24 AM
If you are using Spring, you can autowire your @Service in your MVC RequestMapping and call the service methods which in-turn can call your ejb methods inside.

ettavolt
30 Sep 2013, 4:00 AM
You can establish only HTTP(S) connections from within the browser (with possible upgrade to WebSockets). So you will definitely need to make your beans accessible as Web Services.