migrating to neon - eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11....
TRANSCRIPT
![Page 1: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/1.jpg)
Judith Gull, Matthias Zimmermann
Migrating to Neon
![Page 2: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/2.jpg)
What is Changing with Neon?
Migrating the «Contacts» Application
� Shared
� Server
� Client
� Demo
Migration Tips
Agenda
![Page 3: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/3.jpg)
Eclipse Scout 2015
Migration to NeonWhat is changing?
![Page 4: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/4.jpg)
What changes in Neon?
Pure Java
Instead of OSGi Bundles
HTML-UI
Instead of RAP/Swing/SWT
Other API changes
![Page 5: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/5.jpg)
Goals: No conceptual changes in scout client model
� Possible to use existing models with minor modifications
Migration:
− Rewrite custom Swing/SWT/RAP components in JS/HTML− New Attributes (CSS class)− Fonts instead of Icons− …
HTML-UI Changes
![Page 6: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/6.jpg)
Challenge: Eclipse and OSGi code had to be removed
� No deprecations
Migration:
− Convert project structure to maven default− Convert manifest dependencies to maven dependencies− Convert product files to launch files− Use bean manager instead of OSGi service registry, no service
registration− Eclipse Jobs -> scout jobs− Test runner
Vanilla Java
![Page 7: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/7.jpg)
Other API Changes
− Some renames/moves: AbstractExtensibleSmartField ->
AbstractSmartField
− Improved Security: HTML is now escaped by default
− ClientNotification: Improved performance and API
− …
![Page 8: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/8.jpg)
Migration Guide
� Not ready yet [1]
- Currently not much experience with migrations
(BSI Standard Product)
- More projects expected to migrate in 2016
[1] https://github.com/BSI-Business-Systems-Integration-
AG/org.eclipse.scout.docs/blob/releases/5.2.x/docs/adoc/migration/MigrationGuide.
adoc
![Page 9: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/9.jpg)
Eclipse Scout 2015
Migrating «Contacts»A practical Example
![Page 10: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/10.jpg)
«Contacts»Mars
https://github.com/BSI-Business-Systems-Integration-AG/org.eclipse.scout.docs/tree/releases/5.0.x/code/contacts
![Page 11: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/11.jpg)
«Contacts»Neon
https://github.com/BSI-Business-Systems-Integration-AG/org.eclipse.scout.docs/tree/releases/5.2.x/code/contacts
https://github.com/BSI-Business-Systems-Integration-AG/org.eclipse.scout.docs/tree/releases/6.0.x/code/contacts
![Page 12: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/12.jpg)
Background
� Replaces Wiki «Minicrm» and Scout Book «My Contacts»
� Broad coverage of Scout features
� Showcase release migrations
Neon «Business» Updates
� Code organisation along business components
� Includes new features of HTML5 UI
− Tabs replace modal forms
− Tools
− Theming
«Contacts»
![Page 13: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/13.jpg)
High level
1. Create a «Hello World» using the Scout SDK
2. Move existing business code to the new app
3. Remove errors and warnings
Lower level
� Migrate the core, then the dependent business modules
� Migrate a module
− First shared
− Then server
− Then client
Migrating the «Contacts»
![Page 14: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/14.jpg)
Eclipse Scout 2015
Migrating «Contacts»Shared
![Page 15: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/15.jpg)
Just copy & paste
� Permissions
� Codetypes & Codes
� Lookup calls
� FormData & PageData
To modify for Neon
� Move Texts.properties to new place
� Lookup call interfaces
� Custom service interfaces
Skipping
� DefaultTextProviderService
Migrating «Contacts»org.eclipsescout.contacts.shared
![Page 16: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/16.jpg)
Migrating «Contacts»Texts.properties
MarsNeon
Copy & Paste
![Page 17: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/17.jpg)
Mars
public interface IContactLookupService extends
ILookupService<String> { }
Neon
@TunnelToServerpublic interface IContactLookupService extends
ILookupService<String> { }
Migrating «Contacts»Lookup Call Interfaces
![Page 18: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/18.jpg)
Mars
@InputValidation(IValidationStrategy.PROCESS.class)public interface IContactService extends IService {...
}
Neon
@ApplicationScoped@TunnelToServer@InputValidation(IValidationStrategy.PROCESS.class)public interface IContactService {...
}
Migrating «Contacts»Custom Service Interfaces
![Page 19: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/19.jpg)
Eclipse Scout 2015
Migrating «Contacts»Server
![Page 20: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/20.jpg)
Just copy & paste
� Lookup services
To modify for Neon
� Add ConfigProperties, SuperUserRunContextProvider, PlatformListener
� Move content of config.ini to config.properties
� Move startup logic to PlatformListener
� DerbySqlService (pom.xml …)
� Custom services
Skipping
� ServerSession
� AccessControlService
Migrating «Contacts»org.eclipsescout.contacts.server
![Page 21: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/21.jpg)
Migrating «Contacts»Helper Classes (ConfigProperties …)
Neon
![Page 22: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/22.jpg)
Migrating «Contacts»Module per Product
MarsNeon
![Page 23: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/23.jpg)
Migrating «Contacts»config.ini – config.properties
Mars
Neon
![Page 24: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/24.jpg)
Migrating «Contacts»DerbySqlService – pom.xml
![Page 25: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/25.jpg)
Mars
public class DerbySqlService extends AbstractDerbySqlService {}
Neon
public class DerbySqlService extends AbstractDerbySqlService {
@Overrideprotected String getConfiguredJdbcMappingName() {
return CONFIG.getPropertyValue(ConfigProperties.DatabaseJdbcMappingNameProperty.class);
}}
Migrating «Contacts»DerbySqlService – ConfigProperties
![Page 26: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/26.jpg)
Mars
public class ContactService extends AbstractServiceimplements IContactService {
...}
Neon
public class ContactService implements IContactService {...}
Migrating «Contacts»Custom Services
![Page 27: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/27.jpg)
Mars
public class ServerApplication implements IApplication {
@Overridepublic Object start(IApplicationContext context) throws Exception {
@Overridepublic IStatus run(IProgressMonitor monitor) {// Call all startup services to collect all available extensionsfor (IServerStartupService service :
SERVICES.getServices(IServerStartupService.class)) {service.init();
}}
return Status.OK_STATUS;}
return EXIT_OK;}
}
Migrating «Contacts»ServerApplication (startup logic)
![Page 28: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/28.jpg)
Mars
public class ServerStartupService extends AbstractServiceimplements IServerStartupService
{
@Overridepublic void init() throws ProcessingException {
Set<String> tables = getExistingTables();createCompanyTable(tables, addInitialData());createContactTable(tables, addInitialData());
LOG.info("DB install completed");}
}
Migrating «Contacts»ServerApplication (startup logic)
![Page 29: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/29.jpg)
Neon
public class PlatformListener implements IPlatformListener {
@Overridepublic void stateChanged(PlatformEvent event) {
if (event.getState() == State.BeanManagerValid) {autoCreateDatabase();
}}
public void autoCreateDatabase() {...superUserRunContext.run(new IRunnable() {
@Overridepublic void run() throws Exception {
Set<String> tables = getExistingTables();createOrganizationTable(tables);createPersonTable(tables);
}});
}}
Migrating «Contacts»PlatformListener (startup logic)
![Page 30: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/30.jpg)
Eclipse Scout 2015
Migrating «Contacts»Client
![Page 31: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/31.jpg)
Just copy & paste
� Lookup calls
To modify for Neon
� Move Icon image files
� Forms & pages: «Pattern Matching»
− AbstractExtensibleFoo � AbstractFoo
− SERVICES.getService � BEANS.get
Skipping
� ClientSession
Migrating «Contacts»org.eclipsescout.contacts.client
![Page 32: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/32.jpg)
Migrating «Contacts»Move Icon Images
Mars
Neon
Copy & Paste
![Page 33: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/33.jpg)
Migrating «Contacts»Client
Mars
Neon
![Page 34: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/34.jpg)
Eclipse Scout 2015
Migrating «Contacts»Demo
![Page 35: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/35.jpg)
«Contacts»Migration Demo
![Page 36: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/36.jpg)
Eclipse Scout 2015
Migration to NeonTips
![Page 37: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/37.jpg)
Test and Check Early
� Play with new sources early
� Are all your essential features implemented?
![Page 38: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/38.jpg)
Plan Ahead
� Team may not be able to work as usual during migration
� Merges may be more difficult (project structure)
![Page 39: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/39.jpg)
Plan Knowhow Transfer
� Be aware of new concepts in Scout Neon!
� Check out the docs (book, forum) [1]
� BSI Offers 2 day Upgrade Course (Mars -> Neon)
[1]https://tools.bsiag.com/scoutbook/5.2/latest/book_scout_architecture/scout_architec
ture/scout_architecture.html
![Page 40: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/40.jpg)
Need Help?
� BSI offers migration support
![Page 41: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/41.jpg)
Eclipse Scout 2015
Summary
![Page 42: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/42.jpg)
«Contacts»
� Technical migration, straight forward
� No change for the majority of components
� Includes refactoring, usage of new features
General:
� Positive feedback from migration of BSI CRM to Neon
� Migration tooling depending on additional experience
� We are here to help ☺
Migrating to NeonSummary
![Page 43: Migrating to Neon - Eclipsewiki.eclipse.org/images/5/59/20151102_ece_unconference... · 2015. 11. 10. · What changes in Neon? Pure Java Instead of OSGiBundles HTML-UI Instead of](https://reader035.vdocument.in/reader035/viewer/2022071114/5febbefab35c785eb94bcf9e/html5/thumbnails/43.jpg)
Eclipse Scout 2015
Thanks@EclipseScout
{judith.gull|matthias.zimmermann}@bsi-software.com