4 May 2007 9:14 AM #1
New Java API idea: ext4j
Hey you all!
I think there are a lot of people here that use Ext with Java on the server side. Last week I started the development of ext4j (that the name I gave, suggestions of a better name are welcome). The ideas of this API are:
- To provide integration with the most used Java frameworks such as Struts2/WebWork (already start to develop this integration and the first tests gave great results, I'm able to use the standards Struts tags such as s:form, s:textfield and get the content generated with Ext functionalities), DWR, JSF and others.
- To provide integration with any I18N adapter (JSL, Struts...) that is being used.
- Some annotations to deal with forms in a easier and interactive manner (I'll explain this one better later).
This weekend I'll finish the Maven configuration and will commit the project to any Subversion or CVS available (any suggestions???). The idea is to have a well-documented project, easy to use and to plug in any project. I'd like some suggestions and to know people that are interested in participate in this project. Thanks for the attention again people! Up the Ext! Cya!
4 May 2007 11:28 AM #2
I am in :-) for EXT4J
Nice to see your post, I have been using Yahoo UI, EXT a lot for developing new JSF/Facelets Components,(Facelets is a templating framework); I use Ext a lot that's integrated with Server side J2EE.
I Love the idea and will be looking forward to help.
I am looking forward for the maven configuration
4 May 2007 9:18 PM #3
I don't think the custom tag is a good idea. Forget the Struts, WebWork and JSF, there are out.
Write Ext's style codes are quite simple and elegant.
I have already written a java framework to integrate ext and java.
The core idea is there is a JsonServlet that support the JSON data serialize/deserialize. And call backend java service or actions. That
4 May 2007 10:27 PM #4
- Join Date
- Mar 2007
- Notts/Redwood City
- Vote Rating
On the contrary, I think custom tags are an excellent idea. They can be used to encapsulate a load of design-time instructions and when executed, can collect metadata about their attributes, and create complex markup and script.
I think a fully integrated Java/Ext framework is an excellent idea.
I'd like it to also integrate Hibernate for easy access to a database.
With Hibernate, it would be a doddle to create a tag which could create a Grid from tags and attributes that are an analogue of Hibernate capabilities like the Hibernate "Criteria", "Restrictions" and "Projections" classes:
<ext4j:Grid entity="Customer"> <ext4j:column property="name" header="Name" width="100"/> <ext4j:column property="language.name" header="Language" width="100"/> <ext4j:restriction type="LIKE" property="area.code" value="NG%"/> <ext4j:order property="name" direction="ASC"/> </ext4j:Grid>
List results = session.createCriteria(Customer.class) .setProjection( Projections.projectionList() .add( Projections.property("name")) .add( Projections.property("language.name")) ) .add( Restrictions.like("area.code", "NG%") ) .addOrder( Order.asc("name") ) .list();
That could be exported via DWR, or Json or XML.
5 May 2007 5:58 AM #5
Sencha Co-Founder, Ext JS Founder
Original author of Ext JS 1, 2 & 3.
5 May 2007 7:42 AM #6
Writing web apps on the server side
Hi to All,
On the other hand if someone would like to develop a basic EXT based app having a tag based server side approach can be a big help for developers.
5 May 2007 9:15 AM #7
And again, why not provide integration with well-spread-known frameworks like Struts, DWR, etc? I want to provide an ext4j integration on the server side (something like the JsonServlet you've mentioned) to use it as a stand-alone framework, but imagine a project that is already using a framework and want to use ext4j? Also, imagine an big organization that has a well defined architeture and they must use Struts2 (that's my case, for example) and they want to use ext4j... so I see the ext4j integration with famous frameworks a MUST HAVE feature... I've already implemented part of the Struts2 integration and it's working great!
Animal, those are really good ideas! I'll set up the project and then we can start to discuss the scope for the first version... my ideas:
- custom tags: form, textfield, numberfield, datefield, select, textarea, checkbox, radio, button (togglebutton), grid, collumn, editableColumn (not sure about this one), tabbedPanel, tab, toolbar, menu, menuItem (maybe subclasses of it too), tree (not sure how to design this tag yet), dialog (not sure about this one too)... and some layout tags maybe
- provide a request handler that output data (java objects) as JSON (a very simple implementation to use ext4j as the only framework;
- provide integration with frameworks, initially: Struts2/WebWork, JSF, DWR, Hibernate
5 May 2007 12:57 PM #8
5 May 2007 6:24 PM #9
Hi Daniel & Animal
As you said, the JSP custom tags can encapsulate some logic and auto generate some codes for common programmers. These tags do reduce the client side code lines. But the custom tags also have drawbacks:
2. The custom tag is hard to extend for users. These tags define a rule, all things must obey the rule, and otherwise, they need another tag. Please see example below.
3. Custom tags also need time to learn. More features your tags can support, more hard to learn your tags. At the same time, the programmers also need to learn EXT.
A clean and simple client side programming model can also reduce programmers
5 May 2007 10:08 PM #10
- Join Date
- Mar 2007
- Notts/Redwood City
- Vote Rating
Interesting concepts David. I like the idea of a HibernateStore which provides access to an org.Hibernate.Query. I'll give that some thought at work.
But tags are simple for, as you put it "common programmers" who are the ones I'm really thinking about. We are going to have probably in the thousands of pages in the app eventually. Our current application is very large. And the people who will be writing it and maintaining it are ... well... "pedestrians"?
Thread Participants: 33
- jack.slocum (1 Post)
- JeffHowden (2 Posts)
- Animal (7 Posts)
- tryanDLS (1 Post)
- firstname.lastname@example.org (1 Post)
- buzz (1 Post)
- alien3d (1 Post)
- cilquirm (2 Posts)
- mystix (1 Post)
- heidtmare (1 Post)
- DavidHu (2 Posts)
- Foggy (1 Post)
- XASD (2 Posts)
- ffzhuang (1 Post)
- AlexKiss (1 Post)
- satishmummadi (1 Post)
- IGx89 (5 Posts)
- mjoksa (5 Posts)
- Ronaldo (2 Posts)
- mglaser (2 Posts)
- quentin (1 Post)
- wxz20032003 (1 Post)
- mallim (3 Posts)
- bouboux (1 Post)
- claudiobosticco (1 Post)
- ryoung2504 (1 Post)
- Lobos (2 Posts)
- SeanBlader (1 Post)
- jschanhals (1 Post)
- random0xff (1 Post)
- hgomez (3 Posts)
- miketech (1 Post)
- Ekambos (1 Post)