Integrating Servoy into a web site that uses PHP

We are developing an open Web Site using PHP. We are considering using Servoy Version 3 for developing some of the areas on the site which will require sophisticated database interaction (client account information etc).

The account information is NOT a seperate back end application open only to adminstrators. It will be available for all registered users of the site.

We want the user experience to be completely seamless. Therefore, when the user visits their account area they don’t have to re-log onto the system. If the main part of the site is built in PHP is there a way I can pass their log on information to servoy? Would I have to wrap the servoy template within a PHP page and would that work?

You might ask - why not write the whole site in Servoy. My reasons are as follows.

  1. Parts of the site are likely to be very busy and calculating concurrent licenses will be difficult and expensive

  2. The account area will be much less visited and therefore use up much less licences. However, it is also the area which requires a signficant amount of development easily and here is where I see Servoy could excel.

Has anybody got any ideas on integrating a web site this way. Please note that what I am considering is different from having a consumer front end and an adminstrative back end, which has already been discussed in the forums.

MerMer

Hi MerMer,

Depending on the need of sessions you can use a httprequest (server-size) from within PHP and serve the result in your own html code. Making it seem like 1 page.
But this would use only 1 webclient and therefore only 1 session.
Another technique is to use an iframe linked to the webclient URL and show the webclient in your page like that.
Again, this will make it feel like it’s part of the page and the user won’t see the webclient URL (unless they read the HTML source).

Hope this helps.

Robert,

Thanks for the input. Let me elaborate on the problem

A user would log onto the main site (using PHP), when they get to the Servoy section of the site then I want their account record to be displayed without having to log into the Servoy application seperately.

For the site to alternate seamlessly between PHP and Servoy, I imagine I would have to pass a Session Variable from PHP (such as the User ID) to the Servoy solution so that Servoy can display their relevant information. I hope this is clear. Any ideas if this is possible and if so how?

Cheers

MerMer

Hi MerMer

Servoy introduced CPU licensing at Servoy World this week which could solve your problem of not knowing how many licenses to buy.

Regards

Graham Greensall
Worxinfo Ltd

Thanks Graham. that’s nice to know and we’ll certainly consider that.

Ideally, I would prefer to know that Servoy can interoperate with PHP. PHP is a quick, powerful and easy to use scripting language that has now become more fully Object Orientated with version 5. It is has a very large base with many free 3rd party libraries.

There’s some things that PHP is going to do very well compared to Servoy and vice-versa. Ideally, I would like to consider using them side by side when it comes to web development.

If Servoy can interoperate well with the likes of PHP and other scripting languages- then it could potentially fill a very useful role for a much wider user base.

MerMer

MerMer:
PHP is a quick, powerful and easy to use scripting language that…

Have you looked at Rails :wink:

We are planning a Rails site with a Servoy back-office system. We will be phasing out PHP.

MerMer:
Robert,

Thanks for the input. Let me elaborate on the problem

A user would log onto the main site (using PHP), when they get to the Servoy section of the site then I want their account record to be displayed without having to log into the Servoy application seperately.

For the site to alternate seamlessly between PHP and Servoy, I imagine I would have to pass a Session Variable from PHP (such as the User ID) to the Servoy solution so that Servoy can display their relevant information. I hope this is clear. Any ideas if this is possible and if so how?

Cheers

MerMer

No problem. If you use Servoy 3.0 you can log a user in via method so you can easily pass your php userID and password to a servoy method and log the client to your servoy solution.

Christian, I looked at Rails some time ago (think I posted my views into these forums then). Ruby is clearly gaining mind share. Perhaps, worthy of another thread, but what was it in particular that made you change to Ruby versus PHP? I’ve heard that PHP now has various MVC frameworks and its now easy to develop using Object Orientated code.

Nicola, thanks for the response. That sounds like a solution. I’ll look at that. Have you tried it yourself?

I would be interested in understanding other detail on how Servoy might interoperate with other scripting engines. For instance, could you use PHP tags within the templates created by Servoy?

MerMer

MerMer:
Christian, I looked at Rails some time ago (think I posted my views into these forums then). Ruby is clearly gaining mind share. Perhaps, worthy of another thread, but what was it in particular that made you change to Ruby versus PHP? I’ve heard that PHP now has various MVC frameworks and its now easy to develop using Object Orientated code.

RailsConf Europe was held 30 minutes from where I live, so I went along. 450 people, mostly Java and PHP developers having switched to Rails or thinking of switching - why? Both more productive and more fun.

A few of the sessions, such as how to sell something new into a conservative organisation, were just as applicable to Servoy. (TIP: say you are prototyping, demo, and ask for 9 montns and a big budget to implement according to corporate guidelines – but if they want to save to some time and money, they can use the prototype as is)

Took the opportunity to tell a few people of Servoy :wink:

MerMer:
Nicola, thanks for the response. That sounds like a solution. I’ll look at that. Have you tried it yourself?

I would be interested in understanding other detail on how Servoy might interoperate with other scripting engines. For instance, could you use PHP tags within the templates created by Servoy?

MerMer

What I’m doing is using the headless client in conjuction with PHP, but I guess that you can pass your userID and pwd to the startup method of a Web client too and do the authentication stuff there. For the time being I’m using some headless clients to process forms and return a php page in some of my solutions but you cannot use php tags in servoy templates because Servoy uses his own tomcat server to serve pages and does not use the standard Apache/PHP. If you need further info feel free to ask me.