Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JAVAºÍFlexÃô½Ýµ÷ÓÃ(Ò»)

   ÔÚjavaÏîÄ¿¼¯³Éflex¿ª·¢ÔÚweb2.0ÊÇÊÇÒ»¸öÊ®·ÖÓмÛÖµµÄ¿ª·¢·½°¸£¬ÌرðÔÚÆóÒµ¼¶µÄÓ¦ÓÃÖУ¬flexºÍjava¼äµÄͨѶԽÏÔÖØÒª¡£µ«ÊÇÏÖÔÚµÄjavaºÍflexµÄ¿ò¼ÜËäÈ»¶à£¬µ«Êǹ²Í¨ÐÔ²»´ó¡£¾ÍÊÇͨ¹ý´«Í³µÄwebserviceµ÷Óã¬Ò²ÒòΪЧÂÊÎÊÌâºÍ½âÎöxmlµÄ·±ÖصŤ×÷£¬ºÜ¶àÏîÄ¿¿ª·¢ËٶȺÍά»¤ÏÞÖƽϴó¡£ÔÚ½üÀ´ÏîÄ¿£¬ÎÒÔÚ¹«Ë¾³¢ÊÔÁËһϹ¤³§Ä£Ê½¸¨Öú¿ª·¢flexºÍjavaµÄÏë·¨¡£ÏÖÔÚÕâÖÖÃô½Ýµ÷ÓñȽϳÉÊ죬¾ÍºÍ´ó¼Ò½»Á÷һϡ£
java·´Éä·½·¨£º
public Object loadMethod(String className, String method, Object[] value) {
try {
Object resultObject = null;
Class h = Class.forName(className);
Object object = h.newInstance();
Method m[] = h.getDeclaredMethods();
for (int i = 0; i < m.length; i++) {
if (m[i].getName().equals(method)) {
if (value == null) {
resultObject = m[i].invoke(object);
} else {
resultObject = m[i].invoke(object, value);
}
}
}
return resultObject;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
Õâ¸öÊÇÒ»¸ö·Ç³£ÖØÒªµÄ·½·¨£¬½ÓÊÜjavaÀàµÄÀàÃûºÍ·½·¨Ãû¡¢²ÎÊý£¬È»ºóÔ¶³Ìµ÷ÓÃ
È»ºó°Ñ¸Ã·½·¨µÄÀà¼Óµ½remoting-config.xml
<destination id="classLoader">
<properties>
<source>com.shine.framework.flexLoader.ClassLoader</source>
</properties>
</destination>
ÔÚflexµÄÔ¶³Ìµ÷Ó÷â×°µÄÀàBaseRoServiceUtil.mxml
Ô¶³Ìµ÷Óõķ½·¨
protected function loadClass(classPath:String, classMethod:String, value:Object):void
{
var loader:RemoteObject=new RemoteObject;
loader.destination="classLoader";
loader.addEventListener(FaultEvent.FAULT, error);
loader.endpoint="messagebroker/amf";
loader.loadMethod(classPath, classMethod, value);
loader.addEventListener(ResultEvent.RESULT, getRomoteHelloRes);
}
½ÓÊÕ½á¹ûµÄ·½·¨(ͨ¹ý·½·¨¶ÔÏóµ÷ÓÃÆäËûÀàµÄ·½·¨)
 private function getRomoteHelloRes(e:ResultEvent):void
{
method.call(this, e.result);
}
Èç¹ûÐèÒªµ÷ÓÃtest.TestÀàÖеÄshow(String str)·½·¨µÄ»°£¬ÎÒÃǾÍÕâôд
<?xml version="1.0" enc


Ïà¹ØÎĵµ£º

flex module ʵÀý

module ½Ó¿ÚÎļþ PictureWindowInterface.as
package
{
public interface PictureWindowInterface
{
function setSelectIndex(index:int):void
}

moudule Îļþ PictureWindow.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml ......

Àí½â flex component

component¾ÍÊÇÒ»¸öAS class »òÕßÊÇMXML componentÎļþÔÚmanifestÎļþÖÐÓ³ÉäµÄ±êÇ©.·Ö¿ÉÊӺͲ»¿ÉÊÓ
¿ÉÊÓ»¯component°üÀ¨Containers ºÍ UI controls
Containers(Appliction, Panel...)
UI controls(Button, Label)
¿ÉÒÔͨ¹ý3ÖÖ·½Ê½ÉèÖÃcomponentµÄÊôÐÔ
1.tag attributers
Java´úÂë
<mx:Application xmln ......

Æß Java EE

   ʲôÊÇjava EEÁË¡£Ò»°ãÀ´Ëµ£¬Ò»¸ö³ÉÊìµÄjava EE½â¾ö·½°¸£¬°üÀ¨ÒÔϼ¸¸ö²¿·Ö¡£
 
 1¡¢¿ÉÒÔ¶ÔÍâÌṩ»ùÓÚ±ê׼ЭÒéÈçxmlµÄ·þÎñ
ÈçWeb Service
 2¡¢ÄÚ²¿Í¨ÐÅ»ùÓÚÃæÏò¶ÔÏóµÄͨÐÅЭÒé
Èç RMI£¬Corba£¬XML RPC
 3¡¢°²È«ÐԸߣ¬È¨ÏÞ¿ØÖÆÑϸñ
Èç MD5£¬SSL£¬AccountDomain
 4 &nbs ......

°Ë Ò»¸öJAVA°¸Àý

   ¼ÙÉèÐèÇó(ÈçÓÐÀ×ͬ£¬´¿ÊôÇɺÏ)£º
     ÓÐÒ»¸öÈ«¹úÐԵĴóÆóÒµ£¬ÔÚÈ«¹ú¸÷µØÐèÒª²¿ÊðÉÏǧ̨¿Í»§»ú£¬ÕâЩ¿Í»§»úÐèҪʵʱÓë·þÎñÆ÷½»»¥£¬½øÐÐÊý¾Ý´¦Àí¡£ÊµÊ±ÐÔÒªÇó¸ß£¬°²È«ÐԸߣ¬ÒªÇóÖ§³ÖÊÂÎñ£¬ÒÔ¼°²»ÖжϷþÎñ¡£
   
Ó²¼þ²¿Êð£º
  1¡¢ 3000̨¿Í»§»ú
  2¡¢ 10̨· ......

myeclipse×¢²á»ú,javaдµÄÊÊÓÃÓÚËùÓа汾


import java.io.*;
public class Test {
    public static String convert(String s) {
        if (s == null || s.length() == 0)
            return s;
        ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ