从另一个光辉的框架,什么是Jshooter? [英] an other framework from shine, what is Jshooter ?

查看:72
本文介绍了从另一个光辉的框架,什么是Jshooter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁可以告诉我使用jshooter的主要目的是什么?

就像RMI吗?像CORBA吗?是或多或少?

这是此文档的链接.阅读并说出您的意见

http://SourceForge.net/projects/shine-enterpris/files/ [

who can tell me what is the main purpose of using jshooter?

is it like RMI ? is it like CORBA ? It is more or less ?

here is the link of this document.read it and say ur opinion

http://SourceForge.net/projects/shine-enterpris/files/[^]

tnx

推荐答案

第三章
JShooter(反映在网络框架中)
什么是JShooter?
JShooter是用于在网络上分发应用程序的框架.当然,您已经使用了RMI,Corba和JMS.上述每种技术都有其自身的特殊问题,同时具有非凡的优势.但是,您必须小心由这些技术引起的费用.在大多数情况下,RMI,Corba和JMS令人难以置信地增加了生产成本.但是,在其他情况下,它们会使程序员感到困惑.几年前,反射型编程是专业程序员关注的焦点,然后面向方面的编程进入了编程领域,但它并没有减少程序员的工作量,反而使专业程序员,甚至是业余程序员在很多情况下都感到困惑. JShooter最重要的功能之一是它使反射导向的编程"更易于使用.





反射式编程的第一个示例:
假设您有一个这样的类,并且您想在另一个类中从中创建一个对象.

图3 -1

现在,请注意负责根据上述类创建对象的类.

图3 – 2
首先,我们从应用程序类创建一个名为app的对象(该对象没有数据类型).我们通过输入参数通过"newInstance"方法指定它. Input参数包括Calss-name和Package-name规范.然后,我们使用MyClass中的app创建一个新对象,并调用所提到对象的"hello"方法.


图3 – 3
Chapter three
JShooter (Reflect in Network Framework)
What is JShooter?
JShooter is a framework for distributing application programs on the network. Certainly, you have used RMI, Corba and JMS. Each of aforementioned technologies has its own special problems and at the same time enjoys extraordinary advantages. However, you must be careful about the expenses caused by these technologies. In most cases RMI, Corba and JMS increase the productions’ costs unbelievably. However in other cases they confuse programmers. Years ago, Reflect Oriented Programming was the focus of attention within professional programmers, then Aspect Oriented Programming came into the programming world but instead of reducing the programmer’s task, it causes the professional programmers and even the amateur ones to be confused in many cases. One of the most important capabilities of JShooter is that it makes the "Reflect Oriented Programming" easier to use.





The first example of the Reflect Oriented Programming:
Suppose you have a class like this and you want to create an object from this in another class.

Figure 3 -1

Now, pay attention to the class that is responsible for creating object from the above said Class.

Figure 3 – 2
First we create an object from Application Class called app (this object has no data type). We specify it by "newInstance" method via input parameter. The Input parameter includes Calss-name and Package-name specifications). Then we create a new object by using app from MyClass and invoked "hello" method of the mentioned object.


Figure 3 – 3


好 但是反射是什么?

我不只是一点点

太神奇了
ok but what is reflection ?

I don''t just a little about it

it''s something amazing


嗨!

我找到了Jshooter的示例:

hi!

I found a sample for Jshooter:

jsp pages:

----------------index.jsp---------------

<pre lang="xml"><%@ page contentType="text/html;charset=windows-1256"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
    <title>untitled</title>
  </head>
  <body>
    <form action="servlet/client.Caller" method="get">
      <input type="submit" value="view list of server's class mathods"/>
    </form>
  </body>
</html>




------------- callMethod.jsp --------------




-------------callMethod.jsp--------------

<%@ page contentType="text/html;charset=windows-1256"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
    <title>untitled</title>
  </head>
  <body>
    <P>call one of methods:</P>
    <form action="servlet/client.Caller" method="get">
      <P>Method name:
        <input type="text" name="method_name"/>
      </P>
      <P>
        <input type="submit" value="Call"/>
      </P>
    </form>

  </body>
</html>




---------------- response.jsp ----------------

<%@页面import ="java.util.ArrayList"<>
<%@ taglib uri ="/WEB-INF/maplet.tld" prefix ="maplet"<>







<%
字符串a = request.getParameter("methods");
String [] b = a.split(&");
for(int i = 0; i out.print(b +"
);
}
<>



< iframe src ="CallMethod.jsp" frameborder ="0">


<%= request.getParameter("method_name")<>的输出方法:

<%= request.getParameter("return_value")<>

无法访问



班级:

客户端软件包:

--------------- caller.java ------------

<%@页面import ="java.util.ArrayList"<>
<%@ taglib uri ="/WEB-INF/maplet.tld" prefix ="maplet"<>







<%
字符串a = request.getParameter("methods");
String [] b = a.split(&");
for(int i = 0; i out.print(b +"
);
}
<>



< iframe src ="CallMethod.jsp" frameborder ="0">


<%= request.getParameter("method_name")<>的输出方法:

<%= request.getParameter("return_value")<>

无法访问



服务器软件包:

-------------- Distributer.java ----

包服务器;

导入org.j2os.shine.jshooter.*;


公共类分配器{
公共静态void main(String [] arg)引发异常{
应用程序app = new Application();
app.distribute(1099,"firstApp");
}
}

------------- SourceClass.java ----

包服务器;

公共类SourceClass
{

公共字符串helloWorld(){
返回"Hello World!";
}
公共字符串byeEverybody(){
返回再见!";
}

}




----------------response.jsp----------------

<%@ page import="java.util.ArrayList"<>
<%@ taglib uri="/WEB-INF/maplet.tld" prefix="maplet"<>







<%
String a=request.getParameter("methods");
String[] b=a.split("&");
for(int i=0;i out.print(b+"
");
}
<>



<iframe src="CallMethod.jsp" frameborder="0">


output of <%=request.getParameter("method_name")<> method:

<%=request.getParameter("return_value")<>

No Access



Classes:

client package:

---------------caller.java------------

<%@ page import="java.util.ArrayList"<>
<%@ taglib uri="/WEB-INF/maplet.tld" prefix="maplet"<>







<%
String a=request.getParameter("methods");
String[] b=a.split("&");
for(int i=0;i out.print(b+"
");
}
<>



<iframe src="CallMethod.jsp" frameborder="0">


output of <%=request.getParameter("method_name")<> method:

<%=request.getParameter("return_value")<>

No Access



server package:

--------------Distributer.java----

package server;

import org.j2os.shine.jshooter.*;


public class Distributer {
public static void main(String[] arg) throws Exception {
Application app = new Application();
app.distribute(1099, "firstApp");
}
}

-------------SourceClass.java----

package server;

public class SourceClass
{

public String helloWorld() {
return "Hello World!";
}
public String byeEverybody() {
return "bye bye!";
}

}


这篇关于从另一个光辉的框架,什么是Jshooter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆