I've been looking at some wicket 7 porting.
In some of that, lambda expressions might be useful. Is that OK to use?
Brad
I've been looking at some wicket 7 porting.
In some of that, lambda expressions might be useful. Is that OK to use?
Brad
Hi Brad,
yes, lambdas are on the sprint upgrade menu in order to reduce boilerplate.
I believe Jim (cc’ed) wanted to look into them, check the thread
“Preparing for the Wicket upgrade sprint” in this list for details.
What I believe we want to have in time for the code sprint (Jan 18th) is
some discussion and guidance about which path to follow, like
rolling our own, depending on one of the existing attempts to leverage
lambdas in Wicket models/actions/validators or a hybrid approach.
And if it’s rolling our own, then yep, some code to use when we start
migrating existing pages to it.
Cheers
Andrea
–
Geosolutions’ Winter Holidays from 24/12 to 6/1
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.
Hi all,
As a quick question/follow-up, if the GeoServer build already users Java 8, could we bump to Wicket 8?
From what I can tell, the Wicket version is tied to the version of Java. Consequently, Wicket 8 may have some Lambda work we could leverage.
Worst case, given GeoServer’s size, if we end up with a few hand-rolled helper functions, it won’t be the end of the world.
Cheers,
Jim
On 01/01/2016 05:35 AM, Andrea Aime wrote:
Hi Brad,
yes, lambdas are on the sprint upgrade menu in order to reduce boilerplate.
I believe Jim (cc’ed) wanted to look into them, check the thread
“Preparing for the Wicket upgrade sprint” in this list for details.What I believe we want to have in time for the code sprint (Jan 18th) is
some discussion and guidance about which path to follow, like
rolling our own, depending on one of the existing attempts to leverage
lambdas in Wicket models/actions/validators or a hybrid approach.
And if it’s rolling our own, then yep, some code to use when we start
migrating existing pages to it.Cheers
Andrea–
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.Geosolutions’ Winter Holidays from 24/12 to 6/1
Ing. Andrea Aime
@geowolf
Technical LeadGeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549http://www.geo-solutions.it
http://twitter.com/geosolutions_itAVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.
Jim,
while using Java 8 features in Wicket is an attractive idea, Wicket 8.x is the development branch and only SNAPSHOTs are available:
http://wicket.apache.org/start/wicket-8.x.html
Unless we also want to become Wicket developers, I think we should build GeoServer on current supported Wicket (7.x releases).
Wicket 7.0 was only released in July:
http://wicket.apache.org/news/2015/07/28/wicket-7.0-released.html
Kind regards,
Ben.
On 05/01/16 10:57, Jim Hughes wrote:
Hi all,
As a quick question/follow-up, if the GeoServer build already users Java
8, could we bump to Wicket 8?From what I can tell, the Wicket version is tied to the version of
Java. Consequently, Wicket 8 may have some Lambda work we could leverage.Worst case, given GeoServer's size, if we end up with a few hand-rolled
helper functions, it won't be the end of the world.Cheers,
Jim
On 01/01/2016 05:35 AM, Andrea Aime wrote:
Hi Brad,
yes, lambdas are on the sprint upgrade menu in order to reduce
boilerplate.
I believe Jim (cc'ed) wanted to look into them, check the thread
"Preparing for the Wicket upgrade sprint" in this list for details.What I believe we want to have in time for the code sprint (Jan 18th) is
some discussion and guidance about which path to follow, like
rolling our own, depending on one of the existing attempts to leverage
lambdas in Wicket models/actions/validators or a hybrid approach.
And if it's rolling our own, then yep, some code to use when we start
migrating existing pages to it.Cheers
Andrea--
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.*_Geosolutions' Winter Holidays from 24/12 to 6/1_*
Ing. Andrea Aime
@geowolf
Technical LeadGeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313 <tel:%2B39%200584%20962313>
fax: +39 0584 1660272 <tel:%2B39%200584%201660272>
mob: +39 339 8844549 <tel:%2B39%20%C2%A0339%208844549>http://www.geo-solutions.it
http://twitter.com/geosolutions_it*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo è consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.-------------------------------------------------------
------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
Hi Ben,
Fair enough. I didn't see a roadmap/timeline for a 8.0 release. I wonder if it is worth asking to see if a release is on the horizon.
Depending on how clever we get with the Java 8 features, it may be worth see if anything we do in Victoria can be contributed back.
Cheers,
Jim
On 01/04/2016 05:12 PM, Ben Caradoc-Davies wrote:
Jim,
while using Java 8 features in Wicket is an attractive idea, Wicket 8.x is the development branch and only SNAPSHOTs are available:
http://wicket.apache.org/start/wicket-8.x.htmlUnless we also want to become Wicket developers, I think we should build GeoServer on current supported Wicket (7.x releases).
Wicket 7.0 was only released in July:
http://wicket.apache.org/news/2015/07/28/wicket-7.0-released.htmlKind regards,
Ben.On 05/01/16 10:57, Jim Hughes wrote:
Hi all,
As a quick question/follow-up, if the GeoServer build already users Java
8, could we bump to Wicket 8?From what I can tell, the Wicket version is tied to the version of
Java. Consequently, Wicket 8 may have some Lambda work we could leverage.Worst case, given GeoServer's size, if we end up with a few hand-rolled
helper functions, it won't be the end of the world.Cheers,
Jim
On 01/01/2016 05:35 AM, Andrea Aime wrote:
Hi Brad,
yes, lambdas are on the sprint upgrade menu in order to reduce
boilerplate.
I believe Jim (cc'ed) wanted to look into them, check the thread
"Preparing for the Wicket upgrade sprint" in this list for details.What I believe we want to have in time for the code sprint (Jan 18th) is
some discussion and guidance about which path to follow, like
rolling our own, depending on one of the existing attempts to leverage
lambdas in Wicket models/actions/validators or a hybrid approach.
And if it's rolling our own, then yep, some code to use when we start
migrating existing pages to it.Cheers
Andrea--
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.*_Geosolutions' Winter Holidays from 24/12 to 6/1_*
Ing. Andrea Aime
@geowolf
Technical LeadGeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313 <tel:%2B39%200584%20962313>
fax: +39 0584 1660272 <tel:%2B39%200584%201660272>
mob: +39 339 8844549 <tel:%2B39%20%C2%A0339%208844549>http://www.geo-solutions.it
http://twitter.com/geosolutions_it*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo è consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.-------------------------------------------------------
------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
On Mon, Jan 4, 2016 at 11:12 PM, Ben Caradoc-Davies <ben@anonymised.com>
wrote:
Jim,
while using Java 8 features in Wicket is an attractive idea, Wicket 8.x is
the development branch and only SNAPSHOTs are available:
http://wicket.apache.org/start/wicket-8.x.html
Agreed, unless they are going to make a final release before the sprint, I
suggest not to take Wicket 8 in consideration,
our release model is time boxed and we need to be feature complete by
February 18th, meaning we won't be able
to make significant library changes after that.
Also, the lambda support that we'll use, if any, will probably stay for a
while, unless we get better at upgrading the
libraries over time (that depends a lot also on how much Wicket 8 will be
binary incompatible with Wicket 7, at the
time of writing the upgrade guide is really tiny, seems to suggest they
just got started:
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+8.0 )
Cheers
Andrea
*Geosolutions' Winter Holidays from 24/12 to 6/1*
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
-------------------------------------------------------
One request Brad - if you can collect useful examples of using wicket with lambda expressions it would help everyone be effective during the code sprint. Even just sending them to email or a wiki page …
On 1 January 2016 at 00:52, Brad Hards <bradh@anonymised.com> wrote:
I’ve been looking at some wicket 7 porting.
In some of that, lambda expressions might be useful. Is that OK to use?
Brad
Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
–
Jody Garnett
On Wed, 6 Jan 2016 01:55:30 PM Jody Garnett wrote:
One request Brad - if you can collect useful examples of using wicket with
lambda expressions it would help everyone be effective during the code
sprint. Even just sending them to email or a wiki page ...
I think the common case is avoiding the anonymous class stuff, as shown
in this example. Unfortunately this isn't the cleanest example, because
there are API changes to the visitor code, but hopefully you can see it
diff --git a/src/web/core/src/main/java/org/geoserver/web/publish/PublishedEditTabPanel.java b/src/web/core/src/main/java/org/geoserver/web/publish/PublishedEditTabPanel.java
index 633f217..6b199d7 100644
--- a/src/web/core/src/main/java/org/geoserver/web/publish/PublishedEditTabPanel.java
+++ b/src/web/core/src/main/java/org/geoserver/web/publish/PublishedEditTabPanel.java
@@ -10,6 +10,7 @@ import java.io.IOException;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
+import org.apache.wicket.util.visit.IVisit;
import org.geoserver.catalog.LayerInfo;
import org.geoserver.catalog.PublishedInfo;
import org.geoserver.web.data.resource.ResourceConfigurationPage;
@@ -59,12 +60,8 @@ public class PublishedEditTabPanel<T extends PublishedInfo> extends Panel {
public PublishedEditTabPanel<T> setInputEnabled(final boolean enabled) {
- visitChildren(new IVisitor<Component>() {
- @Override
- public Object component(Component c) {
- c.setEnabled(enabled);
- return CONTINUE_TRAVERSAL;
- }
+ visitChildren((Component c, final IVisit<Void> visit) -> {
+ c.setEnabled(enabled);
});
return this;
}
On netbeans 8, the IDE will offer to do conversions for you. Possibly other
IDEs will do that too.
Brad
On Thu, Jan 7, 2016 at 11:10 PM, Brad Hards <bradh@anonymised.com> wrote:
On netbeans 8, the IDE will offer to do conversions for you. Possibly other
IDEs will do that too.
Checked Eclipse, it does provide a "Convert to lambda expression" quick fix,
that turns the above code into:
visitChildren(c -> {
c.setEnabled(enabled);
return CONTINUE_TRAVERSAL;
});
That still needs a fix, as CONTINUE_TRAVERSAL now needs to be
qualified as IVisitor.CONTINUE_TRAVERSAL, but I guess it's good enough
The translation made by Netbeans is a bit odd, wondering if it's really
equivalent,
as it's not returning the CONTINUE_TRAVERSAL flag? Did not spend time
to check.
Cheers
Andrea
*Geosolutions' Winter Holidays from 24/12 to 6/1*
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
-------------------------------------------------------
On Fri, 8 Jan 2016 11:38:44 AM Andrea Aime wrote:
The translation made by Netbeans is a bit odd, wondering if it's really
equivalent,
as it's not returning the CONTINUE_TRAVERSAL flag? Did not spend time
to check.
It isn't equivalent, because I've actually done a conversion for the new
(Wicket 7) API in there as well. There is no IVisitor in Wicket 7, and the
IVist replacement doesn't return a value.
Sorry for the confusion.
Brad