Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] DTO plugin of Che

Hello Tareq
Thank you for your work.
I think che issues https://github.com/codenvy/che/issues can be a good starting point
for  such kind of conversation. Or you can continue in this mail list. 

Sergii Kabashniuk

On Wed, Jan 20, 2016 at 12:29 PM, Sharafy, Tareq <tareq.sharafy@xxxxxxx> wrote:

Hi,

I would like to contribute an alternative method for generating DTO implementations.

The alternative method would be based on standard java annotation processing and would use text templating engines to generate the source code. This would simplify generating DTO implementations greatly without the need for several complicated maven configurations. The generated code would be managed with convenient external code template files, ditching away the hazardous current method that does hundreds of "string append" and is very hard to maintain and develop.

I do have a POC branch with tests and examples. Where should I explain the design of the suggested method? Is there a dedicated area for such purposes?

thank you
Tareq Sharafy

 

From: che-dev-bounces@xxxxxxxxxxx [mailto:che-dev-bounces@xxxxxxxxxxx] On Behalf Of Sharafy, Tareq
Sent: Monday 17 August 2015 16:53
To: che developer discussions <che-dev@xxxxxxxxxxx>


Subject: Re: [che-dev] DTO plugin of Che

 

Hi,
My question is less a development requirement and more a rethinking about the actual design of the feature.

The current approach relies on reflection which requires a fully compiled DTO definition interfaces before generating the DTO implementations. This forces Che extensions that generate DTOs to explicitly add sources re-compile during the maven build process in order to get consistent results.

This requires complex non-standard configurations and dependencies, compared to the annotation processing tooling of Java and Maven that provides native support the required tasks and requires zero configurations.

Regardless of the points above, working with StringBuilder is very hard to maintain and extend. Templating engines would be a huge improvement here, especially for relatively simple patterns like DTOs.

thank you
Tareq Sharafy

 

From: che-dev-bounces@xxxxxxxxxxx [mailto:che-dev-bounces@xxxxxxxxxxx] On Behalf Of Sergii Kabashniuk
Sent: Monday 17 August 2015 16:12
To: che developer discussions
Subject: Re: [che-dev] DTO plugin of Che

 

Hi.

The original idea was taken from collide https://code.google.com/p/collide/

 

Is there any usecase that block you with current architecture what you want to use annotation processor and (or )template engine ?

 

Sergii Kabashniuk

 

 

 

 

On Mon, Aug 17, 2015 at 3:51 PM, Sharafy, Tareq <tareq.sharafy@xxxxxxx> wrote:

Hi,

I have two questions about the DTO plug-in of Che:

1- Why wasn't it written as a standard annotation processor?

2- Why isn't a text template engine (e.g. Mustache) used instead of repetitive StringBuilder appending?

thank you
Tareq Sharafy
Cloud Development Experience | SAP Labs Israel | 15 Hatidhar st, Raanana 43665, Israel
T +972-(0)7-4732-1647 | F +972-(0)9-777-5618


_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev

 


_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev



Back to the top