Separate UI and data

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trevix
Posts: 962
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Separate UI and data

Post by trevix » Fri Nov 21, 2014 12:27 pm

I always found frustrating the user interface of web applications: no one would ever think to use a "photoshop" in a browser. Web browser are too generic and just not up to the task. Java and PHP are tough...
LiveCode suggested to me, by its very structure, how easy it would be with it to separate the engine, the interface and the data. But strangely I can not find a trace of this on the web.

Imagine that you download from a web page, on your handheld or iPad, the "engine" (a LiveCode standalone you built): a blank page able to dowload from a web address, to create buttons, fields...controls, but nothing else. From the web you then download a "UI", that is a document (txt, xml or stack that describes the interface that I bought, which is nothing more than all the properties of the objects to be created + the scripts that make the application work).
The "engine", when it is launched on the handheld, read these data and creates buttons, fields, text, graphics, scripts and all that is needed (such as a database interface or the game of tick / tack / toe).
Once the interface has been built, the application is able to upload / download the necessary data (in the case of the database) or connect with other users (tick / tack / toe) and give the user a "satisfying" UI .
In the case of the database, an heavy "sort" of data would be made on the remote server, but the local processor could handle the display of those data, the changes of the layout, and so on. A graphic update of chart tick / tack / toe would be managed by the local processor, but statistical analysis of 10 years of gaming could be made and served by the remote server. Version updates would be a snap. Security would be a big concern but, seen the power of modern processors of handhelds and iBooks, everything could be encrypted. And the download web sites would have to be qualified...

It seems to me an excellent idea and I do not understand why I can not find a trace of this on the web. And Livecode is perfect for this (beside the lack of sockets on mobile). Unless it's a dumb idea.
Someone wants to comment?
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Separate UI and data

Post by Mark » Fri Nov 21, 2014 12:50 pm

Hi trevix,

I do this all the time, but apparently not in the way you expect.

I create a standalone that does nothing but loading another stack. This other stack contains the interface and scripts that make up the actual programme. This programme can create files that are stored on the user's hard disk. Sometimes, as in the case of my Strom flow chart application, these files are complete stacks containing graphics and fields that have been created by the user.

Currently, I do this with desktop applications. It wouldn't be allowed to do this on iOS (or even in apps for the Mac app store). Probably, it will be possible to do something similar with web apps, once the HTML5 features are available.

I don't see why we wouldn't run programmes like Photoshop in a web browser very soon.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

trevix
Posts: 962
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: Separate UI and data

Post by trevix » Sat Nov 22, 2014 2:39 pm

Hi. Thanks for the answer.
Yes, I do this too but, since I was thinking of something slightly different, the real point is: "...It wouldn't be allowed to do this on iOS..." ?
I never developed for iOS but I would like to know: is it impossible to distribute a iOS or Android plain app, that gets its logic and UI from a different downloaded document, saved in a place accessible to the same plain app?
I know how strict is Apple, but what about Android apps?

I am not planning to build anything special, but sometime I feel like I may be missing the all picture, while having some strong opinions on the following facts:

- for some of my data, I do not want them to be saved in some remote server that, as a private humble citizen, I will never be able to sue, in a case of data loss.

- web browser are so damn generic for most task: they to everything...but not as well as local apps. There is no question about this. If I want to do a long sort, welcome the powerful remote server. But if I want to move things on the screen....

- to have a web page to do even simple things, is getting more and more difficult (java, Php, html5,...) taking away the development from most people and putting it in the end of fews.

- for the same above reasons, web pages are mostly similar to each other and, frankly, getting boring. A lot of people use template stuff (similar to RapidWeaver): they may change a few colors or disposition but they are getting far from the graphic and functional variety of standalone applications.

- I feel to say that all the web apps are a reduced set of existing standalone applications. Hardly the web version became better. And let's not talk of connection speed...

In this article about Flash vs HTML5 (https://www.udemy.com/blog/flash-vs-html5/) at the end it is stated: "It all depends on what you need them for".
My point then is: for me Livecode could be similar to Flash but without the overhead of a browser and much more easily to develop. The user could download a single plane empty app. Then the user can download a doc that makes the plain app to to what he is looking for: a word processor, a game, or else. Everything would run in a much varied, snappier and faster environment.

All this came to my mind when I decided to make a proof of concept of a handheld app, where people would login and vote on things (to make it easy).
Since I needed a database on the web, the easier thing could have been FileMaker 13 Webdirect: I published it but it was so incredible slow and buggy, from an handheld browser, that I gave it up.
I don't know php so there was no easy way to do this thing (for me and millions of others).
Since I already made client/server livecode apps while having the server to dialog with a database (Filemaker, MySQL, Access), I tough how easy would be for me to build a client plain app in Livecode, distribute it and have the clients download the different uses. Like the one that would connect trough internet to a LiveCode app server that would store data on a nearby database. The same client apps could run as a different application, just uploading different UIs and scripts.
Sorry for the long post.
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Separate UI and data

Post by Mark » Sat Nov 22, 2014 4:27 pm

Hi Trevix,

Basically, you are saying two things.

First, you want to have a LiveCode standalone and have it download code from the web. This is simply not allowed on iOS and that's it. Maybe you can get away with it on the Google Play store but I have some doubts. You'd have to try. If you try it, make sure that you state in the description that it downloads executable code. Otherwise, your app may be dismissed as malware.

Second, you want to do great and original things without having to make a big effort or without being a professional developer. Well, sorry, that's just not how things work. If you want to make something exciting, you'll have to put some serious effort into it.

PHP isn't that difficult. I'm sure you can make a voting web app within a weekend and your next web app will be even easier.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply

Return to “Internet”