I want to create an application that will draw simple forms based on JSON data. I need to have a script to put intelligence on that.
Is Pascal Script from RemObjects a solution for that?
Is is compatible to generate application with the same source code for Android, iOS and Windows?
EDIT: Extending to better understand the need: I have a delphi program that draws a form (pretty much like a dfm file, as a descriptor) and fill it with data from a database. However there is a need for inteligence to validate the data entered. Since the form and data and the validation rules are done by the user there is no way to be a "regular" pascal source code. For that an script language would be perfect, and since I need the same form and same script works in each platform that I could delploy my application it would be also perfect.
This script language should be able to work with exposed objects and deal with database operations (via exposed objects should work also), it is not only a simple IF statement, but there is not need of classes definition. Basically the same concept of what is possible to be done inside a delphi event when attributed by the IDE on OnClick for a TButton for example. It can validate fields, make a calculation of totals, save to a database.
EDIT: I have found that http://www.paxcompiler.com/ PaxCompiler is capable of implement scripting on all target platforms of XE5. I have contacted all the other scripting around this is the only one up to now.
If you want to draw shapes based on JSON data, then just interpret the data using Delphi code and have Delphi to draw the shapes or create the controls.
However I think it is a better idea to create some dummy code and ask RemObject support.
See: http://www.remobjects.com/support/
You can write them an email with some source/pseudo code of what you're trying to do and see what they say.
Related
I am currently building an Android mobile application that requires me to build in complex mathematical functions. The platform I use to build this app uses SQLite for its internal DB and it supports custom SQL statements. The built in math functions of the application building software are very basic, so I wanted to try and use custom SQL statements to get what I need instead.
I have tried the SQRT function to try and get what I need, but nothing I do seems to work. I wish I had more that I could provide you, but the platform I use doesn't have any internal errors. It either works, or it doesn't.
While researching I read that SQRT doesn't necessarily work in SQLite, but these were mostly really old threads and I'd like to know if it can somehow be done.
The list of SQLite math functions is at https://www.sqlite.org/lang_mathfunc.html
Sqrt is included (I originally didn't see it and uggested using pow as a replacement)
I have written a very basic program in C++. It only interacts with the user via text from the console.
How can I turn this into an app for my android phone? I just want to do the exact same thing, interact via boring text in a black screen (no graphs, no fancy interface, no nothing)
Is there a simple way to achieve that? I was told that I should translate my program into Java, and then go from there; is that the only way, or better, the simplest way?
As far as I know, you will need a Java UI even for "boring text in a black screen". (The project https://github.com/jraska/Console looks like it might help with that. But note I haven't used it, can't vouch for how it works, and might be mistaken about what it does.)
But you probably don't need to translate absolutely all your C++ code to Java. The official Android Developer page https://developer.android.com/studio/projects/add-native-code describes how to include C++ code into an Android app, using the Java Native Interface (JNI). You will need to provide interface functions using JNI so that the Java code can call the C++ functions. And you may need to generalize how your C++ code handles input and output, e.g. to use streams or strings instead of std::cin and std::cout directly.
We are designing a generic Android application using Xamarin Forms. At the same time, we need some texts that the user enters to be treated a bit differently for some of the customers, ie. run them through a custom transformation.
Instead of having to build a different version of our generic app, it would be great if we could define those transformations as an external dependency, as a pluggable "dll" or a text file with a script, maybe something like MoonSharp.
Does anyone have experience with something similar and how to achieve that in Xamarin Forms?
We did end up using the MoonSharp framework and the Lua scripting in two different projects, one on Xamarin, and another one on a classic windows service C# application. It was a great tool and gets the job done!
I want to build and test the network and data layer of an Android app completely outside the Android environment. This would be the classes that make a network call to get JSON data and then convert the JSON objects to Java Objects.
To test this bit of code, I just want to write a program with a simple "main" function that can parse a few command line arguments, execute some code, and give some output.
How would I do that? I'm relatively new to Android and Java. I'm guessing the solution involves some tinkering with the Gradle build configuration.
After these components are tested, I'd like to incorporate them into a particular Android project. But before that I'd like to be able to develop these trickier bits of the code without all the baggage and clutter of the Android Studio and the Emulator, on the command line and a simple Vim editor.
Write your own java project that use apache HttpClient and JSon(optional: Gson),
you can also use other tools like PostMan. Both for network test.
If you wrapped the logic responsible for retrieving the remote JSON data in an android-independent class you could write a Junit test around it. For running this test you don't need to start the emulator (as soon as you don't embed any android logic within that class).
(If these works for you, an upvote is highly appreciated. Thanks for your patience)
The way i understand this question is you want to save time required to learn android deveopment.
Here are some tricks that i use to save time in android development.
Do not use any UI element except a simple activity with hello world screen ( which is default template in android when starting new project). In simple words No button, No Textbox. Practically no touch input at all.(When core of app is functional, do whatever you want).
Set sample values directly in requests make to server (like set complete url directly in request).
Output recieved data to console using System.out.println. Again No TextView, No ListView.
Set your avd to lowest resource available. This make emulator very light but fully functional and quickly usable.
All these combined saves a lot time in development.
i am new to android and xml. so, i would like to know what is xml parsing and how and where we can use it in android application development.
I would also like to know the syntax to be used for this purpose.
thanks
For an introduction to XML, why not start by reading the Wikipedia entry? Basically it is a standardized way to put in form some textual data ; and it is widely used for many, various applications, online or offline.
"Parsing" means processing the XML data to extract values that can be used in your program's code.
When developing for Android, some XML files are used to store application data (e.g. UI layout, Android manifest,...) The parsing of these files is done automatically at build time by the Android Developer Tools, so you do not need to program it. For example, in this part of the Hello World tutorial, you can learn how to use the XML layout files to compose your User Interface.
If you do need an XML parser, as user Rahul recommended in this question, this great page presents three ways to parse XML on Android and shows example code.
The Android platform is an open source mobile development platform. It gives you access to all aspects of the mobile device that it runs on, from low level graphics, to hardware like the camera on a phone. With so many things possible using Android, you might wonder why you need to bother with XML. It is not that working with XML is so interesting; it is working with the things that it enables. XML is commonly used as a data format on the Internet. If you want to access data from the Internet, chances are that the data will be in the form of XML. If you want to send data to a Web service, you might also need to send XML. In short, if your Android application will leverage the Internet, then you will probably need to work with XML. Luckily, you have a lot of options available for working with XML on Android.
XML parsers
Frequently used acronyms
API: Application programming interface
RSS: Really Simple Syndication
SDK: Software Developers Kit
UI: User interface
URL: Universal Resource Locator
XML: Extensible Markup Language
One of the greatest strengths of the Android platform is that it leverages the Java programming language. The Android SDK does not quite offer everything available to your standard Java Runtime Environment (JRE,) but it supports a very significant fraction of it. The Java platform has supported many different ways to work with XML for quite some time, and most of Java's XML-related APIs are fully supported on Android. For example, Java's Simple API for XML (SAX) and the Document Object Model (DOM) are both available on Android. Both of these APIs have been part of Java technology for many years. The newer Streaming API for XML (StAX) is not available in Android. However, Android provides a functionally equivalent library. Finally, the Java XML Binding API is also not available in Android. This API could surely be implemented in Android. However, it tends to be a heavyweight API, with many instances of many different classes often needed to represent an XML document. Thus, it is less than ideal for a constrained environment such as the handheld devices that Android is designed to run on. In the following sections, you will take a simple source of XML available on the Internet, and see how to parse it within an Android application using the various APIs mentioned above. First, look at the essential parts of the simple application that will use XML from the Internet.
Xml parser is done through SAX, DOM and pull parser