Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

DWR and Script.aculo.us now included in AppFuse and Equinox

Last night, I integrated DWR into both AppFuse and Equinox. AppFuse has had Script.aculo.us integrated since 1.8.2 and it's been great to work with - so I added it to Equinox as well. I added these with the philosophy that it's easier to remove them than to add them.

Thanks to Joe Walker (DWR), Thomas Fuchs (Script.aculo.us) and Sam Stephenson (Prototype) for authoring (and supporting) these great open source projects.

Next up: integrating Ivy (or Maven 2's Ant Tasks) for downloading dependencies. Hopefully both will still allow bundling JARs in a release so both AppFuse and Equinox can stick with the 1-download-to-get-everything philosophy. The main reason I'd like to integrate a dependency downloading tool is to reduce AppFuse's size in CVS, as well as make it easier to upgrade dependencies.

Posted in Java at Oct 10 2005, 09:40:33 AM MDT 14 Comments
Comments:

My vote would be for Maven2. FWIW.

Posted by D'Andrew on October 10, 2005 at 03:33 PM MDT #

Hi Matt,
I just installed the latest version from CVS with DWR included. I was wondering wether there was already a way to see it "in action" when appfuse is deployed?
Thanks,

Thomas

Posted by Thomas on October 12, 2005 at 01:49 AM MDT #

I can´t get your app to work, I´m using IntelliJ Idea to deploy the app and I get these errors when tring to add a user (in a alert window): org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update: 0 expected: 1; nested exception is org.hibernate.StaleStateException: Batch Update returned unexpected row count from update: 0 actual rowcount: 0 expected: 1 /Mikael

Posted by Mikael on October 12, 2005 at 02:49 AM MDT #

Thomas - after deploying, go to http://localhost:8080/appfuse/dwr to see if things are working. Of course, you could also just read the instructions on DWR's website. ;-)

Mikael - please post these types of issues to the mailing list for the project you're working with. If you could include detailed steps to reproduce it'll be easier for us to diagnose your problem.

Posted by Matt Raible on October 12, 2005 at 05:39 AM MDT #

Dear,mraible My name is xiaofeng lu. I am one java engineer in china, with the appfuse document Chinese translator michael.duan and rocksun is good friend, now I builded one appfuse Chinese website, hoped promotes appfuse in China application, hoped is under your authorization. Moreover about yours book 'springlive', in Chinese also some readers, I has how only then to be able to be under your authorization, in order to I can as well as translate the book English edition to Chinese edition and puts to my website? Anticipates your reply,thanks. Website: http://www.kingbit.com/appfuse/index.php or http://appfuse.kingbit.com/ or http://www.kingbit.com/appfuse/ Regards, ?lxf [email protected] ?2005-10-12

Posted by xiaofeng lu on October 12, 2005 at 06:22 PM MDT #

Xiaofeng - Wow! Thanks for promoting AppFuse in China - it looks like you've done a lot of work. Let me know if there's anything I can do to help. As far as translating Spring Live - please Contact SourceBeat to get more information. You can also e-mail Matt Filios (matt - sourcebeat.com) or James Goodwill (james - sourcebeat.com) directly.

Posted by Matt Raible on October 13, 2005 at 08:57 AM MDT #

D'Andrew:

I hope you didn't get the impression that I was migrating the entire build system to Maven. I simply said I was going to use "Maven 2's Ant Tasks". ;-)

The problem with migrating to Maven is most users prefer Ant (including myself). If I do migrate, I'll migrate to Maven 2 (Maven 1 is too slow IMO) and maintain Ant support as well.

This is probably quite a bit in the distance b/c it'll require restructuring many of the directories, from src/dao, src/service to something like modules/data and modules/web. And then there's the question of iBATIS and the 4 other web frameworks. In a perfect world, it wouldn't be hard to do modules/hibernate, modules/ibatis, modules/webwork, etc. and somehow allow users to pick and use which JARs and web module to use for their project - so an AppFuse project could still use modules/data and modules/web for their two components.

In other words, it's a lot of work to do it right. I'd prefer to do baby steps right now with dependency downloading. Ideally, I could do a pom.xml - but that doesn't allow separate dependency groupings (i.e. dao.dependencies) and I'd either have to do the directory breakup now (with multiple poms) - or I can just declare all the dependencies in my build file - which is likely what I'll do.

Posted by Matt Raible on October 13, 2005 at 09:00 AM MDT #

Here is a quick setup to get onto DWR on AppFuse:- http://lifeasastruct.blogspot.com/2005/10/ajax-on-appfuse.html. Thanks for the dynamic AppFuse, Mr. Raible.

Posted by Vui Lo on October 17, 2005 at 07:19 PM MDT #

matt,Thank you for reply.

In order to cause the more Chinese java engineer to participate in the website construction, can you put one link[ AppFuse in china -> http://www.kingbit.com/appfuse/index.php ] on yours website? when they are visiting your website to knows "AppFuse in china ".

In your website content issues in 'appfuse in china' website, whether needs your authorization? if the need, please sends one authorized book gives me. thanks.

Posted by xiaofeng lu on October 17, 2005 at 11:32 PM MDT #

Hello Mat, Something's wrong with this build. As Michael mentioned above.. when we tried to add a new user there's an error (in a alert window): org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update: 0 expected: 1; nested exception is org.hibernate.StaleStateException: Batch Update returned unexpected row count from update: 0 actual rowcount: 0 expected: 1 even the demo site has this bug: http://demo.raibledesigns.com/equinox-ajax/editUser.html Do you have an idea what's causing this? My development server is running on MySQL database btw. I wonder what db the demo site is using. Anyway, great job on Equinox... I'm planning to use it on my next project. Cheers, Syo

Posted by syo on October 19, 2005 at 08:53 AM MDT #

Syo - the problem appears to be that DWR sets the "id" probably to something other than null. Modifying the <em>saveUser()</em> function to check for an empty id and nullifying it fixes the problem:

function saveUser() {
    if (validateUser(document.forms['userForm'])) {
        user = { id:"", firstName:"", lastName:"", birthday:"" };
        DWRUtil.getValues(user);
        if (user.id == "") user.id = null;
        if (user.birthday == "") user.birthday = null;
        else user.birthday = Date.parse(user.birthday);
        ...

There might be a better way to instantiate the user object in JavaScript - I'm not sure.

Posted by Matt Raible on October 19, 2005 at 09:05 AM MDT #

Xiaofeng,

<em>> In order to cause the more Chinese java engineer to participate in the website construction, can you put one link
> [ AppFuse in china -> http://www.kingbit.com/appfuse/index.php ] on yours website? when they are visiting your website
> to knows "AppFuse in china ".

> In your website content issues in 'appfuse in china' website, whether needs your authorization? if the need, please sends
> one authorized book gives me. thanks.</em>

I don't have a problem with you using AppFuse's name, or promoting "AppFuse in China". I'll definitely link to it and tell users to check it out - but IMO, there's no reason to make any site an official (language) site for AppFuse. I think if there are no official sites, there will be more competition to be the "best" site. ;-)

As far as the book is concerned, that's an issue for SourceBeat. I'll forward your offer to translate to the leaders of the company. In the meantime, could you please remove the translated PDF from your website. Thanks.

Posted by Matt Raible on October 23, 2005 at 10:47 AM MDT #

[Trackback] Dejan Bosanac recently posted about integrating Spring and with the Java ajax library DWR. His entry builds upon previous work done by Bram Smeets, and Bram actually comments on some possible improvements to Dejan's setup. Bram is also working...

Posted by Ajaxian on December 12, 2005 at 08:47 AM MST #

who can help me? when I use hibernate and spring to consturct my web project ,it brings to following exception messages,if somebody knows the resean,please tell me,I will thank for you heartly! org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1 org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:649) org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:715) org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:592) org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:500) org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:473) org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:266) org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) $Proxy2.saveUser(Unknown Source) org.mogaoxi.web.UserAction.save(UserAction.java:105) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274) org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194) org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Posted by 61.144.29.101 on August 07, 2006 at 04:08 AM MDT #

Post a Comment:
  • HTML Syntax: Allowed