Skip to main content

Hi FME'ers,

Here's this week's quiz. As before, I'll be back online with the answers tomorrow, and a list of top scores, so I'll see you then.

Quiz: https://demos-safe-software.fmecloud.com/fmeserver/apps/FMEQuiz

It is still a bit experimental (my use of Server apps) so do let me know if it doesn't work for some reason (I do see a bit of an encoding issue with one question, but it should be OK).

Cheers

Mark

@mark2atsafe, how do you have the FME Server App workspace redirect set up? So after we run the translation, it brings me to another app that is displaying the score.


@mark2atsafe, how do you have the FME Server App workspace redirect set up? So after we run the translation, it brings me to another app that is displaying the score.

To be honest, it's not the ideal setup. I would normally return the scores as HTML (a streamed HTML writer), but unfortunately it opens up a new page, losing the formatting/style of the app page. 

So what I do instead is stream back HTML that redirects you to a new app. e.g. if you scored 3 then it streams back:

<meta http-equiv="Refresh" content="1; url=https://demos-safe-software.fmecloud.com/fmeserver/apps/YouScored3">

That app is set up to look the same as the question page. And if you click run again it just runs a workspace that does the same redirect, but to safe.com.

It's really not a great design because I need an app for each different score, but since there are only 7 possible scores, it's not too bad. 

In the long run I think we'll have to improve this functionality to stream HTML using the same page stylings that an app is set up with. Maybe a workspace transformer (ServerAppHTMLStyler?) that lets me create HTML using the same style options as a Server app? Maybe an option to stream back to the same app page? I don't know, but it's one of those shortcomings you don't really see until something goes into production.


Bug in html encoding on last question?


Bug in html encoding on last question?

Yes, I noticed that, and yet if you use the app mentioned in question 2, then it looks fine. I shall query the developers about that.


To be honest, it's not the ideal setup. I would normally return the scores as HTML (a streamed HTML writer), but unfortunately it opens up a new page, losing the formatting/style of the app page. 

So what I do instead is stream back HTML that redirects you to a new app. e.g. if you scored 3 then it streams back:

<meta http-equiv="Refresh" content="1; url=https://demos-safe-software.fmecloud.com/fmeserver/apps/YouScored3">

That app is set up to look the same as the question page. And if you click run again it just runs a workspace that does the same redirect, but to safe.com.

It's really not a great design because I need an app for each different score, but since there are only 7 possible scores, it's not too bad. 

In the long run I think we'll have to improve this functionality to stream HTML using the same page stylings that an app is set up with. Maybe a workspace transformer (ServerAppHTMLStyler?) that lets me create HTML using the same style options as a Server app? Maybe an option to stream back to the same app page? I don't know, but it's one of those shortcomings you don't really see until something goes into production.

I think having the ability to customize the fme server translation page would be a great addition.


@mark2atsafe

Whoever designed the second FME quiz deserves an applause on behalf of all the Indians for having included FME Vande Bharat Express or Train 18 as one of the options!

Happy FME -ing :-)

SRG


Reply