I see that Codename One does not support SQLite database on UWP. Does this functionality will be added later as SQLite is now included in the UWP SDK ?
In order to bypass this limitation, is it possible to had a native interface ? Documentation talks about IOS and Android but UWP...
Many thanks.
The UWP port is slowly maturing in beta so things like sqlite aren't implemented yet. I've filed an RFE and set it for 3.7 which is scheduled for early 2017: https://github.com/codenameone/CodenameOne/issues/1889
This might be implemented sooner but it is hard to tell...
Normally we schedule tasks based on requests from enterprise customers and we are currently bogged down with tasks. In fact one of the things we need to do for the UWP port (which we will probably do sooner) is implement native interfaces properly.
Assuming native interfaces will get implemented soon (which should be the case), doing this in a native interface will be VERY challenging!
Database access is complex and would require a large/elaborate porting layer.
If you are really serious about doing this yourself the best way is to do it thru a pull request. You can just fork our git project http://github.com/codenameone/CodenameOne/ and hack the SQL support into the UWP port. If you get something working you can contribute it back via a pull request and it will get incorporated.
Other possible strategies moving forward would be:
Try to use other storage options such as Storage for your data. Those are far more portable
Try to port a lightweight database such as HSql to Codename One. This would require some work but might be rewarding
Wait for us to do that or optionally sign up as an enterprise developer and make us do it sooner
Related
I would like to embed a graph database in my application (shipping for windows, linux & MAC). I narrowed the search down to ArangoDB & OrientDB. I was able to get embedded OrientDB to work but I'd still like to try ArangoDB to make an informed decision. Documentation for OrientDB embedded version is pretty clear while I can't find anything for ArangoDB. ArangoDB is written in C++ so I also have to figure out how to make it be portable across platforms and how to install it with my application. The usage of ArangoDB (or OrientDB) should be transparent to the users of our application. Thanks!
Update: I forgot to mention, our application is in C++. We were looking for instructions that can help us build ArangoDB binary with our existing modules. We then can figure out how to load the binaries and talk to them.
It's possible to install an instance of ArangoDB with your application installation.
It installs into it's own directory, and its key assets are:
ArangoDB Binaries
ArangoDB Data files
ArangoDB Log files
ArangoDB Foxx Applications (optional)
ArangoDB can run as a service, and it is configured via a file called arangod.conf.
This file centrally controls settings like the ports it runs on, the IP addresses it listens to, the database engine to use, SSL and security settings, and much more.
Taking Windows as an example, you can do a silent installation of ArangoDB, and then use tools like PowerShell or DOS batch files to stop/start the ArangoDB service, copy in an arangod.conf file with your required configuration settings, etc.
It's even possible to generate an SSL certificate and apply it to the ArangoDB instance so that you can have SSL connectivity to the database if required.
Additionally you can utilise the ArangoShell via scripts which allows you to create databases, restore default data from a backup, create ArangoDB users, assign rights.
It sounds like you need to get more comfortable with ArangoDB as a product, and then start to mess around with installing, uninstalling, configuring, and backing up/restoring databases.
I've also evaluated ArangoDB versus OrientDB, and I picked ArangoDB because it runs faster, has many more updates, and their driver packs are well written.
When it comes to embedded databases, you really need a multi-model database, and being able to store standard documents as well as graph data in one database engine, is invaluable.
Additionally, have a really good look at the Foxx MicroService architecture of ArangoDB. It allows you to host business logic behind REST API's and Job Queues running right in the ArangoDB database. This means your application doesn't even need raw table access to the database, rather it can access your data via a REST API and your internal schema is hidden from users, and your business logic stops them doing silly things and wrecking the database.
By having a REST API data layer between your application and the database, it gives you more flexibility on how people consume your data, giving you more options about opening it up in a safe way, knowing your application logic will keep your data safe.
If you chose to use Foxx, there is a cool new tool ArangoDB has released called foxx-cli which lets you script the installation and configuration of Foxx MicroServices in your database. This is a super powerful tool as it's possible to fully install and configure an ArangoDB server, database, and internal settings via installation scripts.
Take time to learn ArangoDB, as with all skills it takes time to really get to know it. I'm still learning something every day and I've only been using it for 2 years :)
If you're using NodeJS (which I have to assume as you don't mention what programming language you're using) as your platform you can use Electron (https://electron.atom.io) and use the ArangoJS (http://npmjs.com/package/arangojs) Driver, if an ORM is necessary I'd recommend using (http://npmjs.com/package/caminte) which has built-in support for ArangoDB, although the documentation being to a poor standard, it should be suffice with some programming knowledge.
OFT: Electron lets you create cross platform Desktop applications in pure HTML, JS and CSS. You can also use Cordova if you're targeting the mobile platform.
You could also use Foxx to perform some of your application logic (this is down to your personal preference) or also create an API platform (with for example Restify).
Most of database systems are written in C++ but that does not mean can only access them via C++, additional drivers are provided for the popular languages. If you use a specific language then update the question so we can help further.
You might also want to read this: https://www.arangodb.com/2018/02/nosql-performance-benchmark-2018-mongodb-postgresql-orientdb-neo4j-arangodb/ as to why ArangoDB would be a better choice for you.
Edit
Due to my limited experience in C++ I can only provide some references which I've saved earlier, but I'm sure they'll be of use to you.
For C++ the driver you should be using is:
https://www.arangodb.com/2017/11/introduction-fuerte-arangodb-c-plus-plus-driver/
An example of the usage of the driver:
https://www.arangodb.com/wp-content/uploads/2017/10/C-Example-Source-Code-File.cc
A simple example / tutorial on how to use graphing in ArangoDB:
https://docs.arangodb.com/3.2/Manual/Graphs/
A free course by Arango on Graphing:
https://www.arangodb.com/arangodb-graph-course/
Hope they help!
Need help in developing an Enterprise application which involves hundreds of thousands of notifications and calls to server. Client has mandated to use Java/Springs stack. It has 3 portals involving like mobile, Institutes and Admin which depends on web services from server.
Which type of Database we should prefer?(It should support Hundreds of requests and Should support Geo-Location based queries)
Which application server we should prefer?
Which type of server side scripting we should prefer?
How about should I go with this?
You really should read the answers to this: https://gis.stackexchange.com/q/9809
One you know it or have anyone in your team who knows it. Otherwise WildFly seems pretty good.
Once again you must choose one you're comfortable with... and look at Thymeleaf.
If you are really starting something from the ground, you really get known the Service-oriented architecture and build your solution around it.
I have a database that I need to distribute to users (it's a directory of contact details) probably on CDs.
Users have varying platforms (OS and device wise - I'm willing to target desktops hence CDs).
I was thinking of some kind of deployable webapp that would provide a nice interface and a sqlite database. Does some kind of db interface exist with a highly customisable ui? Or does someone have a better way of doing this?
How big is the database? One simplistic option would be to generate a "contacts" webpage and burn this to the CD. Users can then search this from their browser or perhaps you could do it for them using javascript.
If you really need a DB then you're looking at an embedded database of some sort, however, since you've suggested sqlite I suspect you know this already and are looking at user interface options.
You have not specified a technology, so I'll just list several frameworks designed to develop database backed webapps:
Grails (Groovy/Java)
Rails (Ruby)
Django (Python)
All the above operate in a development mode that uses an embedded database (H2 or Sqlite). Your only challenge will be to ensure their runtime environments are properly configured, or shipped on the CD as well.
In conclusion, I pretty certain this has been done before. Have you also considered just shipping an installer for your webapp, rather than worry about the complexities of getting something to run from CD? For example you might wish to support more than one platform: Linux, Windows, Mac, etc.
Update
Someone has thought of doing this:
http://www.benjysbrain.com/misc/cdsite/
I am an Android developer. I haven't developed J2ME applications before. I have a requirement in which the client needs a J2ME application which requires me to store around 10,000 (Each record would have around 60-150 KB of data) records on the mobile phone. The mobile app will also be tied up with a backend server using a REST based web service.
The client wants the app to run on a specific mobile - Nokia 5233.
I need the correct options to proceed. Currently I am using the RMS and LWUIT. I chose them because:
RMS - I am using the CLDC profile. I am not aware of any DB that can be used with this configuration. Apache Derby is supported only in CDC.
LWUIT - There are many cases in the application where the TextField requires event listeners, the StringItem in LCDUI doesn't seem to have any event listeners.
Please enlighten me. I'm not sure whether I am taking the right direction.
RMS is probably your only decent option for on-device data persistence in J2ME (unless you go for direct file access using JSR-75, however if you aren't signed, the user will see all sorts of intrusive error popups when using this API). 10,000 records at 60KB per record, i.e. 614MB minimum? I've never heard of a MIDlet storing this size of data, RMS is intended really for a meg or two at most.
Why do you need to use J2ME? The 5233 is a Symbian^1 device, maybe try a native technology such as Qt? Probably far more reliable for that size of data, and easier to get a nice UI too.
(By the way, what events would you expect StringItem to give? It's a display-only widget.)
We have a relatively large application that is strongly tied into Firebird (stored procedures, views etc). We are now getting a lot of requests to support additional databases and we would also like to move a lot of the functionality from the client to the server.
Now seems like a good time to move to a 3(4) tier architecture. We have already looked at DataSnap 2009 and RemObjects SDK/DataAbstract. Both seem like they would do the job, but are there any advantages/disadvantages we should look out for? Are there any other frameworks that you could recommend?
Cheers,
Paul
I can recommend using the KBM Middleware components from Components4Developers. There is a bit of a learning curve but they are very flexible and hold up well under use in real world conditions.
Comment from a user (http://www.components4programmers.com/usercomments/commentfromapowerusertoaquestion.htm)
Changing your application to Multi-Tiers with new framework (RM,DS,kbmMW, or what ever), will make a lot of changes in our application architecture, I recommended to go with this in future, but you can achieve the support for multi database, with other products like
UniDac from DevArt( Best components for database with direct connection).
AnyDac(from same Company who offer RemObjects.
SqlDirect(Has support for 9 MajorDB and also ODBC).
ZeosDB(Open source).
using one of the components above, will give you support for most major databases, beside it will not make you doig a lot of changes, and in some cases you just replace old database components with the new ones, and maybe change some of properties.
However, changing to Multi-tiers will not only make you only support more databases, but it will separate your business logic from presentation layer, therefore you can have more presentation layers for your application like web interface, or smart devices.
But the most important in the Multi-Tiers architecture, you will have a scalable system the grow more than what the database you are using can handle of connection, beside other benefits, like using other languages to write client applications.
In the process of moving to a multitier application you could consider using a transport protocol between the layers, which is language/technology independent (like webservices, (i think tha remobjects supports that)).
This could make a reimplementation of a layer simpler later (like if you later have to make a another version of the client-application in a browser/java/silverlight).
You can also investigate Midware http://www.overbyte.be/frame_index.html
For multi-tier architecture I also recommend to check out message-oriented middleware.
With message-oriented middleware, cross-language and cross-platform application integration can be implemented using the peer-to-peer or the publish/subscribe communication model. Messaging systems are loosely coupled, asynchronous and reliable. For example, they are core components in Java(tm) application servers such as JBoss.
For Firebird, I recently wrote a blog article on replacing Firebird database events, their limitations and ways to replace them with message-broker based solutions (which are available as open source):
Firebird Database Events and Message-oriented Middleware (part 1)
Firebird Database Events and Message-oriented Middleware
(part 2)
(disclaimer: I am a developer of Delphi and Free Pascal client libraries for open source message brokers).