Hi Imesh,

See my inline comments.

On Wed, Feb 3, 2016 at 8:34 PM, Imesh Gunaratne <[email protected]> wrote:

> Hi Manuri,
>
> Would you mind explaining the purpose of this feature?
> - What is an archetype?
>
Archetype is kind of a prototype/template of a project. So that you don't
have to worry about the structure and the archetype will create the bare
minimum project structure.
More about archetype  you can refer to [1].

> - Why do we need it?
>
As I have mentioned it can used to create the bare minimum project
structure plus the configs.

> - What are we trying to achieve with it in MSF4J?
>
So that MSF4j users can start developing their project step ahead.

And for the C5 release we introduced some archetypes so that bundle
developers can use, see [2]

[1].
https://maven.apache.org/guides/introduction/introduction-to-archetypes.html
[2].  https://docs.wso2.com/display/Carbon500/Using+Maven+Archetypes

Thanks
>
> On Wed, Feb 3, 2016 at 9:29 PM, Manuri Amaya Perera <[email protected]>
> wrote:
>
>> Hi Azeez,
>>
>> To place archetypes I have added a module "archetypes" under msf4j. The
>> parent of the pom of this module is msf4j-parent. Under "archetypes" module
>> I have created msf4j-microservice-archetype module which contains the
>> archetype.
>>
>> The structure is as follows
>> msf4j
>> ├── archetypes
>> │   ├── msf4j-microservice-archetype
>> │   │   ├── pom.xml
>> │   │   ├── src
>> │   │   │   └── main
>> │   │   │       └── resources
>> │   │   │           ├── archetype-resources
>> │   │   │           │   ├── pom.xml
>> │   │   │           │   └── src
>> │   │   │           │       └── main
>> │   │   │           │           └── java
>> │   │   │           │                 ├── Application.java
>> │   │   │           │                 └── MicroService.java
>> │   │   │           └── META-INF
>> │   │   │               └── maven
>> │   │   │                   └── archetype-metadata.xml
>> │   ├── pom.xml
>>
>> For the project generated from the archetype the default values I have
>> given at the moment are as follows,
>>
>> groupId = org.wso2.msf4j
>> artifactId = org.wso2.msf4j.microservice
>> version = 1.0.0-SNAPSHOT
>> package = org.wso2.msf4j.microservice
>>
>> The structure of a project created from this archetype with the default
>> values, is as follows,
>> ├── pom.xml
>> ├── src
>> │   └── main
>> │       └── java
>> │           └── org
>> │               └── wso2
>> │                   └── msf4j
>> │                       └── microservice
>> │                           ├── Application.java
>> │                           └── MicroService.java
>>
>>
>> Application.java contains the main method. The class which contains
>> methods for http CRUD operations is named as "MicroService.java" because
>> that name should be a generic one.
>>
>> Please suggest if any changes are needed to be done.
>>
>> And for GET, POST, PUT, DELETE operations should there be any
>> implementation?
>> We can do something like, keeping some information in a datastructure and
>> perform CRUD on it.  For example, create a POJO class Student and keep a
>> map of students inside MicroService class.
>> Any suggestions on this?
>>
>>
>> Thank you.
>>
>>
>>
>> --
>>
>> *Manuri Amaya Perera*
>>
>> *Software Engineer*
>>
>> *WSO2 Inc.*
>>
>> *Blog: http://manuriamayaperera.blogspot.com
>> <http://manuriamayaperera.blogspot.com>*
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> *Imesh Gunaratne*
> Senior Technical Lead
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057
> W: http://imesh.gunaratne.org
> Lean . Enterprise . Middleware
>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 

*Aruna Sujith Karunarathna *| Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 9040362 | Work: +94 112145345
Email: [email protected] | Web: www.wso2.com
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to