Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] [Lyo Generator] removing ToHtml methods from generated POJOs

Nice! Do we plan to add the deprecation annotations in 2.4.0 and then remove them completely in Lyo 4?

--
/Andrew

On 12 Nov 2018, at 09:11, Jad El-Khoury <jad@xxxxxx> wrote:

Hi

 

I plan to remove the [property]ToHtml() methods that are generated in the java classes corresponding to each of the domain resources. This would make these classes a lot cleaner, compact, and more open for different templating engines.

These methods are currently used in the generated jsp pages, which are of use for debugging purposes. (As well as the sample delegatedUI code.)

 

Any ideas or tips towards a better direction are appreciated. Below are my thoughts so far.

 

Since the produced jsp pages are mainly for debugging purposes, I do not plan to improve the currently produced html code. I will simply move the code from the [property]ToHtml() methods to be under <% %> inside the html pages.

That is, the JSP pages will not be so neat. My assumption is that you either (1) do not care about the code since you just use the pages to debug or (2) you care so much that you override the generated pages anyway. Either way, it means you don’t really care about the code in these JSP pages?

 

To start with, I will only mark the methods as “Deprecated”; and will not directly remove them. Why? Any currently produced jsp pages are not automatically reproduced (unless the files are first deleted). This means that old jsp pages do dependent on these java methods, and hence will break if I simply remove the methods.

 

Please note that these changes are based on my own assumptions on how these pages are being used.

If you share your needs and usage scenarios, I am happy to accommodate for them during this change.

 

regards

______________________________

Jad El-khoury, PhD

KTH Royal Institute of Technology

School of Industrial Engineering and Management, Mechatronics Division

Brinellvägen 83, SE-100 44 Stockholm, Sweden

Phone: +46(0)8 790 6877 Mobile: +46(0)70 773 93 45

jad@xxxxxx, www.kth.se

 

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

Back to the top