[wsas-java-dev] Re: [esb-java-dev] Use of YUI

Ruwan Linton ruwan at wso2.com
Thu Mar 8 19:44:43 PST 2007


Sorry, this mail is not readable, I have some problem with my mail client...

Hi Paul and all,

I have done some POCs to incorporate the YUI framework in ESB UI, which 
is not a very difficult task to achieve. Here I am listing advantages 
and disadvantages of using YUI in our products.

Advantages:
   YUI is licensed under BSD license so there is no licensing issue in 
using that.
   We don't have to take care of the cross browser effects, framework 
will take care of that.
   We have a set of predefined controls that we can use by instantiating 
an object and calling a set of methods on them.

Disadvantages:
   Even though BSD license is business friendly we will have to keep 
there license headers in our licensing, so can not directly go with the 
Apache license.
   We will have to include at least 15 js files which are mostly greater 
than 300 lines in length. (all these plus our js files will be loaded 
when we load the page initially because we have referred to those in 
index.html)
   Almost all the YUI objects starts with the name YAHOO for example a 
ContextMenu object will be referred to as YAHOO.widget.menu.ContextMenu, 
so that within our js we will be having "YAHOO.widget" frequently.

One thing that we can get from the framework is that, they have 
optimized there js files by removing comments, unwanted space 
characters, newline characters and so on ... Basically they have two 
versions of a particular js file, one for development named xxx-debug.js 
which contains all the comments and the newlines (nice looking 
readable), other for deployment named xxx-min.js which is optimized. I 
think we also can get this applied for our js files if we can write a 
filter to filter-out the above unwanted characters at the build time.

If the above disadvantages are ok with compared to the advantages that 
we gain by using YUI, I propose the following mechanism for integrating 
that to our products (if not have to look for some other framework)

Hence this YUI zip is not in any repositories currently, we will have to 
upload this to our own repository for using this. I think best place to 
put the code for this framework is the adminui project inside commons. 
Basically we will have to extract the code to the adminui and do any 
modifications if required and check in to the commons svn. Then at the 
build time of adminui we can include these js files also in to the 
adminui.zip and upload to the dist.wso2 repository and get them 
extracted by each and every project.

Care has to be taken when using the YUI: some samples refer to there 
latest resources (js, css files) deployed on there servers. Don't use 
them hence they can change over the time.

Thanks,
Ruwan.

Ruwan Linton wrote:
>
>
> Ruwan Linton wrote:
>> Paul Fremantle wrote:
>>> Folks
>>>
>>> I believe the mashup-dev team have started using Yahoo UI (YUI) JS 
>>> components. I think this could help us a lot - especially in the 
>>> drop-down menus!!
>> Yes, that will be help full. I had a look in to those when I was 
>> having discussion with Thilina about mashup UI
>>
>>>
>>> As an experiment can someone please try replacing our drop-down Add 
>>> Mediator menu with one using YUI, and write up the experience and 
>>> lessons learnt.
>>
>> Sure. I will try that out.
>>>
>>> Paul
>>>
>>
>>
>> _______________________________________________
>> Esb-java-dev mailing list
>> Esb-java-dev at wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
>>
>
>
>
> _______________________________________________
> Esb-java-dev mailing list
> Esb-java-dev at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
>





More information about the Wsas-java-dev mailing list