how to record last visit page on Eclipse RAP develop - eclipse-rap

In the development of RAP eclipse, I want to record the last visit of the page, and the next time to open the application is the last visit to the page.
which API I need to use the RAP eclipse to develop ?

When it's only about reloading the application, the BrowserNavigation might help. For example, this online demo uses this service to set an entry into the browser history for every page that is opened. When you select a page in the menu and then reload, the application will load the same page. This demo is part of the RAP project, you can have a look at the source code.
If this solution is not sufficient, the RAP Developer's Guide also contains introduction to storing data in a RAP application.

Related

PWA vs html5 webapp?

I know that the most Iconic feature of PWA are
Service Worker: which make user can use the app offline from cached resources
Add To Home Screen: With this feature, user can add a shortcut of the app on their mobile home screen, to get a experience like interacting with a Native App(But there still a huge different, in my opinion)
etc.
However, I can do like all of them on about 6/7 years ago by using the HTML5 technology at that time, I know that service worker comes recently but there also was "HTML5 App Cache, as well as the Local Storage, Indexed DB, and the File API specifications." can do similar things.
Is there anyone can explain what's the difference between PWA and HTML5 webapps? or they are just the in term of same? or a similar concept but different implementation? or PWA is the (next gen/extension) of HTML5 webapp?
I might have some misunderstanding on PWAs, since I am new to this term, Thanks.
If keep it simple PWA is ordinary site with 3 additional features.
responsive design - site should look well on all devices
manifest.json - site must have general description about itself stored in manifest.json
caching - site must work offline
I believe 1 and 2 is easey. And 3 is realy what PWA is all about. So the question is: how we can provide offline support?
First problem is how we can get our initial .html .css and .js files without internet connection? Answer is: we should use service worker or App Cache. But App Cache has a lot of problems and probably will be deprecated, in other hand service worker under developement and become better each month. You can read more about their difference here.
Second problem is how we can get server data without internet connection? We should store most vital data somwhere. But after we get our .js file from cache we have access to Local Storage, Indexed DB etc. So we can store vital data in any of this storage while we online and get it back from them when we offline. It is totally up to you how you will handle that.
I believe there no cleare and strict defentiton for PWA and HTML5 webapp (at least for now). So you can asume it is the same but today PWA is more common word.

Using OneNote API without registering an application?

The question is pretty clear I think, but I will elaborate on why I'm asking it.
I created a little blog engine based on OneNote. Basically, the blog configuration asks for an access to OneNote. Then the user chooses a section under which the blog posts are stored.
There is a cron script that will use all these informations to automatically get new pages, fetch the medias and cache every, and finally display the posts.
I chose OneNote because I own three Windows 8 computers and a Windows Phone, so OneNote was an easy choice, as I didn't want to get an other application to manage my blog.
There is still a lot to do (as always with softwares...), but I want to make this more or less an open source project, so that other people can install it on their websites and link it directely to OneNote.
The only "big" obstacle for this now is that authentication in the OneNote API needs to register the application on the Live Connect, and specify a redirect domain. So every user wishing to use this blog engine on their server will have to register their own application... That will look complicated just for a blog, especially if you're not tech-savvy.
Is there a way to "skip" or work around this requirement, even if it requires the user to make the section public (as it is for a blog, this doesn't seem too much to ask) ?
Thank you in advance,
Cheers
Sounds like an awesome project! When you get it released be sure to let us know at #OneNoteDev.
Unfortunately, at this time there's no way to circumvent the requirement for Live Connect OAuth configuration. You could offer a hosted variant so only you need to worry about the LiveID configuration.

Offline site/application to propagate a form

We are building an offline version of our online store.
This is for reps to take with them on a tablet when they are out. The reason it needs to be offline is because there will be no connection in a lot of the places and we aren't using tablets with 3/4g connectivity.We use Windows 8.1/RT based tablets.
Since php relies on a server and the tablets cannot be installed with xampp or the like, I have rebuilt the site using html and css.
So far this works and has some flexibility in it. The website is turned into an application using googles create application button in its tools (though technically it's not really an application). It has all the product info, pictures and videos the reps need. Another advantage to this is that the application and files are stored on a one drive cloud account shared to all the tablets. This way, I can update the app/website from my machine and have it up to date on all the reps machines. This current set up works for now but we are looking to add some more functionality.
What we want is a button on each product that will let a rep add an amount of that particular product to a quote form. Because each product sits on a different page, it can't be in the one page form. So as the rep is pressing the buttons on each product, they are getting stored somewhere. Then at the end, the rep can turn all those values into a word doc/pdf/excel by hitting a final submit button.
I have looked at web storage in html 5 but still not quite sure if I can get what I need using it.
Going through the explination here:
http://diveintohtml5.info/storage.html
looks like sites can store info but not sure how to turn this into a form or document at the end. This document is what the reps will email back to the head office.
Has anyone got any pointers on what I could do. Since the site/app has been created in html already, I would like to just build into the existing framework. Are there any other pieces of software that I could use? I do remember using spreadsheet converter to turn an excel file into a web form that exported a pdf but the form needs to be on a single page.
All help appreciated.
Thanks

How does Battlelog launch games from browser?

Battlelog was released by EA alongside Battlefield 3 recently, and I'm curious how it is able to launch games, such as Battlefield 3, from a web browser?
More generally, how does a website launch programs locally?
I'm one of the developer responsible for the launch part of Battlelog. It's handled by a combination of the installed web browser plugin and JavaScript. Launching the game basically goes through these steps.
We figure out where you've installed the BF3.exe by using a registry key
We use the plugin to launch that exe with a couple of command line options
When the game client has launched, it opens a connection back to the plugin, for two-way communication between Battlelog and the game.
Game client sends state info and error messages back through the connection, so we can show progress and errors in Battlelog, and also know when the game has closed down.
It is thanks to the plugin you installed at battlelog. Websites are not allowed to execute programs on your local machine due to the HUGE security risk that would present. Plugins have to be used if you want to accomplish virtually anything outside the context of the browser, which is why you have to explicitly give them permission to install when they try to run.
I think that there are two options. First, the link points to a file which has an extension understandable only to that program, like when you click a .pdf link a pdf viewer will open. My second guess is that the link may use another protocol associated to the program in question, does the link start really with http://?
Im almost 100% sure it uses the plugin you have to install to manage the launch process as it also controls whether the game is minimised or not.

How can I update a web page remotely? Using a web service or email, no direct server access

How can I update a web page remotely? Is there a web service or can I do it via email, I have no direct access to the server.
We simply need to add an alert facility in an emergency. For example simple text message across the top of the home page saying "We are shut today due to bad weather".
Thanks
I can't tell that I catch what you mean, but I will answer in general manner
1- if you are building the whole site from scratch: You can create your site by any CMS like dotNetNuke or joomla which will allow you to login and edit what you want
2- if you are building just this page from scratch : You can build your page with online-editing in mind, in this case I recommend to build two pages one for for viewing content and the other for online-editing you can use any HTML-Editor control like FCKEditor
3- if you are dealing with already built page : it will be easier to build administration page which you can upload the new version of the content page to it, and the administration page take care of replacing the content page
hope this can help you, if not, please feel free to clear your needs so we can help more
Contact the host server company you have your DNS/Host service/name resolution with and ask them to redirect the DNS calls to another server of your choice with the notice you wish to have people see when they try to access your page.
On a general basis, yes it's possible, that's what most blog engines and CMS are for. It's also fairly easy to develop an ad-hoc program if all you need is to be able to put an offline page.
If what you mean however is you need to do today witout any access to the server, contacting the person hosting your site or your DNS are indeed your best chances.
I'd suggest getting someone to put a twitter widget on the page, then you can sms/email or use a web browser to send your updates and they will automatically appear on the site.
Is it at all possible for you get someone to do that for you? Twittercard can be used to generate the code to drop in.
It looks like this thread is a bit dated, but for anyone still looking for a way to update your site using email, you might want to check out https://www.sitemailcms.com/. It's a service I've developed to do just that.