Which will be the best way to adapt an web app running in Express to mobile? - node.js

I have make a simple web application in express (Node.js) with ejs as a template/view system.
Very simple. For some reasons I need to make that app working on mobile devices just to have some push notifications: chrome notifications works great but some devices (android) have this feature blocked by default also IOS blocks chrome notifications
So the only way is by converting this simple web app into some kind of mobile app. Ionic look's great but you need to adapt your view tags and code..also I don't know if you can combine it with express.
Which will be the best way to adapt an web app running in express to mobile?

I was currently solving the same problem for my new problem you can Convert your Web App to a Mobile App with Apache Cordova , specifically using the Ionic framework, you won't change much on Server side(node.js), however few change as to be made on angular js and very little on view to adapt on ionic design view which very similar to bootstrap tags

Related

How can I create a mobile applications which react that can also serve as a website

I just finished my JavaScript course and I understand pretty well how things work.
I have started my React journey with a project in mind
So I want to create a mobile application using React Native and I also want that same application to be a website with domain and url since I want the website to work with with Google adsense.
I'm a little bit confused about things cause I want to use mysql database, node for back end and React for the front end, but I don't know if this is possible to just create one application that work as both mobile app and a website.
Thank for your assistance and advice in advance.
A way to use practically the same code for a web frontend and mobile app is using tools like Capacitor. It make it quite simple, and also allow you to use some mobile native API's.
Here's how to integrate it with react js Using Capacitor with React

How to build desktop App using electron

I have a website which I build using Angular as frontend and NodeJs as my backend with mysql as the database. I want to create same version of the website as desktop application using ELECTRON, Am new to electron, Can someone guild me on how to build this desktop app. also do not forget my database which in mysql.
With Kind Regards,
It would be good to know what kind of web application you have and what you're trying to aim with the desktop application.
One solution could be to just embed your web page in the desktop application, inside a webview.

Moving from ExpressJS apps to ElectronJS apps

I'm trying to understand the transition from Web Apps in Nodejs with Express to making similar apps on the Desktop with ElectronJS.
The thing I can't understand is how you change a view, for instance in Express if I have a basic CRUD app I have an index controller and view and a create thing controller and view, and I can switch between them my clicking links renders in the browser via Express.
How does that work in ElectronJS?
Am I supposed to run Express within Election? Is Electron somehow the Routing framework.. or do I have to drop that way of thinking all-together and use something like AngularJS or ReactJS?
You have to understand why we use express first. It's a server that reads http requests which in ElectronJS doesn't make sense because you can directly communicate via IPC. So, no you don't run express in electron. And think of electron as a packaged nodejs that ships with your app. It's not a routing framework or anything. It's literally nodejs but with the ability to talk to Chromium as it's view where you can write HTML, CSS etc.
And lastly, yes, you can use whatever client library/framework that you'd use on your web app in electron too.

Native apps, Web apps communicating with same application server

Hello guys i was learning web developments and have a simple question. If i built a e-commerce web page using node.js and ejs template engine and everything works fine. The next decision is to build a native app for the same e-commerce site either android or IOS. I want the native app to also communicate with the same application server designed in node.js. Do i have to redesign the application server?
My approach or thought:
Native app will have to consume data either xml or json. So i will have to change the business logic of my endpoints. And if i do it this way, i will also have to change the way the web ui interacts with the application server and it also has to consume json or xml response using ajax call. Is my thinking or approach on the right track? But if using node.js, should i avoid the template engines?
Yes, you have to redesign the application server logic by exposing API endpoints. As mobile apps (iOS/Android) will interact with the server using these API endpoints, via JSON. And this will affect your web page also, as everything thing now has to be done via AJAX calls.
Best practice is to built a single page web application using Angular or React.
That way both your mobile app and web app would behave almost the same.

Mobile app with Node.js backend - What framework to pick for client-side dev?

I'm planning to build a hybrid mobile app,
I have already progressed pretty well with the server-side using Express 3, and PAssport for authentication.
Now I need to make a decision on what framework or library to use for the clinet-side.
I was wondering if I could get some recommendations and perhaps pros and cons of going with frameworks like
Sencha Touch, JQuery Mobile, Phonegap....
and if there is anyother ones that you think it's worth considering please mention them here,
Thanks for any pointers or advice
JQuery Mobile and Sencha Touch are JavaScript libraries that will let you create an HTML5 application that looks like a native application. Cordova/Phonegap lets you wrap your HTML5 app in native code and provides a common JavaScript API that gives you access to native functionality, like taking a picture with the camera or getting the users Contacts. Another benefit of using Cordova is that it creates native applications for you using the same HTML5 app, so you can publish these files to App stores and increase your distribution. With a JQuery/Sencha Touch only app, you can't distribute on app stores because your hybrid app is simply a website (so, I guess it'd only be a mobile app.)
There are hundreds of blog posts comparing different JavaScript frameworks like Sencha vs jQuery vs Dojo, so you should just go off and do some of that reading. Personally I would suggest Dojo as I think it is the most powerful and enterprise ready framework, but it can have a steep learning curve. One thing I like about Dojo though is the build system, you can pick and choose the modules you want so that you don't have to end up including an enormous .js file like JQuery. I have no idea if jQuery can do this, but a lot of user apps I have seen that use Cordova and JQuery end up including all of jQuery and then jQuery mobile.
If you want to access native device features and/or package the web app as a native app and distribute it on the stores, you should use one of those JavaScript frameworks in combinations with Cordova. (Cordova is the new name for PhoneGap.) Phonegap/Cordova is not really used to build mobile web apps, it's used to extend the capabilities of mobile web apps and allow them to access native device functionality in a completely cross platform way.
Ionic is a new framework available for making hybrid apps that I am liking a lot so far. The framework is built with Sass and AngularJS on top of PhoneGap. Ionic just handles the front end so you still build your app with PhoneGap. I found that since it uses AngularJS your javascript code ends up being a lot cleaner and you will save development time making your app slick compared to what you would have to write with jQuery. It also has some beautiful UI elements. The ionic team has done a lot of speed optimizations with the framework so your app will feel more native than your typical hybrid app built purely with PhoneGap. The framework is still in alpha but I have been impressed with it.

Resources