Kony Forms - produced in what form? - temenos-quantum

I am trying to understand the form in which the mobile UI portion of a KonyOne Studio hybrid app is produced and whether I can have a disconnected hybrid app. As I understand it now for hybrid apps (Web and native parts), Forms in the KonyOne Designer get converted into JSPs. Is that correct? Can I assume this type of app must run connected all the time so that the JSP output is always up to date? Thanks.

So there is a little misunderstanding here:
When the output is Hybrid, the forms are converted to a SPA ( Single Page Application, a feature of HTML5 ), and embedded with the application itself.
The Hybrid shell is a native application, and there are javascript bindings between the content on the form ( which is in HTML5 ) and the shell ( which is pure native )
The SPA portion of the application only needs to be connected to the network when Service calls are being made. So to answer your question, you can have an "offline" ( non-network connected ) application, as long as you are not going back to the server for data. For data calls, you will need to be connected.

Related

azure media service for xamarin?

I have created a console application with azure media service.
in the app i am using the plugin
windowsazure.mediaservices
the way i am doing is
static IAsset CreateAssetAndUploadSingleFile(string filePath, string assetName, AssetCreationOptions options)
{
IAsset asset = _context.Assets.Create(assetName, options);
var assetFile = asset.AssetFiles.Create(Path.GetFileName(filePath));
assetFile.Upload(filePath);
return asset;
}
so i just want to know whether this plugin will work on xamarin(i am not a xamarin devoloper) as its a portable project.
if its not do we have any alternative plugin?
my basic purpose is upload and encode.
That package is for our current .NET SDK
https://www.nuget.org/packages/windowsazure.mediaservices
It does not support .NET Core. See the dependencies.
It's not compiled for Xamarin though, so I don't believe that it works in Xamarin, but i'm not a Xamarin expert at all.
What is your scenario exactly? Why would you want to call the Media Services account directly from Xamarin anyways? You would only need to do that if you are creating a management application for the account Administrator. Otherwise, dont put Media Services directly into any client code! You should hide it in your middle-tier, and only pass Streaming URLs or SAS locators to the client application to upload content to.
For the upload from phone scenario, middle tier should create an Asset, get a writable SAS Locator for the Asset, hand that to the client side. Client can then use Azure Storage APIs to upload the content to that SAS URL directly (it ends up in an Azure storage container then.)
I believe that Xamarin has client side support for the Azure Storage APIs available.
As john answered, you don't do this stuff on a client, you will need to use SaS tokens and what not. I could explain everything here, but there are some nice guides and examples online.
Build 2018 video explaining how it works (including Azure Functions): https://www.youtube.com/watch?v=dEZkQNNpSIQ&feature=youtu.be&rel=0
The github example of this video: https://github.com/Azure-Samples/xamarin-azure-businessreview
To understand it better, I recommend this guide, it is old but it does cover the entire process, just make sure to combine new documentation with this old one.
Old docu: https://learn.microsoft.com/en-us/previous-versions/msp-n-p/dn735912(v%3dpandp.10)
Official current documentation: https://learn.microsoft.com/en-us/azure/media-services/previous/media-services-dotnet-upload-files#upload-multiple-files-with-media-services-net-sdk
Probably useful for new readers.

UI testing: completely skip app delegate

In some, or all of my UI testing, the UIApplicationDelegate is completely useless.
Is it possible to start with a blank screen and then I can present a view controller as part of my testing code?
This is not possible.
The UI testing framework allows you to interact with your app only through a proxy, and considers the app a black box. You have no control on it apart from the possibility to set launch arguments and environment variables.
This is an intentional design decision that many acceptance frameworks take, and it is meant to focus the UI tests on the users interaction and how the app responds to it.
You can always leverage the launch arguments or environment variables to pass an instruction to your app to load your desired view controller straight away from the app delegate's applicationDidFinishLaunching(_: withOptions:), for example using a router.
More info can be found here:
http://nshipster.com/launch-arguments-and-environment-variables/
https://github.com/clayallsopp/routable-ios

node-webkit equivalent for sinatra?

I've been thinking about learning how to make simple Mac OS X applications based on web-technology and I came across node-webkit which seems compelling. However, I've recently invested in learning the basics of Sinatra/Ruby and I wanted to stay on that course.
Is there a "node-webkit equivalent" for developers who use Sinatra? Or, is there a recommended way to use the Sinatra framework (or Ruby) to build OS X apps that are essentially web wrappers?
Sinatra is a server-side framework.
Contrary to Node-webkit which is on client side.
If you need to interact with a server, you can still use sinatra (as well as node.js, php, ...) on your server.
But if you are looking for a framework like sinatra on node.js, you should look into Express.js : https://npmjs.org/package/express
Node-webkit can use file or http, and which to use depends on your needs. The majority of the time you shouldn't need to, Node-webkit runs completely client-side using only HTML, javascript, and css. You certainly can initialize a local webserver when Node-webkit loads, but first try making a basic "Hello World" application to learn how it works.
If you still think you need to spin up a web server, then the code might look something like this (I'm using Express.js):
// Retrieve libraries...
var expressPort = 6014
var NodeWebkit = require('nw.gui');
// Call focus to application...
NodeWebkit.Window.get().focus();
// Instantiate the Express Server...
var spawn = require("child_process").spawn;
spawn("node", ['./server/server', expressPort]);
// Request director page...
window.location.replace('http://localhost:'+expressPort);
In order to use the Node-webkit features from a page on localhost you will also need to add the following line beneath the root of your package.json:
node-remote": "<local>
Note: While this does work, you must really consider whether it makes sense. In other words, is you application fully self-contained? If nothing will access that content except the application then you don't need it.
For my application I am using Node-webkit as an admin console for creating/managing broadcasts. (hence the local webserver)
Nw is not a web framework. Nw does not use a http protocol; it does use a file protocol.
Nw is composed of chromium and nodejs, which allows you to run both DOM and node.js stuff -- without setting up a web server.

Approach to asynchronous web programming ( Working on Google Image Labeler site look like )

I want to create a website like Google Image Labeler, in which people can tag images.
but this is my first serious web programming project and my problem is that I don't know what are requirements for doing this job.
In this site what I have to do is First : pair people randomly and second : I need to send each session information to server asynchronously ( not only client to server [ AJAX ], but also server to client [ by using comet I guess ] )
I have Python and PHP programming experience and also I'm familiar with AJAX and Javascript. In my 2, 3 days journy(!) for finding suitable tools to doing this project I encountered to lot of stuffs : websocket, jquery, comet, socke.io, nod.js and a lot more which just made me so confused.
in fact I'm looking for a good reference helps me on where to start and what to do. ( or you can think of it as : what is best approach for starting asnyc web programming )
thanks a lot in advance
OK, after a lots of trying I got here :
to start async web programming , first of all you need to get familiar with AJAX, it's not that hard . you can earn all you need from w3schools.
after that the best choice you have is jquery . there is lots of incredible things you can do with it . one of it's capabilities is that you can send and receive data using ajax without reloading the page . To get familiar with jquery live page manipulation you can check How to Create A Simple Web-based Chat Application.
Also you can use some of html 5 technologies such as SSE ( server sent events [ more convenient ] one directional connection ) or websockets ( bidirectional connection, useful for web game programming )
In order to pair people you can use Mysql database as a medium to hold each new user's information and after that pair them using an unique id , such as session id . obviously you can use files as a medium too .
That's almost all you need to create a live updating web site , but if you want to do it much more professionally and in the server side, you can look at node.js ( server side javascript, an event oriented programming ) or twisted ( a python frame work ).
This is all I learned in my way .
Sorry for unwanted mistakes .

strutrs2 and ajax(Displaying dynamic value on jsp)

Im pretty new to struts2 and Ajax ,Actually i have a drop down menu in JSP lets say first.jsp, When user select a choice from dropdown menu,I am calling a function of Action class lets say Method1.In this method i am fetching some value from DB(lets say:a,b,c) and one value from java memory lets say d.Then I am forwarding to second.jsp and display all the parameters(a,b,c and d) in tabular format.
Now problem is that the parameter d is dynamic ,this is updating by some other application and if its change then I have to show it on JSP wihout any action.
One solution is I use in second.jsp , so after interval of 10 second again Mehod1 will call and it will fetch value(a,b,c) from db and updated value of d from java memory. and disply it to second.jsp.But in this case i am unnecessary retrieving value from db while my purpose is just to get value d from memory.This is working but this is causing my application to slower.
Can any body suggetst some other solution? or can i do it using ajax and how?
Any other advice? any help is appreciated.try to be more clear, i'm in lack of ideas in this problem, even it sounds like a classic :I have spend hours trying to play around with this but have got nowhere
Okay... What you're asking is a little fuzzy so let me rephrase:
You have a user (USER1) who opens a web page and sees some data.
You have a second user (USER2) (who may be an application) who is able set a value from time to time.
When USER2 updates that value you want USER1 to see it change in their open browser window?
If this is the case you need to understand basic ajax. For that get these demo applications working:
This example uses dojo and perhaps the S2 ajax tag lib I don't remember I prefer not to use ajax tags (as they are deprecated and prefer jquery for ajax):
http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html
This example here shows a very similar application but using jquery, no tag library, upgraded to Spring 3, it still needs polish:
http://www.kenmcwilliams.com/Downloads/
Now that you know how to get data via ajax, look at the request with firebug. You'll see that the request is just like a typical function call, the browser keeps waiting for the data to come back.
What you do is simply not return from the action until new data is provided. This is called long polling see: http://en.wikipedia.org/wiki/Comet_%28programming%29#Ajax_with_long_polling
If you have not written a simple chat program, using just terminal windows I recommend you do so. Two windows per client (client-send, client-receive windows) and you'll need a server program. I remember hacking one together in a few hours using _Thinking In Java 2nd Edition (Later books took out the networking section if I remember correctly). Anyways between understanding client server interaction and long polling will let you get things working. It would be fun to extend the simple terminal based chat application to a S2 ajax chat application. Would make an awesome tutorial! PS: This is just an application of the producer/consumer problem (If you understand that then I guess you don't need to do the fun exercise).
The interfaces would look very pretty if the server was managed by spring. I know there must be nice servers already written but I am not familiar with any, but would love to hear of one.

Resources