Is it OK for a web app to refresh itself when server is pushing the update? - mobile

Basically, we are building a small apps for mobile that list and display all applications/builds/details availables on the server. The listing is between 3-25 apps and each apps on the display occupy about 60 pixel hight with nice UI.
Apps 1 version ABC build date...
Details of the apps here (1-100 lines)
Apps 2 version ABC build date...
Details of the apps here (1-100 lines)
Apps 3 version ABC build date...
Details of the apps here (1-100 lines)
Apps 4 version ABC build date...
Details of the apps here (1-100 lines)
etc.
The listing order/size may change few times during a day (1-3). Is it good practice the just update the listing without any warning?
We have concerns if user is reading details for exemple while the refresh occured, the refresh will cause a scroll back to top. etc. We are talking about "good practice" of apps behavior.
Any comment or suggestion would be appreciated.
thanks,

I think it's all right to refresh data on an application if the goal of the application is to show the most actual data at all times.
But it is VERY important to give a clear and noticeable feed back to the user that the data has been refreshed, with an animation, some color changing or just an effect that goes well with the application.
Another option (and you have a great example just here in Browser Stack) is to tell the user that there is new data, and make them do something to update it.
Like a small prompt at the top of the screen that says "New data is available, tap here to update". That way you are sure that the user is 100% aware that data is being pushed to the application again, and that he agrees to do it.
Hope this helps.

Related

Rich text field is not showing the published (EVOQ) version of inner app

First off I would like to say your product is amazing! Has made the job of inheriting an old DNN instance a much more intuitive experience.
Apologies if this is really simple thing I'm missing but I'm at a dead end after scouring the docs and internet.
I'm using Evoq content and up until the start of the week the publishing workflow had been working fine rich text WISIWIG fields but it seems something has changed. Now when publishing changes any apps that are embedded in rich content fields display the demo item when not logged in.
I've recreated the issue on a smaller scale to illustrate the problem:
When logged in it looks as expected - on the left is a button that's placed directly onto the page, on the right is a button inside a rich text field:
logged in
And when logged out:
logged out
As you can see the button that is embedded as a rich text field is displaying the demo item.
I've gone through all of the content items and ensured that they are set to publish and not draft or hide and ensured the page is set to published in DNN.
Aldo I've double checked how the fields are setup but as this was working previously, I'm doubtful that this is the issue but for clarity here is how the fields look in the model:
Rich text field model
And it's rendered to the page using:
#{
var renderSvc = GetService<IRenderService>();
}
#renderSvc.All(Content, field: "BodyContentBlocks", merge: Content.Body)
I've been scouring the docs and internet for hints of what might be going on but the closest I could find was this thread on github but it doesn't seem to be quite the same issue.
Any help would be massively apricated as this issue has cropped up just before moving to our production server (as they always do!) after working as expected for a couple of months. Let me know if you need any more info from me and thanks for your time.
Evoq has a page-workflow feature which is technically undocumented. 2sxc got a sponsor a few years ago who paid for the implementation but there are limitations to it. Some background:
Some data in 2sxc can be clearly assigned to a module or page - such as content added directly
Other data cannot be assigned to a page - such as a blog post
Because of this, the logic is to first determine if something is partOfPage and if yes - and workflow is active - then it will be set to be a draft. This way the end users don't see it.
Upon page-publish, everything that is partOfPage will be published, so the draft will become the live data.
I assume the detection of this was never implemented for inner content - I think inner-content was actually developed later. Because of this, I assume the toolbars for the inner-content-item tell the UI it's part of the page (resulting in draft), but the publish cycle doesn't know about this, since it's internally a sub-entity (which is just like a tag on a blog - not part of a page).
This is difficult to fix. A proper fix would require 2sxc to be modified to make sure that inner-content is never seen as part-of-page, OR that it's taken into account when publishing. Both of these options would probably take ca. 3 days of dev on 2sxc side and would only happen if we have a sponsor.
A workaround is to disable the Evoq-integration so the page publishing wouldn't happen. I believe there is a feature for this - and AFAIK you don't even have to become a Patron (which I highly recommend to support our thousands of hours of work):
Or you could manually try to publish it, but that will be difficult. Note that most of us will be on x-mas vacation so we won't be answering questions till mid Jan.
Summary of options
Avoid inner content for now
Disable Evoq Page Workflow in 2sxc
Manually publish the items (very difficult, needs super-user permissions because it's an unusual thing to publish)
Get some budget ca. 3 days to sponsor the feature https://2sxc.org/contact but wait till end of January
A mix of short-term solution + sponsoring
Sorry for the delay on this, I've been waiting for a decision. I'm going to close the question as we have been able to work around the issue for now with the help of your last comment. Avoiding inner content is working well enough for our use case. Thanks for your time and help and for making an amazing product!

Fetch live sports data that changes from website to Google sheets

Update:
I have found a better website for getting the data. If you press my link, you can see in the top of the screen there are multiple future games. I would like to get details about the games that BC Copenhagen plays. The details should be live stats (points, players' points...). Is this possible?
Website: https://basketligaen.dk/
I have a pretty difficult question.
I want to fetch live data from a basketball game website. However, this is very tricky, because first of all:
The live games change all the time, and I'm only interested when one team is playing: "BC Copenhagen". (However, if I get more data from different teams, that would work as well)
When you click on the list, you get moved to a detailed screen about the live game. And this is the data I'm interested in.
So I need to somehow get data from the live games. Is it even possible to do this with Excell commands, or do I need to work with APIs like Zapier or Make? However, I have no idea how to do this.
Do you maybe have to give the Link to the game every time the game starts? But this would really not be a reliable solution.
Note: I'm using this data for a Glide App
Website: https://official.mvpapp.dk/live.php
You could try IMPORTHTML, but the link provided above shows no data for me. Most likely this requires much more scripting than that. Ideally, there would be an API data feed that could be used. Again, I see no data, so I can't say for sure.
A worst case scenario would be using #google-apps-scripts to parse the listing of games, grab the game you want, and get the data from that page. That would be out of scope of a Stack Overflow question.

Can a Codenameone Android build be published on the Galaxy Store?

I am getting frustrated with Google's Play store. My app won't appear in searches (at all). There isn't a "new this week" section where users can find new stuff from indie devs such as myself. Top results usually include hillarious reviews that smell fishy
I contacted Google and they said that I can pay them money to appear in top searches (via ads) and this way improve my "market strategy". I am just trying to share my free app so that others can use it, I have no market strategy
As a result, I am going to focus on my Apple Store version (which is performing much better). I am also exploring the option of publishing on Galaxy Store, Huawei Store, etc
I tried uploading to Galaxy Store but upon submitting the app I get the following error:
The registered binaries do not meet the category conditions for Galaxy Specials
Looking here I can see that something needs to be added in the manifest file. Is there a way to do this via build hints in CodenameOne? I also read that a "Galaxy SDK" needs to be added somewhere. Is this a prerquisite and if so, how would one add it in CodenameOne?
I haven't tried this but this might work, add the build hint:
android.xpermissions=<uses-permission android:name=”com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY”/>
If the build hint already exists then just tack this string to its ending.

Dealing with server stranded file uploads

I have an Angular SPA app running on Azure and I'd like to implement a rich text editor similar to Medium.com. I'll be using some existing editor for this, but I have a problem with image files.
The problem
I would like my editor to have the ability to also add images inside content. The problem I'm having is when should I be uploading images to the server?
Possible solution 1: Immediate upload after they're selected
The good
saving content is quicker because all images are likely already uploaded
files get displayed right after they're uploaded from the server URL
The bad
files may have to be deleted on the server if users selects to cancel editing
files may get stranded on the server if user simply closes their browser window
Possible solution 2: Upload after save
The good
files get displayed immediately using FileAPI capabilities
no stranded server side files if editing is discarded in whatever way
The bad
saving of content may take longer as all images need to be uploaded at the moment of saving content
additional client-side to display images from local files
Question
I would like to implement Solution 1 because it provides more transparent user interface process and reacts quicker to edit saves => better UX. But how should I be managing stranded files? I could use a worker process that would delete stranded files from time to time, but I wonder whether that's the best approach for this scenario.
What and how would you suggest I implement this?
This is highly subjective (opinion based), but I will give it a shot.
You are actually having bigger problem than you think. In your abstracted approaches, you only describe a situation when user started something as new. Whereas I see much harder to solve issues if user is editing existing item. What will happen if he/she deletes images, adds new images and at the end hits CANCEL. And also, if Internet connection drops while creating / editing?
I would also go for Solution one. And, of course minimize the "bad" things, as they aren't really that much or hard to handle. Here is how I would solve all the "bad"s in Approach 1:
All my articles (or whatever user is editing with editor) will have a boolean flag "IsDraft" or something like this. Then all my business logic for front end will only look for items where IsDraft == False.
Whenever a user starts a new article (the easiest to solve problem) I immediately create new item in my DB with IsDraft=True
Have a link table to keep link between ID of item being created and Image Files being used (blobs). The point here is, that, if you do not keep links between used and unused blobs, you will have a lot headaches deciding which blob to delete and which one to leave on the storage.
Have a worker process (either as worker process in Web Role if I use Cloud Services, or as a Web Job (+ nice and short explanation here) is I use Web Sites) that checks for articles that are Draft and older than XXX days. If found - delete files + article itself.
Handling Editing of existing item is more challenging - for this, I might take the approach of:
Create a new copy of the entire article when user hits Edit and mark it as draft
If user hits save - switch the content of the new article (new version) with the existing one, leaving the new article marked as IsDraft - the worker process will clean it up.
If user doesn't hit save for some reason (hit cancel, or internet drops, or computer restarts, or browser crashes, or or or ..) - the new article will be cleaned later by the worker process
And if you want to go deeper and crazier, you can have a section in your admin panel where you show the Drafts to your users, so they can either continue work, or leave it to be auto cleaned.

Best practice for updating silverlight deployment that is actively being used

I am currently running a SL3 project where we are in a highly iterative development mode with about 25 active test customers. I am making small changes at a clip of about 4 new builds per day. It is important to know this application is mission critical line of business for these 25 people, it is the tool they use all day to do their work so they are using it constantly and often launch their browser and the app in the morning and never close it until the end of the day.
The challenge is that when I make an update to the application I have no clean way to notify the users, in most cases this is ok as it is rare that I introduce a data contract change or something that would be a classic 'breaking' change to the app/service. Users keep plugging along and will get the change next time they refresh.
Right now we have resorted to emailing everyone and telling them to force refresh or close the browser and log back in.
Surely there is a better way...
Right now my train of thought is to have a method on the server that compares client xap versions and determines if the client being used is the most up to date, if so I will notify the user and make them update.
What have you done to solve this problem?
One way of doing it is to use a push mechanism (I used Kaazing Websoocket Gateway but any would do). When a new version of the XAP is released a message (either manually entered into the system by admin or automated triggered by XAP file change event) would be sent to all the clients. In the simplest scenario some notification would be shown to a user (telling him that a new version is released and the application needs to refresh) and then the app would refresh (by simply reloading the page) saving user's state if necessary.
If I would do this I would just keep it simple. A configuration value in web.config and a corresponding service method that simply returns that value (the value itself could be anything, but a counter is probably wise). Then you could have your Silverlight app poll that service method at regular intervals. Whenever the value changes (which you would do manually when you deploy a new version), just pop up a dialog telling the user to refresh the browser or log in/out. This way you don't have to force them to refresh every time. If you go with the idea of comparing xap file versions they will always be required to refresh, even for non-breaking changes.
If you want to take it further you could come up with some sort of mechanism to distinguish between different severity levels. For instance, if the new config value would contain the string "update_forced", you could force the users to reload the app by logging them out automatically (a little harsh, perhaps). If it contains the string "update_recommended", just show a little icon at the top right corner saying that there is a new version and that they should upgrade in their own time.
Granted, this was targeted at Silverlight 3, but with the PollingDuplex client and such in the newer versions of Silverlight, you could publish an "Update Now" bit to the clients, and build a mechanism in the client to alert the user that there is an update that is now out... that they should update it shortly, etc. You may even be able, through serialization and such, to save the state that they are in when they close the app to reload it.
We've done stuff similar with a LOB app that we built, so that as users are changing things, the rest of the userbase sees those changes immediately. Next up will be putting the flags in to change authorization and upgrades "on the fly" if you will.

Resources