[codenameone-discussions] Re: SQLite and BLOB type

2019-04-02 Thread Thomas
On Wednesday, April 3, 2019 at 6:20:53 AM UTC+2, Shai Almog wrote:
>
> No.
> We don't support byte buffers. Even if we did I'm talking about just using 
> a binary file which will always be faster than any sqlite implementation. 
> This will also allow reducing the database size which will make all queries 
> *much* faster. You are talking about JSON/XML which isn't what I'm saying.
> I'm saying the SQL's blob column should just be a text column pointing at 
> a binary file on the device.
>

A binary file with an index in the database would never be faster than 
storing the data directly into the database. Because for retreiving your 
data you would have first to request the database for the files indexes 
(=binary files names) and then to open the matching binary files to fetch 
the data (if you have 100 results, it means you would have to open and 
close 100 binary files...). And the size of the database does actually have 
no impact on the time of the queries. Only the number of stored objects 
does, not their size. An SQLite database is just an indexed binary file so 
requesting it is just as looking at the indexes (wich do not depend on the 
size of the objects stored) and then fetch the matching data from this 
file.  
Furthermore by keeping all the data in your database you reduce the risk of 
inconsistency in your data (with binary files and indexes into the DB the 
two might be out of sync) so as the number of files in your filesystem 
(because if I have thousands of objects to store it means I would have to 
keep thousands of different binary files...)
As for supporting BLOB with iOS on CN1 you don't need to support byte 
buffers. You just have to pass all your arguments as a concatenated byte[] 
array to the native interface along with an int[2*number of args] array 
that describe the length and type (which can only be of two types: String 
or byte[]) of each argument in this concatenated data byte[] array. And on 
the native side, you deserialize this data by converting parts of this 
byte[] array that are String args to Strings and keep part that are byte[] 
args (= BLOB args) to byte[]. 

 

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/02eb1b84-440b-4b9b-98c3-1c10ad07d395%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: SQLite and BLOB type

2019-04-02 Thread Shai Almog
No.
We don't support byte buffers. Even if we did I'm talking about just using 
a binary file which will always be faster than any sqlite implementation. 
This will also allow reducing the database size which will make all queries 
*much* faster. You are talking about JSON/XML which isn't what I'm saying.
I'm saying the SQL's blob column should just be a text column pointing at a 
binary file on the device.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/2af9988f-19af-42d2-9a02-936fad24b7b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: SQLite and BLOB type

2019-04-02 Thread Thomas
Blob provide a clear benefit on devices too. It allows to reduce the size 
of the database when you have large objects to store (not necessarily 
pictures. It can be geographic shapes like in spatialite for example or any 
other large object) and these objects can also be deserialised more quickly 
than if beeing stored as plain text objects (like json or xml)
Nowadays, most developpers actually use byte buffers to handle objects 
communication and storage (see protobuf, thrift, avro, messagepack...) on 
the server AND on the device.
Competitors frameworks like flutter support BLOB SQLite type just well 
bytheway


On Wednesday, April 3, 2019 at 5:49:33 AM UTC+2, Shai Almog wrote:
>
> It's a bit problematic to implement that API on iOS and most developers 
> used workarounds since blobs aren't as necessary on devices.
> Unlike servers where the DB is distributed/clustered. On a device a blob 
> provides no benefit and can impact performance. You are better off storing 
> a file URI.
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/1e1a1ad9-fbd8-4a22-b393-64e570d4e25d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: SQLite and BLOB type

2019-04-02 Thread Shai Almog
It's a bit problematic to implement that API on iOS and most developers 
used workarounds since blobs aren't as necessary on devices.
Unlike servers where the DB is distributed/clustered. On a device a blob 
provides no benefit and can impact performance. You are better off storing 
a file URI.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/f57e28d1-e5cb-45e2-abc8-08c6cc4ad4ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: use swagger codegen with codename

2019-04-02 Thread Shai Almog
Hi,
I'm afraid I haven't used this. I suggest asking the developer in the 
project for a usage sample in the issue tracker.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/9e97628b-de63-4721-a38d-e042f2868b9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: TABS and multiline text

2019-04-02 Thread Shai Almog
See this: https://www.codenameone.com/blog/tip-customize-tabs-behavior.html

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/040eea8a-64fe-4587-8753-a2c117e8d3a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: NFC lib?

2019-04-02 Thread Shai Almog
We don't have that. You would need to port one yourself.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/5dd2bf4f-9700-44e1-8a4a-0403af9eec92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] SQLite and BLOB type

2019-04-02 Thread Thomas
I need to store some byte encoded serialized objects (like protobuf encoded 
objects and similar) into an SQLite table. But I have seen in the forum 
that there was some issues with the support of BLOB type in SQLite by CN1. 
However, these posts are quite old and since then, some plugins like 
https://github.com/shannah/cn1-spatialite have appeared that seems to work 
with BLOB type with no issue (spatilite encode each Geography object as a 
wkb BLOB object in the SQLite database and, as this plugin is working with 
both Android and iOS, I assume the support of BLOB type on iOS is no longer 
problematic, exept if this plugin is shipping with its own SQLite 
engine...). 
So can I use BLOB type in SQLite with CN1 without issue now (I am targeting 
Android and iOS only) or is it still problematic? If so, how can I write 
and read a byte array into an SQLite table (do I just have to pass the 
object as a byte[] object for it to be writen into my BLOB table column ?)
If the support of BLOB type is still problematic, the alternative would be 
to encode my bytes buffer objects as String before storing them into the 
database (with base64 encoding or someting similar) but I would really 
avoid the unecessary bytes<->String encoding/decoding and storage overhead 
if I can... 

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/0b3fe39f-966a-4dce-b56b-ce3076464493%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] use swagger codegen with codename

2019-04-02 Thread yassineelmalyh
Hello,

Is there any way to use swagger codegen with codename.
i found this library https://github.com/Pmovil/swagger-codenameone-codegen 
to provide a codename1 client library , but i didn't understand how to use 
it.

thanks,
Cordially

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/c7f38f1e-8b0b-49a0-a134-c231dc772135%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] TABS and multiline text

2019-04-02 Thread shop . service . assistant
If you are experiencing an issue please mention the full platform your 
issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windows 10 Pro
Simulator Latest
Device PC, Android, IOS

How can I Set a Tab name with multiline text as shown in the attached 
picture?
Note In Java Swing I use html to accomplish this.

regards.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/dc33831b-4b2c-40d1-96d8-d8437148c5c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: How to get xcode proj?

2019-04-02 Thread Gareth Murfin
Sorry it worked, i forgot to save !

On Tuesday, April 2, 2019 at 6:26:44 PM UTC+8, Gareth Murfin wrote:
>
> I ticked include sources but i dont see the xcode project anywhere? where 
> is it meant to be ?
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/eb799def-e4a3-483e-bdf6-3fdcd533cb5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] NFC lib?

2019-04-02 Thread Gareth Murfin
Client needs NFC, can codenameone do this yet? or is it a case of making a 
native lib? 

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/0a41056e-808c-47f7-b3e0-1981b759815f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] How to get xcode proj?

2019-04-02 Thread Gareth Murfin
I ticked include sources but i dont see the xcode project anywhere? where 
is it meant to be ?

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/ad09fcbd-0db7-4c6e-83ac-a941c19a278d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.