how to port a desktop groovy app to cloud/android - android

I have an application already developed and in production. It's developed in groovy, as a desktop application with its own UI, and its purpose is to screen-scrape a website to extract some information every minute, and show alerts to the user when it need to.
Now I am trying to move this application to android, so it will be available all the time the phone is up (the more alerts the user gets during the day the better). Before starting I would like to gather opinions from people with experience (haven't touched android yet):
I see the following ways to set the app in android:
just port the whole application to android/java and have it running in the background all the time, doing more or less what the app now does. To take into account.
I assume running groovy on android is out of the question. I think I saw once some reference to a project to port it to android but it was so slow it was useless. So it must be android/java
Getting the html pages every minute (or less if i decrease) and doing all the parsing etc is doable or drains to much battery? What about memory, pages to parse could be not so small is there any limit on android?
Set up a server side living in some hosting doing the screen-scraping every minute and only sending alerts to the background running android app, that would be much lighter than the previous one.
I assume there is some built-in push functionality in android apps can listen to?
What server side hosting/service would be recommended (and for what reason, cost, perf, easy of use...).
My guess would be 2, using GAE due to the affinity with android and maybe I could even use gaelyk to reause part of my groovy code...
I am targeting android 2.2.1 and up. The number of users is very small and easy to deal with so updating the android app is not a problem.
thanks

If you choose #1 you will not only drain the phones battery but also generate more traffic to the web-site you are scraping (if all users are scraping the same pages). In any case, I would go with #2. (Have you considered sending out an email or SMS instead of writing an app? Of course, this really depends on your use case...)
Regarding the server platform:
GAE and Android are both by Google but I don't see how that would help you in this case. I develop GAE apps and never came across any Android specific features for GAE. However, GAE seems like a good fit for your intended use. It is quite possible that you could get away with a free instance (depending on the amount of processing you need to do, which will depend on the number of users and scraping).
Some points you should also consider
with GAE you don't get a static IP as opposed to EC2.
if you need https: does not work with custom domains (so users will always see something like https://youapp.appspot.com)
On the plus side: you don't have to deal with adminstration and can focus on coding. I believe EC2 is a lot more involved in that respect. (At least that's why I chose GAE). The technology look-in is greater on GAE of course.
Hope this helps!
P.S.: Just to be clear, I have no experience with Android.

Related

which database should I use?

I am planning to build a web application and android app, which will manage huge numbers of notification (push notification), and can work in slow internet connection too. I need to send and get instant notifications. Number of users can be thousands or millions, application will have multiple servers (web farm), multiple database. Now I need to decide that which database will be best for this kind of application and which language should I use for programming. Please help me out. Any suggestions will be appreciated
Well, first you need to decide what your immediate needs are. Are you going to use this on a platforms that could potentially have hundreds of people accessing information at the same time? Then you need to estimate your future needs.
This will help you to decide your database system.
As per my experience i am suggesting you to use MYSQL database.
I Blindly Suggest you to Use Parse Cloud Database,as it provides SDK for All mobile Environments like Android and IOS for easy implementation and also it recently Launched a Javascript SDK to use.Its free for Trial.MultiPlatform Support and Secure
Check it out Here: https://www.parse.com/
Are you sure you going to get to thousands and millions users ? Everyone starts from scratch (read: zero users, except some friends). By this I mean, that you have to concentrate on what's the real issue within your development (growing app user base is different story):
Creation of Android app and it's lifecycle (updates, support of previous versions & etc).
Back-end. Will I also work on Back-end. Working on 2 'projects' (Android app and it's back-end) isn't easy. Not everyone is experienced enough to work on multiple assignments at the same time.
Valuate an option of using SaaS/Paas backend. Most of the have trial or free version for developer.
Third option is great. Get cheap/free web host. Store there configuration, that your Android app will download when it starts. In configuration you should declare what's the back-end and how to communicate with it. You can use any of known services like https://www.firebase.com or https://parse.com/plans or even use Google App engine free tier / AWS free tier.
About developing app for Android - if your app doesn't need any complex calculation or libraries - just write it with JavaScript. It's fast enough. Though, Java apps are always faster and easier to debug.
Good luck !

system for bidirectional realtime communication between tablets and server

We are going to build a multiplayer game.
The idea is that every player has a tablet and is connected to a server.
The server should control the game logic, while the clients (the tablets) will only serve as a frontend to the game.
We need to make a decision about the frameworks/programming language we are going to use.
A crossplatform frontend would be cool, but is not mandatory. It has to run on Android devices at least.
The communication between the server and the client must be bidirectional and realtime.
We don't care about a small amount of delay.
Currently we consider an HTML5 client in combination with a javascript server (running upon nodejs) to be the best option.
The communication would be managed by the javascript library socket.io.
The HTML5 frontend can be run either in-browser or as an app (built with PhoneGap).
However we did not decide yet since we want to be sure to make the right choice.
There might be frameworks that can do a better job.
Does anyone know a better solution?
Play 2 is great for this well, but node/socket are great choices too. I would use backbone.js for the front end as it gives you a lot of flexibility and it's easy to keep the views in sync. (there is an example of such an app on my github if you're interested)

Backend for an Android and iOS app

I am developing a system including an iOS and Android app. I have two approach:
1 - I thought about use MySQL as the backend.
And then use REST in java using jersey to transfer my resources to the apps.
2 - Currently I heard about Parse which is consider as a easy way to add a backend to the mobile applications. It lets the mobile developers write server code without servers.
Which one is your suggestion? please support your answer with proper reasons and your personal experience.
If you want to be trendy, use node.js and MongoDB. (Although MongoDB is not trendy anymore, but it allows binary files of arbitrary length and works beautifully.) PHP with MongoDB works fine too.
My reasons: they are widespread technologies and with a very low barrier of entry. Avoid Java unless you want to nurse your JVM.
Assuming your typical backend for a mobile app which involves one or more REST apis and provides server-side functionality such as user authentication, communication (e.g. chat, messaging), or persistence (e.g. a leaderboard for a game, or retrieving geo-location related data). You basically have the two options you mentioned, build yourself or use a backend-as-a-service platform.
Build yourself (pros):
You retain all of the IP
You have the best level of customization
Build yourself (cons):
Very high learning curve if you lack server-side coding experience
Longer to implement, and harder to iterate quickly if you need to change something or add a feature
Higher risk of critical issues if you lack experience (e.g. security vulnerabilities, reliability etc)
You need to monitor and maintain the system once it's deployed. This can become a full time job if the app gets big enough
Backend-as-a-service platform (pros):
Much faster to get something up and running. This is a big one if you're launching something new and want to validate the market
Benefit from the years of experience of server-side developers who built the platform
Often, platforms will provide ready-made components that already do what you need
Running and operating the backend is included as part of the service, you don't need to worry about it.
It's actually cheaper than implementing it yourself if you consider the time investment, or if you hire a backend developer to build it for you
It allows you to focus your energy and time on the client side app, which is where you'll most likely differentiate yourself anyway
Backend-as-a-service platform (cons):
You have less flexibility, depending on the platform (some are better than others)
There's usually a recurring cost (although you'll also incur some of this if you build it yourself, to run the servers and databases)
There's always a risk that the provider will shut down (like Parse) and you're left scrambling to find an alternative or rebuild it yourself
There are now many backend-as-a-service platforms available to chose from. Unfortunately, Parse is no longer one of them, having been acquired by Facebook and subsequently shut down https://www.computerworld.com/article/3027537/application-development/facebook-is-closing-down-its-parse-developer-platform.html
I feel that a backend-as-a-service platform is a good option if you don't have much experience on the server side, or if you have limited time and want to focus your attention on the client side app. One of the greatest benefits is fast iteration. You can try something out and change it quickly with relatively little investment if you realize that your feature didn't hit the mark. Some examples of backend service providers can be found here https://en.wikipedia.org/wiki/Mobile_backend_as_a_service.
Some of the platforms actually allow you to build a full custom app without actually writing any code, and some of them provide ready-made components (like chat, leaderboards etc) but are less flexible.
Here's a list of Backend-as-a-service providers:
http://pipegears.com (No coding required)
https://www.appcelerator.com/
https://cloudboost.io/
http://api.shephertz.com/
https://backendless.com/
https://quickblox.com/
I participated in the development of an iOS/Android app. We used a server coded in java working as a web service running on Tomcat 7, with a mongoDB database, and JSON parsing for communication. Certainly not the best solution ever, but it was working.

How to find out the cost of our Android App or project before developing?

Actually I have a Client-Server based application developed on vb.net/C#.net now i want to port or publish that client-server Application on Android. I knew the tools for making it useful for my Android device. And I have also make out some important point to find out the cost of that project, but i'm newbie so i can't understand how to give assign or fix a amount for particular task in android. My Points are:
Develop a jazzy look user Interface for displaying a data.
Check and use the Device's network connection state.
Use the web service for accessing the method/functionality of
client-server application.
Also check and use the state of web service whether it is available
or not and use the functionality or fetch the data on the basis of
state.
Also the main thing is to maintain the server for storing the data
and fetching the data via web service.
Any help is appreciated for finding and assigning the cost/price/amount to the Android application.
This usually depends on the size of your target market. If you have a large target market, you can let the app go at a low price, because volume and economies of scale will kick in bringing your costs down while your revenues go up.
If you have a smaller target market, you're going to have to bump up the price of the application in order to recover costs of delivering to such a small market and move into the positive for profit loss.
For the most part, you can ignore the cost of developing your app. Development is mainly a one-time fixed cost that disappears over time. There will be some maintenance of the application itself that will cost money over time, but it isn't enough to worry about. Your server maintenance will be the brunt of your costs, but provided you're able to outsource most of the storage and bandwidth onto Amazon's extremely cheap pay as you go servers, you're running costs will be relatively low as well.
The greatest majority of your budget will be spent on marketing (depending on the type of app you are developing). Should you get a shoe in with the press, or market through ads on mobile, Facebook and the like. This is where most of your money will be going. Make sure to offset the cost of conversion with the revenue generated by conversion.
If you gave me more details, I could get more specific and help you out some more, but with what I have to go on, I have to stay broad. I wish you the best of luck with your venture.

Which web platform would be best to create a web app with an android client

I'm working on an android app which would connect to a web server which would power a social network and data store inside the app. Recently we decided that we would use a landing page and pre-order page to try and try and market our app before we launch.
Right now I'm working to create the landing page and I ran into a whole host of problems. Namely, that we would need a landing/pre-order page that would tie into the social network and would run off the same set of usernames/emails (we need to honor discounts/ deals). I've spent the whole day looking at our options and I came to the conclusion that
Static hosts (probably) wont work for what we are doing. We would need a cloud host
I only have previous experience in Windows Azure but the cost is prohibitive.
Any host that I choose would require a significant time investment.
So I'm at a complete loss. I took a look at Amazon EC2, Google App Engine, and a few other hosts like Heroku and Linode and realized I would have to spend at least a day or two working just on learning the workings of the services to effectively use them. So the tl;dr is: I need to pick and choose a single webhost to host a back end for an android app and my website. Which host should I pick?
EC2 may require more effort to maintain but you will be able to do what you want. It will basically give you bare bones Linux server where you can install anything you want and choose whatever implementation you need (Java, C++, Perl - name it.).
It cost some money but for the first year they give Micro instance for free. Which gives you room to grow.
I don't have much experience with Google App Engine, but as far as I understand, you will be more constrained to specific things that Google offers. It may not be a bad thing as it seems to be easier to maintain. But long term you will be locked in to it.
So weight carefully.
GAE has two big advantages for this case:
It's free: for the description of what you want, it does not seem that you'll be over the free quota, at leas at the beginning.
You can write it in java, which means reusing a lot of code in the final android app.

Categories

Resources