Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code discovery & new model proto #119

Open
mdutoo opened this issue Jun 28, 2012 · 2 comments
Open

Code discovery & new model proto #119

mdutoo opened this issue Jun 28, 2012 · 2 comments

Comments

@mdutoo
Copy link
Member

mdutoo commented Jun 28, 2012

Principles / overall tasks

  • hardcode / simulate to avoid dev (or test sample) tunnels
  • lay a strong focus on model element ids and how to address them (through other metadata)

1. write discovery of @webservice JAXWS annotation

as well as JAXRS, in example code (SmartTravel ?) and the buildup of the corresponding Implementation model in Nuxeo, targeting "mysoa" (hardcoded)

alternatives :

get inspiration (or even write analysis) from code : javadoc, enunciate source, swagger TODO ask mdutoo for info

DONE using QDox :

     {
  "id" : "org.easysoa.discovery:easysoa-discovery-code-sample,JAX-RS:org.easysoa.samples.paf.PureAirFlowersRest",
  "name" : "PureAirFlowersRest",
  "version" : "0.9-SNAPSHOT",
  "requirements" : [ ],
  "relations" : {
    "org.easysoa.discovery:easysoa-discovery-code-sample" : "Deliverable"
  },
  "operationsInfo" : "GET Operation getOrdersNumber ('/orders/{clientName}'), POST Operation addOrder ('/orders')",
  "soaNodeType" : "ServiceImpl"
}

LATER extract more info for documentation purpose (which ones ?) : signature (operations), (link to CI-generated) javadoc / enunciate / swagger...
LATER2 make it pluggable for custom annotation handlers (allowing Restlet, Swagger, custom ex. CXXXXX...)
IDEA make it generic for new annotations, ex. @org.easysoa.code.xxx goes in the xxx Nuxeo metadata

2. enrich it by getting (mocked ?) info about the maven project

that calls the previous discovery (maven plugin) and creating the corresponding Deployable model in Nuxeo and link both

DONE as plugin easysoa-discovery-code-mavenplugin

LATER Use maven (plugin) conf-provided info to know the target "mysoa"

LATER2 also classpath info from maven ?

3. OPT explicit creation of Design out of Implementation

(for now only implicit & automatic)

create ("promote") the corresponding Design-level model (with a JAXWS interface) and link both

LATER allow this explicit creation to be declared in code by @org.easysoa.Design (if not already done by ex. maven plugin conf)

4. handling code changes

redo a code discovery where one serviceimpl has disappeared, another has appeared, others have changed

alternatives : correlate on class & @webservice name, on (trimmed) source hash, diff, LATER class signature

5. simulate a validation

by writing the checkups that should occur between Design and changed Implementation and also writing their output alert messages

  • "Warning : a serviceimpl known in Design has disappeared ! You have to approve it before doing a maven release"
  • "Info : an unknown serviceimpl has appeared"
  • "Warning: an unknown serviceimpl correlated in Design has appeared ! You have to approve it before doing a maven release"

6. simulate a maven project version change

and what the alert messages would become

  • "Error : unapproved Implementation changes have undergone a maven release. You have to justify and approve it."

7. redo it in the case of Design-first development

first create Services with WSDL interfaces (on SmartTravel sample ? LATER by importing its FraSCAti), then simulate how after a code discovery Design-Implementation links can be explicitly created and how JAXWS interfaces are then set as secondary interfaces on the Service

LATER

LATER simulate how also doing java2wsdl allows tosuggests Design-Implementation links through correlation

LATER handle other source files in a pluggable manner : wsdls (upload & correlate on hash & name(space)), any conf file (.properties, .xml) containing known endpoints, integrated confs (FraSCAti)...

LATER do the same for a web discovery : simulate by loading a wsdl from filesystem, build the corresponding model (environment & endpoints), link it to impl & design, redo it and simulate changes (correlate on url, name, (trimmed) hash, diff, LATER signature) & validation messages

@ghost ghost assigned mkalam-alami Jun 28, 2012
@mkalam-alami
Copy link
Contributor

Additional research on what could be used to explore the code is reported here.

@mkalam-alami
Copy link
Contributor

Development of a prototype is started in EasySOA-Incubation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants