[Geoserver-devel] Preparing for the Wicket upgrade sprint

Hi all,
I’m starting a thread to get us prepared to the Wicket upgrade sprint in January.

We’ll have several devs and testers for a limited amount of time, thus it makes
sense to do some preparation in advance in order to hit the ground running,
and leverage all the people we have starting from the first morning of coding.

My plan is to create a wicket7 branch on GeoServer’s github, update the
deps, and perform some of the changes that can be machine automated,
in order to spend time during the sprint on the bits that actually require some
brain to be performed.

I don’t know in advance all the changes that can be automated, but my two
previous attempts at upgrading wicket, to 1.5 the first, to 1.6 (wicket 6) the
second, provide some good starting point to locate changes that repeat
over and over, and also, could be used as quick guidance when in doubt
during the sprint:
https://github.com/geoserver/geoserver/commits/feature-upgrade-wicket16

Another thing that I would like to do, if I manage, is to drop the dependency
towards wicket-spring, since the latter depends on Spring 4, we are not
using much out of that module anyways, and during one of my upgrade
attempts I already made GeoServerApplication not extend SpringWebApplication
anymore.

Other changes that are suitable to be done earlier are anything so core
that would prevent individual component tests from being run.

Other activities that could be carried on early would be checking
library compatibility, some Java 8 lambda support and tester improvement guides.

Library compatibility wise, we should check that we don’t need to upgrade
other libs in order to upgrade Wicket. As far as I can tell Wicket core
does not depend on much, but we should probably have a look:

http://mvnrepository.com/artifact/org.apache.wicket/wicket-core/7.1.0

The lambda support would reduce the usual Wicket boilerplate, we could draw
some ideas from these blogs/projects:
https://rodrigouchoa.wordpress.com/2015/02/26/apache-wicket-with-lambda-expressions/

https://github.com/rodrigouchoa/wicket-lambda

https://github.com/todvora/wicket-lambdamodel
https://github.com/wicketstuff/core/tree/master/lambda-parent/lambda

A thorn in the back when working with Wicket is the testing, which has been
so far, with Wicket 1.4, poor and hard to get right to say the least.
It would be cool if someone could look into what Wicket 7 has to offer,
and if there is anything useful, write down a little guide on how to perform
test upgrades. Some reference here:
https://ci.apache.org/projects/wicket/guide/7.x/guide/testing.html

Hum… that’s what comes to mind right, you’re welcomed to contribute more
bits to the list, and more importantly, to volounteer on working on an item
of your choice.

Don’t think I’ll get quick feedback today, but I’m going to get a wicket7 branch
started, will mail back when it’s available.

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 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 Andrea,

Thanks for sending this out. Since my background with Wicket is limited, I’m going to do my best to read through links and branches before the code sprint.

I’m interested in some of the Java 8 lambda support and TDD. Regarding testing, do you have any general guidance for which levels of testing would be ‘good to have’, ‘nice to have’, and stretch goals?

As a low bar, it looks like we could test whether or not components of a page are rendered properly. On the extreme end, should we have tests which click through multiple pages to register a DataStore, a layer, and validate all those steps?

Thanks in advance,

Jim

···

==
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 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 Sat, Dec 26, 2015 at 8:27 PM, James Hughes <jnh5y@anonymised.com> wrote:

Hi Andrea,

Thanks for sending this out. Since my background with Wicket is limited,
I'm going to do my best to read through links and branches before the code
sprint.

This one looks like a good concise read too:
https://dzone.com/refcardz/getting-started-apache-wicket

I'm interested in some of the Java 8 lambda support and TDD. Regarding
testing, do you have any general guidance for which levels of testing would
be 'good to have', 'nice to have', and stretch goals?

As a low bar, it looks like we could test whether or not components of a
page are rendered properly. On the extreme end, should we have tests which
click through multiple pages to register a DataStore, a layer, and validate
all those steps?

Yes, most of the tests we have today are indeed setting up the page or the
component, and checking it does not blow up and that the main components
are properly rendered and filled with the right values.
Where we are severely falling short is checking dynamic behavior,
especially the one linked with ajax actions, I hope that Wicket 7 will
provide
better support for that (Wicket 1.4 has some, but very often, it does not
seem to work...).

Single components might have a unit test, but most are
integration/system/functional types extending this base class, which you
can check
for functionality, and to get a feel of which tests we have, by looking at
its subclasses:
https://github.com/geoserver/geoserver/blob/master/src/web/core/src/test/java/org/geoserver/web/GeoServerWicketTestSupport.java

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 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,
I’ve started collecting some material in a wiki page, add as you see fit:

https://github.com/geoserver/geoserver/wiki/Wicket-migration-code-sprint

Cheres
Andrea

···

On Sat, Dec 26, 2015 at 4:41 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi all,
I’m starting a thread to get us prepared to the Wicket upgrade sprint in January.

We’ll have several devs and testers for a limited amount of time, thus it makes
sense to do some preparation in advance in order to hit the ground running,
and leverage all the people we have starting from the first morning of coding.

My plan is to create a wicket7 branch on GeoServer’s github, update the
deps, and perform some of the changes that can be machine automated,
in order to spend time during the sprint on the bits that actually require some
brain to be performed.

I don’t know in advance all the changes that can be automated, but my two
previous attempts at upgrading wicket, to 1.5 the first, to 1.6 (wicket 6) the
second, provide some good starting point to locate changes that repeat
over and over, and also, could be used as quick guidance when in doubt
during the sprint:
https://github.com/geoserver/geoserver/commits/feature-upgrade-wicket16

Another thing that I would like to do, if I manage, is to drop the dependency
towards wicket-spring, since the latter depends on Spring 4, we are not
using much out of that module anyways, and during one of my upgrade
attempts I already made GeoServerApplication not extend SpringWebApplication
anymore.

Other changes that are suitable to be done earlier are anything so core
that would prevent individual component tests from being run.

Other activities that could be carried on early would be checking
library compatibility, some Java 8 lambda support and tester improvement guides.

Library compatibility wise, we should check that we don’t need to upgrade
other libs in order to upgrade Wicket. As far as I can tell Wicket core
does not depend on much, but we should probably have a look:

http://mvnrepository.com/artifact/org.apache.wicket/wicket-core/7.1.0

The lambda support would reduce the usual Wicket boilerplate, we could draw
some ideas from these blogs/projects:
https://rodrigouchoa.wordpress.com/2015/02/26/apache-wicket-with-lambda-expressions/

https://github.com/rodrigouchoa/wicket-lambda

https://github.com/todvora/wicket-lambdamodel
https://github.com/wicketstuff/core/tree/master/lambda-parent/lambda

A thorn in the back when working with Wicket is the testing, which has been
so far, with Wicket 1.4, poor and hard to get right to say the least.
It would be cool if someone could look into what Wicket 7 has to offer,
and if there is anything useful, write down a little guide on how to perform
test upgrades. Some reference here:
https://ci.apache.org/projects/wicket/guide/7.x/guide/testing.html

Hum… that’s what comes to mind right, you’re welcomed to contribute more
bits to the list, and more importantly, to volounteer on working on an item
of your choice.

Don’t think I’ll get quick feedback today, but I’m going to get a wicket7 branch
started, will mail back when it’s available.

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 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.


==
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 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 Sat, Dec 26, 2015 at 4:41 PM, Andrea Aime <andrea.aime@anonymised.com>
wrote:

Don't think I'll get quick feedback today, but I'm going to get a wicket7
branch
started, will mail back when it's available.

The wicket7 branch is not available, I've hammered it up to the point that
I have
GeoServerHomePageTest pass, and GeoServer start with the home page actually
showing up with proper CSS:

https://github.com/geoserver/geoserver/tree/wicket7

Everything else is still up for migration, won't compile, and so on, but at
least
in Eclipse you can start it up (not sure if other IDEs allow code to start
up without
first fully compiling, so you've been warned).

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 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,
I believe to have migrated pretty much anything that could be automated
with search/replace, and I’ve updated the wiki page with some more references
to guides and manual steps for the migration.

Eclipse states there are 200+ compile errors left, so there’s plenty
of fun left for Victoria (plus finding what does not work once it compiles,
extending our weak test coverage, make code leaner using lambdas, and so on).

I invite anyone that is going to join the code sprint to have a look both
at the wiki, the referenced material, and the current set of changes in the branch.

Cheers
Andrea

···

On Mon, Dec 28, 2015 at 6:33 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Sat, Dec 26, 2015 at 4:41 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Don’t think I’ll get quick feedback today, but I’m going to get a wicket7 branch

started, will mail back when it’s available.

The wicket7 branch is not available, I’ve hammered it up to the point that I have
GeoServerHomePageTest pass, and GeoServer start with the home page actually
showing up with proper CSS:

https://github.com/geoserver/geoserver/tree/wicket7

Everything else is still up for migration, won’t compile, and so on, but at least
in Eclipse you can start it up (not sure if other IDEs allow code to start up without
first fully compiling, so you’ve been warned).

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 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.


==
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 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.