JSF Central - Daniel Lichtenberger talks [fleXive]
JSF Central

 
 Home 
 
 Products 
 
 Articles & Books 
 
 Resources 
Community Chat
 
Daniel Lichtenberger talks [fleXive]
by Kito Mann
28 Jul 2010 02:15 EDT

This podcast was recorded in April 2009, and [fleXive] has gone through some major changes since then. Here's the latest news from Daniel:Since the interview took place last April, we published our next major release, [fleXive] 3.1. It addresses some of the issues I discussed in the podcast:

  • Greatly improved performance for large datasets: a new storage engine (flat storage) enables us to store common data structures with very little overhead.
  • Additional databases supported: PostgreSQL, Oracle.
  • Additional application servers supported: Geronimo 2.2.

In this podcast, JSFCentral editor-in-chief Kito D. Mann talks with Daniel Lichtenberger about [fleXive] and its use of JSF. Daniel is a senior software engineer at the Vienna, Austria based software development company UCS -- Unique Computing Solutions. He develops enterprise software for the Java EE platform and has a keen interest in web technologies and agile development. This interview was recorded in April of 2009 at JSFDays in Vienna, Austria.


Podcast (MP3)
Welcome to the JSFCentral podcast #21 for the week of July 25th, 2010. This series of podcasts features interviews, news, and commentary for those working with JavaServer Faces technology.
Kito Hello my name is Kito Mann. I am here at JSFDays in Vienna, Austria in 2009. It’s April 2nd. I am here today with Daniel Lichtenberger, who is with Unique Computer Solutions (UCS). We are going to talk today about another open-source framework called fleXive. Daniel is the lead of the web JSF part of this. Daniel, why don’t you tell us more about yourself and what you do with UCS?
Daniel I am a software developer at UCS. I work mainly in the Java enterprise sector with web front ends so we do a lot of Java EE stuff, both Java Enterprise Edition 1.4 and now with fleXive, version 5. We do a lot of the front ends, now mostly with JSF, but previously also with Apache Struts. This is generally my field of work.
Kito Okay and how long have you been with UCS?
Daniel It is now almost 4 ½ years. When we started, we were with Java Enterprise Edition 1.4 and Struts, and we wrote huge applications with it, and then JSF came along and brought new changes.
Kito Let’s talk about fleXive itself. You guys released fleXive last year?
Daniel Yeah, September [of 2008] was the first major release.
Kito For those listeners that don’t know, explain what fleXive is.
Daniel fleXive was created from our experience in enterprise solutions with web front ends that use some kind of dynamic database as a back end, where you want to define your own types of data -- for example documents or personal data. You have to manage this, you have to somehow always write the front end for it, and you always have to add Enterprise features like security to control who can edit which fields. You have to add things like versioning or multilingual content, especially for web front ends -- this is a very common requirement. This was the setting that fleXive originated from. We wanted to create a solution that is usable to create applications in this area rapidly without having to reinvent the same things over and over again. We started to build a content repository with a set of Java Enterprise APIs. You can use these APIs to define you data types, to create structures that are then used for storing the data from the application. You can create the data, and you get all these features like versioning and so on for free basically. Then you usually have to write some kind of web front end, so what we decided to do was not to create another web framework, or another kind of full blown stack, to avoid being locked into the specific solution just because you want some features of fleXive. We decided to create a JSF component suite which offers you components for displaying data from the repository or for displaying edit fields. You can conveniently interact with the repository or create programs to interact with it.
Kito So when you say content repository, that brings up different ideas. One thing might be the Java content repository API, or big systems like Documentum or some of these newer content management systems like Alfresco, etc. So where does the fleXive content repository fit into that landscape?
Daniel The focus of the fleXive content repository is mainly on the definition of very fine structured data types. So for example, you have a person with several contact addresses and you can model this very easily without losing the ability to search for this content. You can still submit queries that get indexed by the backing database. It is always backed by a relational database. You can effectively work with this content. The main difference between large systems like Documentum or Alfresco is that we are not aiming to be a product that can be used for document management, but we want to deliver framework that can be used for modeling the core requirements of such a system. You may want to take fleXive and build something like Alfresco or Documentum, but you would have to add all these features that these products provide and fleXive doesn’t. fleXive is just the bare content repository which you can easily extend and so on, and which you can use in your web interface, but it’s not a complete product in this sense.
Kito Okay, so then how does that compare to the JCR standard? Java Content Repository.
Daniel We looked very closely at the JCR standard when we started fleXive, and we also repeatedly revisited the standard again, and now we are at the update specification for version 2 of the JCR. So basically it’s a similar approach in that we want to be able to define our data types at runtime, so that we don’t have fixed structures in the database or in the code. I think what differentiates us from the JCR is that the JCR is a model that is very much focused on the needs of content management systems, where you have your page tree or whatever, where you can define nodes and link between nodes, and of course all the mix ins and plugins for security and so on. We wanted to take a step back and provide a more generic solution where you don’t have to store your data in a tree, or where you have just the plain objects to play with. This is a personal opinion but we didn’t want to get tied up in the rather specific requirements that the JCR imposes on the implementation of the repository. It is a very detailed specification that leaves little room for your own approach.
Kito Okay, so with the fleXive content repository, I can take my normal graph of demand objects and persist them in presumably a way that is simpler than it might be if I just want to use Hibernate, right?
Daniel Yeah, with Hibernate it is a slightly different scenario, because with Hibernate you basically have to –or you can – map the main model into the Java objects, which of course is a very powerful feature, but which you often don’t want to do if you don’t know the structure of the data you are working with beforehand. This works best for user management or all kinds of stuff….
Kito Where you actually have a schema that you need to work with. So I guess the best way to look at this is kind of like an object repository that doesn’t require a fixed database schema.
Daniel Yes. It is mapped currently to a relational database so we have, of course, our own schema for storing the data, but if you make any changes to your data types, this works without having to modify the database schema.
Kito So are there any issues in terms of performance?
Daniel Performance is of course a critical issue. Currently we have a very generic approach, which works well for small to middle sized data sets, but if you have extreme amounts of data, or data that is difficult to handle for an existing relational database, then this will simply exceed the scope of the current implementation. It’s meant for storing things like documents, web pages, and contact data which has some natural limit in the scope of the application. You can’t just fill in data all the time and expect it to happen. But we have entered some kind of research mode recently where we reevaluated our mapping to databases, and we have some ideas that will greatly improve performance for larger datasets. We are aware that this is a problem if you work with real large datasets, that we are going to address over the next few months.
Kito Okay. So you have got the content repository where you can actually store data, and then you have the fleXive JSF components for working with them. Can you explain the different types of components again and how they interact with the repository?
Daniel Well the main focus is on components that allow you to display and edit content from the repository. So if you have a data type for the contact data of a person, you can load this content with a JSF component. You can then access the individual views of the content through a JSF variable that is stored in the current request context. You can access the individual fields either through output tags or through the map notation of JSF EL, where you just pass the X part of the requested property. Based on this, we then have components to render the information stored in this field. For example, we have support for binary properties where we can store images directly in the repository, so this component will then take the idea of the image and render a link to a servlet that delivers the image data to the browser, so you get an actual image tag that renders the content of the field. If you have a date property it will render a date picker component. So you don’t have to care at all, when writing the input form in JSF, about the actually type of data fields, so this can vary at runtime. Basically you really don’t have to care.
Kito So basically, just by using these components with the repository you get instant crud screens – create, read, update, delete?
Daniel Exactly. It is very easy. We currently don’t have a tool to do this automatically but it would be very easy to take the structure of a type and just render it in basic edit form.
Kito That was my next question. For a particular type, you don’t have a component right now that automatically goes through all the fields?
Daniel We have a generic editor component that takes the type structure and creates a dynamic editor.
Kito Okay.
Daniel What you can do then is to…for example, the support positions inside a content so you can say “okay first I want to have the title, then I want to have this paragraph, then I want to have another title.”
Kito So it’s like an ordering?
Daniel Yes it is an ordering, so you can move these fields inside the content. You can create new instances of the content if you have a field that can occur multiple times. It is a fully dynamic component. It’s great for getting a quick start but of course if you want to customize it, sooner or later you are going to have to use the markup-based version, where you specify the individual fields.
Kito That makes sense. The generic stuff can only go so far. It works great for back end applications though. Like if you have an administrator that doesn’t care if it looks great.
Daniel We actually have a back end administration application for exactly this kind of stuff. So it is a generic front to the entire repository where you can define your data types, you can create contents using the generic content editor, and you can create queries on the content and show the results.
Kito Nice.
Daniel It is especially important when you start with a new application, where you don’t want to write input fields for some parts of the data model that you know won’t be in the final application.
Kito Right.
Daniel You don’t have to write code to create this data; you can just use the user interface.
Kito That makes a lot of sense.
Daniel It gives you a great head start I think.
Kito Okay. You know it strikes me; this seems like something that would work really well for one of these next generation wikis, like XWiki, where you basically can build wiki pages dynamically by creating the structure of new pages and everything. It seems like it would work really well for something like that.
Daniel Okay, so you have a kind of model behind the wiki page.
Kito Right, so you can build simpler applications by designing pages.
Daniel That sounds interesting.
Kito It will work well for that kind of thing. So let’s say that I sit down and download fleXive -- and the site is called…?
Daniel www.flexive.org.
Kito Easy to remember. And I want to actually build a quick app. What do I do?
Daniel You have basically two options, you can either download the entire distribution, which is a zip file that has an Ant based built system, where you can create a new product – it’s called a product, but it’s a new project, actually, that uses fleXive which has predefined sensible defaults you might want to use in the application. The other way is to use the Maven repository, the Maven integration. fleXive is available as Maven artifacts. What it basically boils down to is that we have three main artifacts: the enterprise java bean artifact that contains all the content repository logic and database access, security, and so on.
Kito Is that for EJB 3?
Daniel EJB 3, yeah. So this delivers to you the whole functionality of fleXive if you want to use it in your own application. You can then use the JSF component artifact to add the JSF component suite so you have access to all these tags in your JSF application. You can also include the back end administration as a WAR type deployment. We also have…it’s mentioned in the reference documentation that we have an example archetype from Maven with an example EJB project where you have your own EJB module, your own WAR module and so on, and which is correctly set up to use the fleXive component.
Kito Okay, so it sounds like one of the requirements for running fleXive would be some sort of EJB 3 container.
Daniel Exactly
Kito Are there certain ones that it works with or that you have tested with?
Daniel Internally we develop on JBoss and GlassFish so it is constantly tested. We also use the OpenEJB container for integration testing. This works really well, it is very easy to set up, and is a high recommendation for anyone who tries to do this kind of stuff. When you use the Maven archetype from our website, you also have the predefined setup, where we use the Jetty Servlet container plugin in combination with OpenEJB to provide you with an integrated container to work with, so you literally only need Maven and Java to get started. It will fetch the dependencies and you use Jetty and OpenEJB for development.
Kito Okay, so if you look at all these different frameworks, there are things like Seam and there are things like the different elements of Spring, all of which work with JSF to some degree. It sounds like fleXive really isn’t competing with Seam or Spring or anything like that. It is basically providing the content repository and integration with the content repository.
Daniel It provides a separate functionality that may have use in Seam applications or not, but you can use it with a plain JSF application, as you can with Seam or whatever.
Kito Have you used it or found people using it with Seam or in an application that has Spring artifacts?
Daniel Not that I am aware of. We have a section in our documentation on Seam integration. At least we have tried it and it works. I am not sure about Spring and EJB integration; I have no experience in that.
Kito I must say that the documentation is very complete for a new open source project.
Daniel There is still a large part missing actually…
Kito At least for someone, there is at least stuff to read that gives you an idea about how it works.
Daniel Thank you, we spent some time on writing this documentation. It is not always fun but of course it is very important for someone who actually wants to work with it.
Kito Have you guys tested out the fleXive components inside a portal server?
Daniel No we haven’t. I have no data on this. I wouldn’t be surprised if there happens to be some strange things or it doesn’t work.
Kito There might be issues. Portal servers have a reputation for making things more complicated. I think you get a lot of benefits but nothing really works without changes.
Daniel Up until now, there really were no requirements, or requests for those requirements---we do not have much experience in this area.
Kito Okay, fair enough. The other thing I am wondering was how the fleXive components work with other JSF component suites. If I am using RichFaces or something, can I be sure that the fleXive components will work with them?
Daniel Yes, there will be no problems. In the back end application we also use RichFaces so it works without a problem. We also don’t really add features that depend on the JSF infrastructure, like Ajax links or something like that. We just write our own plain JSF components and Facelets templates and so on. We do not require RichFaces or anything, so it basically should work with any JSF framework out there.
Kito That’s nice to hear. Avoiding Ajax can be very useful in term of JSF component interoperability. I think those are really all the key questions I have right now. Anything else you want to add, Daniel?
Daniel Well if you want to try it out, I would recommend -- if you are familiar with it -- the Maven approach, because it gets you started really quickly. You have such nice features as editing. If you start a Jetty container and you edit the XHTML files and the WAR module, these changes get reflected immediately without having to do anything, because the container just listens on the source directories if there are any changes.
Kito Cool.
Daniel It uses an embedded database, the H2 database engine.
Kito That does bring up another question. What sort of databases do you guys support?
Daniel Currently only MySQL and H2. The infrastructure is there for supporting multiple databases -- obviously it was there from the beginning -- but it still takes some time to get over all the… especially more complicated statements and there is some overhead involved with adding support for additional databases. So far MySql has worked really well considering the requirements. We plan to add support for additional databases but right now it’s just these two.
Kito Alright, so if you are interested in a very flexible content repository with integrated JSF support you should definitely check our fleXive at www.flexive.org. It has been a pleasure chatting with you Daniel and I hope you enjoy the rest of your stay – you are actually local to Vienna, right?
Daniel Yeah.
Kito So it’s not really a stay for you. I hope you enjoy the rest of the conference.
Announcer That's it for this edition of the JSFCentral podcast. The music for this podcast was composed and performed by Kito Mann. Thank you for listening.


RSS feed(all feeds)

The Editor's Desk
Podcasts
Inside Facelets
In the Trenches

Site version 1.83  Report web site problems

Copyright (C) 2003-2015 Virtua, Inc. All Rights Reserved. Java, JavaServer Faces, and all Java-based marks are trademarks or registered trademarks of Oracle Corporation. in the United States and other countries. Virtua, Inc. is independent of Oracle Corporation. All other trademarks are the sole property of their respective owners.