Showing posts with label appfuse. Show all posts
Showing posts with label appfuse. Show all posts

Spring-RCP using AppFuse webservices

To build a classical 3-tier architecture, you can use AppFuse as a back end. This full-featured web-framework provides many time-saving features, additionally it's very easy to export the managers as webservice and use them as a backend to your Spring-RCP application.

AppFuse as backend for Spring-RCP Standalone

To easily build a fully working backend for Spring with database access and services, you can use an AppFuse backend. As it's based on Spring, it is very easy to integrate with Spring-RCP.

UserDetails from LDAP and Database

A drawback of the LDAP authentication approach is, that roles and other user details are only retrieved from the LDAP server (plus it breaks the user counter, as it casts to org.appfuse.model.User). You might have the wish, to define additional properties or assign roles just available in the application scope. For this purpose I extended the base LdapAuthenticationProvider to integrate with AppFuse and return User objects, carrying merged data from the LDAP directory and the database.

LDAP-Authentication with Active Directory

This post describes how to integrate Spring/AppFuse applications with a Windows Active Directory server (tested with Windows 2003 server).

Webservices with HttpInvoker

It's easy to export the AppFuse managers as a webservice to various clients using Spring remoting.

The HttpInvoker

If you only have Java clients, the easiest solution for exporting managers is using the HttpInvoker. As it uses Java serialization, you don't have to care about object mappings or conversions. Additionally, by using HTTP as a protocol, it's trivial to allow access to the services via a proxy. If you later on wish to change the protocol (e.g. to allow non-Java clients to access your services), Spring makes it easy to replace the remoting protocol by only changing one line in a config file.