Im looking to code a simple point of sale system using HTML as a progressive app, in other words, creating a web app that doesn't run in a browser.
How would be the best way to get an EPSON printer to communicate with the app. I've used JAVAPos API in the past for communication. Is there any way to get JAVAPos to work with a web app?
Since you specifically say that you're interested in developing something that runs outside of the browser, but you presumably want to use web technologies like HTML, CSS, and JavaScript, pursuing an approach based on an Electron container, and using a library like electron-usb to communicate with your printer, would seem like the best option.
If you're open to other options, it is possible to write a traditional web app that runs within certain browsers and talks to USB devices, using the WebUSB API.
Another approach would be to write a Chrome App that accomplished something similar, but that's deprecated if you don't plan on running on a Chrome OS-based computer.
Related
I am currently on a research understanding the whole buzz around some technologies that claim that they deploy themselves as cross-platform apps once you write your code in HTML5/CSS3/AngularJS/Whatever client side techonology.
I understand those technologies provide you with a bridge to the native-side of the OS you are running on, but I still lack some real important information regarding them.
Do all those PhoneGap/Ionic/Cordova just wrap your client-side code into an application? Is it the same as using the web-browser to get to a URL but with only some native-like additions(Camera/File etc..).
Do those technologies just connect to your website that is online using DNS? Or is the "Website" you are building does not sit on a server but only on the local OS? Can they run that application offline?
Besides the native additions you get with those kind of technologies, why bother developing with them when you can on the other hand develop a responsive website that can also work on desktop?
Can you connect to a server-side using Ionic/Phonegap? Let's say I have an MS-SQL Table I want to communicate with- is that possible?
I really have a hard time understanding what all those technologies are any good. Still, it is growing in popularity. Thanks for any light on that matter.
Do all those PhoneGap/Ionic/Cordova just wrap your client-side code
into an application? Is it the same as using the web-browser to get to
a URL but with only some native-like additions(Camera/File etc..).
They wrap your html, css and javascript code and provide a javascript API to use native features
Do those technologies just connect to your website that is online
using DNS? Or is the "Website" you are building does not sit on a
server but only on the local OS? Can they run that application
offline?
You should have all the html, css and javascript inside of your app, if you do it this way the app will work offline.
You can have it online too, but it won't work offline and have some problems.
Besides the native additions you get with those kind of technologies,
why bother developing with them when you can on the other hand develop
a responsive website that can also work on desktop?
If you don't need any of the native features phonegap provides, then do a responsive website, the idea of phonegap is fill the gap between the browser and the native apps, some day the browser will have access to all the native features and phonegap will die.
BTW, now phonegap have a desktop platform, so you can make it work as native app for phone and still work in the browser
Can you connect to a server-side using Ionic/Phonegap? Let's say I
have an MS-SQL Table I want to communicate with- is that possible?
Sure, you can make XHR calls to the server to get a XML, JSON, etc with the onlyne SQL database, you can do a POST too, and upload files.
So I am writing a cross-platform (so far plans for Windows and Ubuntu) application for both the web and desktop.
This application
is expected to at times be moderately graphically intensive and perform a substantial amount of file IO. I am writing it in Dart. Which may seem like a
"funny" choice given the circumstances, however I did not want
to deal with any heavy API's or have two code bases (NaCl and GCC with two different libs).
In short I am using Dart to interact with an HTML web page, and noticed the Dart VM does
not interact with a webpage unless you are in Dartium. But I want a "desktop application" as well as a web application which eliminates Dartium as a choice, so alternately I plan to use a Qt Webview to make it look like a desktop app, but what I am wondering is would it be worth it to go through the trouble of embedding the Dart VM into my app? In doing so would it easily enough to get the Dart VM (running a dart script) to interact with the page in the Qt Webview (I am a bit new to Dart)? Thanks for reading!
Dartium will eventually be merged with Chromium, allowing your DART applications to run inside chrome directly as a web technology.
Once that merges, you can take advantage of the new Chrome Apps which allow you to have a desktop version of your web technologies. As such, you won't need to use Qt Webview, or embed dartVM into your native application; just use Chrome Apps.
~Main
I am presently started working with mobile development and would like to know which is the best way to work with Html,css and jquery/Javascript for WP7.
As I have seen couple of things on the web as Phone Gap,Jquery mobile and Appcelerator Titanium
1.I have some of the problems actually this is not a problem but as PhoneGap gives a starter template with C# solution.
But I'm working on VB.Net.I'm unable to work with the C# solution as If I convert to VB.Net the entire starter template it is not working.
2.Just now I had a look at Jquery mobile there is no specific documentation mentioned how to use it with emulator in WP7.
Can anyone show me the links where I can start with the basics of Jquery mobile with WP7 emulator.
3.Do you think there is any other best way so that I Can work with jquery, html and css in WP7.
It sounds like PhoneGap is your best option here. Right now, it's the best way to deploy an HTML-based application on Windows Phone. The main thing that PhoneGap gives you is a bridge to the phone's hardware (things like volume buttons, vibration, etc.). It also gives you an easy way to wrap up your application into a package that can be installed like a real native app.
By themselves, other frameworks like jQuery Mobile, Sencha Touch and Kendo UI don't provide hardware access or the ability to deploy the app natively. They are purely UI frameworks, meaning they provide the interface widgets you'll use to build your app but little else. Generally, with these frameworks, you need to host the app somewhere like a website and access it through the browser.
Assuming you're running a Windows machine, you could host the app locally for development using Internet Information Services (IIS). Here's a guide to setting up a site. Then you could open the emulator and go to http://localhost to interact with your app. That would work, but it would be clunky.
The ideal scenario is to use both jQuery Mobile (or another UI framework) and PhoneGap to create a nice-looking, natively installable app.
What I'd recommend is trying to get PhoneGap set up in a VB project. From what I've seen, this shouldn't be too difficult. There are probably some details to work out, but mainly it looks like you need to copy the www and GapLib folders over. Then right click on References and browse to the GapLib .dll. You'll also need to get the MainPage.xaml and MainPage.vb files set up, but they probably just host a web browser control, so this should be straightforward.
Migrating the pieces into a new project should work a lot better than trying to convert an existing project.
If you post specific issues that you run into during the setup, I'm sure you could get them answered quickly.
I'm trying to make a multiplatform offline webapp using PhoneGap. I know my html and css, but I'm not altogether familiar with the full capabilities of JavaScript, and I've never made a webapp before, let alone tried to use phonegap to empower it.
Right now, I have the main index.html that phonegap sets up for you, but now I'm uncertain as to how to proceed. If I want a button to take the user to another page from the main page, should I make a second html file and literally link between them, or is this a lot more complex than that?
Also (get ready for a possibly epically stupid question from a total beginner):
Do web apps have to be online? I'm really not clear on whether they function like normal websites in which they need to be hosted on a server, or if they can be packaged up and downloaded just like normal native apps. Please help!
Thanks.
Oh, and btw, I'm working in Xcode with the phonegap addon thing....I'm trying to get it running on the iphone before I move on to android.
Although the other answer helped me at the time, I thought I would add a more complete answer now, five years later, to my own first StackOverflow question.
To start with, a "web app" is the same as a "website" in a technical sense, and yes, they have to be hosted on a server in order to be accessed through the browser...just like every website. The only distinction is that a web app is generally a more dynamic and complex sort of website, involving JavaScript and AJAX. It would be misleading to call a simple website like this one a "web app," whereas Facebook is definitely a web app. Basically all web apps are websites, but not all websites are quite exactly web apps.
However, it only has to be "online" if you want it to be accessible anywhere from a browser via http. If you're making a Cordova app like I was at the time, that's not relevant. If you only want to run an application locally, you can do so with a local server like Python's SimpleHTTPServer or the one webpack provides, or any other alternative, including a server you write yourself from scratch.
As for the primary question about having multiple pages, yes anchor elements like my link are the standard way of connecting pages. To link among your own pages, you would have multiple .html files, and you would create a link with an href like href="myOtherPage.html", where that file is contained in the same directory as the file for the page linking to it. Alternatively you could set up a single-page-app where JavaScript loads new page content without the use of anchor elements-- in that case multiple .html files are not needed. Frameworks like Angular and React are helpful for accomplishing that, but it's by no means necessary.
In a typical web app, most of the time you would just need to create a link as you would if you were creating a link on a website. Also, Web apps can be developed via a local environment (research Mamp/ or Wamp) depending on the dependencies in which your app require.
I am contemplating buying an iPad and am wondering what options I will have for developing an app for personal use ... specifically whether I will be able to do it as an offline browser app. The app currently exists as an Android Java app; it interacts with a large local database (about 3MB) and displays images and text drawn from a very large pool of resources stored locally (about 2GB).
My immediate questions are:
How would I get the files (html/javascript, database, images and text) transferred into the iPad's storage from a Windows PC? With Android this is a simple matter of hooking up via USB and using Windows Explorer. Googling suggests that for an iPad I might have to use an app on Windows called DiskAid, but this costs $25 which seems a bit steep for my simple purpose. Are there free alternatives?
Once the files are installed on the iPad how would I run the html app? On Android this appears to be a matter of keying "file:///sdcard/MyBrowserAppFolder/mybrowserapp.htm" into the browser's address box. Does th iPad browser work in a similar way.
There are two basic kinds of applications that run on iOS.
Mobile designed web applications that are hosted on a server and accessed through Safari or another browser.
Native applications built using Xcode and usually objective-c.
For the latter, you could use the phonegap framework to build an app using existing html and javascript.
My personal advice is to invest the time to learning how to code this up using objective-c. Depending on what format your db is in, importing the structure and data might be trivial. It will take an investment of time, but doing things using the native tools is the best choice for iOS development in my opinion. I was in the same situation (PHP, VB.NET and Javascript developer) and just decided to take the time and learn to do it right. This was a great decision and the development time of a simple to moderate application takes very little time now.
Safari on iOS does not support the URL's of type file:// natively. So you either write your own app, purchase an app or use something like a local web server after jailbreaking.
Alternatively, and if you can verify that the app you have mentioned does what you want to do, then maybe $25 is not so much of a price. Depends on what your time is worth :)
However there are cheaper apps around that allow to transfer and read html via wifi and usb. (Not sure I can name them here)
The USB transfer aka iTunes Filesharing is a standard function that a developer can enable in the info.plist of their app. Many apps use this to transfer data between Computer and iDevice.