Can JavaScript be used entirely to make a SQL querying app? - javascript

There's a specific app that I want to make, and I was wondering if I can use JavaScript to code it entirely.

There are a number of frameworks out there that let you write your code in HTML, CSS, and JS and then compile/build apps to native devices I for instance Apache Cordova or Phone Gap do this.

Choices are countless. Try Cordova for hybrid app development.

You're most likely thinking of a single page HTML5-based "app".
(though it's arguably not an app, it's just a web page).
These are often built using frameworks such as Angular, Backbone, or Ember.
Watch out, there's still constant debate on the merits of HTML5 vs. native apps.

Related

Can electronjs be used for websites

I'm offered to build a project, a web application, or basically a website. But the client prefers that I use electronjs to develop it.
But as far as I know (Correct me if I'm wrong), electronjs is for building cross-platform desktop applications ONLY which can run on any OS like Windows, Linus, Mac, etc but not on a browser via URL. Since it uses HTML, CS, JS, or basically the browser's language, it may have confused my client to think that it can be used also for building web applications.
So my questions are:
Can I use electronjs for building a web application?
If yes, is it wise to use? Or building it in reactjs is better?
You are right. Electron was developed for building standalone desktop applications. It bundles a node.js server with a chromium browser to give the feeling of an application but of course uses web technology.
That said you can of course do a lot of things electron can by using a node.js server. But a lot of things - especially clientside file manipulation, or playing around with windows is than limited.
On the other hand you can build an electron application that accesses an online Server to retreive data or display webpages.
I would say no. Electron is used to build cross-platform desktop apps, and is not generally used to build websites. You could probably do it, but this is limited to very special circumstances, I would advise against it. You're probably better off using a framework meant to develop Single Web Apps, like React or Vue.
Like #Torf said with electron it's possible to have a nodejs application run in it's own chrome browser window (which looks like it's own application). But it's just a "website" which is displayed. So you can code a simple site and use it as website, windows application etc. it looks the same on all platforms.
What the hell then code-server does?
https://github.com/cdr/code-server
The fact that it is not yet generically implemented, does not mean "no".
Code-server is literally example of electron app that can be run inside a docker container, but have it's gui - as it is - rendered in a webpage.
Yes, not yet generically done, but is exactly possible.
No, it doesn't make sense to develop a website in ElectronJS. ElectronJS compiles and builds to formats that are not web-browser compatible. Like exe, zip, dmg, deb, etc.
You can develop a website in languages/frameworks which are designed for this purpose.

Scheduling App with Node JS

I was thinking about building a scheduling/time tabling app with Node JS that is primarily used in/as a mobile native app. Im certain I have worded the specifications wrong, but I was hoping for some guidance on where to start researching:
Any useful libraries/services
The general way to go about using Node JS for mobile
Anything you might think it useful
Thanks!
I am assuming you want to launch this mobile app natively on multiple platforms (IOS/Android/WP).
If that's the case, you can directly go for hybrid app frameworks which will help you write once and deploy natively on multiple devices. The best two hybrid frameworks that I found are React Native and Xamarin ( different people can have different opinions about different hybrid frameworks )
React Native will give you the opportunity to use JSX which is very close to Javascript. While in Xamarin you'll work purely in C#.
As far as your question regarding deploying natively via node.js is concerned, I don't think it's possible. If you read this blog post. It says the following.
Technically, you can run Node on Android, but not iOS. This is because Node uses Google’s V8 JavaScript engine. The V8 engine compiles JavaScript to a native code before executing it, a process known as Just-In-Time (JIT) compiling. iOS does not allow JIT compiling unless the device is jailbroken which why Node applications cannot be deployed native on iOS.
Obviously, any mobile strategy that ignores iOS is doomed to fail
So my suggestion would be to use one of these hybrid frameworks for front end and build a node.js based backend service where you can write a REST API to retrieve results for calls you make from the frontend.
There are tons of tutorials out there regarding how to build REST API's in node.js. this can be a good start.

Database access from UWP app in HTML5/JS

What is the best way to use a database (be it Redis, SQLite, WebSQL or just about anything actually) from a UWP app being developed in HTML5/Javascript? For a C# or VB.NET app I guess it would be quite easy, since you can just use stuff like this. But how would I do that for a JS-based app?
I guess one option would be to do a wrapper C# project and use that as a data layer (since I believe my JS/HTML project can invoke methods in my other projects in the solution). Is that the best/easiest way or are there any other really good options that I'm missing somehow? It feels a bit clumsy, since I would prefer a solution with 100% Javascript in this case.
You could use IndexedDB in UWP javascript apps.
You can easily find samples online (here for example) and relevant MSDN documentation is here.

Providing no-js fallbacks for clientside MV* frameworks

I just recently got introduced to MV* frameworks and have taken a chance to try out Ember.js with the TodoMVC app tutorial they have on their site.
I was considering using Ember for one of my upcoming projects (a Ruby on Rails CRUD app, similar to Twitter in some of the functionality), but I'm still a bit confused and before I take a final decision I would love it if somebody could clear the following concerns:
Is it a good idea to use such an advanced framework as Ember for a medium-sized multi-page CRUD app? Will it improve development time and maintenance compared to an interactivity layer built with jQuery's DOM manipulation and AJAX capabilities? Or is using Ember (and the like) only good when developing complex single-page apps (e.g.: Grooveshark)?
Considering the app will be developed using Rails, and assuming Ember will be used, is it going to be possible to offer a fallback with basic functionality for browsers with JavaScript disabled and/or for search engine crawlers? Will it require code duplication or other dirty tricks? Do you know of any technique that can be used to achieve it?
Will it be possible to adapt the website for mobile browsing (using only CSS) with valid results, or will the overhead imposed by running Ember on the phone make it hard for the device to render the website in a way that keeps it responsive?
We're in the middle of a pretty big Ember project right now, so here are my thoughts on your questions.
We've found Ember to be really productive for creating rich UIs for our single page app, but I don't know that it's going to be that much more helpful if you're creating an app designed for traditional multi-page (viewing pages, submitting forms, etc) layout.
I think this is the clincher - Ember is completely JS-based, so if you need to support browsers without JS, you'd basically have to write a parallel application. If this is a hard requirement for your app, I think Ember (or any MV* JS framework) would be out of the question
We've had very few performance issues on mobile - our site is fully responsive and renders on everything from Blackberries to the latest Chrome on desktop with good performance.
#Scott Rankin, has addressed most of the concerns with going with the Pure Ember approach. I'll add one quick way to make this decision.
Go with Ember/MVVM if the application is behind a login. Then you don't have to consider search engines, as the content is generally private and not supposed to be indexed.
For SEO you have to build atleast part of your content such that it is indexable. A good example of this is the Discourse application. They use Ember but also send down some generated html along with the app html slugs, so that search engines can index them. You can read about their approach here.
We have a different approach which can be seen as a fall back: We pre-render a static version of each page in the application (daily scheduled task). This static version is stored on the server as HTML file. Whenever we sniff as spider/ robot user agent, we deliver that version.

Mobile Development Using Only HTML, CSS & JavaScript

I want to introduce a class to mobile development. In the past, the long installation process for using things like phonegap deterred many from completing the assignment, so this time I want to keep things as simple as possible.
My preferred languages are javascript, css, and html. I know I can create a mobile version of a website using these languages, but that would go through a web browser. Is it possible to build an app purely using these languages and install it on a phone, with an icon and everything?
You should look into jQuery mobile. It's a HTML5 Javascript library for easy app creation: http://jquerymobile.com/ It should be good for students to use for assignments.

Categories