Not sure if this is the correct forum for my question, so please move it if necessary.
I’m not a rock star developer by any stretch of the imagination. I’ve built JSP and GWT websites backed by MySQL databases. Around 2005 I developed an API that coalesced various mobile phone contract data streams into one coherent data stream in real-time. I sold that and made enough money to be able to stop making bloody websites for financial companies and concentrate on learning how to make things I’m interested in. I’m not rich. At all. I have traded income/lifestyle for having the time to learn how to program desktop applications using JavaFX and 3D computer games using Java and LWJGL. It took me a long time to learn how to program in Java, to pick up JSP and GWT database driven web applications and a couple of years to learn JavaFX and LWJGL. Like I said, I’m not a rock star developer. In fact I’m a bit slow and I found everything I have learned how to do quite challenging. Perversely, this is why I enjoy programming. I find it difficult.
I’m describing this to try to give you an idea of my ability as a programmer now, so you can maybe advise me on how best to proceed.
I am focussed on building an application that allows people to create and play tabletop style role playing games together via the internet. Nothing new there. It’s just what I’m interested in doing, combines all the skills and experience I already have and is pushing me to learn new skills and areas of Java that I haven’t used before. I can do this with Java. I can do this on the standard internet.
I want to develop this on the SAFE network.
I’m new to the SAFE Network and I am gradually working my way through the background material. The support for Java development seems to be in its infancy - which is cool, though a little frustrating. The more comprehensive ‘how to build an app’ tutorials and demos are all using languages, frameworks and so on that I have zero background in.
So I’m asking for some advice: Should I carry on using what I know reasonably well and wait for a Java API while building up my background understanding of SAFE Network or try to learn how to use one of the new to me languages, frameworks, or whatever that seem to be more developed than the Java API?
I’d wait for the Java bindings if I were you. Sounds like they’re quite close to release, and actually working as of last week. But in the meantime I think studying the API documentation for other languages is a good idea. They’re all supposed to be the same.
Re: Studying the API documentation in other languages, you’re suggestion makes sense. I am a bit slow though. I find it hard to fully understand without examples written in Java. Also I tend to learn by doing. Good advice though.
I agree with @drehb that if your preference is Java, stick with that because things are falling into place. I don’t see an advantage in starting learning a new language unless that’s something you actually want to do.
There are probably people here with enough understanding of java and the SAFE API to compensate for the lack of examples (although check the repos of the Maidsafe devs working in that area and in the safe_app_java repo in case it has some test code in java etc).
The main learning for you will be the SAFE API and there are a few of us who will help you with that.
Glad to have found another non-rockstar Funny thing is that in my youth I was a very minor guitar playing rockstar!
I’m more than happy to do the hard work myself, I’m just old enough to know that asking for help is a wise way to progress.
My general plan is to build my application as a Java desktop project - which is where I am now. Whilst doing that I’m trying to build up an understanding of the SAFE Network. Then later, build a version running on the SAFE Network. I guess my fear is/was that the Java API doesn’t appear as a mature API or just hangs around as a poor second cousin to the existing, newer web application languages or frameworks that seem to be first class citizens here. At least that’s my impression.
I’m not sure which devs - they get mentioned in the Dev updates sometimes, but we can ask @krishna now: can you point us to the repos of anyone who might have some sample code (even tests) which use the safe_app_java bindings.
API questions are best asked here on this forum.
I sometimes make sounds with a harmonica
Asking questions is always fine IMO, people don’t have to answer, and the skill is knowing how to make best use of the asking, and being willing and able to look for another way when the help you wanted doesn’t appear. Those are the skills I was referring to.
The SAFE API is the same for all languages and platforms with only slight deviations, so no issues there regarding Java. There may be better supported platforms, or horses for courses, but that’s a more general issue and not really to do with SAFE, at this stage anyway. In time the more popular languages will have more people writing tutorials, creating tools, frameworks etc, and the less popular languages will fall behind. But right now there’s not much in it.
I’d say it’s better to stick with the Java API. Although we’re focusing on Android and mobile platforms, the desktop Java is definitely supported (the differences from Android APIs and JNI are minor). The bindings should be close to completion (@lionel.faber might provide you with more details here), but unfortunately there is not a lot of examples/tutorials – just yet. There are some examples of the API usage though, in the form of unit tests, so you can try to follow these for now if you’re eager to try using Java to build SAFE Apps
Hey @prtscr! As mentioned above, sticking with Java is the better option. And adding on to the information that has been shared, here’s a sample application that we’re building to demonstrate the use of the Java APIs on the desktop platform.
Safe Todo Example - Java
This is still a work in progress, but, it should run you through the basic setup and authentication process.
Please reach out with any questions. We’ll be glad to help you
Had a quick scan through the code and this is exactly what I need in order to relate the SAFE API documentation to a Java application. There are a couple of libraries in there that I’m not familiar with.
The application is built using the MVVM design pattern. This library provided us with necessary components to do so.
As part of the authenticaton process the authenticator (in the browser) would open a new instance of the application with the required Auth URI. This library was used to maintain a single instance of the application and to send the data (in the URI) to the first instance.