This is my first topic here I wanted to make it worth
Two months ago I have never heard of such framework AngularJS/Ionic or even Typescript
AS I’m Java Desktop/Web developer I don’t have to touch any JavaSrcipt code ( Existing of the great JSF components like Primefaces etc ) also it’s something I don’t like actually I hated JavaScript as I consider it a wired language you can do something crazy there is almost no restriction unlike Java and other restricted languages
Two months ago I was planning to start developing mobile applications but not the old way
in the past I developed some mobile applications for android using regular android Java studio and so on. But now I should consider iOS and other platform which you can’t target it by sticking yourself in Java so at the first I have to do a research and find what my options are
In the beginning I read about developing mobile apps using JavaScript but I found it silly and unreasonable so I dropped the idea
Than I found two options using Java to deploy mobile apps on iOS & Android of course which were codenameone.com & MAF from Oracle. I studied both frameworks and it was so easy to follow the development stages as it was almost pure java with some xml work in MAF.
The problem I faced was there is a price and I believe it’s a big problem not just for me but for many developers so I decided to drop these two framework after spending two weeks learning and coding
After that the magic start when I read about AngularJS and the great tools of Ionic so I decided to start with Angular 2 for almost ten days and after that I went directly to Ionic 2.
It was so easy to learn especially the existing of Typescript which I consider a great implementation of JavaScript the was so close to Java implementation ( Object oriented , Interfaces and etec ) So I started reading about JavaScript and Typescript like a beginner programmer and I completely changed my mind about this amazing language and I believe now it’s the next generation language which will last for a long time in the future taking the begest part of mobile app markets
The greatest thing I found is the amazing community of Angular and Ionic. So I didn’t have to buy a courses or books. All what I have to do is using youtube and Ionic forum and some amazing blogs which have a great resources and a huge sample codes and examples
So when I finished studying the basic fundamentals of Angular 2 I headed to Ionic and start studying Ionic 2 actually I started coding immediately. So I started a chat app project and started working on it
After a month of researching studying and coding I came up with this simple chat app called Connect
I wanted to use many libraries as I’m training myself and solving different problems but after that I found I have got great example of actual coding with Ionic 2
Connect is a realtime messaging app it use firebase as an online backend and using SQlite as local storage and AngularFire2 to do some connection with firebase ( login, signup etc )
There are two database a local one and online one and there are syncing between them
right now I implemented syncing messages and user information so you don’t have to be online every time you want to read your old messages also you send message offline and the app came online it starts syncing ( sending & reading messages ).
I used Events technique inside the app it’s the best way to implements user interface update when message arrived
The backend consist of two providers ( one for firebase and the other for SQlite ) and there is a mediator provider which the view talks to and the mediator start choose the right action direction ( to the online database or the offline one )
I can assure you it’s not perfect but that’s what I could do in a month of knowing Ionic 2
and as I benefited greatly form the great Ionic community I wanted to share the source code here so the other can look at the code and maybe someone find it useful.
There are some comments in the code it explain about the functions so you can read these comments if you didn’t know what these functions do
I have tested this app on Android and iOS and on windows phone ( but not sure what went wrong on windows phone ) I’m still working on it the app work but the SQlite didn’t
The project on github here https://github.com/Blacktoviche/Connect
If you have something to ask about the code please go to the githup repositories post your issues there
I wanted to thank the great ionic community for the great resources I also want to mention some amazing website which I solved many problems by reading their posts
Your first resource must be ionic documentation which explain everything about components and native plugins
Josh Morony blog https://www.joshmorony.com which have an amazing examples you can solve tens of problems by reading his posts
Angular Unevirsity blog http://blog.angular-university.io which has an amazing in-depth articles about AngularJS
and of course the great resource from ionic forum here
After I took what I need from ionic ( I don’t need to be professional ) I studied the basic fundamentals of React JS and now I’m heading to React Native to do maybe the same project using this library and when I finish I think that time I can decide which tools should I dig deep into and use it in the future to start implement actual mobile apps