I came across spring for android, which claims to provide Spring Framework that aims to simplify the development of native Android applications.
If anyone has already used or explored this framework, please share your thoughts about the scenarios or situations where this can be beneficial over standard android framework (which is somewhat like MVVM).
To sum up, I am looking for additional benefits provided by this framework.
I investigated spring for android and my analysis is :
It Does not provide Inversion of control. Provide popular spring tools like RestTemplate, Social Integration for Android .
Spring provides parsing framework as well, thought not as efficient as jackson.
more yet to be added, keep your finger crossed.
this means whenever you want a ready made solution for RESTor Social Integration(fb/twitter) along with a parser with normal capability, spring for android might be a right choice for you.
if someone will post more accurate answer, i will surely accept that.
Related
I'm a web developer and am thinking of digging into mobile app development. The languages I know so far are PHP, Python, SQL, Js, HTML and CSS, all of them pretty well now. Currently I'm starting to dig into Java, as it's the language to be used for native Android App Development, as far as I've learned. Interestingly, I'm coming across posts (also in this forum) saying that Java can also be used to develop iOS - compatible Apps, while other sources comment that Apple is completely against cross-devs, and that you should develop iOS apps using Swift when it comes to the native choice and optimal UX. So I was wondering about the answer in this forum; can you develop iOS apps using Java or not?
Post is a few months old now, but I figure someone with a similar question will probably find this with web search, so this reply is for them. (Disclaimer: I wrote Java professionally for about five years, and I grew up when Java was supposed to be the future.)
If the question is, "Can you write Java code and run it on iOS?" then the answer is, "Technically yes, but you almost certainly don't want to."
It requires jumping through all kinds of hoops and sleight-of-hand to make it work. The project linked in a previous answer, Codename One, is a pretty heavyweight framework and the kind of thing you'd only want to use if you were heavily committed to a Java codebase already.
There are advantages to knowing Java in 2022, but cross-platform mobile development isn't one of them.
Some reasons why you might want to learn Java:
Developing on Android. Android now supports/recommends Kotlin for new projects, but Java was the sole first-class language on the platform for 10+ years, so it's advantageous to be able to read/write/reuse Java code and libraries.
Using long-standing big-data tools (spark, hadoop, neo4j, etc.). While this domain has increasingly moved to Python over the past 5-7 years, there's still a lot of production Java code that someone needs to maintain. [Edit 3/31/22: See also the Apache http server, whose name never sat right with me because as far as I know, the people who wrote it aren't Apache.]
Stylistic similarity to C-family languages. Java can be a more intuitive introduction to C-style languages than jumping right into, say C++. These days, though, I would recommend C# over Java since it's used in more domains.
Continuity with some JS dialects. React code in particular is full of Object Oriented(tm) design conventions that are very strongly influenced by Java practices, and those design choices in turn have influenced changes in the JS spec. So being familiar with Java conventions can help make sense of that stuff. It can also help you identify which of those practices are bad ideas so you can avoid them in JS. [See footnote 1.]
As far as reasons why you won't see widespread Java usage outside of those legacy domains, I'd say there are a lot of good reasons people have moved away from Java since 2006 or so:
It's incredibly verbose, and requires a lot of esoteric knowledge about implementation details to write code that runs efficiently. This is the kind of problem that languages like Scala and Kotlin have tried to solve, while retaining compatibility with the JVM platform for ease of migration.
The JVM platform itself introduces substantial overhead, both in resource usage and integration complexity.
Changes in approach and policy since Sun's acquisition by Oracle. This is related to licensing issues (see Oracle v Google), as well as complexity/feature creep, which has given rise to compatibility issues across codebases.
Emergence of viable alternative languages in the 2000's and 2010's.
Widespread adoption of virtualization technology has yielded alternate ways to solve the compatibility issues that Java was designed to address.
It's ironic, since the motto of Java used to be "write once, run everywhere", but that's the way things go.
Footnote 1. Actually, this is kind of a trick question, since most commonly accepted Java practices are bad ideas. This can be demonstrated by the fact that in 1995, object-oriented Java applications would run in a typical web browser, whereas 27 years later Java is considered too heavyweight for that purpose.
Postscript, 3/31/22: This is my first and likely only Stack Overflow post. If you want to read more like this, check out my github: https://github.com/ubuvoid
Yes you can.
One tool used for this is Codename One.
https://www.codenameone.com/
Also for more info on this subject, feel free to consult this thread:
How can one develop iPhone apps in Java?
Yes, this is possible. https://github.com/Anuken/Mindustry is an open-source RTS game written in Java. It has an iOS port that is compiled via an open-source fork of RoboVM.
IOS works on objective C and Android works in Java and Kotlin. I don't know how much some conversion tool can help you to achieve all the functionality. So in my opinion answer is No.
Hybrid Application development can help you. You have one source code that will run in both platform. You have to develop the app again.
First: Java is used in more Domains than C#. Needed information because C# has no way to get over with ONE UI to Desktop, Mobile and Web.
By the way, the recommended Solution is CodenameOne or - if you want to implement your App with JavaFX - use Gluonmobile which is using the GraalVM, an ahead of time compiler for IOS.
In both Cases you have access to Hardware of the Device for Android and IOS because there is an abstraction which helps you with implementations for both Platforms - Android And IOS. Write in this Case one App and compile for both worlds.
I want to develop a real-time chat application in Android like WhatsApp or telegram
for the all-purpose client should connect to the server via WebSockets and even
offline or online has to works fine. I decided to use Android architecture like MVP, MVVM, and MVI, but I'm confusing which one is suitable for my app
Can anyone help me to choose one of them?
And my second question: is it ok to use WebSockets for all APIs or it should better use WebSockets and REST APIs together?
Thanks for your help
There are quite a few patterns out there for app architectures. The most well known are the classic three-tier architectures such as:
MVC: Model-View-Controller.
MVP: Model-View-Presenter.
MVVM: Model-View-ViewModel.
All these patterns represent the main similar idea — to structure your project’s code in a way that it is separated by the different generic layers. Every layer has its own responsibility. That’s why your project becomes modular: separated code parts are more testable, and your app is flexible enough for continuous changes.
MVP is strongly recommended because a lot of developers are using it now. Even, Google also provides its best practice example on Github. You can see full document here.
I strongly recommend you use MVVM because Google has adopted this approach for Android Projects recently. You can find a lot of examples about it. Especially LiveData and ViewModel mechanisms have a lot of advantages in terms of separation of concerns and managing the relations between ui and data.
Disclaimer. I'm asking this on someone else's behalf and given that I know as much about Android development as penguins about flight, it may be clumsy. In such case, let me know and I'll remove it or try to reformulate.
I've created a web service that's reachable at the URL on the following form.
http://server/Blopp.svc/Store/value1/value2
The back-end part I've got covered but I'm worried about the front-end development. I've got a colleague that's making the app and he's got the rudimentary GUI done. However, in order not to do a lot of convoluted coding, he's heard that there's a certain library for making such URL calls.
What's the name of it? Is there certain other aspects to take into consideration or is there an (almost) standard one that everybody uses?
Please not that the app's functionality is at the moment limited to providing the web service with data. All the logic and presentation is done on the website and not inside the app.
I've never built up an Android app, so I'm asking for understanding if this is a dumb formulation. I just want to help my co-worker and he seemed to struggle with the details.
Is there perhaps a smoother way to make the call to a web service if I substitute the patter of the URL to use query strings? Any other approach that makes it easier for an Android developer? I'm not familiar with the area but I want to make things easy for my team-mate.
There are quite a few different HTTP libraries available and it would really depend on your specific requirements which one you used (if any - you can roll your own HTTP requests using HttpURLConnection) Two of the more popular ones are:
Volley
http://developer.android.com/training/volley/index.html
Written by one of the guys on the Google Play team and part of the AOSP. Very flexible and easy to use however I would hesitate to recommend it as it relies on the now deprecated Apache Http classes in its public API.
Retrofit
http://square.github.io/retrofit/
From Square. Version 2 is currently in late stages of beta. It allows you to define your API as an interface. It has dependancies on their OkHttp library as well. Very fast and also has RxJava support baked in.
I created an Android app. While creating one specific app was an interesting challenge, I'm now looking into creating a group of similar apps.
I'd like to create a group of similar Android apps and then move on to creating the same on tablets and iOS... (anything mobile).
I've considered doing so with a product called PhoneGap or doing a web based mobile app. Both of these options seem less than ideal. Doing the Android app I've been frustrated by Java's lack of control and low level constructs. Moving to something like a web based app seems like the exact wrong direction.
C++ is my language of choice. It has the ability to work at a low level, is highly portable across platforms, and has significant support for generic coding which would be useful for generating a group of similar apps. However, the Android documentation suggests to not use C++ unless your goal is porting existing code or dealing with computationally heavy tasks.
I'm leaning towards using C++ anyway, but are there other options I've not considered?
Thanks
You could in theory write your logic in C++ and then have UI layers on top that make use of it. If you are really comfortable with C++ that might be the way to go.
Almost any other parts (networking, UI, animation, etc) are better off being done in the native language of the platform. Use of cross platform solutions always limits you in some way, and usually leads to an application that is not as good as it could be for any platform.
Well, Google's recommendation to not use C++ is based on the following, I believe. C++ is low level, so you can get extra performance out of it if you know what you are doing. Google makes the reasonable assumption that many programmers do not. It is easier for an inexperienced programmer to do harm in C++ then to get a performance boost.
But, if you know what you are doing, it can help you. UI elements on both iOS and Android are implemented in their main language (obj-c, and Java respectively) so there is not a great way around that, but you can write core logic and other functions in C++ and it will be portable between them (iOS can use C++ directly and Android can use it via the Native Development Kit).
There are a few other options available. The one I ended up using is Appcelerator Titanium but please stay away from it. If your project gets complicated or large at all you will hate yourself for choosing it, as I did. Another interesting one that uses C++ instead of Javascript is Marmalade. I haven't used it though, so I can't comment on it.
A non-free solution that I hear good things about is Xamarin, who have ported both environments to C# and a .NET using Mono. However, you still have to write two versions of your code for the UI as far as I can tell.
We are starting from scratch to develop a couple sophisticated mobile apps. We anticipate supporting iPad, iPhone, Android tablet and Android phones. However, our initial focus will be Android only.
The applications will be used to collect data and send that data to the backend. The whole scope of this project is data collection, data analysis, and data presentation. It's all about data.
What is the right backend technology?
EDIT: Sorry for not providing this info initially. The attraction of Python is the SciPy / NumPy libraries for data presentation and data analysis. I don't think any other platform has libraries that can match these. So Python/Django would seem ideal if there is no problem interfacing with mobile apps...
It will also be nice to use the same technology for the general website and I guess Python/Django is good in that regard too.
I don't see any difference between PHP, Python and Ruby in this case. As I understand, backend is going to be used as a database access layer and for nothing more complex. Am I right? If yes, go with technology you know better.
Why do you want to use Drupal for this task? From my point of view, it is better to use something more oriented on high performance and database interaction. Try Yii, Codeigniter or Fat Free PHP frameworks for example.
Django is a good choise as well because it has wonderful administration interface which is being generated by framework automatically. The only thing you should do is to set up models in your app and enable admin module.
Unfortunatelly, I have no RoR experience so I can say nothing about it except that a lot of people say that it is great.
Python/Django plus SciPy/NumPy proved to be the best option for our project.
The attraction of Python is the SciPy / NumPy libraries for data
presentation and data analysis. I don't think any other platform has
libraries that can match these.
Seriously: Java. You've got ease of use, statefulness and many very very good frameworks. And performance for large datasets is still very very good.
I'd especially recommend the Spring framework and hibernate.