667481 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

News News News Messages: 12 Messages: 12 Messages: 12 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

Light: an Ajax and Java based open source portal framework

Posted by: Jianmin Liu on July 06, 2006 DIGG
Light is an AJAX- and Java-driven portal framework. One of its unique features is that it can be turned on when users need to access their personalized portal and turned off when users want to do regular business processes.

Since last year, I have been working at a project. This project's mission is integrating a few Java EE web applications with Single-signon technology and also upgrading these Java EE web applications. The new integrated Java EE web application will be used by organization's internal employees and customers, and I thought it would be nice to integrate with a Portal application; it will attract customers and give flexibility to the users. So I started to evaluate some popular open source portal products and frameworks. After reading documents and testing the demos, I found out the following results:
  • It's very hard to integrate existing web application with portal application. It needs to change existing code to conform to java portlet api.
  • Most portal application is too heavy, not just a nice feature of existing web application.
  • page based portal application's performance is slow when one page contain many portlets.
After I got these results, I decided to create a new lightweight portal framework. It must be easy to plug in to any existing java EE web application or as an independent portal application and the performance should be acceptable. That's the reason the Light framework come out; it can be turned on or off based on needs.

A live demo is available, and "Introduction to the Light framework.html" offers more detail about the project.

Benefits of Light
  • Ajax and Java based Portal framework.
  • Support JSR 168 Portlet API programming model.
  • Can be seamlessly plugged in to any Java EE Web Application or as an independent web application.
  • Supports turn on and turn off feature.
  • Supports Portal Personalization.
  • Supports Portal Security.
  • Supports multiple layouts, and looks and feels, also supports custom looks and feels.
  • Supports multiple Portlet window styles, also support custom window styles.
  • Portlets support VIEW,EDIT and HELP mode, also support custom portlet modes.
  • Portlet's Window states include NORMAL, MINIMIZED, MAXIMIZED, also support custom portlet window state.
  • Portlet's Window supports functions include minimize, maximize, close, refresh, auto refresh, move.
  • Portlet can be configured to refresh other Portlets within this page.
  • Build in with many utility Portlets.


Message was edited by: joeo@enigmastation.com

Threaded replies

·  Light: an Ajax and Java based open source portal framework by Jianmin Liu on Thu Jul 06 08:16:45 EDT 2006
  ·  Re: Light: an Ajax and Java based open source portal framework by brian mcsweeney on Thu Jul 06 09:07:19 EDT 2006
    ·  Single Sign On and Portal. by Jianmin Liu on Thu Jul 06 10:14:49 EDT 2006
  ·  Re: Light: an Ajax and Java based open source portal framework by Irakli Nadareishvili on Thu Jul 06 21:38:14 EDT 2006
    ·  Light Portal supports customized theme by Jianmin Liu on Fri Jul 07 00:41:15 EDT 2006
  ·  Re: Light: an Ajax and Java based open source portal framework by S H on Fri Jul 07 02:36:57 EDT 2006
  ·  What do you think about WSRP? by MOHAN RADHAKRISHNAN on Fri Jul 07 02:37:31 EDT 2006
    ·  Which framework ! by Faisal Abdelli on Fri Jul 07 04:30:22 EDT 2006
      ·  Ajax framework by Jianmin Liu on Fri Jul 07 10:25:14 EDT 2006
      ·  new powerful j2ee framework (shine framework) by alen smith on Fri Dec 05 18:51:30 EST 2008
  ·  Re: Light: an Ajax and Java based open source portal framework by Haibo Qiao on Fri Jul 07 05:47:34 EDT 2006
  ·  You should add it to the list of Portal apps out there by Venkatt Guhesan on Fri Jul 07 08:12:58 EDT 2006
  ·  Very good idea by jim woods on Mon Jul 10 22:54:41 EDT 2006
  Message #212979 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Light: an Ajax and Java based open source portal framework

Posted by: brian mcsweeney on July 06, 2006 in response to Message #212926
Interesting project. Definately fills a gap. Lots of the current solutions are a bit heavy for sure.

Can you tell me what solution you decided on for the single sing on with existing webapps?

We're currently going through the same problem at the moment and have several webapss which all need single sign on through a portal front end. I see two major design issues here:

a) Single sign on technology - eg, acegi, CAS, JAAS etc

b) the database structure for storing the account information. For example, if we assume that the webapps can work independently as well as through the portal, perhaps they all have separate users, accounts, roles etc. Possibly LDAP can be used to manage all these for all the webapps. Alternatively, perhaps you just store 1 set of users/accounts etc.

thanks very much and well done,
brian

  Message #212990 Post reply Post reply Post reply Go to top Go to top Go to top

Single Sign On and Portal.

Posted by: Jianmin Liu on July 06, 2006 in response to Message #212979
Interesting project. Definately fills a gap. Lots of the current solutions are a bit heavy for sure.

Can you tell me what solution you decided on for the single sing on with existing webapps?

We're currently going through the same problem at the moment and have several webapss which all need single sign on through a portal front end. I see two major design issues here:

a) Single sign on technology - eg, acegi, CAS, JAAS etc

b) the database structure for storing the account information. For example, if we assume that the webapps can work independently as well as through the portal, perhaps they all have separate users, accounts, roles etc. Possibly LDAP can be used to manage all these for all the webapps. Alternatively, perhaps you just store 1 set of users/accounts etc.

thanks very much and well done,
brian


For answer your questions:

a) The solution I decided on for the single sign on with existing webapps is using acegi and CAS.
1. central user accounts info into one location(database or LDAP)
1. create a central authentication web app using acegi and CAS.
2. config other web apps which needs SSO using acegi.(these web apps don't need to have login page, all use CAS web app's login page)

b)For integrating existing web apps and this portal framework is really depend on what's security framework used in existing web apps and requirements. This portal framework currently support user based personalize, it will support role based personalize in next version.

thanks for your comments

  Message #213035 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Light: an Ajax and Java based open source portal framework

Posted by: Irakli Nadareishvili on July 06, 2006 in response to Message #212926
Does not look good at all. Sorry.

  Message #213039 Post reply Post reply Post reply Go to top Go to top Go to top

Light Portal supports customized theme

Posted by: Jianmin Liu on July 07, 2006 in response to Message #213035
Does not look good at all. Sorry.


Light Portal framework supports customized portlet window style, look and Feel, Layout. Developers can customize a beautiful UI based on Light Portal framework.

One purpose of Light Portal framework is giving another design option to integrate existing Java EE web app with a portal app without change existing code.

The other purpose is easy to build an independent Portal app using Ajax and java (enjoy the performance and RIA). Developers don't need to start from scratch.

  Message #213042 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Light: an Ajax and Java based open source portal framework

Posted by: S H on July 07, 2006 in response to Message #212926
Very interesting indeed. I have similar experiences with current portal implementations. I will definitely take closer look at this one.

  Message #213043 Post reply Post reply Post reply Go to top Go to top Go to top

What do you think about WSRP?

Posted by: MOHAN RADHAKRISHNAN on July 07, 2006 in response to Message #212926
We have been trying to use WSRP for our portal but the current version has a few drawbacks. Information about how to integrate SAML and WSRP, file attachments using WSRP etc. is scarce. There is no activeuser list.


Thanks,
Mohan

  Message #213047 Post reply Post reply Post reply Go to top Go to top Go to top

Which framework !

Posted by: Faisal Abdelli on July 07, 2006 in response to Message #213043
Now that I have to start learning Ajax, I am need to know which framework to use with Java.
Any suggestion?

  Message #213050 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Light: an Ajax and Java based open source portal framework

Posted by: Haibo Qiao on July 07, 2006 in response to Message #212926
Interesting stuff indeed.

  Message #213056 Post reply Post reply Post reply Go to top Go to top Go to top

You should add it to the list of Portal apps out there

Posted by: Venkatt Guhesan on July 07, 2006 in response to Message #212926
Hey Jianmin,

Good work... You should list the portal here:
http://java-source.net/open-source/portals

This seems to be a good list of Open Source Portals. And I think you will get some good visibility.

Good Luck

Venkatt

  Message #213065 Post reply Post reply Post reply Go to top Go to top Go to top

Ajax framework

Posted by: Jianmin Liu on July 07, 2006 in response to Message #213047
Now that I have to start learning Ajax, I am need to know which framework to use with Java.
Any suggestion?


Light Portal adopts prototype and rico ajax frameworks. Take a look at http://ajaxpatterns.org/Ajax_Frameworks for other ajax frameworks.

  Message #213234 Post reply Post reply Post reply Go to top Go to top Go to top

Very good idea

Posted by: jim woods on July 10, 2006 in response to Message #212926
I think the idea of this product is great.


install java
http://www.developerzone.biz/index.php?option=com_content&task=view&id=128&Itemid=36

  Message #281103 Post reply Post reply Post reply Go to top Go to top Go to top

new powerful j2ee framework (shine framework)

Posted by: alen smith on December 05, 2008 in response to Message #213047
hi.
i `m alen smith a java architect.
if you want learning J2ee you must choose a powerful framework first.such as shine or struts.
but to my idea you learn and use shine frame work,because of this frame work is wery powerfull and also using shine is so easy because shine frame work`s team write sevral document and sample about that.
you can go to www.J2sos.org and find sevral document about learning shine.
and you can find download link for download shine frame work.
if you have a problem in any part of learning shine,you can get help fromshine framework`s support team.
you can ask your question and they answer to your questions.

I give you a hello world sample that I copyed from www.j2sos.org in technical forum.

you can find complet learning document in this site.
""this sample copyed from www.J2SOS.org ""


Hi! I'm Mehdi Mousavi, member of Shine Framework's support team.
Today I'll teach you developing Hello world sample.
I want teach & show you this powerful technology.
We use (jdeveloper10g) IDE for develop this project by shine framework.



In start , make new application with name "learning-shine" like this step :
1- Right click on application
2- choice new application workspace
3- complete this step follow up picture 2



As you see , new application have 2 part (model and view).
Now in continue, we should add Shine library to our project as below:
For do this , do this step:
Double-click on view ? library ? add shine, jsp runtime & servlet runtime
If the shine library isn't in your list, add it as below:
Click on New button in the bottom of the page ? Edit ? Add Entry ? find Shine.jar & click on Select ? ok
As you see Shine library has added to your library list.


Create request page
in next step we should create a JSP request page :
Right-click on view ? New ? jsp page ? ok ? name your page as "Request.jsp" ? ok



As you see, your page has created.

now , we must design this page .
For do this , in source tab write this code:

<%@ page contentType="text/html;charset=windows-1252"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>untitled</title>
</head>
<body>
<form action="ShineMappingClass.exec">
<P>
<STRONG>Fname:
<input type="text" name="Fname"/></STRONG>
</P>
<P>
<STRONG>Lname:</STRONG>
<input type="text" name="Lname"/>
</P>
<P>
<input type="submit" value="Submit"/>
</P>
</form>
</body>
</html>


We design one HTML form with two text field for give Fname (First name) & Lname (Last Name) .
also if you want, you can design your page without write .
component pallet will help you to Create your HTML form


Create response page :
Now we need create one response page (a service) .
Right-click on view ? New ? jsp page ? ok ? name your page as "ResponseServer.jsp" ? ok
As you see, your page has created.
Now we write this code in that page like beneath code:

<%@ taglib uri="/WEB-INF/shine.tld" prefix="shine"%>
<header>
<%
String x=(String) request.getParameter("Fname");
String y=(String) request.getParameter("Lname");
out.print("welcome Mr/Mrs "+x+" "+y);
%>






</header>

<tags>
<shine:tag name="tag1">
<%out.print("Hello.I am "+x+" "+y);
%>






</shine:tag>
</tags>

<footer>
<%out.print("Email Address:"+" ");%>
<%out.print(" www.j2sos.org.com");%>
</footer>


As you see in the source we have a taglib named "shine.tld" that is at "shine-framework/lib/tld". You should copy it at this address:
../jdev/mywork/shine/view/public_html/web-inf/
After this tag, we have "Header" & "Footer" in our source. Use Header & Footer to write the codes & massages you want to be shown on the top & bottom of all pages. Like welcome massage you see on the top of the pages while mail checking. As you see, we put welcome massage & the codes of getting two variables of the form and store them in two public variables, in header & the mail address in footer in this sample.

You can use all of the programming codes in header & footer.

** Interesting tip for the developers who had worked with other frameworks like Struts:
If you want, you can use all struts codes throw the tags. (Although after working with Shine, you'll understand that Shine is more strong that you won’t need to do like that.)
In the source continuation we have "tag" & "shine:tag" that are related to the Shine's own architecture, JWMS.
In Shine, instead of having a lot of response pages we can have one or more services that include our response pages as some tags.
e.g. / The Bank is the service & its operations are the tags.
Indeed in this ways, shine create all response pages in one response page (package).
In this sample, we have a tag named "tag1" that shows this output massage:
"Hello . I am fname (First name) lname (Last name)"

*developer saved with tags of shine in create more and work with many response pages.*


Now let's create the Mapping class:
MappingClass is the engine of the Shine framework. To create it do the instructions as below:
Right-click on view ? New ? java class? ok ? name your class as "ShineMappingClass" ? ok



Now you have a class named "ShineMappingClass".
Ok, write these codes in it now:

package view;
import com.evermind.client.clientassembler.ClientAssembler;
import j2sos.shine.controller.Mapping;
import j2sos.shine.script.Server;

public class ShineMappingClass extends Mapping
{
public void rater()
{
String b=(String) getRequest().getParameter("Fname");
String c=(String) getRequest().getParameter("Lname");
System.out.print("Hello"+b+c+"How are you?");
forward("ResponseService","tag1");
}
}



As you see all of the executive functions implements in "rater ()" method.
In this sample first we get Fname & Lname of the input then cast them to String mode and store them in "b" & "c" variables.
The "System.out.print("Hello "+b+" "+c+". How are you?!")" code makes just a test output that is visible only in IDE.
"forward("ResponseService","tag1")" code says go to "ResponseService" & run "tag1".

Now we just need to set the properties of "web.xml" file.
Open "web.xml" file & write this source in it:


<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<description>Empty web.xml file for Web Application</description>
<servlet>
<servlet-name>ShineMappingClass</servlet-name>
<servlet-class>view.ShineMappingClass</servlet-class>

<init-param>
<param-name>ResponseService</param-name>
<param-value>http://127.0.0.1:8988/learning-shine-View-context-root/ResponseService.jsp
</param-value>
</init-param>
<init-param>
<param-name>ContentType</param-name>
<param-value>text/html; charset=utf-8</param-value>
</init-param>
<init-param>
<param-name>ServerConsoleStatus</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>ShineMappingClass</servlet-name>
<url-pattern>ShineMappingClass.exec</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>35</session-timeout>
</session-config>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
</web-app>


As you see, we set colored parts as below:

Blue part: say the name & the address of "ShineMappingClass".
Red part: set the name of "ResponseService.jsp" as ResponseService. (Indeed it is the same name that had used in "forward" in "ShineMappingClass".)
* An applicable tip:
If we had more services, we should do this definition for each one, separately.
Brown part: introduce ShineMappingClass as executive class.
Congratulations!
Now us project is ready , and you must run it.
For do this , you must run request.jsp page .
After run , one page be open with two text field like this picture:


Now if you insert fname (First name) and lname (Last name) , after push submit you see this Response:



Congratulate
Now, You can deploy one simple project by shine
I hope you would enjoy yourself!






you can find complete samples about shine framework in:

www.j2sos.org
or
http://groups.google.com/group/j2sos

and for downloading shine framework you must visit this link in sourceforge.net:

http://sourceforge.net/projects/shine-app/



Good luck.

New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com

Dependency Injection in Java EE 6 - Part 1

Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (November 2, Article)

SAML: It's Not just for Web services

SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options. (September 28, Article)

Programming is Also Teaching Your Team

Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team. (September 22, Article)

Can Java EE Deliver The Asynchronous Web?

Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies. (July 14, Article)

JSF Flex

JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags. (June 29, Article)

The Rules of SOA - A Road to a Successful SOA Implementation

In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project. (June 23, Tech Talk)

Ari Zilka Talks About Terracotta 3.1

Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now. (June 15, Tech Talk)

Enterprise Application Integration, and Spring

In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements. (June 15, Tech Talk)

Google Web Toolkit: An Introduction

In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls. (June 4, Tech Talk)

Just Enough Early Architecture to Guide Development

Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable. (May 28, Tech Talk)

Productive Programmer: On the Lam from the Furniture Police

This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work. (May 26, Tech Talk)

Auto-Scaling Your Existing Web Application

Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers. (May 21, Tech Talk)

Automating Hibernate Mapping and Queries For Java Web Development

Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application. (May 19, Article)

Auto-Scaling Your Existing Web Application

In this session Nati Shalom demonstrates how to take a standard Java EE web application and scale it out or down dynamically without changes to the application code. Seeing as most web applications are over-provisioned to meet infrequent peak loads, this is a dramatic change because it enables growing your application as needed, when needed, without paying for unutilized resources. (May 19, Tech Talk)

Free Book: Jakarta-Struts Live

Download the entire book of Jakarta-Struts Live and learn about Struts MVC, Tiles, the Validator, DynaActionForms, plug-ins, internationalization, and more.
(Book PDF Download)

Application Server Matrix

The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map