I am working on desktop based responsive web application where UI/front end will be in HTML/JS and back end point will be either servlets or struts/spring controllers.
My question is say after 3 years i want to have android mobile app , can
I continue to use my servlet as back end code and serves the response coming from android mobile app,
Mine understanding :- I will develop the native UI part(wherever it is required) using android SDK which then can communicate with existing servlets .
Then android app on mobile can render the html returned from my servlets or servlets can return the android specific views. so changes are required only whenever i need custom views(htmls or android specific views) for my mobile application. Is that right ?
after 3 years... can I continue to use my servlet as back end code and serves the response coming from android mobile app
We have no way of predicting the future with accuracy.
Then android app on mobile can render the html returned from my servlets
To render HTML in Android, you use WebView (or maybe a third-party library, though that is uncommon). WebView handles lots of stuff but not everything that a desktop browser does. How well that all works three years from now is unknown, and how well it works today with whatever your Web site does is unknown.
or servlets can return the android specific views
No.
so changes are required only whenever i need custom views(htmls or android specific views) for my mobile application
Can you get that to work? Possibly, but the details will depend a lot on what your existing Web site does and what sorts of client-side technologies it depends upon. For example, Android does not support Flash. There are also technical and security issues with interoperating between Java based UIs and WebView-based UIs, though this is a bit better in your case, as you are only hitting one server (I think).
All that being said, I would never write an Android app this way, and I would never recommend anyone else write an Android app this way. I would revise the Web server to have a proper Web service API, and I would write a native Android app that uses that Web service API, not using servlets returning HTML. The primary place where I would use WebView is when I had material that only exists in HTML, typically because I did not create the HTML in the first place (e.g., user-generated content).
Primarily mine question is can I continue to use existing servlets. I don't think its based on opinion. It should be either yes or no
Of course it is not "yes or no". We have no way of predicting the future, and we know almost nothing about the Web site. Your question collected two "too broad" close votes, and that is a reasonable assessment.
Related
I have never made an app before but I’m currently relearning Java with hopes to make an Android app soon. However a key part of my app would rely on borrowing data from another app, namely the Digital Wellbeing app by Google. I essentially want to build an app that will take user’s phone usage data and do cool stuff with it. Is this possible?
I am writing a cross platform app(PC, iOS, Android) in Java. I would like to integrate facebook into this app. I have been trying to find a uniform method to login, since it is a cross-platform applicaiton. So I have been following Facebook's manual login to try an approach that will work on each platform. I am using restFB to handle the interaction with Facebook after I get the access token from the user. That last bit is causing difficulties. It seems the only way for me to get the users access token is to have them sign in from an embedded browser.
Now I have looked at this similar question, but the problem is that Libgdx is not compatible with JavaFX. So my question is: Is there a relatively simple way to embed a web browser into an app that is built via Libgdx?
So my question is: Is there a relatively simple way to embed a web browser into an app that is built via Libgdx?
Nop
We are in the process of looking at allowing mobile devices to view our site. We have targeted 3 phones - BlackBerry, iPhone and Android.
Being new to all this I have several questions.
I am going to assume that what we are really looking at here is the browser capabilities of the devices and not so much the device itself (the device comes into play if we are building a mobile application - correct?)
So, We have an on line auction site in which the front end is build using JSF 1.1, myFaces and RichFaces. We are going to move to JSF 1.2 anyway and this will allow us to make use of Trinidad since it appears to be friendly to a mobile site.
The concern I have is performance. On our current site we allow the user to do a search and the result of that search can be a lot of data returned. Running from a desktop browser there is a wait for result set now. I can only assume that there will be a greater wait for the result set when viewing from a mobile device unless we do something different for these request - is that correct?
So just building a mobile front end is still not going to address any performance issues that we face with the non mobile site - is that correct statement?
Are there any sites out there that are recommended to learn more about how to take a site and make it mobile ready?
Thanks
You could start from http://www.w3.org/TR/mobile-bp/ if you are a web designer/developer you already know everything to design for mobile devices. you just need some info about browser capabilities of your target devices and for that you can have a look at http://tech.groups.yahoo.com/group/wmlprogramming . For basics of web development for iPhone (also for Android ) http://building-iphone-apps.labs.oreilly.com/ch01.html is a good start
I'm working on a large website project that makes heavy use of in-page graphing of data. To make the graphs interactive (the old paradigm was to post data to the server, have the server render the graph as a jpg, then send it back to the browser) we've started building the graphs in Java. It's a smooth system, but the website is still very much computer-dependent.
I'd like the site itself to work as a device-aware web application - switching layouts based on user agent strings to render a mobile-optimized version for cell phones and PDAs. But I'm concerned about the nebulous support for 3rd-party applets (Java, Flash, etc) when it comes to platforms like the iPhone.
So if you were building a web application that could be accessed either through a standard web browser or an iPhone/Blackberry/Palm device, what would you do to still display interactive graphs? Is there a workaround for using Java on the iPhone? Is there another platform we should pursue all together?
If you want to support more browsers, you may want to look at using Javascript to help decide what to do.
You could generate the graphs using the canvas element, and if the browsers doesn't support that element then you could use a Flash app, and if that doesn't work, have the graphs developed on the server and use the <img> tag and just refresh.
This third approach could also work if the browser doesn't have javascript enabled.
This way you can handle the various situations and get away from having to run Java in the browser.
The iPhone and Android browsers support HTML5 features such as "canvas", which you may want to look into. The browsers on BlackBerry phones are somewhat behind the times - they are finally releasing a WebKit-based browser for their upcoming 6.0 OS but all of the current in-market devices are quite limited in terms of browser capabilities. For those devices you're probably best off just using a static server-generated image.
I would use a JS charts library and gracefully downgrade to images when you detect an older browser.
I have read the Blackberry documentation and it is possible to push a notification from a webapp. I am planning to create a Blackberry application that compliments to our webapps. But I am still left in the middle whether to develop a webapp or native Blackberry app. I have also look at how a webapp runs on Blackberry browser and it looks smooth.
From your experience does the native app offer something that the webapp doesn't? Bonus question, is Facebook and Twitter app on Blackberry a native app or a webapp? If it is a webapp, is it possible to make a launcher for the application on Blackberry?
Thanks for your help.
Facebook and Twitter are on both types. The web apps are just a website formatted for a small screen so anything you do in say asp.net will show on a blackberry web app if you program it to. The native app just feels like part of my phone. You can save data on the phone so if your app is a relating to news or something that would be stored I can read it offline or slow connectivity (camping, rural areas, etc...). It can also interact with other feature that blackberry offers such as contacts, email, media player, etc...
If you would like to save anything for the user to view without pinging the internet a native app would be preferred.
It's possible to create a launcher but I haven't created one so I'm not sure of the details. I would assume it's just an app that opens the browser to your URL.
One more thing about a web app would be if your application stores users settings (twitter auth key, etc...) they would need to be stored on your server and not the users phone adding more expense and maintenance.
Good Luck.
Widget is not supported for device software less than 5 , you combine both of web and native development by using browser field ,but you need to consider that its Java Script support is poor
Let's not forget that the blackberry browser is really bad as well. I don't know any BB users who would want to use a web application because of that.
When it comes to native apps, you have some choice however and you are not restricted to java (depending on which OS version you want to target). In addition to the mentioned Java, you can use Widget (link for resources) that behaves like a native app, but can be accessed like a web app.
I was just at innoTech and they had a whole session on this topic. But instead of recaping it let me just post the funny video they showed at the end which sums it all up.
Mobile Dev Rap Battle: Native Code vs. Web Apps