B4A vs challenge 2, and what was the final result after about 1.5 days???

Discussion in 'Chit Chat' started by Peter Simpson, Aug 14, 2018.

  1. Peter Simpson

    Peter Simpson Expert Licensed User

    You should watch some English comedy sketches, I was joking, being sarcastic, and every body knows it especially Erel. Erel is making some great game examples that looks great and that runs smoothly at 60FPS, that's all I was saying. Anyway I really shouldn't have to explain myself to you so I'm off to watch the football on the box now.

    Hmm tut tut tut...
     
    DonManfred and Johan Hormaza like this.
  2. aeric

    aeric Active Member Licensed User

    Ya, everybody includes me. I know you were joking. Sorry for disturbing. Enjoy your football. We all are happy using B4X.
     
    Johan Hormaza likes this.
  3. thedesolatesoul

    thedesolatesoul Expert Licensed User

    Such a cool story :)
     
    Peter Simpson likes this.
  4. walterf25

    walterf25 Well-Known Member Licensed User

    This is so cool, I wonder if we could start our own challenges within this forum, I know everybody is probably so busy with their own projects but wouldn't it be awesome if we could start some sort of competition/challenge between us, maybe @Erel can agree to this and somehow give the winner some type of incentive, we can raise funds for the price ourselves. Before I read this post this morning i was dreading to get back on my laptop and finish a project i started a few weeks ago for one of my clients, The reason i was so hesitant to get back to this project was because this is an App someone else did for Android, i'am now porting it to B4i, it's a very neat app for what it does but unfortunately the code is very messy besides it was done years ago with an older version of B4A so there's a lot of unneeded code, so you could imagine going through thousands of line of code that don't have any comments and don't make very much sense :D.
    My point is after reading this post I realized what i had forgotten, and that is how easy it is to develop with this beautiful platform that @Erel has created for us, if i was doing this type of job in any other than B4A, B4i or B4J i would have probably ended up crazy already LOL, most importantly is the amount of resources you can find in the forums if you know how to search for it, After reading the post i was so pumped up that i immediately got back on my laptop and continued working on this project, just a few minutes before i decided to reply to this thread, in under 2 hours i was able to get a lot done on this project that i was being hesitant to continue, i am now feeling accomplished for the day and very pumped up to finish this project soon.

    So, Thanks for this post i'm sure i'm not the only who was inspired by it.

    Keep it up.
    Regards,
    Walter
     
  5. Lewys Cousins

    Lewys Cousins New Member

    Great work!! We all eagerly await a third challenge ;)
     
  6. sorex

    sorex Expert Licensed User

    why not organize a Xui2D game coding challenge? Then there will be (hopefully) a lot of games as reference for Erel's site to attract more people to B4X.
    (I'm still waiting for a decent categorized showcase page there aswell ;) )
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    We are not there yet... XUI2D stable version wasn't even released.
     
  8. Peter Simpson

    Peter Simpson Expert Licensed User

    Imran has always been impressed with the business apps that I create for clients using both B4A, he also likes my personal B4J apps too @aeric. Matt on the other hand says that I should leave the rebellion forces and try joining the dark side, if you know what that refers too ;)

    My team lost 3-1 grrr :mad:

    Thank you @thedesolatesoul, that means a lot coming from you, you know the score :)

    Wow thank you for the compliments @walterf25, but it was the whole community that inspired me to take on the 2nd challenge in the first place.

    I will admit one thing though, half way through the challenge I though to myself that I must be absolute crazy taking on these two, it's not going to end well for me, it's going to cost me not one but two nights out with Imran and he will not make it cheap for me, I wouldn't for him and he knows it :eek:. At the time I wasn't thinking about this great community on the forum and all the resources to hand, all that was going through my mind at the time was that Android Studio was developed by Google with probably hundreds of developers behind it, what was I thinking. But then I remembered what it was like for me to create something simple not just in Android Studio but also in Eclipse, those left hand side panes in those IDE's and all the extra coding was a nightmare for me. Now compare the coding in AS compared to the B4X suite of development tools and as far as I'm concerned I had a huge advantage, so I just kept pushing on.

    Half way through I was expecting either Imran or Matt to say 'hey I've finished', but thankfully that never happened.

    Anyway Erel designs the B4X IDE look and feel and he actually does all the hard work so that we don't have to, closely followed by the library developers and wrappers. Erel keeps up to date as much as humanly possible with all the latest Android news, updates, solutions and issues from Google and he then has to decide how to implement everything that he has learned into B4A for example, he also has to do the same for B4I, B4J and B4R too.

    Me, I just took advantage of everybody else's hard work :D, cheers all ;)

    There's a famous saying @Lewys Cousins, 'Once bitten twice shy', Imran ignored that saying completely. I can't see it happening as Imran might not be up for it again. If it does happen I would be pushing for some sort of mind game, image memory game or maths memory game. I once released a flags game (with multiple games inside of it) on the Play Store that did really well, but I pulled it as I wanted to add even more games to it, but I never got around to completing the updates, I was just too busy at the time. If we ever went for a third challenge I would want to change it up a bit and definitely do some sort of small game next, we can just use gfx images from free online resources as it would only be for our challenge apps.

    If there were ever to be a third challenge, I would definitely be going for a clean third round knock out, no counting to 10 for a TKO :D

    Hmm, I might have to call Imran later to give him a chance for revenge...
     
    Last edited: Aug 21, 2018
  9. Multiverse app

    Multiverse app Active Member Licensed User

  10. Mashiane

    Mashiane Expert Licensed User

    Wow, this is very exciting. If you dont mind me asking. For MySQL, which library did you use from here in the forum? I see that the speed if fairly very good.
     
    Peter Simpson likes this.
  11. Peter Simpson

    Peter Simpson Expert Licensed User

    Thank you, it was exciting and stressful both at the same time

    My MySQL library of choice is no longer available on the forum, the library developer took it off about 18 months ago, but trust me when I say that it's seriously fast. You have to remember that in the video when I filter out the searches, it brings back not just the text results, but the Base64 stored images too, the images are between 250k and about 500k each. So yes in the video it does bring back the online database queries extremely quickly, but the speed is even more impressive without loading the image data as well.

    The library solution that I use is based on the official MariaDB library and is excellent. The basic database information is stored in KeyValueStore2 and I obviously use PutEncrypted and GetEncrypted for storing and retrieving the MySQL database information.

    I don't use any other solutions as most of them means installing another driver on the server. Not unless the client has an VPN or dedicated server, I find a lot (not all) service providers are reluctant (are not willing) to install an extra driver once MySQL is already installed on their servers.

    Fun fact (I don't do this though):
    Hey, did you know that if you copy the jSQL library from the internal B4J libraries folder to your B4A external libraries folder, you can use that library to connect directly to an MySQL database. In release mode you need to use DisableStrictMode but it works great and is seriously fast too. It only takes a few lines of code to get running, I tried it out one day because I was bored and was wondering about it. I was seriously impressed with the speed and ease of use, but I DO NOT and WOULD NOT use this for an app solution, it was just for fun and to ease my curiosity.

    I wonder why @Erel didn't create an easy to use MySQL solution like the B4J solution but instead for B4A (probably for security reasons on the play store), a solution that does not require asking service providers to install extra drivers. Not all businesses have VPN or dedicated servers that they control, actually over 99% of businesses have their websites on shared servers which are hosting hundreds of sites per server, that stat can be found on the net.

    I have my own dedicated 2TB SSD server with 64GB of ram and 2TB of SSD RAID, I host my clients databases, so I can easily use for example Erels jRDC2 or JdbcSQL solutions, but those solution are not for me or for my clients either. A lot of my clients already have MySQL databases with a supplier, those suppliers can be a pain to deal with, my clients might already have some sort of bespoke Windows software or e-commerce website using that MySQL database and moving their database to my server is not always an option, even though I have done that before.

    What @Erel says about solutions like what I use is.
    - Insecure - it will be quite simple for a hacker to get the username and password and directly access the database.
    A. All my solution are bespoke in-house solutions, no Play Store apps. If a hacker really wanted the data they would most probably need to steal an android device from my clients, or actually spend some time hacking the actual database if they can find it. If IBM, Facebook, Microsoft, The Pentagon and Amazon etc can get hacked (have security issues), then anybody can. Which bedroom hacker would seriously try to steal a device, they might end up with a black eye or broken nose ;)

    All my databases have important information encrypted. Using encryption is by its nature a slow process, so I only encrypt names, addresses, postcodes and phone numbers, the end user can't really tell the difference speed wise so all is good there. The information sent to the server is the same information that would be sent via for example MySQL studio on Windows, I repeat that my apps are bespoke and ARE NOT on the Play Store.

    - Hard to maintain - changes to the database design will require updating the app.
    A. Not a problem for me, plus any DB changed only happens if I update the app anyway. Why would I change the database without changing/updating the app. I get paid for adding new features, thus I add new tables to the database if need be. Anyway any new tables and columns are usually created as my clients needs them, so yes there no issues there either.

    - Server and client performance issues - The Jdbc drivers are not optimized for mobile usage.
    A. Maybe so but I've never had any speed issues. Fetching results speedwise is almost on par with my windows development laptop, now populating tables (xCLV) is nowhere near as fast as let's say a DataGridView, but I would never expect a mobile device to be anywhere near the processing speeds of computer, not even an 7th generation i3. But for what it is, speed wise as you can see from the video the MySQL library that I use and Erels xCLV with LL works great, don't forget I'm loading and decrypting large Base64 images at the same time as I didn't have time to optimise the images down to size (about 50k):)

    I have both a huge Ford and a Huge Vauxhall parts distributors using my Android solutions, both their databases are we'll over 1GB in size, my bespoke Android apps are fully optimised and have never had any serious issues whatsoever with performance, if they had these clients would let me know. It's not like they load all the data at once like M$ Excel does.

    - Reliability issues due to unstable connectivity.
    A. I've not had any serious complaint about connections to my servers considering how long I've been doing this for, my clients have had internet service provider issues but nothing to do with my services, plus the same connectivity issues would happen with Erels solution (If you can't reach the IP address of the server then you can't reach it, it's as simple as that). Yes their are issues once in a blue moon but nothing too serious. My supplier once had a main switch go down, also they had a new antivirus box put in place that interfered with my server but nothing too serious, but even with Erels solution the exact same small issues would have happened. There's been a few times when I can't reach b4x.com for a while via multiple connection and suppliers, that's happened more than I've ever had issues in my server. At home I have 2 separate broadband suppliers (Talk Talk and Virgin Internet), I have two simply because if one ever goes down I can quickly switch to the other one. Nothing is perfect, but luckily over the years I've not had any reasons for my clients to moan about my services, I'm pleased about that. So I'll just keep using the MariaDB solution until hopefully @Erel one day adds MySQL to the standard SQL library in B4A (preferably with a warning about not using that solution for Play Store apps) which I would not do anyway. Hmm, maybe for saving high scores in online games, but once again that would depend on what drivers are installed on the server lol :p

    Oops, sorry for the long response (rant)...
     
    Last edited: Oct 31, 2018
    Tadeu Botelho and Mashiane like this.
  12. Mashiane

    Mashiane Expert Licensed User

    @Peter Simpson , thanks for the rant, very informative. I'm glad there are people like you here to share their experiences so that we also know. As a person you always learn from the best and at times reinventing the wheel might be necessary and sometimes not. Im glad I asked because you have been kind to open up and I learned a lot again. Thanks a million.
     
  13. OliverA

    OliverA Well-Known Member Licensed User

    Erel likes this.
  14. Peter Simpson

    Peter Simpson Expert Licensed User

    That solution needs a separate driver installing on the server if I remember correctly. Did you even read my rediculously long and unnecessary response above, I don't like installing extra drivers if there are already drivers on a server, why reinvent the wheel.

    But saying that, NASA have infact reinveted the wheel for exploring other planets with Rovers like Mars etc. The wheel changed shape and does not use rubber so it can't get a puncture and it is lighter than traditional wheels, it is basically a wheel with holes already included. Anyway, if I need to install a separate driver on a server then I have no interest, well not unless there are absolutely no other solutions available Mr @OliverA ;)

    Cheers and you have a nice chillaxing day.
     
  15. Erel

    Erel Administrator Staff Member Licensed User

    Mashiane likes this.
  16. Erel

    Erel Administrator Staff Member Licensed User

    BTW, B4A JdbcSQL = B4J jSQL

    They are identical.
     
    Mashiane likes this.
  17. Mashiane

    Mashiane Expert Licensed User

    Thanks for the heads up again. For security reasons the lib should be used in in-house apps. I’m looking for a lib that I can use for MySQL that has decent speeds for apps for the store. I have been using php all this time because I had to produce both apps for iOS and android and porting my app was fairly easy for that. Is there something decent that one can use on both platforms without the need for phping around?

    Thanks.
     
  18. Erel

    Erel Administrator Staff Member Licensed User

    This is not the correct place for these questions. Check jRDC2. For further discussion start a new thread in the questions forum.
     
  19. Peter Simpson

    Peter Simpson Expert Licensed User

    I was originally saying that it would be good to have it like B4J, just there (something like initialize2) without searching the forum for jdbcSQL, there are already a lot of these on here and it gets confusing.

    Anyway some unrelated news.
    I finished rebuilding and upgrading my 497 BHP Cossie last weekend, so I'm now going out to the track to test it. If all goes well I can advertise it and sell it next week. It's too fast for main roads and there no need for me to be paying 3 lots of car insurance.

    Anyway I'm off, got to be at the track for 3:30. Then I'll be back, as Arnie says :)
     
  20. Erel

    Erel Administrator Staff Member Licensed User

    It will not be added to the standard SQL library as the B4A SQL library is built over a completely different API (SQLite is natively supported by Android).

    There aren't so many options. I recommend watching jRDC2 video tutorial: https://www.b4x.com/android/forum/t...-rdc-remote-database-connector.61801/#content

    The various options are explained.
     
    Johan Hormaza and Peter Simpson like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice