How to Use Different Solution Types?

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

How to Use Different Solution Types?

Postby john1598360627 » Thu Oct 20, 2022 2:47 am

I noticed there's a bunch of different solution types. Is there supposed be a certain way of using all these types properly? I only have one NG Client, and the rest are NG Modules. I have no idea what the point of using the other ones are. The wiki didn't really help as it doesn't list all these different types, or explain what the practical usage of the different types are.


https://wiki.servoy.com/display/DOCS/Solution+Types

solutionType
* Normal
* Module
* Web Client
* Smart Client
* Login
* Authenticator
* Pre-import hook module
* Post-import hook module
* Mobile
* Mobile shared module
* NG Client
* NG Module
* Service

Do each of these different solution/module types give unique properties or attributes? Are there any practical project examples that showcase the different types I can look at?
john1598360627
 
Posts: 191
Joined: Tue Aug 25, 2020 3:03 pm

Re: How to Use Different Solution Types?

Postby sean » Thu Oct 20, 2022 3:09 pm

Hi John, Many are there for legacy client types and backwards-compatibility. I guess you can ignore those. (Some should be hidden when you make a new solution)
NG Client: Main solution type
NG Module: Module of NG client, having UI
Module: Code-only module (no UI dependencies)
Pre-import hook module: Code which can be run during deployment (before hook). Use the onOpen event to execute code
Post-import hook module: Code which can be run during deployment (after hook). Use the onOpen event to execute code
Software Engineer
Servoy USA
sean
 
Posts: 383
Joined: Mon May 21, 2007 6:26 pm
Location: USA

Re: How to Use Different Solution Types?

Postby john1598360627 » Fri Oct 21, 2022 1:17 am

sean wrote:Hi John, Many are there for legacy client types and backwards-compatibility. I guess you can ignore those. (Some should be hidden when you make a new solution)
NG Client: Main solution type
NG Module: Module of NG client, having UI
Module: Code-only module (no UI dependencies)
Pre-import hook module: Code which can be run during deployment (before hook). Use the onOpen event to execute code
Post-import hook module: Code which can be run during deployment (after hook). Use the onOpen event to execute code

Ahh.

Wait what is before/after hook? Like, before/after the launching of the program? Similar to 'onSolutionOpen' right?

What is the usefulness of it. Is it a way of turning modules into a global space?


Also wait, so Web Client and Smart Client those are clearly deprecated.

But is the Login & Authenticator deprecated too? I was going to use those to setup a login page for my project.
john1598360627
 
Posts: 191
Joined: Tue Aug 25, 2020 3:03 pm

Re: How to Use Different Solution Types?

Postby mboegem » Fri Oct 21, 2022 7:30 am

john1598360627 wrote:what is before/after hook?

No, this is pre- and post import.
So when deploying a .war file or .servoy file, first the pre-import hook is triggered before anything else happens.
The pre-import hook module will (can only) run completely on its own, so no modules allowed here.
Simple reason for running on its own, is that at this point of importing, no other solutions exist on your server (at least when deploying a .war file)

After finishing pre-import, your solution will be imported, Servoy takes care of any incremental updates to your DB etc.
Now the post-import will be triggered, the post-import module may contain other modules.

john1598360627 wrote:so Web Client and Smart Client those are clearly deprecated.

Yes

john1598360627 wrote:is the Login & Authenticator deprecated too?

Basically, yes.
In a smart-client solution these were useful, because it was easy to get around a login page which was part of the main solution. Besides at that point you would have full access to the connected datasources.
So the login-module could only consist of forms without a connection to your datasource (so completely based on variables)
The authenticator-module could be called, which would then be spawned as a headless client and simply return a result like an object of data that you could then process in the login-module.

NG, lacking any Java UI, can not move away from the login page neither it's possible to execute client-side code that will gain access to datasources.
Therefor the login and authenticator module are no longer necessary.
As NG can not leave the form you setup as login form without being authenticated, you will need to use a tabpanel and navigate through different pages in case you need more.
Usecase could be a separate 'forgot password' page or '2FA verification' page after you initially entered correct credentials.

Hope this explains it.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1817
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: How to Use Different Solution Types?

Postby john1598360627 » Thu Oct 27, 2022 2:07 am

mboegem wrote:
john1598360627 wrote:what is before/after hook?

No, this is pre- and post import.
So when deploying a .war file or .servoy file, first the pre-import hook is triggered before anything else happens.
The pre-import hook module will (can only) run completely on its own, so no modules allowed here.
Simple reason for running on its own, is that at this point of importing, no other solutions exist on your server (at least when deploying a .war file)

After finishing pre-import, your solution will be imported, Servoy takes care of any incremental updates to your DB etc.
Now the post-import will be triggered, the post-import module may contain other modules.

john1598360627 wrote:so Web Client and Smart Client those are clearly deprecated.

Yes

john1598360627 wrote:is the Login & Authenticator deprecated too?

Basically, yes.
In a smart-client solution these were useful, because it was easy to get around a login page which was part of the main solution. Besides at that point you would have full access to the connected datasources.
So the login-module could only consist of forms without a connection to your datasource (so completely based on variables)
The authenticator-module could be called, which would then be spawned as a headless client and simply return a result like an object of data that you could then process in the login-module.

NG, lacking any Java UI, can not move away from the login page neither it's possible to execute client-side code that will gain access to datasources.
Therefor the login and authenticator module are no longer necessary.
As NG can not leave the form you setup as login form without being authenticated, you will need to use a tabpanel and navigate through different pages in case you need more.
Usecase could be a separate 'forgot password' page or '2FA verification' page after you initially entered correct credentials.

Hope this explains it.

Wow, thank you for explaining all of this. I didn't realize Login & Authenticator solutions were deprecated!
john1598360627
 
Posts: 191
Joined: Tue Aug 25, 2020 3:03 pm


Return to How To

Who is online

Users browsing this forum: No registered users and 0 guests