cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

SaaSModulesRefactoring

SaaS services modules refactoring (to support Java EE, PHP, C/C++, Ruby, full IDE distro's) for NB6.5 M2

1.0 Introduction

SaaS services modules in netbeans provide a easy mechanism to consume most popular services in Java, Java EE (JSP, Servlet, JSR-311 annotated resources), PHP, (C/C++, Ruby, Javascript, will be available in the future and it is growing).

When user drag-and-drop a service node (say Yahoo News Search) from the web services node(in the services tab of netbeans) to say a PHP file opened in the IDE, we insert PHP code snippet along with support files to access 'Yahoo News Search' service. Same is true for Java/J2EE files.

2.0 Problem

After receiving numerous requests for SaaS support in PHP distro, we think it is time to create a new cluster called 'websvccommon'. The reasons for this new cluster are

  • This new cluster with only minimum modules can be shared by non Java/J2EE clusters such as PHP, Ruby and C/C++.
  • Will minimize the footprint for distro's such as PHP. (Currently, SaaS modules if included in the PHP distro will

pull modules from j2ee/java clusters, since SaaS modules are now in j2ee cluster)

3.0 Solution - Details of what needs to be done to create 'websvccommon' cluster

Following are the additions/changes we anticipate

3.1 Main change

  • Create websvccommon cluster and move all existing SaaS modules from java to this new cluster. So
  • java cluster and php cluster will have dependency on this new cluster

(Note: websvc.jaxb21 will be part of websvccommon cluster, so java cluster need not have dependency on websvc.jaxb21 module)

  • j2ee cluster depends on java cluster, so j2ee will inherit websvccommon

3.2 Auxiliary changes

  • Split websvc.jaxws21 module into websvc.jaxb21 and websvc.jaxws21 (existing module without jaxb libraries). This is

necessary moving forward to reduce footprint for non-java distro's. (websvc.jaxb is a required module for SaaS since it is used to process xml metadata).

  • websvc.jaxb21 module will be moved into websvccommon cluster.
  • Alterate proposal is to create a xml.jaxb21 module and add it to the ide cluster.
  • Split existing websvc.saas.codegen into
  • websvc.saas.codegen.java (for java cluster),
  • websvc.saas.codegen.j2ee (for j2ee cluster),
  • websvc.saas.codegen.php (for php cluster) and
  • websvc.saas.codegen (will contain common code)
  • Refactor websvc.saas.api, so we remove dependency on jaxwsmodel for WSDL to Java binding and push this dependency onto

websvc.saas.codegen.java. websvc.saas.api should instead use xml.wsdl model for representing wsdl services.

  • Refactor websvc.saas.ui, so we remove dependency on jaxwsmodel for WSDL to Java binding.

3.3 Cluster.properties changes

diff -r 6007b35752ea nbbuild/cluster.properties
--- a/nbbuild/cluster.properties	Mon Jun 30 12:00:45 2008 -0700
+++ b/nbbuild/cluster.properties	Wed Jul 02 15:06:50 2008 -0700
@@ -353,7 +353,8 @@ nb.cluster.java.dir=java2
 nb.cluster.java.dir=java2
 nb.cluster.java.depends=\
         nb.cluster.ide,\
-        nb.cluster.platform
+        nb.cluster.platform,\
+        nb.cluster.websvccommon
 nb.cluster.java=\
         ant.browsetask,\
         ant.debugger,\
@@ -418,9 +419,10 @@ nb.cluster.java=\
         refactoring.java,\
         spring.beans,\
         swingapp,\
+        websvc.jaxb21,\
         websvc.jaxws21,\
-        websvc.jaxws21api,\
         websvc.serviceapi,\
+	websvc.saas.codegen.java,\
         xml.jaxb, \
         xml.tools.java
 
@@ -548,20 +550,7 @@ nb.cluster.j2ee=\
         websvc.restapi,\
         websvc.restkit,\
         websvc.restlib,\
-        websvc.saas.api,\
-        websvc.saas.codegen,\
-        websvc.saas.services.amazon,\
-        websvc.saas.services.delicious,\
-        websvc.saas.services.facebook,\
-        websvc.saas.services.flickr,\
-        websvc.saas.services.google,\
-        websvc.saas.services.strikeiron,\
-        websvc.saas.services.twitter,\
-        websvc.saas.services.weatherbug, \
-        websvc.saas.services.yahoo,\
-        websvc.saas.services.zillow,\
-        websvc.saas.services.zvents,\
-        websvc.saas.ui,\
+        websvc.saas.codegen.j2ee,\
         websvc.serverapi,\
         websvc.utilities,\
         websvc.websvcapi,\
@@ -622,11 +611,33 @@ nb.cluster.profiler=\
         profiler.selector.ui,\
         profiler.utilities
 
+nb.cluster.websvccommon.dir=websvccommon1
+nb.cluster.websvccommon.depends=\
+        nb.cluster.platform,\
+        nb.cluster.ide
+nb.cluster.websvccommon=\
+	websvc.jaxb21,\
+        websvc.saas.api,\
+        websvc.saas.ui,\
+        websvc.saas.codegen,\
+        websvc.saas.services.amazon,\
+        websvc.saas.services.delicious,\
+        websvc.saas.services.facebook,\
+        websvc.saas.services.flickr,\
+        websvc.saas.services.google,\
+        websvc.saas.services.strikeiron,\
+        websvc.saas.services.twitter,\
+        websvc.saas.services.weatherbug, \
+        websvc.saas.services.yahoo,\
+        websvc.saas.services.zillow,\
+        websvc.saas.services.zvents
+
 nb.cluster.php.dir=php1
 nb.cluster.php.depends=\
         nb.cluster.platform,\
         nb.cluster.ide,\
-        nb.cluster.gsf
+        nb.cluster.gsf,\
+        nb.cluster.websvccommon
 nb.cluster.php=\
         libs.javacup,\
         php.dbgp,\
@@ -634,7 +645,8 @@ nb.cluster.php=\
         php.kit,\
         php.project,\
         php.refactoring,\
-        php.samples
+        php.samples,\
+        websvc.saas.codegen.php
 
 nb.cluster.groovy.dir=groovy1
 nb.cluster.groovy.depends=\