Click here to Skip to main content
15,353,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've read a document about a new java architecture that's name is JWMS !

I want to know of any body know any thing about it?
Please describe it for me.

Here is link of the document I've read:
http://SourceForge.net/projects/shine-enterpris/files/[^]
Posted
Updated 4-Jul-10 0:24am
v2

I've download it, and by reading doc I image it as :

+-----------------------------------------------+
|	Shine-Enterprise-Pattern                |
|						|
|  Maplet  | JShooter |  JConnection  | Utils   |
+-----------------------------------------------+
|asm.jar, c3p0-0.9.0.jar, ...                   |
|		Open Source Libs                |
|commons-collections-2.1.1.jar, ...             |
+-----------------------------------------------+
|						|
|		Java SE				|
|						|
+-----------------------------------------------+


it's like Spring that use many OpenSource lib and has own framework for JEE and JSE, it's great.
but in reality Shine like Maven Archetype, why?
because it just a collection of tools, and has create classes and methods that help you and save your life and/or time (~50%) for not rewrite it.
you can look in source (Shine source code is just 78kbyte) and use many libs.

Developing a project with amateur developers is very dangerous. Because new developers don't care about some important things, and if the project manager, technical architect or head developer don’t care about those points, the project will fail.


we can see! author want to create a project-example like (Maven Archetype), for all people follow and use some methods, this can easily save many things in development.

(maybe ^_^)
   
Comments
OmiD_Haghighatgoo 23-Jul-10 8:37am
   
Reason for my vote of 5
OK
thanks a lot

you are right

it is some thing intresting

I want to do a project with this pattern but my knowledge is limitted

and i don't understand some thing about it

what is the main differences between MVC and JWMS?

and do u understand maplet completely ?
   
Comments
Adrabi Abderrahim 4-Jul-10 19:31pm
   
what is the main differences between MVC and JWMS?
I don't know JWMS, but I'm interested too, his says : Java Web Model Service (JWMS) transforms each part of application to a service. and solve SOA problem with communication. (http://forums.java.net/jive/thread.jspa?messageID=335646)

and do u understand maplet completely?
this is like interview :D!? I'm not fully reading doc, but has some interested things as : auto-binding JSP-names as methods, parameters and forwarding methods names (like validator example) etc...

& you need to follow examples for better understanding it & good luck.
check my code and see that maplet is not like spring
note 1: resource bundle is class not .properties file
note 2: the maplet:DataTable is different
note 3: the startup method execute only once,exactly like init method in servlet
note N: discover more and let me to know :)


fileName : maplet.tld
=====================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>maplet</shortname>
<tag>
<name>Service</name>
<tagclass>org.j2os.shine.maplet.tag.Service</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>name</name>
</attribute>
</tag>
<tag>
<name>SecureService</name>
<tagclass>org.j2os.shine.maplet.tag.SecureService</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>name</name>
</attribute>
</tag>
<tag>
<name>ErrorService</name>
<tagclass>org.j2os.shine.maplet.tag.ErrorService</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
<tag>
<name>Resource</name>
<tagclass>org.j2os.shine.maplet.tag.Resource</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>show</name>
</attribute>
<attribute>
<name>from</name>
</attribute>
</tag>
<tag>
<name>DataTable</name>
<tagclass>org.j2os.shine.maplet.tag.DataTable</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
<tag>
<name>DataRow</name>
<tagclass>org.j2os.shine.maplet.tag.DataRow</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
</taglib>
=====================



fileName : Resuest.jsp
=====================
<%@ taglib uri="/WEB-INF/maplet.tld" prefix="maplet"%>
<html>
<body>
<form name="myform" action="Core.exec">
<maplet:Resource show="msg1"/>
<input type="text" name="name"/>
<input type="submit" value="ClassicSendQuery"/>
</form>
</body>
</html>
=====================



fileName : Response.jsp
=====================
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="/WEB-INF/maplet.tld" prefix="maplet"%>
<maplet:SecureService name="insert">

</maplet:SecureService>
<maplet:ErrorService>
<maplet:Resource show="msg2"/>
<maplet:DataTable>
<database-driver>oracle.jdbc.driver.OracleDriver</database-driver>
<database-url>jdbc:oracle:thin:@javaserver:1521:xe</database-url>
<database-username>iranair</database-username>
<database-password>iran123</database-password>
<database-query-sql>select * from users</database-query-sql>
<view-border>style="background-color: red; border: 1px solid"</view-border>
<view-header>style="background-color: green; border: 5px solid"</view-header>
<view-first-records>style="background-color: pink"</view-first-records>
<view-second-records>style="background-color: gray"</view-second-records>
</maplet:DataTable>
</maplet:ErrorService>
=====================



fileName : Core.java
=====================
package controller;

import model.database.dao.T1DAO;

import org.j2os.shine.maplet.Maplet;


public class Core extends Maplet {
private T1DAO t1;
public String name;

public void startup() throws Exception {
try {
t1 = new T1DAO("model/database/setting/Connection.xml");
System.out.println("DataBaseLogin");
} catch (Exception e) {
out.print(e);
}
}

public void request() throws Exception {
t1.insert(0, name, "none");
secureForward("Response.jsp", "insert");
}
}
=====================



fileName : T1DAO.java
=====================
package model.database.dao;

import model.database.dto.*;

import org.j2os.shine.jconnection.*;

import java.util.*;


public class T1DAO extends Hibernate {
public T1DAO(String address) throws Exception {
login(address);
}

public void insert(long id, String name, String famil)
throws Exception {
// if id!=0 => update
begin();

T1 object = new T1();
object.setId(id);
object.setName(name);
object.setFamil(famil);
saveOrUpdate(object);
commit();
}

public void delete() throws Exception {
begin();

Iterator i = getSQLQueryContent("select * from t1",
"model.database.dto.T1");

while (i.hasNext()) {
T1 object = (T1) i.next();
delete(object);
}

commit();
}

public void update() throws Exception {
begin();

Iterator i = getSQLQueryContent("select * from t1",
"model.database.dto.T1");

while (i.hasNext()) {
T1 object = (T1) i.next();
object.setFamil("bahador");
saveOrUpdate(object);
}

commit();
}

public void select() throws Exception {
begin();

Iterator i = getSQLQueryContent("select * from t1",
"model.database.dto.T1");

while (i.hasNext()) {
T1 object = (T1) i.next();
System.out.println(object.getName());
}

commit();
}
}
=====================



fileName : T1.java
=====================
package model.database.dto;
import org.j2os.shine.maplet.tag.DataTable;
public class T1 {
private long id;
private String name;
private String famil;

public void setName(String name) {
this.name = name;
}

public String getName() {
return name;
}

public void setFamil(String famil) {
this.famil = famil;
}

public String getFamil() {
return famil;
}

public void setId(long id) {
this.id = id;
}

public long getId() {
return id;
}
}
=====================



fileName : T1.xml
=====================
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="model.database.dto">
<class name="T1" table="T1" dynamic-update="true" dynamic-insert="true">
<id name="id" type="long" column="id">
<generator class="increment"/>
</id>
<property name="name" type="java.lang.String" column="name" insert="true" update="true"/>
<property name="famil" type="java.lang.String" column="famil" insert="true" update="true"/>
</class>
</hibernate-mapping>
=====================



fileName : Connection.xml
=====================
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@javaserver:1521:xe</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">root</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.GenericDialect</property>
<mapping resource="model/database/dto/T1.xml"/>
</session-factory>
</hibernate-configuration>
=====================



fileName : EN.java
=====================
package resource;

public class EN {
public String msg1 = "insert your name";
public String msg2 = "finish";
}
=====================



fileName : FA.java
=====================
package resource;

public class FA {
public String msg1 = "&#1606;&#1575;&#1605; &#1585;&#1575; &#1608;&#1575;&#1585;&#1583; &#1705;&#1606;&#1740;&#1583;";
public String msg2 = "&#1575;&#1578;&#1605;&#1575;&#1605;";
}
=====================
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900